Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
sequencelengths
0
101
negative_scores
sequencelengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
TODO: emstricten & fix the typing here! `createWithBsPrefix...`
function createWithBsPrefix(prefix, _temp) { var _ref = _temp === void 0 ? {} : _temp, _ref$displayName = _ref.displayName, displayName = _ref$displayName === void 0 ? pascalCase(prefix) : _ref$displayName, Component = _ref.Component, defaultProps = _ref.defaultProps; var BsComponent = react__WEBPACK_IMPORTED_MODULE_4___default.a.forwardRef(function (_ref2, ref) { var className = _ref2.className, bsPrefix = _ref2.bsPrefix, _ref2$as = _ref2.as, Tag = _ref2$as === void 0 ? Component || 'div' : _ref2$as, props = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__["default"])(_ref2, ["className", "bsPrefix", "as"]); var resolvedPrefix = Object(_ThemeProvider__WEBPACK_IMPORTED_MODULE_5__["useBootstrapPrefix"])(bsPrefix, prefix); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(Tag, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ ref: ref, className: classnames__WEBPACK_IMPORTED_MODULE_2___default()(className, resolvedPrefix) }, props)); }); BsComponent.defaultProps = defaultProps; BsComponent.displayName = displayName; return BsComponent; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createWithBsPrefix(prefix, _temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$displayName = _ref.displayName,\n displayName = _ref$displayName === void 0 ? pascalCase(prefix) : _ref$displayName,\n Component = _ref.Component,\n defaultProps = _ref.defaultProps;\n\n var BsComponent = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__.forwardRef(function (_ref2, ref) {\n var className = _ref2.className,\n bsPrefix = _ref2.bsPrefix,\n _ref2$as = _ref2.as,\n Tag = _ref2$as === void 0 ? Component || 'div' : _ref2$as,\n props = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__.default)(_ref2, [\"className\", \"bsPrefix\", \"as\"]);\n\n var resolvedPrefix = (0,_ThemeProvider__WEBPACK_IMPORTED_MODULE_5__.useBootstrapPrefix)(bsPrefix, prefix);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__.createElement(Tag, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__.default)({\n ref: ref,\n className: classnames__WEBPACK_IMPORTED_MODULE_2___default()(className, resolvedPrefix)\n }, props));\n });\n BsComponent.defaultProps = defaultProps;\n BsComponent.displayName = displayName;\n return BsComponent;\n}", "function createWithBsPrefix(prefix, _temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$displayName = _ref.displayName,\n displayName = _ref$displayName === void 0 ? pascalCase(prefix) : _ref$displayName,\n Component = _ref.Component,\n defaultProps = _ref.defaultProps;\n\n var BsComponent = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__.forwardRef(function (_ref2, ref) {\n var className = _ref2.className,\n bsPrefix = _ref2.bsPrefix,\n _ref2$as = _ref2.as,\n Tag = _ref2$as === void 0 ? Component || 'div' : _ref2$as,\n props = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__.default)(_ref2, [\"className\", \"bsPrefix\", \"as\"]);\n\n var resolvedPrefix = (0,_ThemeProvider__WEBPACK_IMPORTED_MODULE_5__.useBootstrapPrefix)(bsPrefix, prefix);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__.createElement(Tag, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__.default)({\n ref: ref,\n className: classnames__WEBPACK_IMPORTED_MODULE_2___default()(className, resolvedPrefix)\n }, props));\n });\n BsComponent.defaultProps = defaultProps;\n BsComponent.displayName = displayName;\n return BsComponent;\n}", "function createWithBsPrefix(prefix, _temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$displayName = _ref.displayName,\n displayName = _ref$displayName === void 0 ? pascalCase(prefix) : _ref$displayName,\n Component = _ref.Component,\n defaultProps = _ref.defaultProps;\n\n var BsComponent = /*#__PURE__*/react.forwardRef(function (_ref2, ref) {\n var className = _ref2.className,\n bsPrefix = _ref2.bsPrefix,\n _ref2$as = _ref2.as,\n Tag = _ref2$as === void 0 ? Component || 'div' : _ref2$as,\n props = _objectWithoutPropertiesLoose(_ref2, [\"className\", \"bsPrefix\", \"as\"]);\n\n var resolvedPrefix = useBootstrapPrefix(bsPrefix, prefix);\n return /*#__PURE__*/react.createElement(Tag, _extends({\n ref: ref,\n className: classnames(className, resolvedPrefix)\n }, props));\n });\n BsComponent.defaultProps = defaultProps;\n BsComponent.displayName = displayName;\n return BsComponent;\n}", "function createWithBsPrefix(prefix, _temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$displayName = _ref.displayName,\n displayName = _ref$displayName === void 0 ? pascalCase(prefix) : _ref$displayName,\n Component = _ref.Component,\n defaultProps = _ref.defaultProps;\n\n var BsComponent = /*#__PURE__*/react.forwardRef(function (_ref2, ref) {\n var className = _ref2.className,\n bsPrefix = _ref2.bsPrefix,\n _ref2$as = _ref2.as,\n Tag = _ref2$as === void 0 ? Component || 'div' : _ref2$as,\n props = (0,objectWithoutPropertiesLoose/* default */.Z)(_ref2, [\"className\", \"bsPrefix\", \"as\"]);\n\n var resolvedPrefix = useBootstrapPrefix(bsPrefix, prefix);\n return /*#__PURE__*/react.createElement(Tag, (0,esm_extends/* default */.Z)({\n ref: ref,\n className: classnames_default()(className, resolvedPrefix)\n }, props));\n });\n BsComponent.defaultProps = defaultProps;\n BsComponent.displayName = displayName;\n return BsComponent;\n}", "function createWithBsPrefix(prefix, _temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$displayName = _ref.displayName,\n displayName = _ref$displayName === void 0 ? pascalCase(prefix) : _ref$displayName,\n Component = _ref.Component,\n defaultProps = _ref.defaultProps;\n\n var BsComponent = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().forwardRef(function (_ref2, ref) {\n var className = _ref2.className,\n bsPrefix = _ref2.bsPrefix,\n _ref2$as = _ref2.as,\n Tag = _ref2$as === void 0 ? Component || 'div' : _ref2$as,\n props = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__.default)(_ref2, _excluded);\n\n var resolvedPrefix = (0,_ThemeProvider__WEBPACK_IMPORTED_MODULE_5__.useBootstrapPrefix)(bsPrefix, prefix);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(Tag, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__.default)({\n ref: ref,\n className: classnames__WEBPACK_IMPORTED_MODULE_2___default()(className, resolvedPrefix)\n }, props));\n });\n BsComponent.defaultProps = defaultProps;\n BsComponent.displayName = displayName;\n return BsComponent;\n}", "function createWithBsPrefix(prefix, _temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$displayName = _ref.displayName,\n displayName = _ref$displayName === void 0 ? pascalCase(prefix) : _ref$displayName,\n Component = _ref.Component,\n defaultProps = _ref.defaultProps;\n\n var BsComponent = _react.default.forwardRef(function (_ref2, ref) {\n var className = _ref2.className,\n bsPrefix = _ref2.bsPrefix,\n _ref2$as = _ref2.as,\n Tag = _ref2$as === void 0 ? Component || 'div' : _ref2$as,\n props = (0, _objectWithoutPropertiesLoose2.default)(_ref2, [\"className\", \"bsPrefix\", \"as\"]);\n var resolvedPrefix = (0, _ThemeProvider.useBootstrapPrefix)(bsPrefix, prefix);\n return /*#__PURE__*/_react.default.createElement(Tag, (0, _extends2.default)({\n ref: ref,\n className: (0, _classnames.default)(className, resolvedPrefix)\n }, props));\n });\n\n BsComponent.defaultProps = defaultProps;\n BsComponent.displayName = displayName;\n return BsComponent;\n}", "constructor(prefix) {\n this.prefix_ = prefix;\n }", "function createPrefixedKey({\n method,\n prefix\n}) {\n return (0, _util.u8aConcat)((0, _utilCrypto.xxhashAsU8a)(prefix, 128), (0, _utilCrypto.xxhashAsU8a)(method, 128));\n}", "function createIdList(prefix, Id){\n this.ButtonsIdArray = {};\n this.tmpId;\n for ( var key in ButtonList ){\n this.ButtonsIdArray[ButtonList[key]]=prefix.concat(ButtonList[key], '_' ,Id);\n }\n return this.ButtonsIdArray\n}", "function prefixer(prefix){\n\tthis.prefix=prefix;\n}", "bcdPrefix() {\n return `${this.bcd.base}${this.trailingSlash(this.bcd.base)}v${this.bcd.version}/`;\n }", "function prefixLabels(object, prefix) {\n var new_obj = {};\n for (var index in object) {\n if (!object.hasOwnProperty(index)) continue;\n new_obj[prefix + index] = object[index];\n }\n object = new_obj;\n return object;\n}", "function buildCreate2Address(creatorAddress, saltHex, byteCode) {\n return `0x${web3.utils.sha3(`0x${[\n 'ff',\n creatorAddress,\n saltHex,\n web3.utils.sha3(byteCode)\n ].map(x => x.replace(/0x/, ''))\n .join('')}`).slice(-40)}`.toLowerCase()\n}", "constructor(prefix, keys = []) {\n this.prefix = prefix;\n this.keys = keys;\n }", "function createBuilderName(name) {\n\t\tvar firstChar = name[0].toUpperCase();\n\t\treturn \"new\" + firstChar + name.slice(1) + \"ParamBuilder\";\n\t}", "addPrefix(prefix) {\n if (!prefix) {\n return this;\n }\n this.input = `${prefix}_${this.input}`;\n return this;\n }", "constructor (address, prefix) {\n super(address);\n this.prefix = this._checkPrefix(prefix);\n }", "constructor(prefix) {\n this.prefix = prefix;\n this.counter = 0;\n this.existing = {};\n }", "constructor(prefix) {\n this.prefix = prefix;\n this.counter = 0;\n this.existing = {};\n }", "function boldPrefix(word, prefix) {\r\n return word.replace(new RegExp('^(' + prefix + ')(.*)','ig'), '<b>$1</b>$2');\r\n}", "function prefix(id, parse) {\n var s = symbol(id);\n s.children = [];\n s.parse = parse || function () {\n this.children[0] = BOGUS();\n return this;\n };\n return s;\n}", "addPrefixes(prefixes, done) {\n // Ignore prefixes if not supported by the serialization\n if (!this._prefixIRIs) return done && done();\n\n // Write all new prefixes\n let hasPrefixes = false;\n for (let prefix in prefixes) {\n let iri = prefixes[prefix];\n if (typeof iri !== 'string') iri = iri.value;\n hasPrefixes = true;\n // Finish a possible pending quad\n if (this._subject !== null) {\n this._write(this._inDefaultGraph ? '.\\n' : '\\n}\\n');\n this._subject = null, this._graph = '';\n }\n // Store and write the prefix\n this._prefixIRIs[iri] = prefix += ':';\n this._write(`@prefix ${prefix} <${iri}>.\\n`);\n }\n // Recreate the prefix matcher\n if (hasPrefixes) {\n let IRIlist = '',\n prefixList = '';\n for (const prefixIRI in this._prefixIRIs) {\n IRIlist += IRIlist ? `|${prefixIRI}` : prefixIRI;\n prefixList += (prefixList ? '|' : '') + this._prefixIRIs[prefixIRI];\n }\n IRIlist = escapeRegex(IRIlist, /[\\]\\/\\(\\)\\*\\+\\?\\.\\\\\\$]/g, '\\\\$&');\n this._prefixRegex = new RegExp(`^(?:${prefixList})[^\\/]*$|` + `^(${IRIlist})([_a-zA-Z][\\\\-_a-zA-Z0-9]*)$`);\n }\n // End a prefix block with a newline\n this._write(hasPrefixes ? '\\n' : '', done);\n }", "static addPrefix(p_prefix, p_elements) {\n let res = [];\n p_elements.forEach(function(p_ele) {\n res.push(p_prefix + p_ele);\n });\n return res;\n }", "function getNewBandNames(suffix, bands) {\n //var seq = ee.List.sequence(1, bands.length());\n //return seq.map(function(b) {\n return bands.map(function(band){\n return ee.String(band).cat(suffix);\n });\n // return ee.String(prefix).cat(ee.Number(b).int());\n //});\n}", "addPrefix(prefix, iri, done) {\n const prefixes = {};\n prefixes[prefix] = iri;\n this.addPrefixes(prefixes, done);\n }", "notePrefix(prefix) {\n this.query['note-prefix'] = lookupAccountTransactions_1.base64StringFunnel(prefix);\n return this;\n }", "constructor(prefix = 'kss') {\n\t\tif ('string' !== typeof prefix) {\n\t\t\tthrow new Error('prefix argument is not a string');\n\t\t}\n\t\tthis.#prefix = prefix;\n\t\tif (new.target === CustomElementsDefiner) {\n\t\t\tObject.freeze(this);\n\t\t}\n\t}", "addPrefix(prefix, iri, done) {\n var prefixes = {};\n prefixes[prefix] = iri;\n this.addPrefixes(prefixes, done);\n }", "function prefix(a, b) {\n let i;\n for (i = 0; a[i] === b[i] && i < a.length; i++);\n return a.substr(0, i);\n}", "static create(params) {\n return {type: `${this.prefix}${this.name}`, _instance: new this(params)}; //eslint-disable-line\n }", "set prefix(prefix) {\n this._prefix = prefix;\n }", "function create(a,b) {\r\n\tvar ret=document.createElement(a);\r\n\tif(b) for(var prop in b) {\r\n\t\tif(prop.indexOf('on')==0) ret.addEventListener(prop.substring(2),b[prop],false);\r\n\t\telse if(prop==\"kids\" && (prop=b[prop])) {\r\n\t\t\tfor(var i=0;i<prop.length;i++) ret.appendChild(prop[i]);\r\n\t\t}\r\n\t\telse if('style,accesskey,id,name,src,href,class'.indexOf(prop)!=-1) ret.setAttribute(prop, b[prop]);\r\n\t\telse ret[prop]=b[prop];\r\n\t} return ret;\r\n}", "function create(a,b) {\r\n\tvar ret=document.createElement(a);\r\n\tif(b) for(var prop in b) {\r\n\t\tif(prop.indexOf('on')==0) ret.addEventListener(prop.substring(2),b[prop],false);\r\n\t\telse if(prop==\"kids\" && (prop=b[prop])) {\r\n\t\t\tfor(var i=0;i<prop.length;i++) ret.appendChild(prop[i]);\r\n\t\t}\r\n\t\telse if('style,accesskey,id,name,src,href,class'.indexOf(prop)!=-1) ret.setAttribute(prop, b[prop]);\r\n\t\telse ret[prop]=b[prop];\r\n\t} return ret;\r\n}", "function create(a,b) {\r\n\tvar ret=document.createElement(a);\r\n\tif(b) for(var prop in b) {\r\n\t\tif(prop.indexOf('on')==0) ret.addEventListener(prop.substring(2),b[prop],false);\r\n\t\telse if(prop==\"kids\" && (prop=b[prop])) {\r\n\t\t\tfor(var i=0;i<prop.length;i++) ret.appendChild(prop[i]);\r\n\t\t}\r\n\t\telse if('style,accesskey,id,name,src,href,class'.indexOf(prop)!=-1) ret.setAttribute(prop, b[prop]);\r\n\t\telse ret[prop]=b[prop];\r\n\t} return ret;\r\n}", "function addOrderPrefix(order, prefix) {\n return order[0] === '-' ? '-' + prefix + order.substring(1) : prefix + order;\n }", "function encodeTagTweak(out, prefix, blockNr) {\n\tout.set(new Uint8Array(12));\n\tnew DataView(out.buffer).setUint32(12 + out.byteOffset, blockNr, false);\n\tout[0] = prefix << prefixShift;\n}", "function addPrefixMapping(prefix, arangoEdges) {\n var namespace = vocabularyMapping[prefix].namespace;\n\n var nameHash = namespace.hashCode().toString();\n var alreadyMappedPrefix = false;\n for(var pref in arangoPrefixes){\n if (pref === nameHash) {\n alreadyMappedPrefix = true;\n }\n }\n\n if (!alreadyMappedPrefix && nameHash !== undefined){\n arangoPrefixes[nameHash] = {\n _key: nameHash, \n namespaceURI: namespace,\n prefix: prefix,\n type: 'Prefix'\n };\n }\n\n}", "function prefix(props, variant) {\n !(props.bsClass != null) ? process.env.NODE_ENV !== 'production' ? (0, _invariant2.default)(false, 'A `bsClass` prop is required for this component') : (0, _invariant2.default)(false) : void 0;\n return props.bsClass + (variant ? '-' + variant : '');\n}", "createButton(symbol, style) {\n\t\tlet b = $('<span>')\n\t\tb.addClass('btn border small m-1 p-1')\n\t\tb.addClass(style)\n\t\tb.html(symbol)\n\t\treturn b\n\t}", "insert (prefix, item) {\n if (!this.items[prefix]) {\n const index = findIndex(this.prefixes, (e) => {\n if (prefix.length === e.length) {\n return prefix > e\n }\n return prefix.length > e.length\n })\n\n if (index === -1) {\n this.prefixes.push(prefix)\n } else {\n this.prefixes.splice(index, 0, prefix)\n }\n }\n this.items[prefix] = item\n return item\n }", "withoutPrefix(prefix) {\n if (this.formatParts.length < prefix.formatParts.length || this.args.length < prefix.args.length) {\n return undefined;\n }\n let prefixArgCount = 0;\n let firstFormatPart;\n // Walk through the formatParts of prefix to confirm that it's a of this.\n for (let index = 0; index < prefix.formatParts.length; index++) {\n const theirPart = prefix.formatParts[index] || '';\n const ourPart = this.formatParts[index] || '';\n if (ourPart !== theirPart) {\n // We've found a format part that doesn't match. If this is the very last format part check\n // for a string prefix match. If that doesn't match, we're done.\n if (index === prefix.formatParts.length - 1 && ourPart.startsWith(theirPart)) {\n firstFormatPart = ourPart.substring(theirPart.length);\n }\n else {\n return undefined;\n }\n }\n // If the matching format part has an argument, check that too.\n if (theirPart.startsWith('%') && !isNoArgPlaceholder(theirPart[1])) {\n if (this.args[prefixArgCount] !== prefix.args[prefixArgCount]) {\n return undefined; // Argument doesn't match.\n }\n prefixArgCount++;\n }\n }\n // We found a prefix. Prepare the suffix as a result.\n const resultFormatParts = [];\n if (firstFormatPart) {\n resultFormatParts.push(firstFormatPart);\n }\n for (let i = prefix.formatParts.length; i < this.formatParts.length; i++) {\n resultFormatParts.push(this.formatParts[i] || '');\n }\n const resultArgs = [];\n for (let i = prefix.args.length; i < this.args.length; i++) {\n resultArgs.push(this.args[i] || '');\n }\n return this.copy({\n formatParts: resultFormatParts,\n args: resultArgs,\n });\n }", "function prefix (a, b) {\n if(a.length > b.length) return false\n var l = a.length - 1\n var lastA = a[l]\n var lastB = b[l]\n\n if(typeof lastA !== typeof lastB)\n return false\n\n if('string' == typeof lastA\n && 0 != lastB.indexOf(lastA))\n return false\n \n //handle cas where there is no key prefix\n //(a hook on an entire sublevel)\n if(a.length == 1 && isArrayLike(lastA)) l ++\n \n while(l--) {\n if(compare(a[l], b[l])) return false\n }\n return true\n}", "static prefixArray(array, prefix){\n return array.map(i => prefix + i);\n }", "function createIdentifier(prefix, name, value) {\n var hashedString = (0, _hash.default)(name + stringifyValueWithProperty(value, name));\n return true ? prefix + \"-\" + name + \"-\" + hashedString : undefined;\n}", "prefixes(func) {\n if (this.prefixFunction) {\n process.emitWarning('Client.prefixes called multiple times');\n }\n this.prefixFunction = func;\n return this;\n }", "function getCosmosAddressCreator(bech32Prefix, HDPath, curve) {\n return async (seedPhrase) => {\n const { getNewWalletFromSeed } = await import(\"@lunie/cosmos-keys\")\n return getNewWalletFromSeed(seedPhrase, bech32Prefix, HDPath, curve)\n }\n}", "function createBucket() {\n metadata\n .buckets.set(bucketName, new BucketInfo(bucketName, ownerID, '', ''));\n metadata.keyMaps.set(bucketName, new Map);\n}", "create(bo) {\n const { columns, values, valuesVar } = bo.getSqlInsertParts();\n const query = `\n INSERT INTO \"${bo.Bo.tableName}\" ( ${columns} )\n VALUES ( ${valuesVar} )\n RETURNING ${bo.Bo.getSQLSelectClause()};\n `;\n return this.one(query, values);\n }", "function prefixNames(prefix) {\n var classNames = [];\n\n for (var _i = 1; _i < arguments.length; _i++) {\n classNames[_i - 1] = arguments[_i];\n }\n\n return classNames.map(function (className) {\n return className.split(\" \").map(function (name) {\n return name ? \"\" + prefix + name : \"\";\n }).join(\" \");\n }).join(\" \");\n }", "function prefix(iri, factory) {\n return prefixes({\n '': iri.value || iri\n }, factory)('');\n}", "_createBlockGenesis(minerAddress, args){\n\n //validate miner Address\n\n args.unshift ( this.blockchain, minerAddress, undefined, undefined, undefined );\n\n let data = new this.blockDataClass(...args);\n\n return new this.blockClass( this.blockchain, 1, undefined, BlockchainGenesis.hashPrev, undefined, 0, data, 0, this.db );\n }", "addPrefixes(prefixes, done) {\n var prefixIRIs = this._prefixIRIs,\n hasPrefixes = false;\n\n for (var prefix in prefixes) {\n var iri = prefixes[prefix];\n if (typeof iri !== 'string') iri = iri.value;\n hasPrefixes = true; // Finish a possible pending quad\n\n if (this._subject !== null) {\n this._write(this._inDefaultGraph ? '.\\n' : '\\n}\\n');\n\n this._subject = null, this._graph = '';\n } // Store and write the prefix\n\n\n prefixIRIs[iri] = prefix += ':';\n\n this._write('@prefix ' + prefix + ' <' + iri + '>.\\n');\n } // Recreate the prefix matcher\n\n\n if (hasPrefixes) {\n var IRIlist = '',\n prefixList = '';\n\n for (var prefixIRI in prefixIRIs) {\n IRIlist += IRIlist ? '|' + prefixIRI : prefixIRI;\n prefixList += (prefixList ? '|' : '') + prefixIRIs[prefixIRI];\n }\n\n IRIlist = IRIlist.replace(/[\\]\\/\\(\\)\\*\\+\\?\\.\\\\\\$]/g, '\\\\$&');\n this._prefixRegex = new RegExp('^(?:' + prefixList + ')[^\\/]*$|' + '^(' + IRIlist + ')([a-zA-Z][\\\\-_a-zA-Z0-9]*)$');\n } // End a prefix block with a newline\n\n\n this._write(hasPrefixes ? '\\n' : '', done);\n }", "function create(label) {\n return { label: label };\n }", "function create(label) {\r\n return { label: label };\r\n }", "function create(label) {\r\n return { label: label };\r\n }", "function create(label) {\r\n return { label: label };\r\n }", "function create(label) {\r\n return { label: label };\r\n }", "function create(label) {\r\n return { label: label };\r\n }", "function create(label) {\r\n return { label: label };\r\n }", "function prefix(pre) {\n\tconst o = this;\n\treturn {\n\t\tget: function(k, cb) { return o.get(pre+k, cb); },\n\t\tput: function(k, v, cb) { return o.put(pre+k, v, cb); },\n\t\tdel: function(k, cb) { return o.del(pre+k, cb); },\n\t\tcrypt: o.crypt,\n\t\tprefix: o.prefix\n\t};\n}", "function BigHippo() {\n this.prefix = 'bighippo_product.';\n}", "startWith(prefix) {\n this.addBefore(`^${Rule(prefix).source}`);\n return this;\n }", "function findNewAnchor(prefix, exclude) {\n for (let i = 1; true; ++i) {\n const name = `${prefix}${i}`;\n if (!exclude.has(name))\n return name;\n }\n }", "static initialize(obj, noncePrefix, macAddress) { \n obj['nonce_prefix'] = noncePrefix;\n obj['mac_address'] = macAddress;\n }", "function AppendPrefix(prefix, feature, isAttribute)\n{\n if (prefix !== undefined)\n {\n if (isAttribute)\n {\n // if a certain feature is an attribute, then it follows a different naming standard\n // where it must be completely capitalized and have words split with an underscore\n return prefix.toUpperCase() + \"_\" + feature.toUpperCase();\n }\n else\n {\n //Vendor prefixing should follow the standard convention: vendorprefixFeature\n //Note that the feature is capitalized after the vendor prefix\n //Therefore if the feature is window.feature, the vendor prefix version is:\n //window.[vp]Feature where vp is the vendor prefix: \n //window.msFeature, window.webkitFeature, window.mozFeature, window.oFeature\n var newFeature = feature[0].toUpperCase() + feature.substr(1, feature.length);\n\n //Build up the new feature name with the vendor prefix\n return prefix + newFeature;\n }\n }\n else\n {\n return feature;\n }\n}", "function create(label) {\n return {\n label: label\n };\n }", "function create(label) {\n return {\n label: label\n };\n }", "function create(label) {\n return {\n label: label\n };\n }", "create() {}", "create() {}", "function generateBlockID(blockIDPrefix, blockIndex) {\n // To generate a 64 bytes base64 string, source string should be 48\n const maxSourceStringLength = 48;\n // A blob can have a maximum of 100,000 uncommitted blocks at any given time\n const maxBlockIndexLength = 6;\n const maxAllowedBlockIDPrefixLength = maxSourceStringLength - maxBlockIndexLength;\n if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) {\n blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength);\n }\n const res = blockIDPrefix +\n padStart(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, \"0\");\n return base64encode(res);\n}", "function generateBlockID(blockIDPrefix, blockIndex) {\n // To generate a 64 bytes base64 string, source string should be 48\n const maxSourceStringLength = 48;\n // A blob can have a maximum of 100,000 uncommitted blocks at any given time\n const maxBlockIndexLength = 6;\n const maxAllowedBlockIDPrefixLength = maxSourceStringLength - maxBlockIndexLength;\n if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) {\n blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength);\n }\n const res = blockIDPrefix +\n padStart(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, \"0\");\n return base64encode(res);\n}", "function setKeyPrefix(obj) {\n if (obj.keyPrefix) return\n for (var s in params) if (params[s] === obj) obj.keyPrefix = s\n}", "function makePrefixer(prefijo){\n return function ponerPrefijo (palabra){\n console.log(prefijo + palabra)\n }\n}", "create () {}", "create () {}", "function createBonuses() {\n for(var i=0; i<1; i++) {\n bonuses[i] = new Bonus();\n bonuses[i].init();\n }\n}", "function prepend(prefix, result) {\n return prefix\n + ((result.length > 0 && prefix.length > 0) ? divider : '')\n + result;\n }", "function createBone(bone_spec) {\n var bone = document.createElement(\"li\");\n bone.classList.add(\"bone\");\n var bone_img = document.createElement(\"img\");\n bone_img.classList.add(\"bonepic\");\n bone_img.style.cursor = \"pointer\";\n\n bone_img.onmouseover = function(){iconBig(this);createTT(this.parentElement, bone_spec)};\n bone_img.onmouseout = function(){iconNormal(this);deleteTT()};\n bone_img.onclick = function(){addBone(bone_spec)};\n\n bone_img.src = bone_spec.img_link;\n\n bone.appendChild(bone_img);\n document.getElementById(bone_spec.type).appendChild(bone);\n}", "function create(a,b) {\r\n\tif(!a || a==\"\" || !b) return;\r\n\tvar ret=typeof a=='object'?a:document.createElement(a);\r\n\tfor(var prop in b) if(prop.indexOf(\"on\")==0) ret.addEventListener(prop.substring(2),b[prop],false);\r\n\t\telse if(prop==\"kids\" && (prop=b[prop])) for each(var p in prop) ret.appendChild(p);\r\n\t\telse if(\",style,accesskey,id,name,src,href\".indexOf(\",\"+prop)!=-1) ret.setAttribute(prop, b[prop]);\r\n\t\telse ret[prop]=b[prop];\r\n\treturn ret;\r\n}", "function prefix(prefix, fn){\n\treturn function(input){\n\t\tfn( (prefix||'') + input )\n\t\treturn input\n\t}\n}", "function bkmkCreatedHandler (id, BTN) {\r\n // We need the parent to calculate the real offset of insertion\r\n let parentId = BTN.parentId;\r\n let parentBN = curBNList[parentId];\r\n let index = BTN.index;\r\n//let t1 = (new Date()).getTime();\r\n//trace(t1+\" Create event on: \"+id+\" type: \"+BTN.type+\" parentId: \"+parentId+\" index: \"+index);\r\n\r\n // Create the new BN tree and insert it under its parent + maintain inBSP2Trash and trashDate fields\r\n let inBSP2Trash = options.trashEnabled && parentBN.inBSP2Trash;\r\n let BN = buildTree(BTN, parentBN.level+1, inBSP2Trash);\r\n BN_insert(BN, parentBN, index);\r\n\r\n // Record action\r\n historyListAdd(curHNList, HNACTION_BKMKCREATE,\r\n\t \t\t\t false, undefined, id, BTN.type, BN_aPath(parentId), parentId, index,\r\n\t \t\t\t BTN.title, BN.faviconUri, BTN.url, inBSP2Trash);\r\n // Save new current info\r\n saveBNList();\r\n // Refresh BSP2 toolbar icon in active tabs\r\n refreshActiveTabs(BN, false);\r\n\r\n // If we receive creation of the BSP2 trash folder, then rebuild pointer\r\n // and tell open sidebars before they are notified of its creation, to recognize it\r\n if (id == bsp2TrashFldrBNId) {\r\n\tbsp2TrashFldrBN = BN;\r\n\t// Notify open sidebars of new id\r\n\tsendAddonMsgComplex({\r\n\t source: \"background\",\r\n\t content: \"bsp2TrashFldrBNId\",\r\n\t bnId: bsp2TrashFldrBNId\r\n\t});\r\n }\r\n\r\n // Signal to sidebars to make them display it (must work with Private window sidebars\r\n // also, which have their own separate copy of curBNList).\r\n sendAddonMsgComplex({\r\n\tsource: \"background\",\r\n\tcontent: \"bkmkCreated\",\r\n\tnewtree: BN_serialize(BN),\r\n\tindex: index\r\n });\r\n\r\n // If we receive creation of the Recently bookmarked special folder (typically on restore bookmarks),\r\n // then rebuild pointer\r\n // -> Cannot detect it otherwise since FF does not support bookmarks.onImportBegan and onImportEnded\r\n // (but Chrome does)\r\n // Note on complete bookmark restore = the FF process appears to be as follows:\r\n // - Delete of all bookmark items at level 2, under Bppkùarks Toolbar, Bookkmarks Menu, Other Bookmarks ..\r\n // (no delete of lower ones, they get included by the level 2 deleted folders).\r\n // - Then re-create of all bookmarks one by one. This includes the special folders like Most Visited,\r\n // Recent Tags or Recently Bookmarked.\r\n if (id == recentBkmkBNId) {\r\n\trecentBkmkBN = BN;\r\n\t// Notify open sidebars of (possibly new) id\r\n\tsendAddonMsgComplex({\r\n\t source: \"background\",\r\n\t content: \"recentBkmkBNId\",\r\n\t bnId: recentBkmkBNId\r\n\t});\r\n }\r\n // Refresh list of recent bookmarks (always)\r\n triggerRecentRefreshBkmks();\r\n\r\n // If we receive creation of the Most recent special folder (typically on restore bookmarks),\r\n // then rebuild pointer and refresh its content also\r\n if (id == mostVisitedBNId) {\r\n\tmostVisitedBN = BN;\r\n\ttriggerRefreshMostVisited();\r\n\t// Notify open sidebars of (possibly new) id\r\n\tsendAddonMsgComplex({\r\n\t source: \"background\",\r\n\t content: \"mostVisitedBNId\",\r\n\t bnId: mostVisitedBNId\r\n\t});\r\n }\r\n\r\n // If we receive creation of the Recent tags special folder (typically on restore bookmarks),\r\n // then rebuild pointer\r\n if (id == recentTagBNId) {\r\n\trecentTagBN = BN;\r\n\t// Notify open sidebars of (possibly new) id\r\n\tsendAddonMsgComplex({\r\n\t source: \"background\",\r\n\t content: \"recentTagBNId\",\r\n\t bnId: recentTagBNId\r\n\t});\r\n }\r\n}", "function call_hook_builder(prefix) {\n return function() {\n var args = _.toArray(arguments);\n var hook = args.shift();\n var cb = args.pop();\n\n\n function exec_hook(type, hook, more_args) {\n var hook_name = type + \"_\" + hook;\n\n var exec_args = more_args || args;\n\n if (_main[hook_name]) {\n var ret = _main[hook_name].apply(_main, exec_args);\n return ret;\n }\n }\n\n exec_hook(\"before\", hook);\n\n var ret;\n if (_main[\"insteadof_\" + hook]) {\n ret = exec_hook(\"insteadof\", hook); \n } else {\n // The callback can prevent default installation by returning true;\n ret = exec_hook(prefix, hook);\n\n // default initializer is called if the 'prefix' hook did not return\n if (!ret) {\n cb.apply(null, args);\n }\n }\n\n // after hook\n ret = exec_hook(\"after\", hook, ret);\n\n };\n}", "create() {\n\t}", "async function createLoadBalancer() {\n const subscriptionId = process.env[\"NETWORK_SUBSCRIPTION_ID\"] || \"subid\";\n const resourceGroupName = process.env[\"NETWORK_RESOURCE_GROUP\"] || \"rg1\";\n const loadBalancerName = \"lb\";\n const parameters = {\n backendAddressPools: [{ name: \"be-lb\" }],\n frontendIPConfigurations: [\n {\n name: \"fe-lb\",\n subnet: {\n id: \"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb\",\n },\n },\n ],\n inboundNatPools: [],\n inboundNatRules: [\n {\n name: \"in-nat-rule\",\n backendPort: 3389,\n enableFloatingIP: true,\n enableTcpReset: false,\n frontendIPConfiguration: {\n id: \"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb\",\n },\n frontendPort: 3389,\n idleTimeoutInMinutes: 15,\n protocol: \"Tcp\",\n },\n ],\n loadBalancingRules: [\n {\n name: \"rulelb\",\n backendAddressPool: {\n id: \"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb\",\n },\n backendPort: 80,\n enableFloatingIP: true,\n enableTcpReset: false,\n frontendIPConfiguration: {\n id: \"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb\",\n },\n frontendPort: 80,\n idleTimeoutInMinutes: 15,\n loadDistribution: \"Default\",\n probe: {\n id: \"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb\",\n },\n protocol: \"Tcp\",\n },\n ],\n location: \"eastus\",\n probes: [\n {\n name: \"probe-lb\",\n intervalInSeconds: 15,\n numberOfProbes: 2,\n port: 80,\n probeThreshold: 1,\n requestPath: \"healthcheck.aspx\",\n protocol: \"Http\",\n },\n ],\n };\n const credential = new DefaultAzureCredential();\n const client = new NetworkManagementClient(credential, subscriptionId);\n const result = await client.loadBalancers.beginCreateOrUpdateAndWait(\n resourceGroupName,\n loadBalancerName,\n parameters\n );\n console.log(result);\n}", "static generatePid(prefix) {\n return 'urn:' + (prefix ? prefix : 'ghsts') + ':' + UUID.v4();\n }", "function createBuds(){\n var buds = [];\n var packCount = 5;\n\n for (var i = 0; i < packCount; ++i) {\n buds[i] = {\n strain: state.stats.supply.strains[Math.floor(Math.random()*state.stats.supply.strains.length)],\n xp: 50,\n traits: ['patreon genesis bud'],\n terps: [],\n pollinated: false,\n father: 'sensimilla'\n }\n }\n if(from=='hashkings'){state.users[json.to].buds.push(buds)}\n return buds;\n }", "attrs(prefix, args) {\r\n\t\tlet res = '';\r\n\t\tconst len = prefix.length\r\n\t\targs.forEach(v => {\r\n\t\t\tif (v.lhs.startsWith(prefix)) {\r\n\t\t\t\t// remove the prefix\r\n\t\t\t\tres += ` ${v.lhs.substr(prefix.length)}`\r\n\t if (v.rhs.length > 0) res += `=\"${v.rhs.join(' ')}\"`\r\n\t\t\t}\r\n\t\t})\r\n\r\n\t\treturn res;\r\n\t}", "function createBands(cb) {\n async.parallel(\n [\n function (callback) {\n bandCreate(\n \"20-somethins\",\n [artists[1], artists[2]],\n [],\n \"2018\",\n false,\n callback\n );\n },\n function (callback) {\n bandCreate(\n \"dads in the basement drinking beerz\",\n [artists[3], artists[4]],\n [],\n \"2009\",\n false,\n callback\n );\n },\n function (callback) {\n bandCreate(\n \"waterhomies\",\n [artists[5], artists[6]],\n [],\n \"2001\",\n \"2004\",\n callback\n );\n },\n ],\n // Optional callback\n cb\n );\n}", "function processPrefix(prefix, iri) {\n // Create a new prefix if an IRI is specified or the prefix doesn't exist\n if (typeof iri === 'string') {\n // Create a function that expands the prefix\n const cache = Object.create(null);\n prefixes[prefix] = local => {\n return cache[local] || (cache[local] = factory.namedNode(iri + local));\n };\n } else if (!(prefix in prefixes)) {\n throw new Error(`Unknown prefix: ${prefix}`);\n }\n return prefixes[prefix];\n }", "function insertFF56EndGapSep (parentBN) {\r\n let children = parentBN.children;\r\n let len = children.length;\r\n let BN = children[len-1]; // Is there since we just inserted it\r\n sendAddonMsgComplex({\r\n\tsource: \"background\",\r\n\tcontent: \"bkmkCreated\",\r\n\tnewtree: BN_serialize(BN),\r\n\tindex: len-1\r\n });\r\n}", "function Bg(a,b){this.Nd=a;this.Dg=b;Cg(this);var c=Dg(this)[0];this.Bb=c[1];Bg.$.constructor.call(this,c[0])}", "function createObjectLiteral(name, batch, hobbies) {\n\n}", "function create(idButton, aliasName) {\n if (aliasName == \"\")\n throw \"Alias Name is required\";\n if (idButton == \"\")\n throw \"idButton is required\";\n return Utils_1.default.OSExecute(`apx-onewire-ibutton create ${idButton} ${aliasName}`);\n}", "async function createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithTwoBackendPool() {\n const subscriptionId = process.env[\"NETWORK_SUBSCRIPTION_ID\"] || \"subid\";\n const resourceGroupName = process.env[\"NETWORK_RESOURCE_GROUP\"] || \"rg1\";\n const loadBalancerName = \"lb\";\n const parameters = {\n backendAddressPools: [{ name: \"be-lb1\" }, { name: \"be-lb2\" }],\n frontendIPConfigurations: [\n {\n name: \"fe-lb\",\n subnet: {\n id: \"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb\",\n },\n },\n ],\n inboundNatPools: [],\n loadBalancingRules: [\n {\n name: \"rulelb\",\n backendAddressPool: {},\n backendAddressPools: [\n {\n id: \"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb1\",\n },\n {\n id: \"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb2\",\n },\n ],\n backendPort: 0,\n enableFloatingIP: true,\n frontendIPConfiguration: {\n id: \"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb\",\n },\n frontendPort: 0,\n idleTimeoutInMinutes: 15,\n loadDistribution: \"Default\",\n probe: {\n id: \"/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb\",\n },\n protocol: \"All\",\n },\n ],\n location: \"eastus\",\n outboundRules: [],\n probes: [\n {\n name: \"probe-lb\",\n intervalInSeconds: 15,\n numberOfProbes: 2,\n port: 80,\n probeThreshold: 1,\n requestPath: \"healthcheck.aspx\",\n protocol: \"Http\",\n },\n ],\n sku: { name: \"Premium\" },\n };\n const credential = new DefaultAzureCredential();\n const client = new NetworkManagementClient(credential, subscriptionId);\n const result = await client.loadBalancers.beginCreateOrUpdateAndWait(\n resourceGroupName,\n loadBalancerName,\n parameters\n );\n console.log(result);\n}", "function _build_turtle_prefixes(){\n\t\t\tvar turtle_prefixes = \"\";\n\t\t\tfor (var i = 0; i < browser_conf_json.prefixes.length; i++) {\n\t\t\t\tvar pref_elem = browser_conf_json.prefixes[i];\n\t\t\t\tturtle_prefixes = turtle_prefixes+\" \"+\"PREFIX \"+pref_elem[\"prefix\"]+\":<\"+pref_elem[\"iri\"]+\"> \";\n\t\t\t}\n\t\t\treturn turtle_prefixes;\n\t\t}", "function BN_create (BTN, level, faviconWorker, parentBN = undefined) {\r\n let node;\r\n let BTN_id = BTN.id;\r\n let index = BTN.index;\r\n let type = getType(BTN);\r\n let protect;\r\n if (type == \"folder\") { // Root cannot be created, so do not verify\r\n\tcountFolders++;\r\n\r\n\tlet title = BTN.title;\r\n\tlet uri, fetchedUri, inBSP2Trash;\r\n\tif (BTN_id == PersonalToobar) {\r\n\t uri = \"/icons/toolbarbkmk.png\";\r\n\t protect = true;\r\n\t fetchedUri = true;\r\n\t}\r\n\telse if (BTN_id == BookmarksMenu) {\r\n\t uri = \"/icons/menubkmk.png\";\r\n\t protect = true;\r\n\t fetchedUri = true;\r\n\t}\r\n\telse if (BTN_id == OtherBookmarks) {\r\n\t uri = \"/icons/otherbkmk.png\";\r\n\t protect = true;\r\n\t fetchedUri = true;\r\n\t}\r\n\telse if (BTN_id == MobileBookmarks) {\r\n\t uri = \"/icons/folder.png\";\r\n\t protect = true;\r\n\t fetchedUri = false;\r\n\t}\r\n\telse if (title == BSP2TrashName) {\r\n\t uri = \"/icons/bsp2trash.png\";\r\n\t protect = inBSP2Trash = true;\r\n\t fetchedUri = true;\r\n\t bsp2TrashFldrBNId = BTN_id;\r\n\t}\r\n\telse {\r\n\t uri = \"/icons/folder.png\";\r\n\t protect = false;\r\n\t fetchedUri = false;\r\n\t}\r\n\r\n\t// Pre-create an array of empty children if needed\r\n\tlet children = BTN.children;\r\n\tif (children != undefined) {\r\n\t children = new Array (children.length);\r\n\t}\r\n\r\n\t// Create new node\r\n\tnode = new BookmarkNode (\r\n\t BTN_id, \"folder\", level, BTN.parentId, BTN.dateAdded, protect,\r\n\t BTN.title, uri, fetchedUri, undefined,\r\n\t children, BTN.dateGroupModified, inBSP2Trash\r\n\t);\r\n }\r\n else if (type == \"separator\") {\r\n\tif ((countSeparators++ == 0) || beforeFF57) { // First separator is not draggable,\r\n\t \t\t\t\t\t\t\t\t\t\t\t // or all separators when FF < 57\r\n\t protect = true;\r\n\t}\r\n\telse {\r\n\t protect = false;\r\n\t}\r\n\tnode = new BookmarkNode (\r\n\t BTN_id, type, level, BTN.parentId, BTN.dateAdded, protect\r\n\t);\r\n }\r\n else { // Presumably \"bookmark\" type\r\n let forceProtect; // In case the general protection rule does not apply\r\n\tif (type == \"bookmark\") {\r\n\t if (!BTN_id.startsWith(\"place:\")) { // Do not count special bookmarks under special place: folders\r\n\t\t\t\t\t\t\t\t\t\t // -> tagged with \"place:\" before their id when inserted\r\n\t\tcountBookmarks++;\r\n\t }\r\n\t else {\r\n\t\tforceProtect = true;\r\n\t }\r\n\t}\r\n\telse {\r\n\t trace(\"Odd bookmark type: \"+type);\r\n\t countOddities++;\r\n\t}\r\n\r\n\tlet uri, fetchedUri;\r\n\tlet triggerFetch = false;\r\n\tlet url = BTN.url;\r\n\tlet title = BTN.title;\r\n\tif (url == undefined) {\r\n\t trace(\"Bookmark with undefined URL !\");\r\n\t traceBTN(BTN);\r\n\t url = \"<undefined!>\";\r\n\t uri = \"/icons/nofavicon.png\";\r\n\t fetchedUri = false;\r\n\t protect = false;\r\n\t}\r\n\telse if (url.startsWith(\"place:\")) {\r\n\t type = \"folder\"; // Convert to folder\r\n\t uri = \"/icons/specfavicon.png\";\r\n\t fetchedUri = true;\r\n\t protect = true;\r\n\t if (url.includes(MostVisitedSort)) {\r\n\t\tmostVisitedBNId = BTN_id;\r\n\t }\r\n\t else if (url.includes(RecentTagSort)) {\r\n\t\trecentTagBNId = BTN_id; \r\n\t }\r\n\t else if (url.includes(RecentBkmkSort)) {\r\n\t\trecentBkmkBNId = BTN_id;\r\n\t }\r\n\t else { // Unknown or non supported place: case ...\r\n\t\ttitle = url;\r\n\t }\r\n\t}\r\n\telse if (url.startsWith(\"about:\") || url.startsWith(\"file:\")) { // about: and file: generate a security error when we try to fetch ..\r\n\t uri = \"/icons/nofavicon.png\";\r\n\t fetchedUri = false;\r\n\t // They are draggable, but keep favicon = nofavicon\r\n\t protect = false;\r\n\t}\r\n\telse if (options.disableFavicons) {\r\n\t fetchedUri = false;\r\n\t protect = false;\r\n\t}\r\n\telse {\r\n\t // Retrieve saved uri or set to undefined by default\r\n\t // and trigger favicon retrieval in background\r\n\t uri = undefined;\r\n\t if (savedBkmkUriList != undefined) { // We are migrating to BN list ..\r\n\t\turi = savedBkmkUriList[BTN_id];\r\n\t\tif ((uri == \"/icons/nofavicontmp.png\") // Last time we stopped the sidebar\r\n\t\t\t|| (uri == \"/icons/waiting.gif\") // it didn't have time to fetch that\r\n\t\t ) {\t\t\t\t\t\t\t\t\t// favicon .. so let's do it now.\r\n\t\t uri = undefined;\r\n\t\t}\r\n\t }\r\n\t else if (savedBNList != undefined) { // We are still at initial load ..\r\n\t\tlet BN = savedBNList[BTN_id];\r\n\t\tif (BN != undefined) {\r\n\t\t uri = BN.faviconUri;\r\n\t\t if ((uri == \"/icons/nofavicontmp.png\") // Last time we stopped the sidebar\r\n\t\t\t || (uri == \"/icons/waiting.gif\") // it didn't have time to fetch that\r\n\t\t\t ) { // favicon .. so let's do it now.\r\n\t\t\turi = undefined;\r\n\t\t }\r\n\t\t}\r\n\t }\r\n\t protect = false;\r\n\r\n\t // Trigger asynchronous favicon retrieval process if favicon uri not found\r\n\t if (uri == undefined) {\r\n\t\t// Set tmp favicon and remember it in case the add-on is stopped before we had\r\n\t\t// a chance to get its image.\r\n\t\turi = \"/icons/nofavicontmp.png\";\r\n\t\tfetchedUri = false;\r\n\t\ttriggerFetch = true;\r\n\t\tif (faviconWorker != undefined) {\r\n\t\t countFetchFav++;\r\n//console.log(\"countFetchFav 1: \"+countFetchFav+\" BTN_id: \"+BTN_id);\r\n\t\t}\r\n\t }\r\n\t else {\r\n\t\tfetchedUri = true;\r\n\t\tif (uri == \"/icons/nofavicon.png\")\r\n\t\t countNoFavicon++;\r\n\t }\r\n\t}\r\n\r\n\tif (forceProtect != undefined) { // General rule does not apply (e.g. BTN_id starting with \"place:\")\r\n\t protect = forceProtect;\r\n\t}\r\n\tnode = new BookmarkNode (\r\n\t BTN_id, type, level, BTN.parentId, BTN.dateAdded, protect,\r\n\t title, uri, fetchedUri, url\r\n\t);\r\n\r\n\tif (triggerFetch && !options.pauseFavicons) { // Trigger favicon fetch, except if paused\r\n\t // This is a bookmark, so here no need for cloneBN(), there is no tree below\r\n\t if (faviconWorker != undefined) {\r\n\t\tfaviconWorker({data: [\"get\", BTN_id, url, options.enableCookies]});\r\n\t }\r\n\t}\r\n }\r\n\r\n // Add child to parentBN if provided, adjusting index of other children as needed\r\n if (parentBN != undefined) {\r\n\tlet children = parentBN.children;\r\n\tif (children == undefined) { // No list of children so far\r\n\t parentBN.children = [node];\r\n\t}\r\n\telse if (index >= children.length) { // Append child at end\r\n\t children.push(node);\r\n\t}\r\n\telse { // Insert child at position\r\n\t children.splice(index, 0, node);\r\n\t}\r\n }\r\n\r\n return(node);\r\n}", "function findNewAnchor(prefix, exclude) {\n for (let i = 1; true; ++i) {\n const name = `${prefix}${i}`;\n if (!exclude.has(name))\n return name;\n }\n}", "function processPrefix(prefix, iri) {\n // Create a new prefix if an IRI is specified or the prefix doesn't exist\n if (typeof iri === 'string') {\n // Create a function that expands the prefix\n var cache = Object.create(null);\n\n prefixes[prefix] = function (local) {\n return cache[local] || (cache[local] = factory.namedNode(iri + local));\n };\n } else if (!(prefix in prefixes)) {\n throw new Error('Unknown prefix: ' + prefix);\n }\n\n return prefixes[prefix];\n }", "static fromValues(...values) {\n const bts = new BTS();\n values.forEach(value => bts.insert(value));\n return bts;\n }" ]
[ "0.72567123", "0.72567123", "0.7242157", "0.722152", "0.72063273", "0.71576464", "0.56655985", "0.564259", "0.5450635", "0.5316197", "0.5272328", "0.51581407", "0.51556474", "0.51294714", "0.51221985", "0.51042974", "0.5082082", "0.5079216", "0.5079216", "0.5020319", "0.4999338", "0.4973759", "0.49614188", "0.49340647", "0.4911399", "0.48964515", "0.4882144", "0.48678398", "0.48673972", "0.48625368", "0.486227", "0.4859687", "0.4859687", "0.4859687", "0.48541465", "0.4852123", "0.48455566", "0.48368514", "0.48329988", "0.48318273", "0.47876582", "0.4787003", "0.4778806", "0.47708586", "0.4763168", "0.47592857", "0.47527063", "0.47264704", "0.47256526", "0.47234803", "0.47146875", "0.47115287", "0.46890908", "0.4681885", "0.4681885", "0.4681885", "0.4681885", "0.467851", "0.467851", "0.46677265", "0.46597588", "0.4647599", "0.46457684", "0.46394676", "0.46369532", "0.4625061", "0.4625061", "0.4625061", "0.46210065", "0.46210065", "0.46173456", "0.46173456", "0.46156254", "0.4598761", "0.4589245", "0.4589245", "0.45792502", "0.45629197", "0.45619938", "0.4561282", "0.45354828", "0.45351833", "0.4523964", "0.45180893", "0.45137495", "0.4507709", "0.45053303", "0.45038307", "0.4500984", "0.44999853", "0.4494296", "0.44939423", "0.449238", "0.44899392", "0.44847563", "0.448384", "0.4479509", "0.4473393", "0.44679254", "0.4466172" ]
0.71808153
5
reading a dimension prop will cause the browser to recalculate, which will let our animations work
function triggerBrowserReflow(node) { // eslint-disable-next-line @typescript-eslint/no-unused-expressions node.offsetHeight; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get dimensions() { return this._dimensions; }", "function GetDimension()\n{\n\treturn m_dimension;\n}", "getDim() {\n var width, height;\n\n // If the particle only has a set size (not width/height)\n if (this.size) {\n width = this.size;\n height = this.size;\n } else {\n width = this.width;\n height = this.height;\n }\n\n return {\n width: width,\n height: height\n };\n }", "dimension() {\n if (!this.item.width) {\n return '';\n }\n return `${this.item.width}px * ${this.item.height}px`;\n }", "updateDimensions() {\n this.props.w = this.getWidth();\n this.props.h = this.getHeight();\n }", "getDimensions( flag ) {\n\n\t\tlet dimensions = {}\n\n\t\t// window\t\t\n\t\tconst wWidth = this.props.windowWidth\n\t\tconst wHeight = this.props.windowHeight\n\n\t\t// element\n\t\tconst element = this.props.element\n\t\tlet originalWidth = element.width\n\t\tlet originalHeight = element.height\n\t\tconst ratio = originalWidth / originalHeight\n\n\n\t\t// TODO: make values dynamic\n\t\t// css values\n\n\n\t\t// vars\n\t\tconst unit = 20\n\t\tconst pageFrame = wWidth > 1111 ? unit * 5 : unit\n\t\tconst contentWidth = wWidth - pageFrame * 2\n\t\tconst maxHeight = wHeight * 0.8\n\n\t\tlet width = originalWidth\n\t\tlet height = originalHeight\n\n\t\tif ( flag === \"teaser\" ) {\n\n\t\t\t// TEASER\n\t\t\tconst citizenWidth = 400\n\t\t\tconst rebelWidth = citizenWidth * 1.5\n\t\t\t// is rebel? bool\n\t\t\tlet isRebel = originalWidth === rebelWidth || originalWidth > originalHeight\n\n\t\t\t// correct original if width is incorrect\n\t\t\tconst correctWidth = originalWidth === citizenWidth || originalWidth === rebelWidth\n\t\t\tif ( !correctWidth ) {\n\t\t\t\toriginalWidth = isRebel ? rebelWidth : citizenWidth\n\t\t\t\toriginalHeight = originalWidth / ratio\n\t\t\t}\n\n\t\t\t// set itemWidth\n\t\t\tlet item = 328\n\t\t\t\n\t\t\tif ( wWidth > 1365 ) {\n\t\t\t\titem = citizenWidth\n\t\t\t} else if ( wWidth < 834 ) {\n\t\t\t\titem = 320 - pageFrame * 2\n\t\t\t\tif ( wWidth < item * 1.5 + pageFrame * 2 ) {\n\t\t\t\t\tisRebel = false\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst itemWidth = isRebel ? item * 1.5 : item\n\t\t\twidth = itemWidth\n\t\t\theight = width / ratio\n\n\t\t} else if ( flag === \"showcase\" ) {\n\t\t\t// SHOWCASE\t\n\t\t}\n\n\t\t// handle ratio\n\t\tif ( width > contentWidth ) {\n\t\t\twidth = contentWidth\n\t\t\theight = width / ratio\n\t\t}\n\t\tif ( height > maxHeight ) {\n\t\t\theight = maxHeight\n\t\t\twidth = height * ratio\n\t\t}\n\n\t\t// return dimensions object\n\t\tdimensions = {\n\t\t\twidth: width,\n\t\t\theight: height\n\t\t}\n\n\t\treturn dimensions\n\n\t}", "function setDimensionVal(dim){\n\t\tthis[dim] = this.style[dim].replace(/px/gi, '') || this._params[dim];\n\t}", "getDimensions() {\n return { x: 1, y: 1, z: 1 };\n }", "function _dim() {\r\n var d = _dfa(arguments);\r\n if (d) {\r\n this.d = objDim(this, d);\r\n }\r\n return objCss(this, \"position\") == \"absolute\" ? this.d : objDim(this);\r\n}", "updateDimensions() {\r\n\r\n let viewport = {...this.state.viewport};\r\n\r\n let constant = 0;\r\n if (window.innerWidth >= 1200) constant = 3/4.;\r\n else if (window.innerWidth >= 992) constant = 2/3.;\r\n else if (window.innerWidth >= 768) constant = 7/12.;\r\n else constant = 1.;\r\n\r\n viewport.width=window.innerWidth*constant - 60;\r\n viewport.height=viewport.width/3.;\r\n\r\n this.setState({viewport:viewport})\r\n }", "_calcDimentions() {\n this._props.time = this._props.duration + this._props.delay;\n this._props.repeatTime = this._props.time * (this._props.repeat + 1);\n }", "function updateRenderDimension(dimension) {\n if (!structureControl || !dimension) {\n return;\n }\n\n var alias;\n\n if (dimension === dimensions.horizontal && structureControl.control.renderingHorizontalResizeMode) {\n alias = structureControl.control.renderingHorizontalResizeMode._id.getAlias();\n } else if (dimension === dimensions.vertical && structureControl.control.renderingVerticalResizeMode) {\n alias = structureControl.control.renderingVerticalResizeMode._id.getAlias();\n }\n\n var value;\n\n if (alias) {\n switch (alias) {\n case 'resizeHundred':\n value = 100;\n break;\n case 'resizeTwentyFive':\n value = 25;\n break;\n case 'resizeThirtyThree':\n value = 33;\n break;\n case 'resizeFifty':\n value = 50;\n break;\n case 'resizeSixtySix':\n value = 66;\n break;\n case 'resizeSeventyFive':\n value = 75;\n break;\n }\n }\n\n if (value) {\n if (dimension === dimensions.horizontal) {\n structureControl.control.renderingWidth = value;\n } else {\n structureControl.control.renderingHeight = value;\n }\n }\n }", "function getDimension(element, dimension, fallback) {\r\n // Attempt to use it's attribute value.\r\n var result = element.getAttribute(dimension);\r\n if (result) {\r\n return result + \"px\";\r\n }\r\n // Attempt to use it's computed style.\r\n var style;\r\n if (element.currentStyle) {\r\n style = element.currentStyle[dimension];\r\n } else if (window.getComputedStyle) {\r\n style = document.defaultView.getComputedStyle(element, null).getPropertyValue(dimension);\r\n } else {\r\n return fallback;\r\n }\r\n if (style == \"auto\") {\r\n return fallback;\r\n }\r\n return style;\r\n }", "updateDimensions() {\n\t\t// if (window.innerWidth < 500) {\n\t\t// \tthis.setState({ width: 450, height: 102 })\n\t\t// } else {\n\t\t// \tlet update_width = window.innerWidth - 100\n\t\t// \tlet update_height = Math.round(update_width / 4.4)\n\t\t// \tthis.setState({ width: update_width, height: update_height })\n\t\t// }\n\t}", "function getDimension(element, dimension, fallback) {\n // Attempt to use it's attribute value.\n var result = element.getAttribute(dimension);\n if (result) {\n return result + \"px\";\n }\n // Attempt to use it's computed style.\n var style;\n if (element.currentStyle) {\n style = element.currentStyle[dimension];\n } else if (window.getComputedStyle) {\n style = document.defaultView.getComputedStyle(element, null).getPropertyValue(dimension);\n } else {\n return fallback;\n }\n if (style == \"auto\") {\n return fallback;\n }\n return style;\n }", "function getDimension(dimension) {\n var imgIndex = param.imgN.indexOf(iName),\n imgW = param.imgW[imgIndex],\n imgH = param.imgH[imgIndex];\n return dimension == \"w\" ? imgW : imgH;\n }", "static get(): number {\n return Dimensions.get('window').scale;\n }", "height(props, propName, componentName) {\n return dimensionProp(props, propName, componentName);\n }", "getDim(){\n let n = (this.state.size);\n //toFixed(someNum) used to set floating point accuracy\n let width = (100/(2*n-1)).toFixed(2);\n let margin = (100/(4.5*n-1)).toFixed(2);\n // console.log(width,margin);\n return {width,margin}\n}", "componentDidMount() {\n this.setNewDimensions(15);\n }", "setEssentialDimensions(){\n if(window.innerWidth > 1280) {\n return 5;\n } \n else if(window.innerWidth > 870) {\n return 3;\n } \n else if(window.innerWidth > 600) {\n return 2;\n } \n else {\n return 1;\n } \n }", "function setSize(size, dimension) {\n\t\treturn Math.round((/%/.test(size) ? ((dimension === 'x' ? $window.width() : $window.height()) / 100) : 1) * parseInt(size, 10));\n\t}", "componentDidMount() {\n this.updateDimensions()\n }", "updateDimensions() {\n if(window.innerWidth > 1280) {\n this.setState({\n amount: 5\n })\n } \n else if(window.innerWidth > 870) {\n this.setState({\n amount: 3\n })\n } \n else if(window.innerWidth > 600) {\n this.setState({\n amount: 2\n })\n } \n else {\n this.setState({\n amount: 1\n })\n }\n }", "componentWillMount() {\n //this.updateDimensions();\n }", "function fancyboxDimensions(dimension) {\n\n var fancyWidth = $(window).width()*0.75;\n var fancyHeight = $(window).height()*0.75;\n\n if( $(window).width() > 500 ) {\n fancyWidth = $(window).width()/4;\n fancyHeight = $(window).height()/4;\n }\n\n if( dimension == 'width' ) {\n return fancyWidth;\n } else {\n return fancyHeight;\n }\n\n }", "static getDimension(callBack){\n Dimensions.addEventListener('change', () => {\n width = Dimensions.get(\"screen\").width\n height = Dimensions.get(\"screen\").height \n })\n\n \n // store the orientation, height and width in an object \n \n var object={\n \"height\":parseInt(height, 10),\n \"width\":parseInt(width, 10),\n \"orientation\":orientation = (Dimensions.get(\"screen\").width<Dimensions.get(\"screen\").height)?\"PORTRAIT\":\"LANDSCAPE\"\n } \n callBack(object);\n\n }", "updateDimensions() {\n const network = this._network;\n if( network ) {\n network.setSize(window.innerWidth, window.innerHeight);\n network.redraw();\n }\n const { dispatch } = this.props;\n // if(window.innerWidth<=1000)\n // dispatch(drawerStatusChange(false));\n }", "updateDimensions() {\r\n\t\tthis.setState({ width: window.innerWidth, height: window.innerHeight });\r\n\t}", "get flexibleDimensions() { return this._flexibleDimensions; }", "setSize() {\n this.size.D1 = this.shape.D1*this.unit.X;\n this.size.D2 = this.shape.D2*this.unit.Y;\n }", "find_dimesionsOfEnemy(layout) {\n const { x, y, width, height } = layout;\n\n this.setState({ dimensionsOfRectX: [...this.state.dimensionsOfRectX, x] })\n this.setState({ dimensionsOfRectY: [...this.state.dimensionsOfRectY, y] })\n this.setState({ dimensionsOfRectHeight: [...this.state.dimensionsOfRectHeight, height] })\n this.setState({ dimensionsOfRectWidth: [...this.state.dimensionsOfRectWidth, width] })\n\n }", "function setSize(size, dimension) {\n\t\treturn Math.round((/%/.test(size) ? ((dimension === 'x' ? $window.width() : winheight()) / 100) : 1) * parseInt(size, 10));\n\t}", "function setSize(size, dimension) {\n\t\treturn Math.round((/%/.test(size) ? ((dimension === 'x' ? $window.width() : winheight()) / 100) : 1) * parseInt(size, 10));\n\t}", "function setSize(size, dimension) {\n\t\treturn Math.round((/%/.test(size) ? ((dimension === 'x' ? $window.width() : winheight()) / 100) : 1) * parseInt(size, 10));\n\t}", "function setSize(size, dimension) {\n\t\treturn Math.round((/%/.test(size) ? ((dimension === 'x' ? $window.width() : winheight()) / 100) : 1) * parseInt(size, 10));\n\t}", "function setSize(size, dimension) {\n\t\treturn Math.round((/%/.test(size) ? ((dimension === 'x' ? $window.width() : winheight()) / 100) : 1) * parseInt(size, 10));\n\t}", "width(props, propName, componentName) {\n return muiDimensionProp(props, propName, componentName);\n }", "function setSize(size, dimension) {\n return Math.round((/%/.test(size) ? ((dimension === 'x' ? $window.width() : winheight()) / 100) : 1) * parseInt(size, 10));\n }", "_getGameWidth() {\n return this.scene.scene.manager.game.config.width;\n }", "getDimensions () {\n return this.properties.length\n }", "updateDimensions() {\n this.setState({\n viewport: Object.assign(this.state.viewport, {\n width: window.innerWidth,\n height: window.innerHeight,\n }),\n });\n }", "updateDimensions() {\n const config = this.state.config;\n const fullWidth = parseInt(window.innerWidth - sidebarMenuWidth, 10);\n\n if (fullWidth - config.marginLeft !== config.svgWidth) {\n this.setState({\n 'config': {\n ...this.state.config,\n 'svgWidth': fullWidth - config.marginLeft,\n },\n }, () => {\n const updatedConfig = this.state.config;\n const width = updatedConfig.svgWidth - updatedConfig.marginLeft;\n\n this.setTimeRangePosition(width);\n });\n }\n }", "function getGameDimensions(elem) {\n\t var tmpWidth = elem.width();\n var controlHeight = $(\"#mr-scores\").height() + $(\"#mr-scores\").height() + $(\"#mr-navigation\").height();\n\n for (var i = tmpWidth; i > tmpWidth - settings.columns; i--)\n\t\t{\n\t\t\tif(i%settings.columns == 0)\n\t\t\t{\n\t\t\t\ttmpWidth = i;\n\t\t\t}\n\t\t}\n\t\n\t\tsettings.width = tmpWidth;\n\t\tsettings.height = (tmpWidth / settings.columns) * settings.rows;\n\n\t\tvar maxHeight = window.innerHeight - controlHeight*2;\n\n\t\tif (settings.height > maxHeight)\n\t\t{\n\t\t settings.height = maxHeight;\n\t\t settings.width = (maxHeight / settings.rows) * settings.columns;\n\t\t}\n\t}", "updateDimensions() {\n // A card has a min-width of 600px\n this.setState({nbCardsPerLine: Math.ceil(getWidth()/600)});\n }", "function effect_start_size(element){\n var size = 'width';\n var length = '50%';\n if($('#'+element).data('effect-size-direction')!==undefined && $('#'+element).data('effect-size-direction')!=''){ size = $('#'+element).data('effect-size-direction'); }\n if($('#'+element).data('effect-size-length')!==undefined && $('#'+element).data('effect-size-length')!=''){ length = $('#'+element).data('effect-size-length'); }\n\n anim_str[size] = length;\n}", "function getSize(d) {\n return 750;\n}", "componentDidMount(){\n this.updateDimensions();\n }", "updateDimensions() {\n this.setState({ width: window.innerWidth });\n }", "getWidthUnit(){return this.__widthUnit}", "setChartDimension(){\n // SVG element\n this.svg\n .attr(\"viewBox\", `0 0 ${this.cfg.width+this.cfg.margin.left+this.cfg.margin.right} ${this.cfg.height+this.cfg.margin.top+this.cfg.margin.bottom}`)\n .attr(\"width\", this.cfg.width + this.cfg.margin.left + this.cfg.margin.right)\n .attr(\"height\", this.cfg.height + this.cfg.margin.top + this.cfg.margin.bottom);\n \n // Center element\n this.gcenter\n .attr('transform', `translate(${this.cfg.width/2}, ${this.cfg.height/2})`);\n }", "_updateWidth() {\n this.setState(this._getDOMDimensions());\n }", "function measure() {\n\t\t\n\t\t// Call our validate routine and make sure all component properties have been set\n\t\tviz.validate();\n\t\t\n\t\t// Get our size based on height, width, and margin\n\t\tsize = vizuly2.util.size(scope.margin, scope.width, scope.height, scope.parent);\n\t\t\n\t\tscope.size = size;\n\t\t\n\t\t// Tell everyone we are done making our measurements\n\t\tscope.dispatch.apply('measured', viz);\n\t\t\n\t}", "function dimensions() {\n\n // make sure the watchables are all valid\n angular.forEach(watchables, function(watchable) {\n \n // parse them to floats\n scope[watchable] = parseFloat(scope[watchable]);\n\n if(watchable == refLow || watchable == refHigh) {\n // this is the low or high value so bring them back in line with the steps\n scope[watchable] = roundToStep(scope[watchable], scope.precision, scope[stepWidth], scope.floor, scope.ceiling);\n } else if(watchable == 'buffer') {\n if(!scope.buffer || isNaN(scope.buffer) || scope.buffer < 0) {\n // the buffer is not valid, so set to 0\n scope.buffer = 0;\n } else {\n // this is the buffer so make sure it aligns with the steps\n scope.buffer = stepBuffer(scope[stepWidth], scope.buffer);\n }\n } else if(watchable == 'precision') {\n // make sure the precision is valid\n if(!scope.precision || isNaN(scope.precision)) {\n scope.precision = 0;\n } else {\n scope.precision = parseInt(scope.precision);\n }\n } else if(watchable == stepWidth) {\n // make sure the step is valid\n if(!scope[stepWidth] || isNaN(scope[stepWidth])) {\n scope[stepWidth] = 1 / Math.pow(10, scope.precision);\n } else {\n scope[stepWidth] = parseFloat(scope[stepWidth].toFixed(scope.precision));\n }\n } else if(watchable == 'stickiness') {\n // make sure the stickiness is valid\n if(isNaN(scope.stickiness)) {\n scope.stickiness = KNOB_STICKINESS;\n } else if(scope.stickiness < 1) {\n scope.stickiness = 1;\n }\n }\n \n // save the decoded values\n scope.decodedValues[watchable] = scope.decodeRef(watchable);\n\n });\n\n if(isDualKnob) {\n // if this is a dual knob slider\n\n // make sure the low value is actually lower than the high value\n if(scope[refHigh] < scope[refLow]) {\n var temp = scope[refHigh];\n scope[refHigh] = scope[refLow];\n scope[refLow] = temp;\n }\n\n // get the difference between the knobs, but make sure it's rounded to a step\n var diff = roundToStep(scope[refHigh] - scope[refLow], scope.precision, scope[stepWidth]);\n\n if(scope.buffer > 0 && diff < scope.buffer) {\n // we need a buffer but the difference is smaller than the required buffer\n\n // so find the middle\n var avg = scope.encode((scope.decodedValues[refLow] + scope.decodedValues[refHigh]) / 2);\n\n // and set the knobs so they straddle the middle with the required amount of buffer\n scope[refLow] = roundToStep(avg - (scope.buffer / 2), scope.precision, scope[stepWidth], scope.floor, scope.ceiling);\n scope[refHigh] = scope[refLow] + scope.buffer;\n\n if(scope[refHigh] > scope.ceiling) {\n // the high value is out of range\n\n // so set the high value to the maximum\n scope[refHigh] = scope.ceiling;\n // but keep the buffer correct\n scope[refLow] = scope.ceiling - scope.buffer;\n }\n }\n }\n\n // save the various dimensions we'll need\n barWidth = width(refs.fullBar);\n pointerHalfWidth = halfWidth(refs.minPtr);\n\n minOffset = offsetLeft(refs.fullBar);\n maxOffset = minOffset + barWidth - width(refs.minPtr);\n offsetRange = maxOffset - minOffset;\n\n minValue = scope.floor;\n minValueDecoded = scope.decodedValues.floor;\n maxValue = scope.ceiling;\n maxValueDecoded = scope.decodedValues.ceiling;\n valueRange = maxValue - minValue;\n valueRangeDecoded = maxValueDecoded - minValueDecoded;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tstepRange = roundTo(valueRangeDecoded, scope.decodedValues[stepWidth]);\n }", "getDimensions(){\n if (this.node === null) {return;}\n else {\n let nodeWidth = this.node.getBoundingClientRect().width\n let nodeHeight = this.node.getBoundingClientRect().height\n let shouldResize = nodeWidth !== this.props.width ||\n nodeHeight !== this.props.height\n if (shouldResize) {\n this.props.resize(nodeWidth, nodeHeight)\n }\n }\n }", "_setMeasurements() {\n const that = this;\n\n that._measurements = {};\n\n if (that.orientation === 'horizontal') {\n that._measurements.dimension = 'height';\n that._measurements.minDimension = 'minHeight';\n that._measurements.maxDimension = 'maxHeight';\n that._measurements.restricredDimension = 'Width';\n that._measurements.size = 'offsetHeight';\n that._measurements.offset = 'offsetTop';\n that._measurements.position = 'top';\n that._measurements.position2 = 'bottom';\n that._measurements.pagePosition = 'pageY';\n that._measurements.scroll = 'scrollTop';\n }\n else {\n that._measurements.dimension = 'width';\n that._measurements.minDimension = 'minWidth';\n that._measurements.maxDimension = 'maxWidth';\n that._measurements.restricredDimension = 'Height';\n that._measurements.size = 'offsetWidth';\n that._measurements.offset = 'offsetLeft';\n that._measurements.position = 'left';\n that._measurements.position2 = 'right';\n that._measurements.pagePosition = 'pageX';\n that._measurements.scroll = 'scrollLeft';\n }\n\n that._measurements.overflow = getComputedStyle(that).getPropertyValue('overflow');\n }", "async getDimensions() {\n await this._stabilize();\n const { width, height } = await this.element().getSize();\n const { x: left, y: top } = await this.element().getLocation();\n return { width, height, left, top };\n }", "function dynamicVariableAndDimensions() {\n dynamicCssVariables();\n settingDynamicDimensions();\n}", "get dimension() {\r\n return this.cpoints.shape[1];\r\n }", "get dimension() {\r\n return this.cpoints.shape[1];\r\n }", "function GetSizeItem() {\n an.size = {\n 'OuterWidth': M.OuterWidth($anim),\n 'OuterHeight': M.OuterHeight($anim)\n };\n }", "getSize() {\n return {width: this._width, height: this._height};\n }", "get width(){ return this.Canvas.width }", "getElementSize() {\n const that = this;\n return { width: that.elementWidth, height: that.elementHeight };\n }", "function dimension(element) {\n if(!element.getBoundingClientRect)\n element = element.document.documentElement;\n\n var rect = element.getBoundingClientRect();\n return {\n top: rect.top,\n\t\t\tleft: rect.left,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top\n }\n }", "function onPropertyChange(evt) {\r\n var attr = evt.propertyName, width, height;\r\n\r\n if (attr === \"width\" || attr === \"height\") {\r\n initSurface(ctx);\r\n\r\n width = parseInt(canvas.width);\r\n height = parseInt(canvas.height);\r\n\r\n // resize <canvas>\r\n canvas.style.pixelWidth = width < 0 ? 0 : width;\r\n canvas.style.pixelHeight = height < 0 ? 0 : height;\r\n\r\n ctx.clear();\r\n }\r\n }", "get width() {\n return this.args.width ?? 300;\n }", "function SizeDependWidth() {\n wImageCur = va.wSlide;\n hImageCur = M.R(wImageCur / rateImage);\n }", "changeDimension(){\n if( this.overlap ){\n this.overlap = false;\n // Changer le fond (changement de dimension)\n player.switchColor();\n\n this.scene.event.compareColor();\n\n // Desactiver la mort avec les bordures\n this.scene.space.desactive()\n \n player.body.velocity.y = player.body.velocity.y/1.5;\n \n setTimeout(() => {\n this.scene.cameras.main.fadeOut( 1000 );\n }, 3000);\n\n // Lancer la scene apres le fade out\n this.scene.cameras.main.on('camerafadeoutcomplete', ()=>{ \n\n // Variable pour initialiser le main menu\n gameState = 0;\n boutonReady = 1;\n onInitBouton = true;\n\n // Faire un fade in lorsque le fade out est fini\n ui.cameras.main.fadeIn( 1000 );\n\n // Lancer le main Menu\n this.scene.scene.stop( curLevel )\n if( indexLvl == 0){\n indexLvl = 1;\n }\n curLevel = dataBase.level[ indexLvl ];\n this.scene.scene.launch( curLevel )\n }, this);\n }\n }", "getWidth() { return this.width; }", "calculateImageDimensions() {\n return { width : `${this.state.width}px`, top : `${((this.state.holderHeight - this.state.height) / 2)}px` }\n }", "function updateSize() {\n let gameArea = document.getElementById(\"game\");\n let tileProportion = 10;\n h = Math.floor(gameArea.clientHeight * 0.9);\n w = Math.floor(gameArea.clientWidth * 0.9);\n size = Math.min(h, w);\n style = gameArea.style;\n style.setProperty(\"--proportion\", `${tileProportion}`);\n style.setProperty(\"--size\", `${size}px`);\n}", "_size() {\n const scaleRatio = (window.innerHeight) / (this.gameBoard.height + 2 * config.board.padding);\n this.renderer.resize(window.innerWidth, window.innerHeight);\n this.gameBoard.height *= scaleRatio;\n this.gameBoard.width *= scaleRatio;\n this.gameBoard.position.set((this.screen.width / 2) - (this.gameBoard.width / 2), config.board.padding);\n }", "updateWindowDimensions() {\n this.setState({\n width: (window.innerWidth * 0.8),\n height: (window.innerWidth * 0.4)\n });\n }", "function _safeDimension(obj, dim) {\n\t\tvar cssvalue = parseInt(obj.css(dim));\n\t\treturn isNaN(cssvalue) ? obj[dim]() : cssvalue;\n\t}", "getWidth(){return this.__width}", "function getElementDimension(Element, dim) {\n oElement = createReference(Element)\n if (isIE) {\t\t\t\t\t\t\t\t\t\t\t\t//String manip: Make sure side is Left or Top...IE doesn't understand all lower case.\n\t\telementDim = eval('oElement.pixel' + (dim.toUpperCase()).substring(0,1) + (dim.toLowerCase()).substring(1,dim.length))\n\t} else if (isDOM) {\n elementDim = parseInt(eval('oElement.' + dim.toLowerCase()))\n } else {\n\t\telementDim = eval('oElement.document.' + dim.toLowerCase())\n\t}\n return elementDim\n}", "function matteDim() {\t\n\tvar outer = document.getElementById('outer'); \n\tvar outerWidth = outer.clientWidth; \n\tvar outerHeight = outer.clientHeight; \n\tvar boxSize\n\tvar scale\n\tif (outerHeight > 2500 || outerWidth > 2500) {\n\t\tboxSize = 2500\n\t\tscale = 1\t\t\n\t} else {\n\t\tif (outerHeight < outerWidth) {\n\t\t\tboxSize = outerWidth\n\t\t} else {\n\t\t\tboxSize = outerHeight\n\t\t}\n\t\tscale = outerWidth/2500\n\t}\n\t//$('#scenesContainer').height(boxSize+'px')\n\t//$('#scenesContainer').width(boxSize+'px')\n\t//console.log('Outer Height: ' + outerHeight + ' Width: ' + outerWidth)\n\t//console.log('Scenes Height: ' + $('#scenesContainer').height() + ' Width: ' + $('#scenesContainer').width())\n\tvar hoffset = (outerWidth - boxSize)/2\n\tvar voffset = (outerHeight - boxSize)/2\n\t//console.log(hoffset)\n\t$('#scenesContainer').css({left:hoffset,top:voffset})\n\treturn(scale)\t\n}", "_getNonTransformedDimensions() {\n // Object dimensions\n return new fabric.Point(this.width, this.height).scalarAdd(\n this.padding + boundingBoxPadding\n )\n }", "function getDimCanavs() {\n w = canvas.width;\n h = canvas.height;\n }", "function dimensions() {\n\n // make sure the watchables are all valid\n angular.forEach(watchables, function(watchable) {\n\n // parse them to floats\n if (watchable === 'presetValues') {\n if (typeof scope.presetValues === 'string') {\n scope.presetValues = JSON.parse(scope.presetValues);\n }\n } else if (typeof scope[watchable] !== 'object') {\n scope[watchable] = parseFloat(scope[watchable]);\n }\n\n if (watchable === 'presetValues' && scope[watchable]) {\n scope.minLimit = scope.presetValues[0];\n scope.maxLimit = scope.presetValues[scope.presetValues.length - 1];\n } else if(watchable === refSelected) {\n // this is the low or high value so bring them back in line with the steps\n if (scope.presetValues) {\n\n } else {\n scope[watchable] = roundToStep(scope[watchable], scope.precision, scope[stepWidth], scope.minLimit, scope.maxLimit);\n }\n } else if(watchable === 'stickiness') {\n // make sure the stickiness is valid\n if(isNaN(scope.stickiness)) {\n scope.stickiness = KNOB_STICKINESS;\n } else if(scope.stickiness < 1) {\n scope.stickiness = 1;\n }\n }\n\n // save the decoded values\n if (watchable !== 'presetValues') {\n scope.decodedValues[watchable] = scope.decodeRef(watchable);\n }\n });\n\n // save the various dimensions we'll need\n barWidth = width(refs.fullBar);\n pointerHalfWidth = halfWidth(refs.currPtr);\n\n minOffset = offsetLeft(refs.fullBar);\n maxOffset = minOffset + barWidth - width(refs.currPtr);\n offsetRange = maxOffset - minOffset;\n\n minValue = scope.minLimit;\n minValueDecoded = scope.decodedValues.minLimit;\n maxValue = scope.maxLimit;\n maxValueDecoded = scope.decodedValues.maxLimit;\n valueRange = maxValue - minValue;\n valueRangeDecoded = maxValueDecoded - minValueDecoded;\n\n\t\t\t\t\t\t\t\tstepRange = roundTo(valueRangeDecoded, scope.decodedValues[stepWidth]);\n }", "function updateMetrics() {\n\n isVwDirty = false;\n DPR = window.devicePixelRatio;\n cssCache = {};\n sizeLengthCache = {};\n\n pf.DPR = DPR || 1;\n\n units.width = Math.max(window.innerWidth || 0, docElem.clientWidth);\n units.height = Math.max(window.innerHeight || 0, docElem.clientHeight);\n\n units.vw = units.width / 100;\n units.vh = units.height / 100;\n\n evalId = [ units.height, units.width, DPR ].join(\"-\");\n\n units.em = pf.getEmValue();\n units.rem = units.em;\n }", "height(props, propName, componentName) {\n return muiDimensionProp(props, propName, componentName);\n }", "calculateSize(){\n const { width: staticWidth, height: staticHeight } = this._options\n let { options } = this\n\n const elem = d3.select(options.target).node()\n\n // set width\n options.width = staticWidth || elem.clientWidth || 400\n\n // set height\n options.height = staticHeight || elem.clientHeight || 350\n\n // calculate width and height without margins\n const { width, height, margin } = options\n options.w = width - margin.left - margin.right\n options.h = height - margin.top - margin.bottom\n }", "calculateSize(){\n const { width: staticWidth, height: staticHeight } = this._options\n let { options } = this\n\n const elem = d3.select(options.target).node()\n\n // set width\n options.width = staticWidth || elem.clientWidth || 400\n\n // set height\n options.height = staticHeight || elem.clientHeight || 350\n\n // calculate width and height without margins\n const { width, height, margin } = options\n options.w = width - margin.left - margin.right\n options.h = height - margin.top - margin.bottom\n }", "function updateMetrics() {\n\n\t\tisVwDirty = false;\n\t\tDPR = window.devicePixelRatio;\n\t\tcssCache = {};\n\t\tsizeLengthCache = {};\n\n\t\tpf.DPR = DPR || 1;\n\n\t\tunits.width = Math.max(window.innerWidth || 0, docElem.clientWidth);\n\t\tunits.height = Math.max(window.innerHeight || 0, docElem.clientHeight);\n\n\t\tunits.vw = units.width / 100;\n\t\tunits.vh = units.height / 100;\n\n\t\tevalId = [ units.height, units.width, DPR ].join(\"-\");\n\n\t\tunits.em = pf.getEmValue();\n\t\tunits.rem = units.em;\n\t}", "function getDimension( e, d ){\n\n\t\treturn ( e.touches?e.touches[0]:e )[\"page\" + d];\n\n\t}", "function get_dimensions(elem) {\n\tconsole.log('getting dimensions for: ')\n\tconsole.log(elem)\n\tconsole.log('width:', elem.width())\n\tconsole.log('height:', elem.height())\n\tconsole.log('outerheight:', elem.outerHeight(true))\n\tconsole.log('outerwidth:', elem.outerWidth(true))\n\tconsole.log('offsetHeight:', elem.offsetHeight)\n\tconsole.log('offsetWidth:', elem.offsetWidth)\n}", "get width() { return this._.canvas.width; }", "function makeEtch(dimension){\n\n removeDivs();\n\n makeContainer();\n\n makeDivs(dimension);\n\n document.documentElement.style.setProperty(\"--dimension\", dimension);\n\n}", "get scalableDimensionInput() {\n return this._scalableDimension;\n }", "function handleUpdate() {\n const suffix = this.dataset.sizing || ''; // const suffix gets the suffix for our CSS variables. These value is link to data-sizing in our HTML\n document.documentElement.style.setProperty(`--${this.name}`, this.value + suffix); //Sets the property to our element (--spacing, --blur), sets the value (10,20,) + and the suffix (px)\n}", "function setDim(dim) {\n\th = dim;\n\tif (h >= 3 && h <= 200) {\n\t\tif (h >= 100) {\n\t\t\thandlers.errorHandler(\"Dimensions above 100 will use a lot of processing power!\", \"warn\");\n\t\t\tmsg.send(\"Dimensions above 100 will use a lot of processing power!\");\n\t\t}\n\t\th = floor(cHeight / dim);\n\t\tres = h;\n\t\tsetup();\n\t} else {\n\t\thandlers.errorHandler(\"Invalid Dimension on setDim(\" + dim + \")!\");\n\t}\n}", "function computeSizes () { \n\tvar width = $(window).width();\n\tvar height = $(window).height();\n\tvar margin = 100;\n\tvar dimens = {\n\t\theight:height,\n\t\twidth: width,\n\t\tmargin: margin\n\t}\n\treturn dimens;\n}", "function Legato_Structure_Dimensions()\r\n{\r\n\t\r\n\t// What type of arguments passed in?\r\n\tif ( arguments.length == 2 )\r\n\t{\r\n\r\n\t\t// Store the passed in parameters.\r\n\t\tthis.width = arguments[0];\r\n\t\tthis.height = arguments[1];\r\n\t\t\r\n\t} // End if a width and height.\r\n\telse if ( arguments.length == 1 )\r\n\t{\r\n\t\t\r\n\t\tvar element = $( arguments[0] );\r\n\r\n\t\t// Get the element's dimensions.\r\n\t\tvar dimensions = element.dimensions();\r\n\t\tthis.width = dimensions[0];\r\n\t\tthis.height = dimensions[1];\r\n\t\t\r\n\t} // End if element passed in.\r\n\r\n}", "function ImageDimensions() { }", "_vars () {\n this.progress = 0;\n this._prevTime = undefined;\n this._progressTime = 0;\n this._negativeShift = 0;\n this._state = 'stop';\n // if negative delay was specified,\n // save it to _negativeShift property and\n // reset it back to 0\n if ( this._props.delay < 0 ) {\n this._negativeShift = this._props.delay;\n this._props.delay = 0;\n }\n\n return this._calcDimentions();\n }", "function dim(el, key) {\nvar v = parseInt(el.css(key), 10);\nif (v) { return v; }\nvar s = el[0].currentStyle;\nreturn s && s.width && parseInt(s.width, 10);\t\n}", "updateSize() {\n this.w = this.ent.width + this.wo;\n this.h = this.ent.height + this.ho;\n }", "function getElementUNPOSDimension(Element, dim) {\n\toElement = createReference(Element)\n if (isIE && !isMac) {\t\n\t\tif (dim == \"width\") {\n\t\t\tdim = \"scrollWidth\"\n\t\t} else {\n\t\t\tdim = \"scrollHeight\"\n\t\t}\t\t\t\t\t\t\n\t\telementDim = eval('document.all.' + Element + '.' + dim);\n\t} else {\n\t\tif (dim == \"width\") {\n\t\t\tdim = \"offsetWidth\"\n\t\t} else {\n\t\t\tdim = \"offsetHeight\"\n\t\t}\t\n\t\telementDim = eval('document.getElementById(\"' + Element + '\").' + dim);\t\n }\n return elementDim\n}", "getWidthMode(){return this.__widthMode}" ]
[ "0.6696144", "0.66818684", "0.6676606", "0.6507382", "0.64850235", "0.64654666", "0.63174057", "0.6300187", "0.6299067", "0.6289369", "0.6270396", "0.6189207", "0.6172025", "0.6156513", "0.6149669", "0.61004347", "0.60715854", "0.6055112", "0.60541075", "0.5985734", "0.597465", "0.5973084", "0.5972594", "0.59724665", "0.59693915", "0.59610486", "0.5952781", "0.5943207", "0.5924671", "0.5891833", "0.58645517", "0.58617896", "0.585735", "0.585735", "0.585735", "0.585735", "0.585735", "0.5853815", "0.5853318", "0.58413136", "0.58119553", "0.58113956", "0.58091295", "0.5804826", "0.580146", "0.5797981", "0.57797927", "0.57793975", "0.57623833", "0.5759827", "0.5751196", "0.57420206", "0.5736764", "0.5730792", "0.57109356", "0.5698146", "0.5695539", "0.56868935", "0.5672134", "0.5672134", "0.5652205", "0.5640522", "0.5638724", "0.56311166", "0.5625051", "0.5620155", "0.5616335", "0.5603555", "0.55991054", "0.5592786", "0.5592573", "0.55917895", "0.55868685", "0.5581602", "0.5581394", "0.55811393", "0.5577035", "0.55720264", "0.55646294", "0.55503124", "0.55363035", "0.55356383", "0.55334884", "0.5532861", "0.5532861", "0.55310494", "0.5523511", "0.5523335", "0.55225474", "0.5520306", "0.5518638", "0.5513807", "0.5511944", "0.5495089", "0.54942554", "0.54937315", "0.5487517", "0.54795825", "0.5469809", "0.5469127", "0.5468868" ]
0.0
-1
by calls to these methods by a Babel plugin. In PROD (or in packages without access to React internals), they are left as they are instead.
function warn(format) { { for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } printWarning('warn', format, args); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetIfUsingPreact() {\n if (window.preact !== undefined) {\n jsxLoader.compiler.pragma = 'React.createElement';\n jsxLoader.compiler.pragmaFrag = 'React.Fragment';\n }\n }", "react() {\n return;\n }", "function globalizeReact() {\n var global = (function () {\n return this;\n })();\n global.React = global.React || react;\n }", "function shim() {\n (0, _invariant2.default)(false, 'The current renderer does not support persistence. ' + 'This error is likely caused by a bug in React. ' + 'Please file an issue.');\n}", "function shim() {\n (0, _invariant2.default)(false, 'The current renderer does not support persistence. ' + 'This error is likely caused by a bug in React. ' + 'Please file an issue.');\n}", "exit(programPath, state) {\n // Babel 6 only let's you read plugin options inside visitors,\n // so we can't warn about an invalid config until the first file is hit.\n // TODO: In Babel 7, use config passed in when plugin is first created\n const {\n config,\n prod = false,\n onWarning = noop,\n onError = noop\n } = state.opts;\n\n if (!validationRan) {\n validationRan = true;\n if (typeof prod !== 'boolean') {\n onError(\n `Expected \"prod\" to be a boolean, but received \"${typeof prod}\"`\n );\n }\n if (typeof config !== 'object') {\n onError(\n `Expected \"config\" to be an object, but received \"${typeof config}\"`\n );\n }\n\n const { passed, error } = validateConfig(config);\n if (!passed) {\n // Warn about invalid config, but let the compilation\n // keep going\n onWarning(error);\n }\n }\n\n // We need to find any identifiers in scope that could be used to call\n // React's `createElement` function.\n const reactModuleImports = identifiersInScopeFromModule(\n programPath,\n /^react$/\n );\n const {\n reactIdentifier,\n createElementIdentifier\n } = reactModuleImports.reduce((acc, importData) => {\n if (importData.bindingName === 'default') {\n acc.reactIdentifier = importData.local;\n }\n if (importData.bindingName === 'createElement') {\n acc.createElementIdentifier = importData.local;\n }\n return acc;\n }, {});\n\n // No element creation in this file, so we bail\n if (!(reactIdentifier || createElementIdentifier)) {\n return;\n }\n\n // Start the transformation traversal\n programPath.traverse({\n CallExpression(path) {\n const isCECall = isCreateElementCall(\n path,\n reactIdentifier,\n createElementIdentifier\n );\n if (!isCECall) return;\n\n const [element] = path.get('arguments');\n const dataMIDPropNode = getProp(path, 'data-mid');\n if (!dataMIDPropNode) return;\n\n const { value: dataMID, type } = dataMIDPropNode;\n if (type !== 'StringLiteral') {\n onWarning(\n 'Expected \"data-mid\" to be a literal string, ' +\n `but instead found a value of type \"${type}\"`\n );\n }\n\n if (!t.isStringLiteral(element)) {\n onWarning(\n '\"data-mid\" found on a Composite Component.' +\n 'Only DOM elements(div/span/etc) can be a Layout Container'\n );\n }\n\n const operations = config[dataMID];\n // No operations were registered for this Container\n if (!(operations && operations.length)) {\n return;\n }\n\n new ContainerOperationsProcessor({\n types: t,\n operations,\n containerPath: path,\n containerMID: dataMID,\n program: programPath,\n reactIdentifier,\n createElementIdentifier,\n onWarning,\n onError\n }).execute();\n }\n });\n }", "function shim() {\n (0, _invariant2.default)(false, 'The current renderer does not support hyration. ' + 'This error is likely caused by a bug in React. ' + 'Please file an issue.');\n}", "function shim() {\n (0, _invariant2.default)(false, 'The current renderer does not support hyration. ' + 'This error is likely caused by a bug in React. ' + 'Please file an issue.');\n}", "function hooks() {\n \"use strict\";\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n }", "function shim() {\n (function () {\n {\n {\n throw ReactError(Error('The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.'));\n }\n }\n })();\n}", "function shim() {\n (function () {\n {\n {\n throw ReactError(Error('The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.'));\n }\n }\n })();\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "babelConfig() {\n return {\n presets: ['@babel/preset-react']\n };\n }", "function shim() {\n (function () {\n {\n {\n throw ReactError(Error(\"The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.\"));\n }\n }\n })();\n } // Persistence (when unsupported)", "componentWillUnmount() {\n\t\t// Stub\n\t}", "function shim() {\n (function () {\n {\n {\n throw ReactError(Error(\"The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.\"));\n }\n }\n })();\n} // Persistence (when unsupported)", "function shim() {\n (function () {\n {\n {\n throw ReactError(Error(\"The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.\"));\n }\n }\n })();\n} // Persistence (when unsupported)", "UNSAFE_componentWillReceiveProps(nextProps) {\n \n }", "prependPolyfills() {\n\t\tif ((Utils.isServerSide && !global._babelPolyfill) || (Utils.isBrowserSide && !window._babelPolyfill))\n\t\t\trequire('@babel/polyfill')\n\t}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n } // Persistence (when unsupported)", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n } // Persistence (when unsupported)", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n } // Persistence (when unsupported)", "dependencies() {\n return ['@babel/preset-react'];\n }", "function shim(){invariant(false,'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');}// Persistence (when unsupported)", "function shim(){invariant(false,'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');}// Persistence (when unsupported)", "function shim(){invariant(false,'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');}// Persistence (when unsupported)", "function shim(){invariant(false,'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');}// Persistence (when unsupported)", "getBabelPlugins() {\n return null;\n }", "function useDocusaurusContext(){return Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(_context__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"]);}", "function checkIfInsideAStrictModeTree(reactComponentInstance) {\n var reactInternalFiber = reactComponentInstance && (reactComponentInstance._reactInternalFiber || reactComponentInstance._reactInternals);\n\n while (reactInternalFiber) {\n if (reactInternalFiber.mode & StrictMode) {\n return true;\n }\n\n reactInternalFiber = reactInternalFiber[\"return\"];\n }\n\n return false;\n }", "componentWillMount(){\n this.setState({ React: false })\n}", "function isAsyncMode(object){{if(!hasWarnedAboutDeprecatedIsAsyncMode){hasWarnedAboutDeprecatedIsAsyncMode=true;// Using console['warn'] to evade Babel and ESLint\nconsole['warn']('The ReactIs.isAsyncMode() alias has been deprecated, '+'and will be removed in React 17+. Update your code to use '+'ReactIs.isConcurrentMode() instead. It has the exact same API.');}}return isConcurrentMode(object)||typeOf(object)===REACT_ASYNC_MODE_TYPE;}", "function a(e){return e&&e.__esModule?e:{default:e}}", "if (prevProps.isActive && !this.props.isActive) {\n this.props.onLoadEventsFunctionsExtensions();\n }", "preset () { return false }", "function shim() {\n {\n {\n throw Error(\"The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n} // Persistence (when unsupported)", "function shim() {\n {\n {\n throw Error(\"The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n} // Persistence (when unsupported)", "function shim() {\n {\n {\n throw Error(\"The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n} // Persistence (when unsupported)", "function shim() {\n {\n {\n throw Error(\"The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n} // Persistence (when unsupported)", "function checkInstrumented() {\n if (proto['__gl_wrapped__']) {\n return false;\n }\n Object.defineProperty(proto, '__gl_wrapped__', {\n 'configurable': true,\n 'enumerable': false,\n 'value': true\n });\n contextRestoreFns.push(function() {\n delete proto['__gl_wrapped__'];\n });\n return true;\n }", "function processChild(element,Component){var isClass=shouldConstruct$1(Component);var publicContext=processContext(Component,context,threadID,isClass);var queue=[];var replace=false;var updater={isMounted:function(publicInstance){return false;},enqueueForceUpdate:function(publicInstance){if(queue===null){warnNoop(publicInstance,'forceUpdate');return null;}},enqueueReplaceState:function(publicInstance,completeState){replace=true;queue=[completeState];},enqueueSetState:function(publicInstance,currentPartialState){if(queue===null){warnNoop(publicInstance,'setState');return null;}queue.push(currentPartialState);}};var inst;if(isClass){inst=new Component(element.props,publicContext,updater);if(typeof Component.getDerivedStateFromProps==='function'){{if(inst.state===null||inst.state===undefined){var componentName=getComponentName(Component)||'Unknown';if(!didWarnAboutUninitializedState[componentName]){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);didWarnAboutUninitializedState[componentName]=true;}}}var partialState=Component.getDerivedStateFromProps.call(null,element.props,inst.state);{if(partialState===undefined){var _componentName=getComponentName(Component)||'Unknown';if(!didWarnAboutUndefinedDerivedState[_componentName]){error('%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. '+'You have returned undefined.',_componentName);didWarnAboutUndefinedDerivedState[_componentName]=true;}}}if(partialState!=null){inst.state=_assign({},inst.state,partialState);}}}else {{if(Component.prototype&&typeof Component.prototype.render==='function'){var _componentName2=getComponentName(Component)||'Unknown';if(!didWarnAboutBadClass[_componentName2]){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);didWarnAboutBadClass[_componentName2]=true;}}}var componentIdentity={};prepareToUseHooks(componentIdentity);inst=Component(element.props,publicContext,updater);inst=finishHooks(Component,element.props,inst,publicContext);{// Support for module components is deprecated and is removed behind a flag.\n// Whether or not it would crash later, we want to show a good message in DEV first.\nif(inst!=null&&inst.render!=null){var _componentName3=getComponentName(Component)||'Unknown';if(!didWarnAboutModulePatternComponent[_componentName3]){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);didWarnAboutModulePatternComponent[_componentName3]=true;}}}// If the flag is on, everything is assumed to be a function component.\n// Otherwise, we also do the unfortunate dynamic checks.\nif(inst==null||inst.render==null){child=inst;validateRenderResult(child,Component);return;}}inst.props=element.props;inst.context=publicContext;inst.updater=updater;var initialState=inst.state;if(initialState===undefined){inst.state=initialState=null;}if(typeof inst.UNSAFE_componentWillMount==='function'||typeof inst.componentWillMount==='function'){if(typeof inst.componentWillMount==='function'){{if(inst.componentWillMount.__suppressDeprecationWarning!==true){var _componentName4=getComponentName(Component)||'Unknown';if(!didWarnAboutDeprecatedWillMount[_componentName4]){warn(// keep this warning in sync with ReactStrictModeWarning.js\n'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);didWarnAboutDeprecatedWillMount[_componentName4]=true;}}}// In order to support react-lifecycles-compat polyfilled components,\n// Unsafe lifecycles should not be invoked for any component with the new gDSFP.\nif(typeof Component.getDerivedStateFromProps!=='function'){inst.componentWillMount();}}if(typeof inst.UNSAFE_componentWillMount==='function'&&typeof Component.getDerivedStateFromProps!=='function'){// In order to support react-lifecycles-compat polyfilled components,\n// Unsafe lifecycles should not be invoked for any component with the new gDSFP.\ninst.UNSAFE_componentWillMount();}if(queue.length){var oldQueue=queue;var oldReplace=replace;queue=null;replace=false;if(oldReplace&&oldQueue.length===1){inst.state=oldQueue[0];}else {var nextState=oldReplace?oldQueue[0]:inst.state;var dontMutate=true;for(var i=oldReplace?1:0;i<oldQueue.length;i++){var partial=oldQueue[i];var _partialState=typeof partial==='function'?partial.call(inst,nextState,element.props,publicContext):partial;if(_partialState!=null){if(dontMutate){dontMutate=false;nextState=_assign({},nextState,_partialState);}else {_assign(nextState,_partialState);}}}inst.state=nextState;}}else {queue=null;}}child=inst.render();{if(child===undefined&&inst.render._isMockFunction){// This is probably bad practice. Consider warning here and\n// deprecating this convenience.\nchild=null;}}validateRenderResult(child,Component);var childContext;{if(typeof inst.getChildContext==='function'){var _childContextTypes=Component.childContextTypes;if(typeof _childContextTypes==='object'){childContext=inst.getChildContext();for(var contextKey in childContext){if(!(contextKey in _childContextTypes)){{throw Error((getComponentName(Component)||'Unknown')+\".getChildContext(): key \\\"\"+contextKey+\"\\\" is not defined in childContextTypes.\");}}}}else {{error('%s.getChildContext(): childContextTypes must be defined in order to '+'use getChildContext().',getComponentName(Component)||'Unknown');}}}if(childContext){context=_assign({},context,childContext);}}}", "function disableClearConsole() {\n require('react-dev-utils/clearConsole');\n require.cache[require.resolve('react-dev-utils/clearConsole')].exports = function() {}\n}", "function useThemeContext(){return Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(_theme_ThemeContext__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"]);}", "function setDeprecatedOptions(env, config, options) {\n var _a, _b, _c, _d, _e, _f;\n if (!options) {\n return config;\n }\n var newObj = config ? JSON.parse(JSON.stringify(config)) : {};\n var filename = options.filename, chunkFilename = options.chunkFilename, react = options.react, reactDOM = options.reactDOM;\n var useSplit = hasOptions('split', env);\n var useVendor = hasOptions('vendor', env);\n if (filename && !((_a = newObj.build) === null || _a === void 0 ? void 0 : _a.filename)) {\n if (!newObj.build) {\n newObj.build = { filename: filename };\n }\n else {\n newObj.build.filename = filename;\n }\n }\n if (chunkFilename && !((_b = newObj.build) === null || _b === void 0 ? void 0 : _b.chunkFilename)) {\n if (!newObj.build) {\n newObj.build = { chunkFilename: chunkFilename };\n }\n else {\n newObj.build.chunkFilename = chunkFilename;\n }\n }\n if (useSplit && !((_c = newObj.build) === null || _c === void 0 ? void 0 : _c.split)) {\n if (!newObj.build) {\n newObj.build = { split: useSplit };\n }\n else {\n newObj.build.split = useSplit;\n }\n }\n if (useVendor && !((_d = newObj.build) === null || _d === void 0 ? void 0 : _d.vendor)) {\n if (!newObj.build) {\n newObj.build = { vendor: useVendor };\n }\n else {\n newObj.build.vendor = useVendor;\n }\n }\n if (react && !((_e = newObj.modules) === null || _e === void 0 ? void 0 : _e.react)) {\n if (!newObj.modules) {\n newObj.modules = { react: react };\n }\n else {\n newObj.modules.react = react;\n }\n }\n if (reactDOM && !((_f = newObj.modules) === null || _f === void 0 ? void 0 : _f.reactDOM)) {\n if (!newObj.modules) {\n newObj.modules = { reactDOM: reactDOM };\n }\n else {\n newObj.modules.reactDOM = reactDOM;\n }\n }\n return newObj;\n}", "function s(e){return e&&e.__esModule?e:{default:e}}", "function s(e){return e&&e.__esModule?e:{default:e}}", "function reactProdInvariant(code){var argCount=arguments.length-1;var message='Minified React error #'+code+'; visit '+'http://facebook.github.io/react/docs/error-decoder.html?invariant='+code;for(var argIdx=0;argIdx<argCount;argIdx++){message+='&args[]='+encodeURIComponent(arguments[argIdx+1]);}message+=' for the full message or use the non-minified dev environment'+' for full errors and additional helpful warnings.';var error=new Error(message);error.name='Invariant Violation';error.framesToPop=1;// we don't care about reactProdInvariant's own frame\nthrow error;}", "function reactProdInvariant(code){var argCount=arguments.length-1;var message='Minified React error #'+code+'; visit '+'http://facebook.github.io/react/docs/error-decoder.html?invariant='+code;for(var argIdx=0;argIdx<argCount;argIdx++){message+='&args[]='+encodeURIComponent(arguments[argIdx+1]);}message+=' for the full message or use the non-minified dev environment'+' for full errors and additional helpful warnings.';var error=new Error(message);error.name='Invariant Violation';error.framesToPop=1;// we don't care about reactProdInvariant's own frame\nthrow error;}", "async _handlePreviouslyNestedCurrentlyImportedCase() {\n if (!this.consumer) return; // $FlowFixMe this.component.componentMap is set\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n\n if (this.origin === _constants().COMPONENT_ORIGINS.IMPORTED && this.component.componentMap.origin === _constants().COMPONENT_ORIGINS.NESTED) {\n await this._cleanOldNestedComponent();\n this.component.componentMap = this.addComponentToBitMap(this.writeToPath);\n }\n }", "function restoreContextAfterImports () {\n try {\n global.define = __define\n } catch (_) {\n console.warn('IXO Keysafe - global.define could not be overwritten.')\n }\n}", "initComponents() {\n // precomputed\n const components = this._withPrecomputeRenderer(this.reactClass, this.el, this.log, MemoizingSnapshotOptimizer);\n\n // isolated\n // const partially = this._withIsolatedComponents.bind(this, this.reactClass, this.el, this.log);\n // const components = partially(NoopOptimizer, NaiveReactRenderer);\n // const components = partially(MemoizingSnapshotOptimizer, NaiveReactRenderer);\n\n // const components = partially(NoopOptimizer, RafReactRenderer);\n // const components = partially(MemoizingOptimizer, RafReactRenderer);\n // const components = partially(MemoizingSnapshotOptimizer, RafReactRenderer);\n \n console.info('initComponents:', components);\n this.renderer = components.renderer;\n this.optimizer = components.optimizer;\n this.loggit = components.loggit;\n }", "render() {\n return (\n <div className=\"BorderBoxSubrouting\">\n Hello {this.props.name}\n <div className={this.defaultParams() ? '' : 'babel-error'}>\n Default parameters work: {this.defaultParams().toString()}\n </div>\n <div className={this.restParams() ? '' : 'babel-error'}>\n Rest parameters work: {this.restParams().toString()}\n </div>\n <div className={this.spreadOperator() ? '' : 'babel-error'}>\n Spread Operator works for array and objects (obj needs stage 2): {this.spreadOperator().toString()}\n </div>\n <div className={this.templateLiteralString() ? '' : 'babel-error'}>\n Template literal string works: {this.templateLiteralString().toString()}\n </div>\n <div className={this.objectDestructuring() ? '' : 'babel-error'}>\n Object destructuring works: {this.objectDestructuring().toString()}\n </div>\n <div className={this.arrayDestructuring() ? '' : 'babel-error'}>\n Array destructuring works: {this.arrayDestructuring().toString()}\n </div>\n <div className={this.enhancedObjectLiterals() ? '' : 'babel-error'}>\n Enhanced Object Literals work: {this.enhancedObjectLiterals().toString()}\n </div>\n <div className={this.arrowFunctions() ? '' : 'babel-error'}>\n Arrow functions: {this.arrowFunctions().toString()}\n </div>\n <div className={this.promises() ? '' : 'babel-error'}>Promises work: {this.promises().toString()}</div>\n <div className={this.letKeyword() ? '' : 'babel-error'}>\n 'let' keywork works: {this.letKeyword().toString()}\n </div>\n <div className={this.isInteger() ? '' : 'babel-error'}>\n Number.isInteger works: {this.isInteger().toString()}\n </div>\n <div className={this.stringIncludes() ? '' : 'babel-error'}>\n String.prototype.includes works: {this.stringIncludes().toString()}\n </div>\n <div className={this.forOf() ? '' : 'babel-error'}>For of works: {this.forOf().toString()}</div>\n <div className={this.maps() ? '' : 'babel-error'}>Maps work: {this.maps().toString()}</div>\n <div className={this.sets() ? '' : 'babel-error'}>Sets work: {this.sets().toString()}</div>\n <div className={this.arrayFrom() ? '' : 'babel-error'}>Array.from() works: {this.arrayFrom().toString()}</div>\n <div className={this.arrayIncludes() ? '' : 'babel-error'}>\n Array.prototype.includes works: {this.arrayIncludes().toString()}\n </div>\n <div className={this.exponentiation() ? '' : 'babel-error'}>\n Exponentiation operator works: {this.exponentiation().toString()}\n </div>\n <div className={this.state.asyncAwaitWorks ? '' : 'babel-error'}>\n Async await: check console for AsyncAwait errors\n </div>\n <div className={this.objectValues() ? '' : 'babel-error'}>\n Object.values works: {this.objectValues().toString()}\n </div>\n </div>\n );\n }", "componentDidMount() {\n this.onQuerySubmiT('React development');\n }", "function cloneElement(element,config,children){!!(element===null||element===undefined)?invariant(false,'React.cloneElement(...): The argument must be a React element, but you passed %s.',element):void 0;var propName=void 0;// Original props are copied\nvar props=_assign({},element.props);// Reserved names are extracted\nvar key=element.key;var ref=element.ref;// Self is preserved since the owner is preserved.\nvar self=element._self;// Source is preserved since cloneElement is unlikely to be targeted by a\n// transpiler, and the original source is probably a better indicator of the\n// true owner.\nvar source=element._source;// Owner will be preserved, unless ref is overridden\nvar owner=element._owner;if(config!=null){if(hasValidRef(config)){// Silently steal the ref from the parent.\nref=config.ref;owner=ReactCurrentOwner.current;}if(hasValidKey(config)){key=''+config.key;}// Remaining properties override existing props\nvar defaultProps=void 0;if(element.type&&element.type.defaultProps){defaultProps=element.type.defaultProps;}for(propName in config){if(hasOwnProperty.call(config,propName)&&!RESERVED_PROPS.hasOwnProperty(propName)){if(config[propName]===undefined&&defaultProps!==undefined){// Resolve default props\nprops[propName]=defaultProps[propName];}else{props[propName]=config[propName];}}}}// Children can be more than one argument, and those are transferred onto\n// the newly allocated props object.\nvar childrenLength=arguments.length-2;if(childrenLength===1){props.children=children;}else if(childrenLength>1){var childArray=Array(childrenLength);for(var i=0;i<childrenLength;i++){childArray[i]=arguments[i+2];}props.children=childArray;}return ReactElement(element.type,key,ref,self,source,owner,props);}", "config(cfg) {\n // if (cfg.hasFilesystemConfig()) {\n // // Use the normal config\n // return cfg.options;\n // }\n\n const {\n __createDll,\n __react,\n __typescript = false,\n __server = false,\n __spaTemplateInject = false,\n __routes,\n } = customOptions;\n const { presets, plugins, ...options } = cfg.options;\n const isServer =\n __server || process.env.WEBPACK_BUILD_STAGE === 'server';\n // console.log({ options });\n\n // presets ========================================================\n const newPresets = [...presets];\n if (__typescript) {\n newPresets.unshift([\n require('@babel/preset-typescript').default,\n __react\n ? {\n isTSX: true,\n allExtensions: true,\n }\n : {},\n ]);\n // console.log(newPresets);\n }\n newPresets.forEach((preset, index) => {\n if (\n typeof preset.file === 'object' &&\n /^@babel\\/preset-env$/.test(preset.file.request)\n ) {\n const thisPreset = newPresets[index];\n if (typeof thisPreset.options !== 'object')\n thisPreset.options = {};\n thisPreset.options.modules = false;\n thisPreset.options.exclude = [\n // '@babel/plugin-transform-regenerator',\n // '@babel/plugin-transform-async-to-generator'\n ];\n if (isServer || __spaTemplateInject) {\n thisPreset.options.targets = {\n node: true,\n };\n thisPreset.options.ignoreBrowserslistConfig = true;\n thisPreset.options.exclude.push(\n '@babel/plugin-transform-regenerator'\n );\n thisPreset.options.exclude.push(\n '@babel/plugin-transform-async-to-generator'\n );\n }\n // console.log(__spaTemplateInject, thisPreset);\n }\n });\n\n // plugins ========================================================\n // console.log('\\n ');\n // console.log('before', plugins.map(plugin => plugin.file.request));\n\n const newPlugins = plugins.filter((plugin) => {\n // console.log(plugin.file.request);\n if (testPluginName(plugin, /^extract-hoc(\\/|\\\\)babel$/))\n return false;\n if (testPluginName(plugin, /^react-hot-loader(\\/|\\\\)babel$/))\n return false;\n if (testPluginName(plugin, 'transform-regenerator'))\n return false;\n\n return true;\n });\n\n // console.log('after', newPlugins.map(plugin => plugin.file.request));\n\n if (\n !__createDll &&\n __react &&\n process.env.WEBPACK_BUILD_ENV === 'dev'\n ) {\n // newPlugins.push(require('extract-hoc/babel'));\n newPlugins.push(require('react-hot-loader/babel'));\n }\n\n if (!__createDll && !isServer) {\n let pathname = path.resolve(getCwd(), __routes);\n if (fs.lstatSync(pathname).isDirectory()) pathname += '/index';\n if (!fs.existsSync(pathname)) {\n const exts = ['.js', '.ts'];\n exts.some((ext) => {\n const newPathname = path.resolve(pathname + ext);\n if (fs.existsSync(newPathname)) {\n pathname = newPathname;\n return true;\n }\n return false;\n });\n }\n newPlugins.push([\n path.resolve(\n __dirname,\n './plugins/client-sanitize-code-spliting-name.js'\n ),\n {\n routesConfigFile: pathname,\n },\n ]);\n // console.log(newPlugins);\n }\n\n const thisOptions = {\n ...options,\n presets: newPresets,\n plugins: newPlugins,\n };\n // console.log(isServer);\n\n return thisOptions;\n }", "function rewirePreact(config, env) {\n config.resolve = {\n alias: {\n react: \"preact-compat\",\n \"react-dom\": \"preact-compat\",\n \"create-react-class\": \"preact-compat/lib/create-react-class\"\n }\n };\n return config;\n}", "function wasComposedPreviously(input) {\n var isForwardRef = input.$$typeof === react_is__WEBPACK_IMPORTED_MODULE_1__[\"ForwardRef\"];\n return isForwardRef && !!input.fluentComposeConfig;\n}", "function isAsyncMode(object){{if(!hasWarnedAboutDeprecatedIsAsyncMode){hasWarnedAboutDeprecatedIsAsyncMode=true;lowPriorityWarning$1(false,'The ReactIs.isAsyncMode() alias has been deprecated, '+'and will be removed in React 17+. Update your code to use '+'ReactIs.isConcurrentMode() instead. It has the exact same API.');}}return isConcurrentMode(object)||typeOf(object)===REACT_ASYNC_MODE_TYPE;}", "function isAsyncMode(object){{if(!hasWarnedAboutDeprecatedIsAsyncMode){hasWarnedAboutDeprecatedIsAsyncMode=true;lowPriorityWarning$1(false,'The ReactIs.isAsyncMode() alias has been deprecated, '+'and will be removed in React 17+. Update your code to use '+'ReactIs.isConcurrentMode() instead. It has the exact same API.');}}return isConcurrentMode(object)||typeOf(object)===REACT_ASYNC_MODE_TYPE;}", "function isAsyncMode(object){{if(!hasWarnedAboutDeprecatedIsAsyncMode){hasWarnedAboutDeprecatedIsAsyncMode=true;lowPriorityWarning$1(false,'The ReactIs.isAsyncMode() alias has been deprecated, '+'and will be removed in React 17+. Update your code to use '+'ReactIs.isConcurrentMode() instead. It has the exact same API.');}}return isConcurrentMode(object)||typeOf(object)===REACT_ASYNC_MODE_TYPE;}" ]
[ "0.6232017", "0.5989827", "0.59513646", "0.5714014", "0.5714014", "0.5707565", "0.5690933", "0.5690933", "0.55861586", "0.5557413", "0.5545285", "0.5545285", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5506975", "0.5485487", "0.5476288", "0.5457707", "0.5457707", "0.54445094", "0.54244953", "0.54123217", "0.54123217", "0.54123217", "0.53574234", "0.5339129", "0.5339129", "0.5339129", "0.5339129", "0.5275687", "0.5235098", "0.52270365", "0.5223542", "0.5210891", "0.5183197", "0.5164678", "0.5157042", "0.5148114", "0.5148114", "0.5148114", "0.5148114", "0.51254827", "0.51111203", "0.5099554", "0.50683856", "0.50621563", "0.5052422", "0.5052422", "0.5051509", "0.5051509", "0.5017337", "0.50123584", "0.50022805", "0.49922666", "0.4990125", "0.49801147", "0.49629727", "0.49575934", "0.49564216", "0.49555078", "0.49555078", "0.49555078" ]
0.0
-1
During execution of guarded functions we will capture the first error which we will rethrow to be handled by the top level error handler.
function rethrowCaughtError() { if (hasRethrowError) { var error = rethrowError; hasRethrowError = false; rethrowError = null; throw error; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _tryEachErrorHandler(next, ctx) {\n if (ctx.ix >= ctx.steps.length) return next(ctx.err2 || ctx.err, 'done'); else { ctx.next = next; _tryStepContext(ctx, _tryNext); }\n }", "function rethrowCaughtError(){if(hasRethrowError){var error=rethrowError;hasRethrowError=false;rethrowError=null;throw error;}}", "function rethrowCaughtError(){if(hasRethrowError){var error=rethrowError;hasRethrowError=false;rethrowError=null;throw error;}}", "function rethrowCaughtError(){if(hasRethrowError){var error=rethrowError;hasRethrowError=false;rethrowError=null;throw error;}}", "function rethrowCaughtError(){if(hasRethrowError){var error=rethrowError;hasRethrowError=false;rethrowError=null;throw error;}}", "function rethrowCaughtError(){if(hasRethrowError){var error=rethrowError;hasRethrowError=false;rethrowError=null;throw error;}}", "function rethrowCaughtError(){if(hasRethrowError){var error=rethrowError;hasRethrowError=false;rethrowError=null;throw error;}}", "function rethrowCaughtError(){if(hasRethrowError){var error=rethrowError;hasRethrowError=false;rethrowError=null;throw error;}}", "function rethrow(){\n if(DEBUG){\n var back = new error;\n return function(err){\n if(err){\n back.stack = err.name +':'+ err.message + back.stack.substr(back.name.length);\n err = back;\n throw err ;\n }\n };\n }\n return function(err){\n if(err){\n throw err ;\n }\n };\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error2 = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error2;\n }\n }", "callUnhandledRejectionHandler(error) {\n const errHandler = window.onunhandledrejection;\n\n if (!errHandler) {\n return;\n }\n\n errHandler(error);\n }", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n }", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n }", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n }", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n }", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n }", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n }", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n }", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n }", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n }", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n }", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n }", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n }", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n }", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n }", "function promiseErrorHandler(next) {\n return err => next(err);\n}", "function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n }", "function errorEnhancer(data){\n //is plain Error and was not yet caught\n if(data instanceof Error && !data.caughtOnChainId){\n data.caughtOnChainId = funcArr._id;\n\n var trace = stackTrace({e: data});\n if(funcArr._name) {\n console.log('Failed inside ' + funcArr._name);\n }\n console.log(data.toString());\n console.log(trace.join('\\n'));\n }\n return Promise.reject(data);\n }", "function captureError(error) {\n\t\t\terr = error;\n\t\t}" ]
[ "0.6411594", "0.6345882", "0.6345882", "0.6345882", "0.6345882", "0.6345882", "0.6345882", "0.6345882", "0.63279694", "0.6323391", "0.6160426", "0.6152842", "0.6152842", "0.6152842", "0.6152842", "0.6152842", "0.6152842", "0.6152842", "0.6152842", "0.6152842", "0.6152842", "0.6152842", "0.6152842", "0.6152842", "0.6152842", "0.6121563", "0.6121297", "0.60831034", "0.60035926" ]
0.59499127
86
Standard/simple iteration through an event's collected dispatches.
function executeDispatchesInOrder(event) { var dispatchListeners = event._dispatchListeners; var dispatchInstances = event._dispatchInstances; { validateEventDispatches(event); } if (Array.isArray(dispatchListeners)) { for (var i = 0; i < dispatchListeners.length; i++) { if (event.isPropagationStopped()) { break; } // Listeners and Instances are two parallel arrays that are always in sync. executeDispatch(event, dispatchListeners[i], dispatchInstances[i]); } } else if (dispatchListeners) { executeDispatch(event, dispatchListeners, dispatchInstances); } event._dispatchListeners = null; event._dispatchInstances = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function forEachEventDispatch(event,cb){var dispatchListeners=event._dispatchListeners;var dispatchIDs=event._dispatchIDs;if(\"production\"!==process.env.NODE_ENV){validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;} // Listeners and IDs are two parallel arrays that are always in sync.\ncb(event,dispatchListeners[i],dispatchIDs[i]);}}else if(dispatchListeners){cb(event,dispatchListeners,dispatchIDs);}}", "function forEachEventDispatch(event,cb){var dispatchListeners=event._dispatchListeners;var dispatchIDs=event._dispatchIDs;if(true){validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i < dispatchListeners.length;i++) {if(event.isPropagationStopped()){break;} // Listeners and IDs are two parallel arrays that are always in sync.\n\tcb(event,dispatchListeners[i],dispatchIDs[i]);}}else if(dispatchListeners){cb(event,dispatchListeners,dispatchIDs);}}", "function forEach(event, each, disposable) {\n return snapshot((listener, thisArgs = null, disposables) => event(i => { each(i); listener.call(thisArgs, i); }, null, disposables), disposable);\n }", "function forEachEventDispatch(event, cb) {\n\t var dispatchListeners = event._dispatchListeners;\n\t var dispatchIDs = event._dispatchIDs;\n\t if (false) {\n\t validateEventDispatches(event);\n\t }\n\t if (Array.isArray(dispatchListeners)) {\n\t for (var i = 0; i < dispatchListeners.length; i++) {\n\t if (event.isPropagationStopped()) {\n\t break;\n\t }\n\t // Listeners and IDs are two parallel arrays that are always in sync.\n\t cb(event, dispatchListeners[i], dispatchIDs[i]);\n\t }\n\t } else if (dispatchListeners) {\n\t cb(event, dispatchListeners, dispatchIDs);\n\t }\n\t}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== \"development\") {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== \"development\") {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== \"development\") {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== \"development\") {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== \"development\") {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== \"development\") {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== \"development\") {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== \"development\") {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== \"production\") {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== \"production\") {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (true) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n\t var dispatchListeners = event._dispatchListeners;\n\t var dispatchIDs = event._dispatchIDs;\n\t if (\"production\" !== process.env.NODE_ENV) {\n\t validateEventDispatches(event);\n\t }\n\t if (Array.isArray(dispatchListeners)) {\n\t for (var i = 0; i < dispatchListeners.length; i++) {\n\t if (event.isPropagationStopped()) {\n\t break;\n\t }\n\t // Listeners and IDs are two parallel arrays that are always in sync.\n\t cb(event, dispatchListeners[i], dispatchIDs[i]);\n\t }\n\t } else if (dispatchListeners) {\n\t cb(event, dispatchListeners, dispatchIDs);\n\t }\n\t}", "function forEachEventDispatch(event, cb) {\n\t var dispatchListeners = event._dispatchListeners;\n\t var dispatchIDs = event._dispatchIDs;\n\t if (\"production\" !== process.env.NODE_ENV) {\n\t validateEventDispatches(event);\n\t }\n\t if (Array.isArray(dispatchListeners)) {\n\t for (var i = 0; i < dispatchListeners.length; i++) {\n\t if (event.isPropagationStopped()) {\n\t break;\n\t }\n\t // Listeners and IDs are two parallel arrays that are always in sync.\n\t cb(event, dispatchListeners[i], dispatchIDs[i]);\n\t }\n\t } else if (dispatchListeners) {\n\t cb(event, dispatchListeners, dispatchIDs);\n\t }\n\t}", "function forEachEventDispatch(event, cb) {\n\t var dispatchListeners = event._dispatchListeners;\n\t var dispatchIDs = event._dispatchIDs;\n\t if (\"production\" !== process.env.NODE_ENV) {\n\t validateEventDispatches(event);\n\t }\n\t if (Array.isArray(dispatchListeners)) {\n\t for (var i = 0; i < dispatchListeners.length; i++) {\n\t if (event.isPropagationStopped()) {\n\t break;\n\t }\n\t // Listeners and IDs are two parallel arrays that are always in sync.\n\t cb(event, dispatchListeners[i], dispatchIDs[i]);\n\t }\n\t } else if (dispatchListeners) {\n\t cb(event, dispatchListeners, dispatchIDs);\n\t }\n\t}", "function forEachEventDispatch(event, cb) {\n\t var dispatchListeners = event._dispatchListeners;\n\t var dispatchIDs = event._dispatchIDs;\n\t if (\"production\" !== process.env.NODE_ENV) {\n\t validateEventDispatches(event);\n\t }\n\t if (Array.isArray(dispatchListeners)) {\n\t for (var i = 0; i < dispatchListeners.length; i++) {\n\t if (event.isPropagationStopped()) {\n\t break;\n\t }\n\t // Listeners and IDs are two parallel arrays that are always in sync.\n\t cb(event, dispatchListeners[i], dispatchIDs[i]);\n\t }\n\t } else if (dispatchListeners) {\n\t cb(event, dispatchListeners, dispatchIDs);\n\t }\n\t}", "function forEachEventDispatch(event, cb) {\n\t var dispatchListeners = event._dispatchListeners;\n\t var dispatchIDs = event._dispatchIDs;\n\t if (\"production\" !== process.env.NODE_ENV) {\n\t validateEventDispatches(event);\n\t }\n\t if (Array.isArray(dispatchListeners)) {\n\t for (var i = 0; i < dispatchListeners.length; i++) {\n\t if (event.isPropagationStopped()) {\n\t break;\n\t }\n\t // Listeners and IDs are two parallel arrays that are always in sync.\n\t cb(event, dispatchListeners[i], dispatchIDs[i]);\n\t }\n\t } else if (dispatchListeners) {\n\t cb(event, dispatchListeners, dispatchIDs);\n\t }\n\t}", "function forEachEventDispatch(event, cb) {\n\t var dispatchListeners = event._dispatchListeners;\n\t var dispatchIDs = event._dispatchIDs;\n\t if (\"production\" !== process.env.NODE_ENV) {\n\t validateEventDispatches(event);\n\t }\n\t if (Array.isArray(dispatchListeners)) {\n\t for (var i = 0; i < dispatchListeners.length; i++) {\n\t if (event.isPropagationStopped()) {\n\t break;\n\t }\n\t // Listeners and IDs are two parallel arrays that are always in sync.\n\t cb(event, dispatchListeners[i], dispatchIDs[i]);\n\t }\n\t } else if (dispatchListeners) {\n\t cb(event, dispatchListeners, dispatchIDs);\n\t }\n\t}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function forEachEventDispatch(event, cb) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchIDs = event._dispatchIDs;\n if (\"production\" !== process.env.NODE_ENV) {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and IDs are two parallel arrays that are always in sync.\n cb(event, dispatchListeners[i], dispatchIDs[i]);\n }\n } else if (dispatchListeners) {\n cb(event, dispatchListeners, dispatchIDs);\n }\n}", "function _forEach(event, each) {\n return snapshot(function (listener) {\n var thisArgs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var disposables = arguments.length > 2 ? arguments[2] : undefined;\n return event(function (i) {\n each(i);\n listener.call(thisArgs, i);\n }, null, disposables);\n });\n}", "function patchViaCapturingAllTheEvents() {\n var _loop_1 = function (i) {\n var property = eventNames[i];\n var onproperty = 'on' + property;\n self.addEventListener(property, function (event) {\n var elt = event.target, bound, source;\n if (elt) {\n source = elt.constructor['name'] + '.' + onproperty;\n }\n else {\n source = 'unknown.' + onproperty;\n }\n while (elt) {\n if (elt[onproperty] && !elt[onproperty][unboundKey]) {\n bound = wrapWithCurrentZone(elt[onproperty], source);\n bound[unboundKey] = elt[onproperty];\n elt[onproperty] = bound;\n }\n elt = elt.parentElement;\n }\n }, true);\n };\n for (var i = 0; i < eventNames.length; i++) {\n _loop_1(i);\n }\n}", "function executeDispatchesInOrder(event,cb){forEachEventDispatch(event,cb);event._dispatchListeners=null;event._dispatchIDs=null;}", "function executeDispatchesInOrder(event,cb){forEachEventDispatch(event,cb);event._dispatchListeners = null;event._dispatchIDs = null;}", "function eventFunction(e){\n\t getSlot([q.id], allEvents).push(e);\n\t eventDurForeach(e, drawfn);\n\t}", "function patchViaCapturingAllTheEvents() {\n var _loop_1 = function _loop_1(i) {\n var property = eventNames[i];\n var onproperty = 'on' + property;\n self.addEventListener(property, function (event) {\n var elt = event.target,\n bound,\n source;\n\n if (elt) {\n source = elt.constructor['name'] + '.' + onproperty;\n } else {\n source = 'unknown.' + onproperty;\n }\n\n while (elt) {\n if (elt[onproperty] && !elt[onproperty][unboundKey]) {\n bound = wrapWithCurrentZone(elt[onproperty], source);\n bound[unboundKey] = elt[onproperty];\n elt[onproperty] = bound;\n }\n\n elt = elt.parentElement;\n }\n }, true);\n };\n\n for (var i = 0; i < eventNames.length; i++) {\n _loop_1(i);\n }\n }", "trigger (eventName) {\n if (this.events[eventName]) {\n for (let cb of this.events[eventName]) {\n cb();\n }\n }\n }", "trigger(eventName) {\n if (this.events[eventName]) {\n for (let cb of this.events[eventName]) {\n cb();\n }\n }\n }", "each(action) {\n for (const element of this)\n action(element);\n }", "function patchViaCapturingAllTheEvents() {\n var _loop_1 = function(i) {\n var property = eventNames[i];\n var onproperty = 'on' + property;\n self.addEventListener(property, function (event) {\n var elt = event.target, bound, source;\n if (elt) {\n source = elt.constructor['name'] + '.' + onproperty;\n }\n else {\n source = 'unknown.' + onproperty;\n }\n while (elt) {\n if (elt[onproperty] && !elt[onproperty][unboundKey]) {\n bound = Zone.current.wrap(elt[onproperty], source);\n bound[unboundKey] = elt[onproperty];\n elt[onproperty] = bound;\n }\n elt = elt.parentElement;\n }\n }, true);\n };\n for (var i = 0; i < eventNames.length; i++) {\n _loop_1(i);\n }\n \n}", "function patchViaCapturingAllTheEvents() {\n var _loop_1 = function(i) {\n var property = eventNames[i];\n var onproperty = 'on' + property;\n self.addEventListener(property, function (event) {\n var elt = event.target, bound, source;\n if (elt) {\n source = elt.constructor['name'] + '.' + onproperty;\n }\n else {\n source = 'unknown.' + onproperty;\n }\n while (elt) {\n if (elt[onproperty] && !elt[onproperty][unboundKey]) {\n bound = Zone.current.wrap(elt[onproperty], source);\n bound[unboundKey] = elt[onproperty];\n elt[onproperty] = bound;\n }\n elt = elt.parentElement;\n }\n }, true);\n };\n for (var i = 0; i < eventNames.length; i++) {\n _loop_1(i);\n }\n \n}", "function patchViaCapturingAllTheEvents() {\n var _loop_1 = function (i) {\n var property = eventNames[i];\n var onproperty = 'on' + property;\n self.addEventListener(property, function (event) {\n var elt = event.target, bound, source;\n if (elt) {\n source = elt.constructor['name'] + '.' + onproperty;\n }\n else {\n source = 'unknown.' + onproperty;\n }\n while (elt) {\n if (elt[onproperty] && !elt[onproperty][unboundKey]) {\n bound = Zone.current.wrap(elt[onproperty], source);\n bound[unboundKey] = elt[onproperty];\n elt[onproperty] = bound;\n }\n elt = elt.parentElement;\n }\n }, true);\n };\n for (var i = 0; i < eventNames.length; i++) {\n _loop_1(i);\n }\n \n}", "function accumulateDispatches(inst, ignoredDirection, event) {\n if (inst && event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(inst, registrationName);\n\n if (listener) {\n event._dispatchListeners = accumulateInto(\n event._dispatchListeners,\n listener,\n );\n event._dispatchInstances = accumulateInto(\n event._dispatchInstances,\n inst,\n );\n }\n }\n }", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (inst && event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "trigger(eventName) {\n if (this.events[eventName]) {\n for (let cb of this.events[eventName]) {\n cb();\n }\n }\n }", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t\t if (event && event.dispatchConfig.registrationName) {\n\t\t var registrationName = event.dispatchConfig.registrationName;\n\t\t var listener = getListener(inst, registrationName);\n\t\t if (listener) {\n\t\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t\t }\n\t\t }\n\t\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t\t if (event && event.dispatchConfig.registrationName) {\n\t\t var registrationName = event.dispatchConfig.registrationName;\n\t\t var listener = getListener(inst, registrationName);\n\t\t if (listener) {\n\t\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t\t }\n\t\t }\n\t\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}" ]
[ "0.6340201", "0.6318283", "0.6216154", "0.6129209", "0.6122544", "0.6122544", "0.6122544", "0.6122544", "0.6122544", "0.6122544", "0.6122544", "0.6122544", "0.6119329", "0.6119329", "0.61154145", "0.60784554", "0.60784554", "0.60784554", "0.60784554", "0.60784554", "0.60784554", "0.6072781", "0.6072781", "0.6072781", "0.6072781", "0.6072781", "0.6072781", "0.6072781", "0.6072781", "0.6072781", "0.6072781", "0.6072781", "0.6072781", "0.6072781", "0.6072781", "0.6072781", "0.6072781", "0.6072781", "0.60410064", "0.5766144", "0.5738541", "0.57251835", "0.57084376", "0.5707732", "0.56692564", "0.55691624", "0.55544513", "0.55030125", "0.55030125", "0.55007696", "0.5492424", "0.5490577", "0.54880106", "0.548289", "0.548289", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405", "0.54687405" ]
0.0
-1
Recomputes the plugin list using the injected plugins and plugin ordering.
function recomputePluginOrdering() { if (!eventPluginOrder) { // Wait until an `eventPluginOrder` is injected. return; } for (var pluginName in namesToPlugins) { var pluginModule = namesToPlugins[pluginName]; var pluginIndex = eventPluginOrder.indexOf(pluginName); if (!(pluginIndex > -1)) { { throw Error( "EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `" + pluginName + "`." ); } } if (plugins[pluginIndex]) { continue; } if (!pluginModule.extractEvents) { { throw Error( "EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `" + pluginName + "` does not." ); } } plugins[pluginIndex] = pluginModule; var publishedEvents = pluginModule.eventTypes; for (var eventName in publishedEvents) { if (!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName)) { { throw Error( "EventPluginRegistry: Failed to publish event `" + eventName + "` for plugin `" + pluginName + "`." ); } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "orderPlugins() {\r\n debug('orderPlugins:before', this.pluginNames);\r\n const runLast = this._plugins\r\n .filter(p => p.requirements.has('runLast'))\r\n .map(p => p.name);\r\n for (const name of runLast) {\r\n const index = this._plugins.findIndex(p => p.name === name);\r\n this._plugins.push(this._plugins.splice(index, 1)[0]);\r\n }\r\n debug('orderPlugins:after', this.pluginNames);\r\n }", "order() {\n debug('order:before', this.names);\n const runLast = this._plugins\n .filter(p => p.requirements.has('runLast'))\n .map(p => p.name);\n for (const name of runLast) {\n const index = this._plugins.findIndex(p => p.name === name);\n this._plugins.push(this._plugins.splice(index, 1)[0]);\n }\n debug('order:after', this.names);\n }", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n\n (function () {\n if (!(pluginIndex > -1)) {\n {\n throw ReactError(Error(\"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `\" + pluginName + \"`.\"));\n }\n }\n })();\n\n if (plugins[pluginIndex]) {\n continue;\n }\n\n (function () {\n if (!pluginModule.extractEvents) {\n {\n throw ReactError(Error(\"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `\" + pluginName + \"` does not.\"));\n }\n }\n })();\n\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n\n for (var eventName in publishedEvents) {\n (function () {\n if (!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName)) {\n {\n throw ReactError(Error(\"EventPluginRegistry: Failed to publish event `\" + eventName + \"` for plugin `\" + pluginName + \"`.\"));\n }\n }\n })();\n }\n }\n }", "function recomputePluginOrdering(){if(!eventPluginOrder){// Wait until an `eventPluginOrder` is injected.\nreturn;}for(var pluginName in namesToPlugins){var pluginModule=namesToPlugins[pluginName];var pluginIndex=eventPluginOrder.indexOf(pluginName);if(!(pluginIndex>-1)){{throw Error(\"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `\"+pluginName+\"`.\");}}if(plugins[pluginIndex]){continue;}if(!pluginModule.extractEvents){{throw Error(\"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `\"+pluginName+\"` does not.\");}}plugins[pluginIndex]=pluginModule;var publishedEvents=pluginModule.eventTypes;for(var eventName in publishedEvents){if(!publishEventForPlugin(publishedEvents[eventName],pluginModule,eventName)){{throw Error(\"EventPluginRegistry: Failed to publish event `\"+eventName+\"` for plugin `\"+pluginName+\"`.\");}}}}}", "function recomputePluginOrdering(){if(!eventPluginOrder){// Wait until an `eventPluginOrder` is injected.\nreturn;}for(var pluginName in namesToPlugins){var pluginModule=namesToPlugins[pluginName];var pluginIndex=eventPluginOrder.indexOf(pluginName);if(!(pluginIndex>-1)){{throw Error(\"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `\"+pluginName+\"`.\");}}if(plugins[pluginIndex]){continue;}if(!pluginModule.extractEvents){{throw Error(\"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `\"+pluginName+\"` does not.\");}}plugins[pluginIndex]=pluginModule;var publishedEvents=pluginModule.eventTypes;for(var eventName in publishedEvents){if(!publishEventForPlugin(publishedEvents[eventName],pluginModule,eventName)){{throw Error(\"EventPluginRegistry: Failed to publish event `\"+eventName+\"` for plugin `\"+pluginName+\"`.\");}}}}}", "function recomputePluginOrdering(){if(!eventPluginOrder){// Wait until an `eventPluginOrder` is injected.\nreturn;}for(var pluginName in namesToPlugins){var pluginModule=namesToPlugins[pluginName];var pluginIndex=eventPluginOrder.indexOf(pluginName);if(!(pluginIndex>-1)){{throw Error(\"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `\"+pluginName+\"`.\");}}if(plugins[pluginIndex]){continue;}if(!pluginModule.extractEvents){{throw Error(\"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `\"+pluginName+\"` does not.\");}}plugins[pluginIndex]=pluginModule;var publishedEvents=pluginModule.eventTypes;for(var eventName in publishedEvents){if(!publishEventForPlugin(publishedEvents[eventName],pluginModule,eventName)){{throw Error(\"EventPluginRegistry: Failed to publish event `\"+eventName+\"` for plugin `\"+pluginName+\"`.\");}}}}}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n }", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n\n if (!(pluginIndex > -1)) {\n {\n throw Error(\n 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `' +\n pluginName +\n '`.',\n );\n }\n }\n\n if (plugins[pluginIndex]) {\n continue;\n }\n\n if (!pluginModule.extractEvents) {\n {\n throw Error(\n 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `' +\n pluginName +\n '` does not.',\n );\n }\n }\n\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n\n for (var eventName in publishedEvents) {\n if (\n !publishEventForPlugin(\n publishedEvents[eventName],\n pluginModule,\n eventName,\n )\n ) {\n {\n throw Error(\n 'EventPluginRegistry: Failed to publish event `' +\n eventName +\n '` for plugin `' +\n pluginName +\n '`.',\n );\n }\n }\n }\n }\n }", "function recomputePluginOrdering() {\n\t if (!eventPluginOrder) {\n\t // Wait until an `eventPluginOrder` is injected.\n\t return;\n\t }\n\t for (var pluginName in namesToPlugins) {\n\t var pluginModule = namesToPlugins[pluginName];\n\t var pluginIndex = eventPluginOrder.indexOf(pluginName);\n\t !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n\t if (plugins[pluginIndex]) {\n\t continue;\n\t }\n\t !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n\t plugins[pluginIndex] = pluginModule;\n\t var publishedEvents = pluginModule.eventTypes;\n\t for (var eventName in publishedEvents) {\n\t !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n\t }\n\t }\n\t}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n }", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n }", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n }", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n\n if (plugins[pluginIndex]) {\n continue;\n }\n\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n }", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n\n if (plugins[pluginIndex]) {\n continue;\n }\n\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n }", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n\n if (plugins[pluginIndex]) {\n continue;\n }\n\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n }", "function recomputePluginOrdering(){if(!eventPluginOrder){// Wait until an `eventPluginOrder` is injected.\nreturn;}for(var pluginName in namesToPlugins){var pluginModule=namesToPlugins[pluginName];var pluginIndex=eventPluginOrder.indexOf(pluginName);!(pluginIndex>-1)?invariant(false,'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.',pluginName):void 0;if(plugins[pluginIndex]){continue;}!pluginModule.extractEvents?invariant(false,'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.',pluginName):void 0;plugins[pluginIndex]=pluginModule;var publishedEvents=pluginModule.eventTypes;for(var eventName in publishedEvents){!publishEventForPlugin(publishedEvents[eventName],pluginModule,eventName)?invariant(false,'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.',eventName,pluginName):void 0;}}}", "function recomputePluginOrdering(){if(!eventPluginOrder){// Wait until an `eventPluginOrder` is injected.\nreturn;}for(var pluginName in namesToPlugins){var pluginModule=namesToPlugins[pluginName];var pluginIndex=eventPluginOrder.indexOf(pluginName);!(pluginIndex>-1)?invariant(false,'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.',pluginName):void 0;if(plugins[pluginIndex]){continue;}!pluginModule.extractEvents?invariant(false,'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.',pluginName):void 0;plugins[pluginIndex]=pluginModule;var publishedEvents=pluginModule.eventTypes;for(var eventName in publishedEvents){!publishEventForPlugin(publishedEvents[eventName],pluginModule,eventName)?invariant(false,'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.',eventName,pluginName):void 0;}}}", "function recomputePluginOrdering(){if(!eventPluginOrder){// Wait until an `eventPluginOrder` is injected.\nreturn;}for(var pluginName in namesToPlugins){var pluginModule=namesToPlugins[pluginName];var pluginIndex=eventPluginOrder.indexOf(pluginName);!(pluginIndex>-1)?invariant(false,'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.',pluginName):void 0;if(plugins[pluginIndex]){continue;}!pluginModule.extractEvents?invariant(false,'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.',pluginName):void 0;plugins[pluginIndex]=pluginModule;var publishedEvents=pluginModule.eventTypes;for(var eventName in publishedEvents){!publishEventForPlugin(publishedEvents[eventName],pluginModule,eventName)?invariant(false,'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.',eventName,pluginName):void 0;}}}", "function recomputePluginOrdering(){if(!eventPluginOrder){// Wait until an `eventPluginOrder` is injected.\nreturn;}for(var pluginName in namesToPlugins){var pluginModule=namesToPlugins[pluginName];var pluginIndex=eventPluginOrder.indexOf(pluginName);!(pluginIndex>-1)?invariant(false,'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.',pluginName):void 0;if(plugins[pluginIndex]){continue;}!pluginModule.extractEvents?invariant(false,'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.',pluginName):void 0;plugins[pluginIndex]=pluginModule;var publishedEvents=pluginModule.eventTypes;for(var eventName in publishedEvents){!publishEventForPlugin(publishedEvents[eventName],pluginModule,eventName)?invariant(false,'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.',eventName,pluginName):void 0;}}}", "function recomputePluginOrdering(){if(!eventPluginOrder){// Wait until an `eventPluginOrder` is injected.\nreturn;}for(var pluginName in namesToPlugins){var pluginModule=namesToPlugins[pluginName];var pluginIndex=eventPluginOrder.indexOf(pluginName);!(pluginIndex>-1)?invariant(false,'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.',pluginName):void 0;if(plugins[pluginIndex]){continue;}!pluginModule.extractEvents?invariant(false,'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.',pluginName):void 0;plugins[pluginIndex]=pluginModule;var publishedEvents=pluginModule.eventTypes;for(var eventName in publishedEvents){!publishEventForPlugin(publishedEvents[eventName],pluginModule,eventName)?invariant(false,'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.',eventName,pluginName):void 0;}}}", "function recomputePluginOrdering(){if(!eventPluginOrder){// Wait until an `eventPluginOrder` is injected.\nreturn;}for(var pluginName in namesToPlugins){var pluginModule=namesToPlugins[pluginName];var pluginIndex=eventPluginOrder.indexOf(pluginName);!(pluginIndex>-1)?invariant(false,'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.',pluginName):void 0;if(plugins[pluginIndex]){continue;}!pluginModule.extractEvents?invariant(false,'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.',pluginName):void 0;plugins[pluginIndex]=pluginModule;var publishedEvents=pluginModule.eventTypes;for(var eventName in publishedEvents){!publishEventForPlugin(publishedEvents[eventName],pluginModule,eventName)?invariant(false,'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.',eventName,pluginName):void 0;}}}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n\n (function () {\n if (!(pluginIndex > -1)) {\n {\n throw ReactError(Error(\"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `\" + pluginName + \"`.\"));\n }\n }\n })();\n\n if (plugins[pluginIndex]) {\n continue;\n }\n\n (function () {\n if (!pluginModule.extractEvents) {\n {\n throw ReactError(Error(\"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `\" + pluginName + \"` does not.\"));\n }\n }\n })();\n\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n\n for (var eventName in publishedEvents) {\n (function () {\n if (!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName)) {\n {\n throw ReactError(Error(\"EventPluginRegistry: Failed to publish event `\" + eventName + \"` for plugin `\" + pluginName + \"`.\"));\n }\n }\n })();\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n\n (function () {\n if (!(pluginIndex > -1)) {\n {\n throw ReactError(Error(\"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `\" + pluginName + \"`.\"));\n }\n }\n })();\n\n if (plugins[pluginIndex]) {\n continue;\n }\n\n (function () {\n if (!pluginModule.extractEvents) {\n {\n throw ReactError(Error(\"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `\" + pluginName + \"` does not.\"));\n }\n }\n })();\n\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n\n for (var eventName in publishedEvents) {\n (function () {\n if (!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName)) {\n {\n throw ReactError(Error(\"EventPluginRegistry: Failed to publish event `\" + eventName + \"` for plugin `\" + pluginName + \"`.\"));\n }\n }\n })();\n }\n }\n}", "function recomputePluginOrdering(){if(!eventPluginOrder){// Wait until an `eventPluginOrder` is injected.\n\treturn;}for(var pluginName in namesToPlugins){var pluginModule=namesToPlugins[pluginName];var pluginIndex=eventPluginOrder.indexOf(pluginName);!(pluginIndex>-1)?invariant(false,'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.',pluginName):void 0;if(plugins[pluginIndex]){continue;}!pluginModule.extractEvents?invariant(false,'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.',pluginName):void 0;plugins[pluginIndex]=pluginModule;var publishedEvents=pluginModule.eventTypes;for(var eventName in publishedEvents){!publishEventForPlugin(publishedEvents[eventName],pluginModule,eventName)?invariant(false,'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.',eventName,pluginName):void 0;}}}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n (function () {\n if (!(pluginIndex > -1)) {\n {\n throw ReactError(Error('EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `' + pluginName + '`.'));\n }\n }\n })();\n if (plugins[pluginIndex]) {\n continue;\n }\n (function () {\n if (!pluginModule.extractEvents) {\n {\n throw ReactError(Error('EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `' + pluginName + '` does not.'));\n }\n }\n })();\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n (function () {\n if (!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName)) {\n {\n throw ReactError(Error('EventPluginRegistry: Failed to publish event `' + eventName + '` for plugin `' + pluginName + '`.'));\n }\n }\n })();\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n (function () {\n if (!(pluginIndex > -1)) {\n {\n throw ReactError(Error('EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `' + pluginName + '`.'));\n }\n }\n })();\n if (plugins[pluginIndex]) {\n continue;\n }\n (function () {\n if (!pluginModule.extractEvents) {\n {\n throw ReactError(Error('EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `' + pluginName + '` does not.'));\n }\n }\n })();\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n (function () {\n if (!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName)) {\n {\n throw ReactError(Error('EventPluginRegistry: Failed to publish event `' + eventName + '` for plugin `' + pluginName + '`.'));\n }\n }\n })();\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n\n if (!(pluginIndex > -1)) {\n {\n throw Error(\"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `\" + pluginName + \"`.\");\n }\n }\n\n if (plugins[pluginIndex]) {\n continue;\n }\n\n if (!pluginModule.extractEvents) {\n {\n throw Error(\"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `\" + pluginName + \"` does not.\");\n }\n }\n\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n\n for (var eventName in publishedEvents) {\n if (!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName)) {\n {\n throw Error(\"EventPluginRegistry: Failed to publish event `\" + eventName + \"` for plugin `\" + pluginName + \"`.\");\n }\n }\n }\n }\n }", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n\n if (!(pluginIndex > -1)) {\n {\n throw Error(\"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `\" + pluginName + \"`.\");\n }\n }\n\n if (plugins[pluginIndex]) {\n continue;\n }\n\n if (!pluginModule.extractEvents) {\n {\n throw Error(\"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `\" + pluginName + \"` does not.\");\n }\n }\n\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n\n for (var eventName in publishedEvents) {\n if (!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName)) {\n {\n throw Error(\"EventPluginRegistry: Failed to publish event `\" + eventName + \"` for plugin `\" + pluginName + \"`.\");\n }\n }\n }\n }\n }", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n\n if (!(pluginIndex > -1)) {\n {\n throw Error(\"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `\" + pluginName + \"`.\");\n }\n }\n\n if (plugins[pluginIndex]) {\n continue;\n }\n\n if (!pluginModule.extractEvents) {\n {\n throw Error(\"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `\" + pluginName + \"` does not.\");\n }\n }\n\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n\n for (var eventName in publishedEvents) {\n if (!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName)) {\n {\n throw Error(\"EventPluginRegistry: Failed to publish event `\" + eventName + \"` for plugin `\" + pluginName + \"`.\");\n }\n }\n }\n }\n }", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n\n if (!(pluginIndex > -1)) {\n {\n throw Error(\"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `\" + pluginName + \"`.\");\n }\n }\n\n if (plugins[pluginIndex]) {\n continue;\n }\n\n if (!pluginModule.extractEvents) {\n {\n throw Error(\"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `\" + pluginName + \"` does not.\");\n }\n }\n\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n\n for (var eventName in publishedEvents) {\n if (!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName)) {\n {\n throw Error(\"EventPluginRegistry: Failed to publish event `\" + eventName + \"` for plugin `\" + pluginName + \"`.\");\n }\n }\n }\n }\n }", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n\n if (!(pluginIndex > -1)) {\n {\n throw Error(\"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `\" + pluginName + \"`.\");\n }\n }\n\n if (plugins[pluginIndex]) {\n continue;\n }\n\n if (!pluginModule.extractEvents) {\n {\n throw Error(\"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `\" + pluginName + \"` does not.\");\n }\n }\n\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n\n for (var eventName in publishedEvents) {\n if (!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName)) {\n {\n throw Error(\"EventPluginRegistry: Failed to publish event `\" + eventName + \"` for plugin `\" + pluginName + \"`.\");\n }\n }\n }\n }\n }", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}", "function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}" ]
[ "0.7994548", "0.74701035", "0.7169167", "0.71361053", "0.71361053", "0.71361053", "0.7128741", "0.7122665", "0.71187073", "0.7117351", "0.7117351", "0.7117351", "0.71010214", "0.71010214", "0.71010214", "0.709135", "0.709135", "0.709135", "0.709135", "0.709135", "0.709135", "0.7091044", "0.7091044", "0.7079425", "0.70746076", "0.70746076", "0.70659184", "0.70659184", "0.70659184", "0.70659184", "0.70659184", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617", "0.70648617" ]
0.0
-1
Get the value for a property on a node. Only used in DEV for SSR validation. The "expected" argument is used as a hint of what the expected value is. Some properties have multiple equivalent values.
function getValueForProperty(node, name, expected, propertyInfo) { { if (propertyInfo.mustUseProperty) { var propertyName = propertyInfo.propertyName; return node[propertyName]; } else { if ( propertyInfo.sanitizeURL) { // If we haven't fully disabled javascript: URLs, and if // the hydration is successful of a javascript: URL, we // still want to warn on the client. sanitizeURL('' + expected); } var attributeName = propertyInfo.attributeName; var stringValue = null; if (propertyInfo.type === OVERLOADED_BOOLEAN) { if (node.hasAttribute(attributeName)) { var value = node.getAttribute(attributeName); if (value === '') { return true; } if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { return value; } if (value === '' + expected) { return expected; } return value; } } else if (node.hasAttribute(attributeName)) { if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { // We had an attribute but shouldn't have had one, so read it // for the error message. return node.getAttribute(attributeName); } if (propertyInfo.type === BOOLEAN) { // If this was a boolean, it doesn't matter what the value is // the fact that we have it is the same as the expected. return expected; } // Even if this property uses a namespace we use getAttribute // because we assume its namespaced name is the same as our config. // To use getAttributeNS we need the local name which we don't have // in our config atm. stringValue = node.getAttribute(attributeName); } if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { return stringValue === null ? expected : stringValue; } else if (stringValue === '' + expected) { return expected; } else { return stringValue; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getValueForProperty(node,name,expected){{var propertyInfo=getPropertyInfo(name);if(propertyInfo){var mutationMethod=propertyInfo.mutationMethod;if(mutationMethod||propertyInfo.mustUseProperty){return node[propertyInfo.propertyName];}else{var attributeName=propertyInfo.attributeName;var stringValue=null;if(propertyInfo.hasOverloadedBooleanValue){if(node.hasAttribute(attributeName)){var value=node.getAttribute(attributeName);if(value===''){return true;}if(shouldIgnoreValue(propertyInfo,expected)){return value;}if(value===''+expected){return expected;}return value;}}else if(node.hasAttribute(attributeName)){if(shouldIgnoreValue(propertyInfo,expected)){// We had an attribute but shouldn't have had one, so read it\n// for the error message.\nreturn node.getAttribute(attributeName);}if(propertyInfo.hasBooleanValue){// If this was a boolean, it doesn't matter what the value is\n// the fact that we have it is the same as the expected.\nreturn expected;}// Even if this property uses a namespace we use getAttribute\n// because we assume its namespaced name is the same as our config.\n// To use getAttributeNS we need the local name which we don't have\n// in our config atm.\nstringValue=node.getAttribute(attributeName);}if(shouldIgnoreValue(propertyInfo,expected)){return stringValue===null?expected:stringValue;}else if(stringValue===''+expected){return expected;}else{return stringValue;}}}}}", "function getValueForProperty(node,name,expected){{var propertyInfo=getPropertyInfo(name);if(propertyInfo){var mutationMethod=propertyInfo.mutationMethod;if(mutationMethod||propertyInfo.mustUseProperty){return node[propertyInfo.propertyName];}else{var attributeName=propertyInfo.attributeName;var stringValue=null;if(propertyInfo.hasOverloadedBooleanValue){if(node.hasAttribute(attributeName)){var value=node.getAttribute(attributeName);if(value===''){return true;}if(shouldIgnoreValue(propertyInfo,expected)){return value;}if(value===''+expected){return expected;}return value;}}else if(node.hasAttribute(attributeName)){if(shouldIgnoreValue(propertyInfo,expected)){// We had an attribute but shouldn't have had one, so read it\n// for the error message.\nreturn node.getAttribute(attributeName);}if(propertyInfo.hasBooleanValue){// If this was a boolean, it doesn't matter what the value is\n// the fact that we have it is the same as the expected.\nreturn expected;}// Even if this property uses a namespace we use getAttribute\n// because we assume its namespaced name is the same as our config.\n// To use getAttributeNS we need the local name which we don't have\n// in our config atm.\nstringValue=node.getAttribute(attributeName);}if(shouldIgnoreValue(propertyInfo,expected)){return stringValue===null?expected:stringValue;}else if(stringValue===''+expected){return expected;}else{return stringValue;}}}}}", "function getValueForProperty(node,name,expected){{var propertyInfo=getPropertyInfo(name);if(propertyInfo){var mutationMethod=propertyInfo.mutationMethod;if(mutationMethod||propertyInfo.mustUseProperty){return node[propertyInfo.propertyName];}else{var attributeName=propertyInfo.attributeName;var stringValue=null;if(propertyInfo.hasOverloadedBooleanValue){if(node.hasAttribute(attributeName)){var value=node.getAttribute(attributeName);if(value===''){return true;}if(shouldIgnoreValue(propertyInfo,expected)){return value;}if(value===''+expected){return expected;}return value;}}else if(node.hasAttribute(attributeName)){if(shouldIgnoreValue(propertyInfo,expected)){// We had an attribute but shouldn't have had one, so read it\n\t// for the error message.\n\treturn node.getAttribute(attributeName);}if(propertyInfo.hasBooleanValue){// If this was a boolean, it doesn't matter what the value is\n\t// the fact that we have it is the same as the expected.\n\treturn expected;}// Even if this property uses a namespace we use getAttribute\n\t// because we assume its namespaced name is the same as our config.\n\t// To use getAttributeNS we need the local name which we don't have\n\t// in our config atm.\n\tstringValue=node.getAttribute(attributeName);}if(shouldIgnoreValue(propertyInfo,expected)){return stringValue===null?expected:stringValue;}else if(stringValue===''+expected){return expected;}else{return stringValue;}}}}}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n }", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n }", "function getValueForProperty(node, name, expected) {\n\t {\n\t var propertyInfo = getPropertyInfo(name);\n\t if (propertyInfo) {\n\t var mutationMethod = propertyInfo.mutationMethod;\n\t if (mutationMethod || propertyInfo.mustUseProperty) {\n\t return node[propertyInfo.propertyName];\n\t } else {\n\t var attributeName = propertyInfo.attributeName;\n\t\n\t var stringValue = null;\n\t\n\t if (propertyInfo.hasOverloadedBooleanValue) {\n\t if (node.hasAttribute(attributeName)) {\n\t var value = node.getAttribute(attributeName);\n\t if (value === '') {\n\t return true;\n\t }\n\t if (shouldIgnoreValue(propertyInfo, expected)) {\n\t return value;\n\t }\n\t if (value === '' + expected) {\n\t return expected;\n\t }\n\t return value;\n\t }\n\t } else if (node.hasAttribute(attributeName)) {\n\t if (shouldIgnoreValue(propertyInfo, expected)) {\n\t // We had an attribute but shouldn't have had one, so read it\n\t // for the error message.\n\t return node.getAttribute(attributeName);\n\t }\n\t if (propertyInfo.hasBooleanValue) {\n\t // If this was a boolean, it doesn't matter what the value is\n\t // the fact that we have it is the same as the expected.\n\t return expected;\n\t }\n\t // Even if this property uses a namespace we use getAttribute\n\t // because we assume its namespaced name is the same as our config.\n\t // To use getAttributeNS we need the local name which we don't have\n\t // in our config atm.\n\t stringValue = node.getAttribute(attributeName);\n\t }\n\t\n\t if (shouldIgnoreValue(propertyInfo, expected)) {\n\t return stringValue === null ? expected : stringValue;\n\t } else if (stringValue === '' + expected) {\n\t return expected;\n\t } else {\n\t return stringValue;\n\t }\n\t }\n\t }\n\t }\n\t}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}", "function getValueForProperty(node,name,expected,propertyInfo){{if(propertyInfo.mustUseProperty){var propertyName=propertyInfo.propertyName;return node[propertyName];}else{if(propertyInfo.sanitizeURL){// If we haven't fully disabled javascript: URLs, and if\n// the hydration is successful of a javascript: URL, we\n// still want to warn on the client.\nsanitizeURL(''+expected);}var attributeName=propertyInfo.attributeName;var stringValue=null;if(propertyInfo.type===OVERLOADED_BOOLEAN){if(node.hasAttribute(attributeName)){var value=node.getAttribute(attributeName);if(value===''){return true;}if(shouldRemoveAttribute(name,expected,propertyInfo,false)){return value;}if(value===''+expected){return expected;}return value;}}else if(node.hasAttribute(attributeName)){if(shouldRemoveAttribute(name,expected,propertyInfo,false)){// We had an attribute but shouldn't have had one, so read it\n// for the error message.\nreturn node.getAttribute(attributeName);}if(propertyInfo.type===BOOLEAN){// If this was a boolean, it doesn't matter what the value is\n// the fact that we have it is the same as the expected.\nreturn expected;}// Even if this property uses a namespace we use getAttribute\n// because we assume its namespaced name is the same as our config.\n// To use getAttributeNS we need the local name which we don't have\n// in our config atm.\nstringValue=node.getAttribute(attributeName);}if(shouldRemoveAttribute(name,expected,propertyInfo,false)){return stringValue===null?expected:stringValue;}else if(stringValue===''+expected){return expected;}else{return stringValue;}}}}", "function getValueForProperty(node,name,expected,propertyInfo){{if(propertyInfo.mustUseProperty){var propertyName=propertyInfo.propertyName;return node[propertyName];}else{if(propertyInfo.sanitizeURL){// If we haven't fully disabled javascript: URLs, and if\n// the hydration is successful of a javascript: URL, we\n// still want to warn on the client.\nsanitizeURL(''+expected);}var attributeName=propertyInfo.attributeName;var stringValue=null;if(propertyInfo.type===OVERLOADED_BOOLEAN){if(node.hasAttribute(attributeName)){var value=node.getAttribute(attributeName);if(value===''){return true;}if(shouldRemoveAttribute(name,expected,propertyInfo,false)){return value;}if(value===''+expected){return expected;}return value;}}else if(node.hasAttribute(attributeName)){if(shouldRemoveAttribute(name,expected,propertyInfo,false)){// We had an attribute but shouldn't have had one, so read it\n// for the error message.\nreturn node.getAttribute(attributeName);}if(propertyInfo.type===BOOLEAN){// If this was a boolean, it doesn't matter what the value is\n// the fact that we have it is the same as the expected.\nreturn expected;}// Even if this property uses a namespace we use getAttribute\n// because we assume its namespaced name is the same as our config.\n// To use getAttributeNS we need the local name which we don't have\n// in our config atm.\nstringValue=node.getAttribute(attributeName);}if(shouldRemoveAttribute(name,expected,propertyInfo,false)){return stringValue===null?expected:stringValue;}else if(stringValue===''+expected){return expected;}else{return stringValue;}}}}", "function getValueForProperty(node,name,expected,propertyInfo){{if(propertyInfo.mustUseProperty){var propertyName=propertyInfo.propertyName;return node[propertyName];}else{if(propertyInfo.sanitizeURL){// If we haven't fully disabled javascript: URLs, and if\n// the hydration is successful of a javascript: URL, we\n// still want to warn on the client.\nsanitizeURL(''+expected);}var attributeName=propertyInfo.attributeName;var stringValue=null;if(propertyInfo.type===OVERLOADED_BOOLEAN){if(node.hasAttribute(attributeName)){var value=node.getAttribute(attributeName);if(value===''){return true;}if(shouldRemoveAttribute(name,expected,propertyInfo,false)){return value;}if(value===''+expected){return expected;}return value;}}else if(node.hasAttribute(attributeName)){if(shouldRemoveAttribute(name,expected,propertyInfo,false)){// We had an attribute but shouldn't have had one, so read it\n// for the error message.\nreturn node.getAttribute(attributeName);}if(propertyInfo.type===BOOLEAN){// If this was a boolean, it doesn't matter what the value is\n// the fact that we have it is the same as the expected.\nreturn expected;}// Even if this property uses a namespace we use getAttribute\n// because we assume its namespaced name is the same as our config.\n// To use getAttributeNS we need the local name which we don't have\n// in our config atm.\nstringValue=node.getAttribute(attributeName);}if(shouldRemoveAttribute(name,expected,propertyInfo,false)){return stringValue===null?expected:stringValue;}else if(stringValue===''+expected){return expected;}else{return stringValue;}}}}", "function getValueForProperty(node,name,expected,propertyInfo){{if(propertyInfo.mustUseProperty){var propertyName=propertyInfo.propertyName;return node[propertyName];}else{if(propertyInfo.sanitizeURL){// If we haven't fully disabled javascript: URLs, and if\n// the hydration is successful of a javascript: URL, we\n// still want to warn on the client.\nsanitizeURL(''+expected);}var attributeName=propertyInfo.attributeName;var stringValue=null;if(propertyInfo.type===OVERLOADED_BOOLEAN){if(node.hasAttribute(attributeName)){var value=node.getAttribute(attributeName);if(value===''){return true;}if(shouldRemoveAttribute(name,expected,propertyInfo,false)){return value;}if(value===''+expected){return expected;}return value;}}else if(node.hasAttribute(attributeName)){if(shouldRemoveAttribute(name,expected,propertyInfo,false)){// We had an attribute but shouldn't have had one, so read it\n// for the error message.\nreturn node.getAttribute(attributeName);}if(propertyInfo.type===BOOLEAN){// If this was a boolean, it doesn't matter what the value is\n// the fact that we have it is the same as the expected.\nreturn expected;}// Even if this property uses a namespace we use getAttribute\n// because we assume its namespaced name is the same as our config.\n// To use getAttributeNS we need the local name which we don't have\n// in our config atm.\nstringValue=node.getAttribute(attributeName);}if(shouldRemoveAttribute(name,expected,propertyInfo,false)){return stringValue===null?expected:stringValue;}else if(stringValue===''+expected){return expected;}else{return stringValue;}}}}", "function getValueForProperty(node,name,expected,propertyInfo){{if(propertyInfo.mustUseProperty){var propertyName=propertyInfo.propertyName;return node[propertyName];}else {if(propertyInfo.sanitizeURL){// If we haven't fully disabled javascript: URLs, and if\n// the hydration is successful of a javascript: URL, we\n// still want to warn on the client.\nsanitizeURL(''+expected);}var attributeName=propertyInfo.attributeName;var stringValue=null;if(propertyInfo.type===OVERLOADED_BOOLEAN){if(node.hasAttribute(attributeName)){var value=node.getAttribute(attributeName);if(value===''){return true;}if(shouldRemoveAttribute(name,expected,propertyInfo,false)){return value;}if(value===''+expected){return expected;}return value;}}else if(node.hasAttribute(attributeName)){if(shouldRemoveAttribute(name,expected,propertyInfo,false)){// We had an attribute but shouldn't have had one, so read it\n// for the error message.\nreturn node.getAttribute(attributeName);}if(propertyInfo.type===BOOLEAN){// If this was a boolean, it doesn't matter what the value is\n// the fact that we have it is the same as the expected.\nreturn expected;}// Even if this property uses a namespace we use getAttribute\n// because we assume its namespaced name is the same as our config.\n// To use getAttributeNS we need the local name which we don't have\n// in our config atm.\nstringValue=node.getAttribute(attributeName);}if(shouldRemoveAttribute(name,expected,propertyInfo,false)){return stringValue===null?expected:stringValue;}else if(stringValue===''+expected){return expected;}else {return stringValue;}}}}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (\n shouldRemoveAttribute(\n name,\n expected,\n propertyInfo,\n false,\n )\n ) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (\n shouldRemoveAttribute(name, expected, propertyInfo, false)\n ) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (\n shouldRemoveAttribute(name, expected, propertyInfo, false)\n ) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }", "function getValueForProperty(node,name,expected,propertyInfo){{if(propertyInfo.mustUseProperty){var propertyName=propertyInfo.propertyName;return node[propertyName];}else{var attributeName=propertyInfo.attributeName;var stringValue=null;if(propertyInfo.type===OVERLOADED_BOOLEAN){if(node.hasAttribute(attributeName)){var value=node.getAttribute(attributeName);if(value===''){return true;}if(shouldRemoveAttribute(name,expected,propertyInfo,false)){return value;}if(value===''+expected){return expected;}return value;}}else if(node.hasAttribute(attributeName)){if(shouldRemoveAttribute(name,expected,propertyInfo,false)){// We had an attribute but shouldn't have had one, so read it\n// for the error message.\nreturn node.getAttribute(attributeName);}if(propertyInfo.type===BOOLEAN){// If this was a boolean, it doesn't matter what the value is\n// the fact that we have it is the same as the expected.\nreturn expected;}// Even if this property uses a namespace we use getAttribute\n// because we assume its namespaced name is the same as our config.\n// To use getAttributeNS we need the local name which we don't have\n// in our config atm.\nstringValue=node.getAttribute(attributeName);}if(shouldRemoveAttribute(name,expected,propertyInfo,false)){return stringValue===null?expected:stringValue;}else if(stringValue===''+expected){return expected;}else{return stringValue;}}}}", "function getValueForProperty(node,name,expected,propertyInfo){{if(propertyInfo.mustUseProperty){var propertyName=propertyInfo.propertyName;return node[propertyName];}else{var attributeName=propertyInfo.attributeName;var stringValue=null;if(propertyInfo.type===OVERLOADED_BOOLEAN){if(node.hasAttribute(attributeName)){var value=node.getAttribute(attributeName);if(value===''){return true;}if(shouldRemoveAttribute(name,expected,propertyInfo,false)){return value;}if(value===''+expected){return expected;}return value;}}else if(node.hasAttribute(attributeName)){if(shouldRemoveAttribute(name,expected,propertyInfo,false)){// We had an attribute but shouldn't have had one, so read it\n// for the error message.\nreturn node.getAttribute(attributeName);}if(propertyInfo.type===BOOLEAN){// If this was a boolean, it doesn't matter what the value is\n// the fact that we have it is the same as the expected.\nreturn expected;}// Even if this property uses a namespace we use getAttribute\n// because we assume its namespaced name is the same as our config.\n// To use getAttributeNS we need the local name which we don't have\n// in our config atm.\nstringValue=node.getAttribute(attributeName);}if(shouldRemoveAttribute(name,expected,propertyInfo,false)){return stringValue===null?expected:stringValue;}else if(stringValue===''+expected){return expected;}else{return stringValue;}}}}", "function getValueForProperty(node,name,expected,propertyInfo){{if(propertyInfo.mustUseProperty){var propertyName=propertyInfo.propertyName;return node[propertyName];}else{var attributeName=propertyInfo.attributeName;var stringValue=null;if(propertyInfo.type===OVERLOADED_BOOLEAN){if(node.hasAttribute(attributeName)){var value=node.getAttribute(attributeName);if(value===''){return true;}if(shouldRemoveAttribute(name,expected,propertyInfo,false)){return value;}if(value===''+expected){return expected;}return value;}}else if(node.hasAttribute(attributeName)){if(shouldRemoveAttribute(name,expected,propertyInfo,false)){// We had an attribute but shouldn't have had one, so read it\n// for the error message.\nreturn node.getAttribute(attributeName);}if(propertyInfo.type===BOOLEAN){// If this was a boolean, it doesn't matter what the value is\n// the fact that we have it is the same as the expected.\nreturn expected;}// Even if this property uses a namespace we use getAttribute\n// because we assume its namespaced name is the same as our config.\n// To use getAttributeNS we need the local name which we don't have\n// in our config atm.\nstringValue=node.getAttribute(attributeName);}if(shouldRemoveAttribute(name,expected,propertyInfo,false)){return stringValue===null?expected:stringValue;}else if(stringValue===''+expected){return expected;}else{return stringValue;}}}}", "function getValueForProperty(node,name,expected,propertyInfo){{if(propertyInfo.mustUseProperty){var propertyName=propertyInfo.propertyName;return node[propertyName];}else{var attributeName=propertyInfo.attributeName;var stringValue=null;if(propertyInfo.type===OVERLOADED_BOOLEAN){if(node.hasAttribute(attributeName)){var value=node.getAttribute(attributeName);if(value===''){return true;}if(shouldRemoveAttribute(name,expected,propertyInfo,false)){return value;}if(value===''+expected){return expected;}return value;}}else if(node.hasAttribute(attributeName)){if(shouldRemoveAttribute(name,expected,propertyInfo,false)){// We had an attribute but shouldn't have had one, so read it\n// for the error message.\nreturn node.getAttribute(attributeName);}if(propertyInfo.type===BOOLEAN){// If this was a boolean, it doesn't matter what the value is\n// the fact that we have it is the same as the expected.\nreturn expected;}// Even if this property uses a namespace we use getAttribute\n// because we assume its namespaced name is the same as our config.\n// To use getAttributeNS we need the local name which we don't have\n// in our config atm.\nstringValue=node.getAttribute(attributeName);}if(shouldRemoveAttribute(name,expected,propertyInfo,false)){return stringValue===null?expected:stringValue;}else if(stringValue===''+expected){return expected;}else{return stringValue;}}}}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (!disableJavaScriptURLs && propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (!disableJavaScriptURLs && propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (!disableJavaScriptURLs && propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (!disableJavaScriptURLs && propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (!disableJavaScriptURLs && propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (!disableJavaScriptURLs && propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (!disableJavaScriptURLs && propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (propertyInfo.sanitizeURL) // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') return true;\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) return value;\n if (value === '' + expected) return expected;\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n if (propertyInfo.type === BOOLEAN) // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) return stringValue === null ? expected : stringValue;\n else if (stringValue === '' + expected) return expected;\n else return stringValue;\n }\n }", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n\n return node[propertyName];\n } else {\n if (!disableJavaScriptURLs && propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}", "function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n\n return node[propertyName];\n } else {\n if (!disableJavaScriptURLs && propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}" ]
[ "0.81585205", "0.81585205", "0.8143505", "0.8068335", "0.8068335", "0.8064425", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.80600667", "0.79319113", "0.79319113", "0.79319113", "0.79319113", "0.7924183", "0.7898062", "0.7898062", "0.7898062", "0.7898062", "0.7898062", "0.7898062", "0.7898062", "0.7898062", "0.7898062", "0.7876727", "0.78763884", "0.78714687", "0.78714687", "0.78714687", "0.78714687", "0.7860083", "0.7850829", "0.7850829", "0.7850829", "0.7850829", "0.7850829", "0.7850829", "0.7830833", "0.78282505", "0.78282505" ]
0.78881687
72
Get the value for a attribute on a node. Only used in DEV for SSR validation. The third argument is used as a hint of what the expected value is. Some attributes have multiple equivalent values.
function getValueForAttribute(node, name, expected) { { if (!isAttributeNameSafe(name)) { return; } if (!node.hasAttribute(name)) { return expected === undefined ? undefined : null; } var value = node.getAttribute(name); if (value === '' + expected) { return expected; } return value; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}// If the object is an opaque reference ID, it's expected that\n// the next prop is different than the server value, so just return\n// expected\nif(isOpaqueHydratingObject(expected)){return expected;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}// If the object is an opaque reference ID, it's expected that\n// the next prop is different than the server value, so just return\n// expected\nif(isOpaqueHydratingObject(expected)){return expected;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "function getValueForAttribute(node, name, expected) {\n if (!isAttributeNameSafe(name)) return;\n // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n if (isOpaqueHydratingObject(expected)) return expected;\n if (!node.hasAttribute(name)) return expected === undefined ? undefined : null;\n var value = node.getAttribute(name);\n if (value === '' + expected) return expected;\n return value;\n }", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n }", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n }", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n }", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n }", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n }", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n }", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n }", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n }", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n }", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}" ]
[ "0.7426143", "0.7426143", "0.7426143", "0.7426143", "0.7426143", "0.7426143", "0.7426143", "0.7426143", "0.7426143", "0.7426143", "0.7328788", "0.7328788", "0.73259443", "0.73224336", "0.73224336", "0.73224336", "0.73224336", "0.73224336", "0.73224336", "0.73224336", "0.73224336", "0.73224336", "0.73224336", "0.73224336", "0.73224336", "0.73224336", "0.73224336", "0.73224336", "0.731562", "0.7264665", "0.7264665", "0.7264665", "0.7264665", "0.708852", "0.7065832", "0.7065832", "0.7065832", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953", "0.70422953" ]
0.0
-1
Flow does not allow string concatenation of most nonstring types. To work around this limitation, we use an opaque type that can only be obtained by passing the value through getToStringValue first.
function toString(value) { return '' + value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function string(val) {\n return {value: val, type: 'string'};\n}", "get stringValue() {}", "function toString(value){return ''+value;}", "function toString(value){return''+value;}", "function toString(value){return''+value;}", "function toString(value){return''+value;}", "function toString(value){return''+value;}", "function toString(value){return''+value;}", "function toString(value){return''+value;}", "function coerceToString(value) {\n return \"\" + (value || '');\n}", "function toString(value) {\n\t switch (typeof value) {\n\t case 'number':\n\t return value + '';\n\t case 'string':\n\t return value;\n\t default:\n\t return JSON.stringify(value);\n\t }\n\t}", "function toString(value) {\n return '' + value;\n }", "function toString(value) {\n return '' + value;\n }", "function toString(value) {\n return '' + value;\n }", "function toString(value) {\n return '' + value;\n }", "function toString(value) {\n return '' + value;\n }", "function toString(value) {\n return '' + value;\n }", "function toString(value) {\n return '' + value;\n }", "function toString(value) {\n return '' + value;\n }", "function toString(value) {\n return '' + value;\n }", "function toString(value) {\n return '' + value;\n }", "function toString(value) {\n return '' + value;\n }", "function toString(value) {\n return '' + value;\n }" ]
[ "0.6297387", "0.6282521", "0.625954", "0.62230176", "0.62230176", "0.62230176", "0.62230176", "0.62230176", "0.62230176", "0.6184894", "0.61484236", "0.6067506", "0.6067506", "0.6067506", "0.6067506", "0.6067506", "0.6067506", "0.6067506", "0.6067506", "0.6067506", "0.6067506", "0.6067506", "0.6067506" ]
0.6112809
71
Implements an host component that allows setting these optional props: `checked`, `value`, `defaultChecked`, and `defaultValue`. If `checked` or `value` are not supplied (or null/undefined), user actions that affect the checked state or value will trigger updates to the element. If they are supplied (and not null/undefined), the rendered element will not trigger updates to the element. Instead, the props must change in order for the rendered element to be updated. The rendered element will be initialized as unchecked (or `defaultChecked`) with an empty value (or `defaultValue`). See
function getHostProps(element, props) { var node = element; var checked = props.checked; var hostProps = _assign({}, props, { defaultChecked: undefined, defaultValue: undefined, value: undefined, checked: checked != null ? checked : node._wrapperState.initialChecked }); return hostProps; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(props) {\n super(props);\n this.value = props.value;\n this.id = RadioButton.idGenerator(this.value);\n this.groupName = props.groupName;\n this.optional = {};\n if (typeof props.onChangeCallback === 'function') {\n this.optional.onChangeCallback =\n props.onChangeCallback.bind(\n this.groupName,\n this.value);\n }\n if (props.checked === true) {\n this.optional.defaultChecked = true;\n }\n }", "function getHostProps(element,props){var node=element;var checked=props.checked;var hostProps=_assign({},props,{defaultChecked:undefined,defaultValue:undefined,value:undefined,checked:checked!=null?checked:node._wrapperState.initialChecked});return hostProps;}", "function getHostProps(element,props){var node=element;var checked=props.checked;var hostProps=_assign({},props,{defaultChecked:undefined,defaultValue:undefined,value:undefined,checked:checked!=null?checked:node._wrapperState.initialChecked});return hostProps;}", "function getHostProps(element,props){var node=element;var checked=props.checked;var hostProps=_assign({},props,{defaultChecked:undefined,defaultValue:undefined,value:undefined,checked:checked!=null?checked:node._wrapperState.initialChecked});return hostProps;}", "function getHostProps(element,props){var node=element;var checked=props.checked;var hostProps=_assign({},props,{defaultChecked:undefined,defaultValue:undefined,value:undefined,checked:checked!=null?checked:node._wrapperState.initialChecked});return hostProps;}", "function getHostProps(element,props){var node=element;var checked=props.checked;var hostProps=_assign({},props,{defaultChecked:undefined,defaultValue:undefined,value:undefined,checked:checked!=null?checked:node._wrapperState.initialChecked});return hostProps;}", "function getHostProps(element,props){var node=element;var checked=props.checked;var hostProps=_assign({},props,{defaultChecked:undefined,defaultValue:undefined,value:undefined,checked:checked!=null?checked:node._wrapperState.initialChecked});return hostProps;}", "function getHostProps(element,props){var node=element;var checked=props.checked;var hostProps=_assign({},props,{defaultChecked:undefined,defaultValue:undefined,value:undefined,checked:checked!=null?checked:node._wrapperState.initialChecked});return hostProps;}", "function getHostProps(element,props){var node=element;var checked=props.checked;var hostProps=_assign({},props,{defaultChecked:undefined,defaultValue:undefined,value:undefined,checked:checked!=null?checked:node._wrapperState.initialChecked});return hostProps;}", "function getHostProps(element,props){var node=element;var checked=props.checked;var hostProps=_assign({},props,{defaultChecked:undefined,defaultValue:undefined,value:undefined,checked:checked!=null?checked:node._wrapperState.initialChecked});return hostProps;}", "function CheckboxBase(props, context) {\n var _this = _super.call(this, props, context) || this;\n _this._checkBox = React.createRef();\n _this._onFocus = function (ev) {\n var inputProps = _this.props.inputProps;\n if (inputProps && inputProps.onFocus) {\n inputProps.onFocus(ev);\n }\n };\n _this._onBlur = function (ev) {\n var inputProps = _this.props.inputProps;\n if (inputProps && inputProps.onBlur) {\n inputProps.onBlur(ev);\n }\n };\n _this._onChange = function (ev) {\n var _a = _this.props, disabled = _a.disabled, onChange = _a.onChange;\n var _b = _this.state, isChecked = _b.isChecked, isIndeterminate = _b.isIndeterminate;\n if (!disabled) {\n if (!isIndeterminate) {\n if (onChange) {\n onChange(ev, !isChecked);\n }\n if (_this.props.checked === undefined) {\n _this.setState({ isChecked: !isChecked });\n }\n }\n else {\n if (onChange) {\n onChange(ev, isChecked);\n }\n if (_this.props.indeterminate === undefined) {\n _this.setState({ isIndeterminate: false });\n }\n }\n }\n };\n _this._onRenderLabel = function (props) {\n var label = props.label;\n return label ? (React.createElement(\"span\", { \"aria-hidden\": \"true\", className: _this._classNames.text }, label)) : null;\n };\n Utilities_1.initializeComponentRef(_this);\n if (process.env.NODE_ENV !== 'production') {\n Utilities_1.warnMutuallyExclusive('Checkbox', props, {\n checked: 'defaultChecked',\n indeterminate: 'defaultIndeterminate'\n });\n }\n _this._id = _this.props.id || Utilities_1.getId('checkbox-');\n _this.state = {\n isChecked: !!(props.checked !== undefined ? props.checked : props.defaultChecked),\n isIndeterminate: !!(props.indeterminate !== undefined ? props.indeterminate : props.defaultIndeterminate)\n };\n Utilities_1.initializeFocusRects();\n return _this;\n }", "function CheckboxBase(props, context) {\n var _this = _super.call(this, props, context) || this;\n _this._checkBox = Object(__WEBPACK_IMPORTED_MODULE_2__Utilities__[\"B\" /* createRef */])();\n _this._onFocus = function (ev) {\n var inputProps = _this.props.inputProps;\n if (inputProps && inputProps.onFocus) {\n inputProps.onFocus(ev);\n }\n };\n _this._onBlur = function (ev) {\n var inputProps = _this.props.inputProps;\n if (inputProps && inputProps.onBlur) {\n inputProps.onBlur(ev);\n }\n };\n _this._onClick = function (ev) {\n var _a = _this.props, disabled = _a.disabled, onChange = _a.onChange;\n var isChecked = _this.state.isChecked;\n ev.preventDefault();\n ev.stopPropagation();\n if (!disabled) {\n if (onChange) {\n onChange(ev, !isChecked);\n }\n if (_this.props.checked === undefined) {\n _this.setState({ isChecked: !isChecked });\n }\n }\n };\n _this._onRenderLabel = function (props) {\n var label = props.label;\n return label ? __WEBPACK_IMPORTED_MODULE_1_react__[\"createElement\"](\"span\", { className: _this._classNames.text }, label) : null;\n };\n _this._warnMutuallyExclusive({\n checked: 'defaultChecked'\n });\n _this._id = Object(__WEBPACK_IMPORTED_MODULE_2__Utilities__[\"Z\" /* getId */])('checkbox-');\n _this.state = {\n isChecked: !!(props.checked !== undefined ? props.checked : props.defaultChecked)\n };\n return _this;\n }", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n return hostProps;\n }", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n }", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n }", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n }", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n }", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n }", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n }", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n }", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n }", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n }", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n }", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n }", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n }", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n }", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n }", "function Toggle(props) {\n var size = props.size,\n children = props.children,\n value = props.value,\n onChange = props.onChange,\n defaultChecked = props.defaultChecked,\n controlledChecked = props.checked,\n disabled = props.disabled,\n className = props.className;\n var isControlled = !(0,_shared_helpers_js__WEBPACK_IMPORTED_MODULE_2__.isNil)(controlledChecked);\n\n var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(defaultChecked),\n _useState2 = (0,_virtual_rollupPluginBabelHelpers_js__WEBPACK_IMPORTED_MODULE_4__.slicedToArray)(_useState, 2),\n checked = _useState2[0],\n setChecked = _useState2[1];\n\n var isChecked = isControlled ? controlledChecked : checked;\n\n var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),\n _useState4 = (0,_virtual_rollupPluginBabelHelpers_js__WEBPACK_IMPORTED_MODULE_4__.slicedToArray)(_useState3, 2),\n animatingPress = _useState4[0],\n setAnimatingPress = _useState4[1];\n\n var _usePress = (0,_hooks_js__WEBPACK_IMPORTED_MODULE_5__.usePress)({\n onPress: function onPress() {\n return setAnimatingPress(true);\n },\n disabled: disabled\n }),\n isPressed = _usePress.isPressed,\n pressProps = _usePress.pressProps;\n\n (0,_shared_hooks_useUpdateLayoutEffect_js__WEBPACK_IMPORTED_MODULE_6__.default)(function () {\n setAnimatingPress(true);\n }, [isChecked]);\n\n function handleChange(evt) {\n onChange(evt, evt.target.checked);\n\n if (!evt.defaultPrevented && !isControlled) {\n setChecked(evt.target.checked);\n }\n }\n\n return (\n /*#__PURE__*/\n // eslint-disable-next-line jsx-a11y/label-has-for, jsx-a11y/label-has-associated-control\n react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"label\", (0,_virtual_rollupPluginBabelHelpers_js__WEBPACK_IMPORTED_MODULE_4__.extends)({\n className: (0,_node_modules_classnames_index_js__WEBPACK_IMPORTED_MODULE_7__.default)(className, cn({\n pointed: !disabled\n }))\n }, pressProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_VisuallyHidden_index_js__WEBPACK_IMPORTED_MODULE_8__.default, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"input\", {\n type: \"checkbox\",\n value: value,\n disabled: disabled,\n checked: isChecked,\n onChange: handleChange\n })), children, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_Indicator_js__WEBPACK_IMPORTED_MODULE_9__.default, {\n setAnimatingPress: setAnimatingPress,\n animatingPress: animatingPress || isPressed,\n disabled: disabled,\n isChecked: isChecked,\n size: size\n }))\n );\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked:\n checked != null ? checked : node._wrapperState.initialChecked,\n });\n\n return hostProps;\n }", "_changeCheckState(optionalValue) {\n const that = this;\n let oldValue = that.checked;\n\n if ((oldValue === null) && (optionalValue !== undefined)) {\n that.$.fireEvent('change', { 'value': optionalValue, 'oldValue': null });\n that.checked = optionalValue;\n that._updateThumbPosition();\n return;\n }\n\n if (that.checked === null) {\n that.checked = true;\n }\n else {\n that.checked = !that.checked;\n }\n\n that._updateThumbPosition();\n\n that.$.fireEvent('change', { 'value': that.checked, 'oldValue': oldValue });\n that._updateHidenInputNameAndValue();\n }", "function useCheckboxGroup(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n defaultValue = _props.defaultValue,\n valueProp = _props.value,\n onChangeProp = _props.onChange,\n isNative = _props.isNative;\n\n var _useState = (0, _react.useState)(defaultValue || []),\n valueState = _useState[0],\n setValue = _useState[1];\n\n var _useControllableProp = (0, _hooks.useControllableProp)(valueProp, valueState),\n isControlled = _useControllableProp[0],\n value = _useControllableProp[1];\n\n var updateValue = (0, _react.useCallback)(function (nextState) {\n if (!isControlled) {\n setValue(nextState);\n }\n\n onChangeProp == null ? void 0 : onChangeProp(nextState);\n }, [isControlled, onChangeProp]);\n var onChange = (0, _react.useCallback)(function (eventOrValue) {\n if (!value) return;\n var isChecked = (0, _utils.isInputEvent)(eventOrValue) ? eventOrValue.target.checked : !value.includes(eventOrValue);\n var selectedValue = (0, _utils.isInputEvent)(eventOrValue) ? eventOrValue.target.value : eventOrValue;\n var nextValue = isChecked ? (0, _utils.addItem)(value, selectedValue) : (0, _utils.removeItem)(value, selectedValue);\n updateValue(nextValue);\n }, [updateValue, value]);\n return {\n value: value,\n onChange: onChange,\n setValue: updateValue,\n getCheckboxProps: function getCheckboxProps(props) {\n var _extends2;\n\n if (props === void 0) {\n props = {};\n }\n\n var checkedKey = isNative ? \"checked\" : \"isChecked\";\n return _extends({}, props, (_extends2 = {}, _extends2[checkedKey] = value.includes(props.value), _extends2.onChange = onChange, _extends2));\n }\n };\n}", "function Checkbox({value, title, onClick}) {\n return <Wrapper onClick={onClick}>\n <Indicator value={value} />\n {title}\n </Wrapper>\n}", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n return hostProps;\n }", "function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n var hostProps = _assign({\n }, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n return hostProps;\n }" ]
[ "0.6890328", "0.67860484", "0.67860484", "0.67860484", "0.67860484", "0.67860484", "0.67860484", "0.67860484", "0.67860484", "0.67860484", "0.63885677", "0.62577355", "0.62111604", "0.6131694", "0.6131694", "0.6131694", "0.6131694", "0.6131694", "0.6131694", "0.6131694", "0.6131694", "0.6131694", "0.6131694", "0.6131694", "0.6131694", "0.6131694", "0.6131694", "0.6130997", "0.6110984", "0.60870266", "0.60426354", "0.6037545", "0.6011736", "0.59509015" ]
0.0
-1
For number inputs, the display value loses trailing decimal points. For email inputs, Chrome raises "The specified value is not a valid email address". Here we check to see if the defaultValue has actually changed, avoiding these problems when the user is inputting text
function setDefaultValue(node, type, value) { if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js type !== 'number' || node.ownerDocument.activeElement !== node) { if (value == null) { node.defaultValue = toString(node._wrapperState.initialValue); } else if (node.defaultValue !== toString(value)) { node.defaultValue = toString(value); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "shouldSetInputTextToDefaultValue (props) {\n let result = (this.previousDefaultValue != props.defaultValue) || (this.previousChangeIndicator != props.changeIndicator)\n return result\n }", "function setDefaultValue(node,type,value){if(// Focused number inputs synchronize on blur. See ChangeEventPlugin.js\ntype!=='number'||getActiveElement(node.ownerDocument)!==node){if(value==null){node.defaultValue=toString(node._wrapperState.initialValue);}else if(node.defaultValue!==toString(value)){node.defaultValue=toString(value);}}}", "function setDefaultValue(node,type,value){if(// Focused number inputs synchronize on blur. See ChangeEventPlugin.js\ntype!=='number'||getActiveElement(node.ownerDocument)!==node){if(value==null){node.defaultValue=toString(node._wrapperState.initialValue);}else if(node.defaultValue!==toString(value)){node.defaultValue=toString(value);}}}", "function setDefaultValue(node,type,value){if(// Focused number inputs synchronize on blur. See ChangeEventPlugin.js\ntype!=='number'||node.ownerDocument.activeElement!==node){if(value==null){node.defaultValue=toString(node._wrapperState.initialValue);}else if(node.defaultValue!==toString(value)){node.defaultValue=toString(value);}}}", "function setDefaultValue(node,type,value){if(// Focused number inputs synchronize on blur. See ChangeEventPlugin.js\ntype!=='number'||node.ownerDocument.activeElement!==node){if(value==null){node.defaultValue=toString(node._wrapperState.initialValue);}else if(node.defaultValue!==toString(value)){node.defaultValue=toString(value);}}}", "function setDefaultValue(node,type,value){if(// Focused number inputs synchronize on blur. See ChangeEventPlugin.js\ntype!=='number'||node.ownerDocument.activeElement!==node){if(value==null){node.defaultValue=toString(node._wrapperState.initialValue);}else if(node.defaultValue!==toString(value)){node.defaultValue=toString(value);}}}", "function setDefaultValue(node,type,value){if(// Focused number inputs synchronize on blur. See ChangeEventPlugin.js\ntype!=='number'||node.ownerDocument.activeElement!==node){if(value==null){node.defaultValue=toString(node._wrapperState.initialValue);}else if(node.defaultValue!==toString(value)){node.defaultValue=toString(value);}}}", "function setDefaultValue(node,type,value){if(// Focused number inputs synchronize on blur. See ChangeEventPlugin.js\ntype!=='number'||node.ownerDocument.activeElement!==node){if(value==null){node.defaultValue=toString(node._wrapperState.initialValue);}else if(node.defaultValue!==toString(value)){node.defaultValue=toString(value);}}}", "function setDefaultValue(node,type,value){if(// Focused number inputs synchronize on blur. See ChangeEventPlugin.js\ntype!=='number'||node.ownerDocument.activeElement!==node){if(value==null){node.defaultValue=''+node._wrapperState.initialValue;}else if(node.defaultValue!==''+value){node.defaultValue=''+value;}}}", "function setDefaultValue(node,type,value){if(// Focused number inputs synchronize on blur. See ChangeEventPlugin.js\ntype!=='number'||node.ownerDocument.activeElement!==node){if(value==null){node.defaultValue=''+node._wrapperState.initialValue;}else if(node.defaultValue!==''+value){node.defaultValue=''+value;}}}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n }\n else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if (// Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function validateInput(\n value,\n { float, canBeNegative, canBeEmpty, defaultValue }\n) {\n if (`${value}`.length > 0) {\n const valueAsNumber = float ? parseFloat(value) : parseInt(value);\n const signedNumber = !canBeNegative\n ? Math.abs(valueAsNumber)\n : valueAsNumber;\n\n return !isNaN(signedNumber) ? signedNumber : defaultValue;\n } else if (canBeEmpty) {\n return '';\n }\n\n return defaultValue;\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' ||\n node.ownerDocument.activeElement !== node\n ) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}" ]
[ "0.6748244", "0.6745956", "0.6745956", "0.668249", "0.668249", "0.668249", "0.668249", "0.668249", "0.66758955", "0.66758955", "0.6567232", "0.65263164", "0.6493208", "0.6483082", "0.6483082", "0.6483082", "0.6483082", "0.6460759", "0.6460759", "0.6460759", "0.6460759", "0.6460759", "0.6460759", "0.6460759", "0.6460759", "0.6460759", "0.64569265", "0.6440519", "0.6440519", "0.6440519", "0.6440519", "0.6440519", "0.6440519", "0.6440519", "0.6440519", "0.6440519", "0.6440519", "0.6440519", "0.6440519", "0.6440519", "0.6440519", "0.6440519", "0.6440519", "0.6440519", "0.6440519", "0.6440519", "0.6440519", "0.64147395", "0.63839495", "0.63839495", "0.63839495", "0.63839495", "0.63839495", "0.63839495", "0.63839495", "0.63839495", "0.63839495", "0.63839495", "0.63839495", "0.63839495", "0.63839495", "0.63839495", "0.63839495", "0.6357067", "0.6357067", "0.6357067", "0.6357067", "0.6357067", "0.6357067", "0.6357067", "0.6357067", "0.6357067" ]
0.63645613
89
Implements an host component that warns when `selected` is set.
function validateProps(element, props) { { // This mirrors the codepath above, but runs for hydration too. // Warn about invalid children here so that client and hydration are consistent. // TODO: this seems like it could cause a DEV-only throw for hydration // if children contains a non-element object. We should try to avoid that. if (typeof props.children === 'object' && props.children !== null) { React.Children.forEach(props.children, function (child) { if (child == null) { return; } if (typeof child === 'string' || typeof child === 'number') { return; } if (typeof child.type !== 'string') { return; } if (!didWarnInvalidChild) { didWarnInvalidChild = true; error('Only strings and numbers are supported as <option> children.'); } }); } // TODO: Remove support for `selected` in <option>. if (props.selected != null && !didWarnSelectedSetOnOption) { error('Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.'); didWarnSelectedSetOnOption = true; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get _shouldUpdateSelection(){return this.selected!=null;}", "get selected() { return this._selected; }", "get selected() { return this._selected; }", "get selected() { return this._selected; }", "get selected() { return this._selected; }", "get selected() { return this._selected; }", "get selected() { return this._selected; }", "get selected() { return this._selected; }", "get selected() { return this._selected; }", "get selected() { return this._selected; }", "get selected() { return this._selected; }", "get selected() { return this._selected; }", "get selected() { return this._selected; }", "select() { this.selected = true; }", "get _shouldUpdateSelection(){return this.selected!=null||this.selectedValues!=null&&this.selectedValues.length;}", "function validateProps(element,props){// TODO (yungsters): Remove support for `selected` in <option>.\n\t{warning(props.selected==null,'Use the `defaultValue` or `value` props on <select> instead of '+'setting `selected` on <option>.');}}", "get disallowEmptySelection() {\n return this.state.disallowEmptySelection;\n }", "function validateProps(element,props){// TODO (yungsters): Remove support for `selected` in <option>.\n{warning(props.selected==null,'Use the `defaultValue` or `value` props on <select> instead of '+'setting `selected` on <option>.');}}", "function validateProps(element,props){// TODO (yungsters): Remove support for `selected` in <option>.\n{warning(props.selected==null,'Use the `defaultValue` or `value` props on <select> instead of '+'setting `selected` on <option>.');}}", "select () {\n this.selected = true;\n }", "function validateProps(element,props){// TODO (yungsters): Remove support for `selected` in <option>.\n{if(props.selected!=null&&!didWarnSelectedSetOnOption){warning(false,'Use the `defaultValue` or `value` props on <select> instead of '+'setting `selected` on <option>.');didWarnSelectedSetOnOption=true;}}}", "function validateProps(element,props){// TODO (yungsters): Remove support for `selected` in <option>.\n{if(props.selected!=null&&!didWarnSelectedSetOnOption){warning(false,'Use the `defaultValue` or `value` props on <select> instead of '+'setting `selected` on <option>.');didWarnSelectedSetOnOption=true;}}}", "_hideSelected() {\n this.props.hideSelected();\n }", "checkSelection(){\n Ember.run.next(() =>{\n let sel = this.getSelection(),\n hasSelection = !!$.trim(sel.toString());\n\n this.$toolpane.css('visibility', hasSelection ? 'visible' : 'hidden');\n\n if(hasSelection) {\n this.$toolpane.css(this.getToolpaneCoords(sel));\n }\n });\n }", "_setSelectedOption() {\n if (this.options.length > 1) super._setSelectedOption();\n }", "set selectedItem(aItem) {\n // A predicate is allowed to select a specific item.\n // If no item is matched, then the current selection is removed.\n if (typeof aItem == \"function\") {\n aItem = this.getItemForPredicate(aItem);\n }\n\n // A falsy item is allowed to invalidate the current selection.\n let targetElement = aItem ? aItem._target : null;\n let prevElement = this._widget.selectedItem;\n\n // Make sure the selected item's target element is focused and visible.\n if (this.autoFocusOnSelection && targetElement) {\n targetElement.focus();\n }\n if (this.maintainSelectionVisible && targetElement) {\n // Some methods are optional. See the WidgetMethods object documentation\n // for a comprehensive list.\n if (\"ensureElementIsVisible\" in this._widget) {\n this._widget.ensureElementIsVisible(targetElement);\n }\n }\n\n // Prevent selecting the same item again and avoid dispatching\n // a redundant selection event, so return early.\n if (targetElement != prevElement) {\n this._widget.selectedItem = targetElement;\n let dispTarget = targetElement || prevElement;\n let dispName = this.suppressSelectionEvents ? \"suppressed-select\" : \"select\";\n ViewHelpers.dispatchEvent(dispTarget, dispName, aItem);\n }\n }", "get selected() { return this.selectionList.selectedOptions.isSelected(this); }", "get selected() { return this.selectionList.selectedOptions.isSelected(this); }", "_selectViaInteraction() {\n if (!this.disabled) {\n this._selected = this.multiple ? !this._selected : true;\n this._changeDetectorRef.markForCheck();\n this._emitSelectionChangeEvent(true);\n }\n }", "_selectViaInteraction() {\n if (!this.disabled) {\n this._selected = this.multiple ? !this._selected : true;\n this._changeDetectorRef.markForCheck();\n this._emitSelectionChangeEvent(true);\n }\n }", "_selectViaInteraction() {\n if (!this.disabled) {\n this._selected = this.multiple ? !this._selected : true;\n this._changeDetectorRef.markForCheck();\n this._emitSelectionChangeEvent(true);\n }\n }", "_selectViaInteraction() {\n if (!this.disabled) {\n this._selected = this.multiple ? !this._selected : true;\n this._changeDetectorRef.markForCheck();\n this._emitSelectionChangeEvent(true);\n }\n }", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n }", "get selected() {\n return this._selected;\n }", "get selected() {\n return this._selected;\n }", "get selected() {\n return this._selected;\n }", "_canItemBeSelected(item) {\n return item.disabled === false && item.templateApplied !== true;\n }", "_setSelected(selected) {\n if (selected === this._selected) {\n return false;\n }\n this._selected = selected;\n if (selected) {\n this.selectionList.selectedOptions.select(this);\n }\n else {\n this.selectionList.selectedOptions.deselect(this);\n }\n this.selectedChange.emit(selected);\n this._changeDetector.markForCheck();\n return true;\n }", "mounted(el, { value }) {\r\n setSelected(el, value);\r\n }", "mounted(el, { value }) {\r\n setSelected(el, value);\r\n }", "displayUnreliableSuppressed() {\n // Don't display unreliable/suppressed unless the selected maternal health is one of the following values.\n if ([\"Maternal Mortality Rate\", \"Late Maternal Death Rate\"].includes(this.getMaternalHealthSelected())) {\n return true;\n }\n return false;\n }", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n warning(props.selected == null, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n }\n }", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n warning(props.selected == null, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n }\n }", "@readOnly\n @computed('selectedItems', 'disabled')\n /**\n * Input should be disabled if anything is selected\n * @param {Number[]} selected - the selected indices\n * @param {Boolean} disabled - the selected indices\n * @returns {Boolean} true if anything is selected\n */\n disableInput (selected, disabled) {\n return disabled || (selected.length > 0)\n }", "set selected(value) {\n this._selected = value;\n this._selectedTimestamp = value ? new Date() : undefined;\n }", "mounted(el, { value }) {\n setSelected(el, value);\n }", "mounted(el, { value }) {\n setSelected(el, value);\n }", "mounted(el, { value }) {\n setSelected(el, value);\n }", "mounted(el, { value }) {\n setSelected(el, value);\n }", "mounted(el, { value }) {\n setSelected(el, value);\n }", "mounted(el, { value }) {\n setSelected(el, value);\n }", "mounted(el, { value }) {\n setSelected(el, value);\n }", "function handleSelection(value) {\n setCategory(value);\n setVisible(false);\n }", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n }", "function checkSelection(name, value){\n\tif (value == -1) {\n \t errMessages += \"<li>\" + name + \" - Please select a choice.</li>\"; \n\t}\n\telse {\n\t\treturn true;\n\t}\n}", "notify(options) {\n\t\tif (options.model==='MenuModel' && options.method==='selected') {\n\t\t\t//console.log(['In ',this.name,' selected = ',options.selected]);\n\t\t\tif (this.name === options.selected) {\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tthis.visible = true;\n\t\t\t\t\tthis.restore();\n\t\t\t\t\tthis.show();\n\t\t\t\t}, 100);\n\t\t\t} else {\n\t\t\t\tthis.visible = false;\n\t\t\t\tthis.hide();\n\t\t\t}\n\t\t}\n\t}", "'state.selected_diagnostics'() {\n if (this.state.selected_diagnostics.length !== 0) {\n this.uncheckLabelsButtons();\n this.createPlot();\n }\n }", "function SelectableDropdownItem({ isSelected, ...props }) {\n return (\n <li className=\"relative\"> \n <DropdownItem \n {...props} \n handleClick={!isSelected ? props.handleClick : (e) => e.preventDefault()} \n {\n ...(isSelected && { rootClass: 'border-2 border-primary pointer-events-none' })\n } />\n {\n isSelected && (\n <div className=\"absolute top-2 right-2 py-1 px-2 rounded-lg bg-green-200 font-bold text-sm text-green-700 pointer-events-none shadow-main\">\n <p>Selected</p>\n </div>\n )\n }\n </li>\n )\n}", "setSelected(selected) {\n if (selected !== this.state.selected) {\n this.setState({ selected })\n }\n }", "get hidden() {\n return !this.selected;\n }", "select(item) {\n if (this.state.selected !== item) {\n this.state.selected = item;\n this.props.updateFilter(this.state.selected);\n }\n }", "getSelectedTarget() {\n this.socket.emit('get_selected_target');\n return false;\n }", "_selectionHandler(activeProject) {\n for (projectElement of this.projects) {\n projectElement.markUnchecked();\n }\n activeProject.markChecked();\n this.emitter.emit('did-change-path-selection', activeProject.path);\n }", "mounted (el, { value }) {\n setSelected(el, value);\n }", "function Update()\r\n{\r\n\tif (selected && !activated)\r\n\t{\r\n\t\tif (puzzle_desc_box.enabled == false)\r\n\t\t{\r\n\t\t\teditor_object.SendMessage(\"assign_target\", this.gameObject, \r\n\t\t\t\t\t\t\t\t\t SendMessageOptions.DontRequireReceiver);\r\n\t\t\tpuzzle_desc_box.enabled = true;\r\n\t\t}\r\n\t} else if (puzzle_desc_box.enabled == true) \r\n\t{\r\n\t\tpuzzle_desc_box.enabled = false;\r\n\t}\r\n}", "function validateProps(element, props) {\n\t // TODO (yungsters): Remove support for `selected` in <option>.\n\t {\n\t warning(props.selected == null, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n\t }\n\t}", "set Selected(value) {\n this._selected = value;\n if (value) {\n selectedInput = this;\n }\n else {\n selectedInput = null;\n }\n }", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function validateProps(element, props) {\n // TODO (yungsters): Remove support for `selected` in <option>.\n {\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n}", "function Selected(props) {\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", { className: 'selected ' + (props.clear || '') },\n react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"i\", null,\n \"The \",\n props.selecting,\n \" \",\n react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"b\", null, props.selected),\n \" has been selected\"),\n props.clear === 'clear' ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"a\", { onClick: props.clearWS },\n react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"svg\", { xmlns: 'http://www.w3.org/2000/svg', id: 'Close', width: '12', height: '12', viewBox: '0 0 12 12' },\n react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"path\", { id: 'X_5_', d: 'M6.21,6.5l2.65-2.65c0.19-0.19,0.19-0.51,0-0.71 s-0.51-0.19-0.71,0L5.5,5.79L2.85,3.15c-0.19-0.19-0.51-0.19-0.71,0s-0.19,0.51,0,0.71L4.79,6.5L2.15,9.15 c-0.19,0.19-0.19,0.51,0,0.71c0.19,0.19,0.51,0.19,0.71,0L5.5,7.21l2.65,2.65c0.19,0.19,0.51,0.19,0.71,0 c0.19-0.19,0.19-0.51,0-0.71L6.21,6.5z', fillRule: 'evenodd', clipRule: 'evenodd', fill: '#666766' }))) : '')));\n}", "get selectable() { return this._selectable; }", "get selectable() { return this._selectable; }", "__$$triggerSelectionChange() {\n\t\tconst selected = this.state.selected\n\t\tthis.refs.headerCheckbox.indeterminate = this.__$$checkboxShouldBeIndeterminate(selected)\n\n\t\tconst fn = this.props.onChange || (() => { })\n\t\tfn(this, this.getSelectedIndices(selected))\n\t}", "selectionChanged(selected) {\n const vizConf = this.visualConfig;\n this.selected = selected;\n if (selected) {\n this.label.tint = vizConf.ui.label.font.highlight;\n this.labelBgContainer.forEach((labelBg) => {\n labelBg.tint = vizConf.ui.label.background.highlight;\n });\n } else {\n this.label.tint = vizConf.ui.label.font.color;\n this.labelBgContainer.forEach((labelBg) => {\n labelBg.tint = vizConf.ui.label.background.color;\n });\n }\n }", "constructor(value, selected) {\r\n this.value = value;\r\n this.selected = selected;\r\n }", "selected(value) {\n value = this.convertOutput(value);\n this.set('model.' + this.get('field'), value);\n // Send action if it is passed.\n if (this.get('onSelect')) {\n this.get('onSelect')(value);\n }\n }", "_checkSelectIsAble () {\n return true\n }", "validateSelect(target) {\n\t\tif(target.value == '') {\n\t\t\ttarget.style.border = '1px solid red';\n\t\t\tthis.selectWarning.classList.add('warning');\n\t\t} else {\n\t\t\ttarget.style.border = '';\n\t\t\tthis.selectWarning.classList.remove('warning');\n\t\t}\n\t}", "_setSelected(selected) {\n if (selected === this._selected) {\n return false;\n }\n this._selected = selected;\n if (selected) {\n this.selectionList.selectedOptions.select(this);\n }\n else {\n this.selectionList.selectedOptions.deselect(this);\n }\n this._changeDetector.markForCheck();\n return true;\n }", "onMultiSelectionComponentPress(event) {\n if (this.isInactive) {\n return;\n }\n this.fireEvent(\"_selection-requested\", {\n item: this,\n selected: event.target.checked,\n selectionComponentPressed: true\n });\n }", "function option(value, selected) {\n return {\n selected: observable(has(selected) ? selected : allCheckbox()),\n value: has(value) ? value.toString() : \"\"\n };\n }", "selectHandler(e) {\n const { trigger } = this.props;\n trigger(e);\n }", "@className('is-invalid')\n @computed('selectedColor')\n get _isInvalid() {\n return !this._validateColor(this.get('selectedColor'));\n }" ]
[ "0.583788", "0.57225657", "0.57225657", "0.57225657", "0.57225657", "0.57225657", "0.57225657", "0.57225657", "0.57225657", "0.57225657", "0.57225657", "0.57225657", "0.57225657", "0.56584495", "0.55881727", "0.55775845", "0.5576491", "0.55629015", "0.55629015", "0.5547889", "0.5525259", "0.5525259", "0.55143225", "0.5445873", "0.54393476", "0.5422125", "0.5418578", "0.5418578", "0.5416308", "0.5416308", "0.5416308", "0.5416308", "0.5390495", "0.53739685", "0.53739685", "0.53739685", "0.53678185", "0.53631324", "0.5335438", "0.5335438", "0.5306317", "0.5304488", "0.5304488", "0.5299729", "0.5283254", "0.52744013", "0.52744013", "0.52744013", "0.52744013", "0.52744013", "0.52744013", "0.52744013", "0.52667975", "0.5262427", "0.5260443", "0.5255716", "0.52540624", "0.52490765", "0.52483386", "0.5244912", "0.5221374", "0.5219766", "0.5218875", "0.52169865", "0.52117115", "0.5210695", "0.5199916", "0.5189048", "0.5189048", "0.5189048", "0.5189048", "0.5189048", "0.5189048", "0.5189048", "0.5189048", "0.5189048", "0.5189048", "0.5189048", "0.5189048", "0.5189048", "0.5189048", "0.5189048", "0.5189048", "0.5189048", "0.5189048", "0.5189048", "0.5189048", "0.518562", "0.51606363", "0.51606363", "0.51423204", "0.5140169", "0.51366025", "0.51251984", "0.51167685", "0.5114361", "0.51126903", "0.5106195", "0.51051545", "0.51048875", "0.50966835" ]
0.0
-1
Validation function for `value` and `defaultValue`.
function checkSelectPropTypes(props) { { ReactControlledValuePropTypes.checkPropTypes('select', props); for (var i = 0; i < valuePropNames.length; i++) { var propName = valuePropNames[i]; if (props[propName] == null) { continue; } var isArray = Array.isArray(props[propName]); if (props.multiple && !isArray) { error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum()); } else if (!props.multiple && isArray) { error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum()); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "'validateValue'(value) {}", "function checkValue(value, defaultValue) {\n return (value ? value : defaultValue)\n }", "function validateInput(\n value,\n { float, canBeNegative, canBeEmpty, defaultValue }\n) {\n if (`${value}`.length > 0) {\n const valueAsNumber = float ? parseFloat(value) : parseInt(value);\n const signedNumber = !canBeNegative\n ? Math.abs(valueAsNumber)\n : valueAsNumber;\n\n return !isNaN(signedNumber) ? signedNumber : defaultValue;\n } else if (canBeEmpty) {\n return '';\n }\n\n return defaultValue;\n}", "function requireValue(field, value) { }", "function validatedata($attr, $defaultValue) {\n \"use strict\";\n if ($attr !== undefined) {\n return $attr\n }\n return $defaultValue;\n}", "function validatedata($attr, $defaultValue) {\n \"use strict\";\n if ($attr !== undefined) {\n return $attr\n }\n return $defaultValue;\n}", "function validatedata($attr, $defaultValue) {\r\n \"use strict\";\r\n if ($attr !== undefined) {\r\n return $attr\r\n }\r\n return $defaultValue;\r\n}", "function validatedata($attr, $defaultValue) {\r\n \"use strict\";\r\n if ($attr !== undefined) {\r\n return $attr\r\n }\r\n return $defaultValue;\r\n}", "function validatedata($attr, $defaultValue) {\r\n \"use strict\";\r\n if ($attr !== undefined) {\r\n return $attr\r\n }\r\n return $defaultValue;\r\n}", "function validatedata($attr, $defaultValue) {\n \"use strict\";\n if ($attr !== undefined) {\n return $attr\n }\n return $defaultValue;\n }", "function valueCheck(props, ...args) {\n if (props.multiple) return p.arrayOf(valueShape).isRequired(props, ...args)\n return valueShape(props, ...args)\n}", "function validate(value){\r\n \r\n if(typeof(value) !== \"undefined\" && value !== \"\"){\r\n // console.log(\"value exists: \", value);\r\n\r\n return value;\r\n\r\n }\r\n\r\n // console.log(\"value does not exist: \", value);\r\n \r\n return \"\";\r\n\r\n }", "validateValue (value) {\n return TypeNumber.isNumber(value) && !isNaN(value)\n }", "function defaulted(value,defaultValue){return value!==undefined?value:defaultValue;}", "function validator(value) {\n if (value === undefined || value === null)\n return true;\n if (Number.isNaN(value))\n return false;\n return true;\n}", "validate(value) {\n if (value < 0) return 0;\n else if (value > 5) return 5;\n }", "validateRequired(propValue, value) {\n return !(propValue && _isEmpty(value));\n }", "function ValidateTypeValue(type, value)\n{\n\tif (type == \"Bool\")\n\t{\n\t\tif (value != \"true\" && value != \"false\")\n\t\t{\n\t\t\treturn \"default value must be either 'True' or 'False' for Bool\";\n\t\t}\n\t}\n\telse if (type == \"Int\" || type == \"Float\")\n\t{\n\t\tif (isNaN(value))\n\t\t{\n\t\t\treturn \"default value must be digit(s) for Int or Float\";\n\t\t}\n\t}\n\telse\n\t{\n\t\t// everything is fine as a string or custom type\n\t\treturn null;\n\t}\n}", "validInput(value) {\r\n let props = this.props;\r\n if (!value)\r\n return props.eReq;\r\n else if (props.eClientValidation)\r\n return props.eClientValidation(value, props.inputProps.floatingLabelText)\r\n return null;\r\n }", "function CheckInputValue($mask, $input, value, validationType, def, isFormSubmit) {\n\n var $parentForm = $input.closest(\".responsive-form\");\n\n // validate\n switch (validationType) {\n // =======================================================\n // === VAL TYPE: Required field\n // === REQUIRMENTS: not null\n // === Data-Validation(s): \"req-field\"\n // =======================================================\n\n case \"req-field\":\n def.resolve(!IsNotEmpty(value));\n break;\n\n // =======================================================\n // === VAL TYPE: Required Drop Down Selection\n // === REQUIRMENTS: not null or not zero\n // === SUPPORTED Data-Validation: \"req-selection\"\n // =======================================================\n\n case \"req-selection\":\n\n def.resolve(!IsNoSelection(value));\n break;\n\n // =======================================================\n // === VAL TYPE: Checkbox/Radio Button field\n // === REQUIRMENTS: checked\n // === SUPPORTED Data-Validation: \"req-checked\"\n // =======================================================\n\n case \"req-checked\":\n\n def.resolve(!$input.is(\":checked\"));\n break;\n\n // =======================================================\n // === VAL TYPE: Checkbox/Radio Button List fields\n // === REQUIRMENTS: at least one input checked\n // === Data-Validation(s): \"req-checked-list\"\n // =======================================================\n\n case \"req-checked-list\":\n\n def.resolve(!$input.find(\"input:checked\").size());\n break;\n\n // =======================================================\n // === VAL TYPE: Price field\n // === REQUIRMENTS: not null, valid number, greater than zero, or \"N/A\"\n // === Data-Validation(s): \"req-price\"\n // =======================================================\n\n case \"req-price\":\n if ($input.hasClass(\"format-price\")){\n value = value.replace(/[^.0-9]/g, '');\n $input.val('$' + parseFloat(value).toFixed(2));\n }\n def.resolve(!IsPrice(value) || !IsNotZero(value));\n break;\n\n // =======================================================\n // === VAL TYPE: Price field\n // === REQUIRMENTS: not null, valid number, greater than or equal to a minimum number, or \"N/A\"\n // === SUPPORTED CLASSES: \"req-price-min\"\n // === requires attribute: data-minprice=\"10\"\n // =======================================================\n\n case \"req-price-min\":\n var enteredPriceText = value.replace(/[^.0-9]/g, \"\"),\n enteredPrice = parseFloat(enteredPriceText),\n minPrice = $input.attr(\"data-minprice\");\n\n $input.val('$' + enteredPrice);\n\n def.resolve(!IsNotEmpty(enteredPrice) || !IsNumber(enteredPrice) || enteredPrice < minPrice);\n break;\n\n // =======================================================\n // === VAL TYPE: Price field\n // === REQUIRMENTS: valid number, greater than zero, or \"N/A\" and within range\n //\t=== Data-Validation(s): \"req-price-range\"\n // === SUPPORTED CLASSES: \" req-price-top, req-price-bottom\"\n // =======================================================\n\n case \"req-price-range\":\n var showDollar = \"$\";\n if ($input.hasClass(\"format-price\")) {\n value = value.replace(/[^.0-9]/g, '');\n $input.val('$' + parseFloat(value).toFixed(2));\n }\n\n case \"req-number-range\":\n var isNumber = IsNumber(value),\n topPriceText = ($input.closest(':has(.req-price-top)').find('.req-price-top').text()).replace(/[^.0-9]/g, ''),\n topPrice = parseFloat(topPriceText),\n bottomPriceText = ($input.closest(':has(.req-price-bottom)').find('.req-price-bottom').text()).replace(/[^.0-9]/g, ''),\n bottomPrice = parseFloat(bottomPriceText),\n enteredPriceText = value.replace(/[^.0-9]/g, ''),\n enteredPrice = parseFloat(enteredPriceText),\n\t\t\t\t\tdollar = showDollar || \"\",\n returnValue = false;\n\t\t\t\t\t\n if (value != \"N/A\" && (!isNumber || value <= 0)) {\n \t\t\t\n returnValue = true;\n $mask.attr('data-warning-override', 'Please enter a valid amount.');\n\n }\n else if (!isNaN(topPrice) && topPrice < enteredPrice) {\n returnValue = true;\n $mask.attr('data-warning-override', 'Please enter an amount less than or equal to ' + dollar + topPrice + '.');\n }\n else if (!isNaN(bottomPrice) && bottomPrice > enteredPrice) {\n \t\t\t\n returnValue = true;\n $mask.attr('data-warning-override', 'Please enter an amount more than ' + dollar + bottomPrice + '.');\n }\n def.resolve(returnValue);\n break;\n\n\n case \"req-number\":\n if (!IsNotEmpty(value)) {\n\n $mask.removeAttr('data-warning-override');\n }\n else {\n $mask.attr('data-warning-override', $mask.attr('title') + ' (Must be a valid number)');\n }\n\n def.resolve(!IsWholeNumber(value) || !IsNumber(value) || !IsNotZero(value));\n break;\n\n // =======================================================\n // === VAL TYPE: Number field\n // === REQUIRMENTS: valid number, greater than zero, less than 3\n // === Data-Validation(s): \"req-three\"\n // =======================================================\n \n case \"req-three\":\n\n def.resolve(!IsWholeNumber(value) || !IsNumber(value) || parseInt(value) < 0 || parseInt(value) > 3 );\n break;\n\n // =======================================================\n // === VAL TYPE: Number field\n // === REQUIRMENTS: valid number, greater than zero\n // === Data-Validation(s): \"opt-number\"\n // =======================================================\n\n case \"opt-number\":\n\n def.resolve(IsNotEmpty(value) && (!IsWholeNumber(value) || !IsNumber(value) ));\n break;\n\n // =======================================================\n // === VAL TYPE: UPC field\n // === REQUIRMENTS: not null, valid number, 11 or 12 digits\n // === Data-Validation(s): \"req-upc\"\n // =======================================================\n\n case \"req-upc\":\n\n def.resolve(!IsWholeNumber(value) || !IsNumber(value) || (value.length != 11 && value.length != 12));\n break;\n\n // =======================================================\n // === VAL TYPE: UPC field\n // === REQUIRMENTS: not null, valid number, 13 digits \n // === Data-Validation(s): \"req-upc\"\n // =======================================================\n case \"opt-isbn\":\n if (value == \"\") {\n def.resolve(false);\n }\n case \"req-isbn\":\n value = value.replace(\"-\", \"\");\n def.resolve(!IsWholeNumber(value) || !IsNumber(value) || !IsISBN(value));\n break;\n\n // =======================================================\n // === VAL TYPE: Phone Number field\n // === REQUIRMENTS: not null, valid phone number\n // === Data-Validation(s): \"req-phone\"\n // =======================================================\n\n case \"req-phone\":\n\n FormatUSPhoneNumber($input, value, false);\n def.resolve((!IsPhoneNumber(value) && !IsInternationalPhoneNumber(value)) || !IsNotEmpty(value));\n break;\n\n // =======================================================\n // === VAL TYPE: Optional Phone Number field\n // === REQUIRMENTS: valid phone number\n // === Data-Validation(s): \"opt-phone\"\n // =======================================================\n\n case \"opt-phone\":\n\n FormatUSPhoneNumber($input, value, false);\n def.resolve(!IsPhoneNumber(value) && !IsInternationalPhoneNumber(value) && IsNotEmpty(value));\n break;\n\n // =======================================================\n // === VAL TYPE: US Phone Number field\n // === REQUIRMENTS: not null, valid US phone number\n // === Data-Validation(s): \"req-phone-us\"\n // =======================================================\n\n case \"req-phone-us\":\n\n FormatUSPhoneNumber($input, value, true);\n def.resolve(!IsUSPhoneNumber(value) || !IsNotEmpty(value));\n break;\n\n // =======================================================\n // === VAL TYPE: Optional US Phone Number field\n // === REQUIRMENTS: valid US phone number\n // === Data-Validation(s): \"opt-phone-us\"\n // =======================================================\n\n case \"opt-phone-us\":\n\n FormatUSPhoneNumber($input, value, false);\n def.resolve(!IsUSPhoneNumber(value) && IsNotEmpty(value));\n break;\n\n // =======================================================\n // === VAL TYPE: Phone Number field by country value\n // === REQUIRMENTS: not null, valid phone number by country\n // === Data-Validation(s): \"req-phone-bycountry\"\n // =======================================================\n\n case \"req-phone-bycountry\":\n\n FormatUSPhoneNumber($input, value, false);\n def.resolve(IsPhoneNumberByCountry(value, $parentForm.find(\".dd-country select\").val().toLowerCase()) || !IsNotEmpty(value));\n break;\n\n // =======================================================\n // === VAL TYPE: Optional Phone Number field by country value\n // === REQUIRMENTS: not null, valid phone number by country\n // === Data-Validation(s): \"req-phone-bycountry\"\n // =======================================================\n\n case \"opt-phone-bycountry\":\n\n FormatUSPhoneNumber($input, value, false);\n def.resolve(IsPhoneNumberByCountry(value, $parentForm.find(\".dd-country select\").val().toLowerCase()) && IsNotEmpty(value) && value != \"+\" + $input.data('phonecode'));\n break;\n\n // =======================================================\n // === VAL TYPE: Address1 field\n // === REQUIRMENTS: valid add from UPS web API\n // === Data-Validation(s): \"req-address1\"\n // =======================================================\n\n case \"req-address1\":\n\n var jsonCurrentAddress = { addressline1: $parentForm.find(\".txt-address1 .textbox\").val(), city: $parentForm.find(\".txt-city .textbox\").val(), state: $parentForm.find(\".dd-states .dropdown\").val(), zipCode: $parentForm.find(\".txt-zipcode .textbox\").val(), country: $parentForm.find(\".dd-country .dropdown\").val() };\n \n // if the zip code is empty, fail\n if (!IsNotEmpty(value)) {\n def.resolve(true);\n } // if\n\n // if the address has been certified to be correct, even though UPS said otherwise...pass\n else if (CertifiedAddressMatches(jsonCurrentAddress))\n {\n def.resolve(false);\n } // else if\n\n else {\n\n // get the values for the current zip code and country code\n var countryCode = $parentForm.find(\".dd-country .dropdown\").val();\n\n // make sure we have a valid country code and valid ZIP code before checking for city/state population and only perform this check on form submit\n if (countryCode == \"US\" && isFormSubmit) {\n\n // build the json request\n var jsonData = { testing: false, companyname: $parentForm.find(\".txt-company .textbox\").val(), addressline1: $parentForm.find(\".txt-address1 .textbox\").val(), addressline2: $parentForm.find(\".txt-address2 .textbox\").val(), city: $parentForm.find(\".txt-city .textbox\").val(), state: $parentForm.find(\".dd-states .dropdown\").val(), zipCode: $parentForm.find(\".txt-zipcode .textbox\").val(), country: $parentForm.find(\".dd-country .dropdown\").val() },\n addressString = $parentForm.find(\".txt-address1 .textbox\").val() + \" \" + $parentForm.find(\".txt-address2 .textbox\").val() + \" \" + $parentForm.find(\".txt-city .textbox\").val() + \" \" + $parentForm.find(\".dd-states .dropdown\").val() + \" \" + $parentForm.find(\".txt-zipcode .textbox\").val();\n\n // debug console output\n if (showJSONAddressData) { console.log(jsonData); }\n\n // send the json request to the handler\n $.ajax({\n url: '/MyAccount/CommonControls/ResponsiveForms/Handlers/UPSAddressValidationStreetLevel.ashx',\n type: 'POST',\n data: JSON.stringify(jsonData),\n contentType: \"application/json; charset=utf-8\",\n dataType: \"json\",\n success: function (data) {\n\n // the json in values produced json out values\n if (data != undefined && data.Response != undefined) {\n\n // assign the response objects\n var dataResponse = data.Response,\n dataAddressClassification = data.AddressClassification,\n dataAddressKeyFormats = data.AddressKeyFormats,\n dataAddressIndicator = data.AddressIndicator;\n\n // debug console output\n if (showJSONAddressData) { console.log(data); }\n\n // a response has been returned, but check to see if it is an error response \n if (dataResponse.ResponseStatusDescription == \"Failure\") {\n // something went wrong, pass by default?\n def.resolve(false);\n } // if\n else {\n\n // LOGIC:\n // ---------------------------------------------------------------------------------------------------------------------\n // If there are no address responses:\n // - ask to verify their address is correct or change the address\n\n // If there is one address response:\n // - update the address with the response address\n // - pass\n\n // If there is more than one address response:\n // - ask to choose from one of the response addresses, verify their address is correct, or change the address\n // ---------------------------------------------------------------------------------------------------------------------\n\n var bypassResultsModal = (typeof placeOrder !== 'undefined' && placeOrder);\n\n // there are no address response matches\n if (dataAddressKeyFormats.length == 0) {\n\n // before we show the modal for no matches, let's make sure we have all the information needed for a full address...\n if (!bypassResultsModal && $.trim(jsonData.addressline1) != \"\" && $.trim(jsonData.city) != \"\" && $.trim(jsonData.state) != \"\" && $.trim(jsonData.zipCode) != \"\") {\n // show the address results modal with the appropriate message\n BuildAddressResultsModal($parentForm.find(\".txt-address1 .textbox\").attr(\"id\"), \"none\", addressString);\n } // if\n\n // fail\n def.resolve(true);\n } //if\n\n // there is an exact match -> auto populate the other address fields\n else if (dataAddressKeyFormats.length == 1) {\n\n // Address: 255 Hupi Rd Monterey, Ma 01245\n // UPS Returns: 1-99 Hupi Rd Monterey, Ma 01245\n // Issue: Since there was only 1 match, we were assuming it was an exact match and auto updating the street address incorrectly.\n // Solution: Check to make sure the address returned by UPS api does not start with \"1-\" for street number ranges. If it does, move forward\n // with the user submitted address and do not overwrite automatically.\n if (dataAddressKeyFormats[0].AddressLine1.lastIndexOf(\"1-\", 0) !== 0) {\n $parentForm.find(\".txt-address1 .textbox\").val(CapitalizeFirstLetter(dataAddressKeyFormats[0].AddressLine1)).trigger(\"change\");\n }\n // make sure UPS was actually returning address2 value before setting...\n if (dataAddressKeyFormats[0].AddressLine2 != \"\") {\n $parentForm.find(\".txt-address2 .textbox\").val(CapitalizeFirstLetter(dataAddressKeyFormats[0].AddressLine2)).trigger(\"change\");\n } // if\n $parentForm.find(\".txt-city .textbox\").val(CapitalizeFirstLetter(dataAddressKeyFormats[0].PoliticalDivision2)).trigger(\"change\");\n $parentForm.find(\".dd-states .dropdown\").focus().val(dataAddressKeyFormats[0].PoliticalDivision1).blur().trigger(\"update\");\n $parentForm.find(\".txt-zipcode .textbox\").val(dataAddressKeyFormats[0].PostcodePrimaryLow);\n\n $parentForm.find(\".txt-zipcode label\").addClass(\"inputted\");\n $parentForm.find(\".txt-city label\").addClass(\"inputted\");\n\n // pass\n def.resolve(false);\n\n } // if\n \n // there are multiple addresses responses\n else {\n\n var fullAddresses = [],\n tempAddresses = [],\n distinctAddress = [],\n passingAddress = false;\n\n // construct the address values and push into a temp array\n $.each(dataAddressKeyFormats, function (index, value) {\n fullAddresses.push(CapitalizeFirstLetter(dataAddressKeyFormats[index].AddressLine1) + \", \" + CapitalizeFirstLetter(dataAddressKeyFormats[index].PoliticalDivision2) + \" \" + dataAddressKeyFormats[index].PoliticalDivision1 + \" \" + CapitalizeFirstLetter(dataAddressKeyFormats[index].PostcodePrimaryLow));\n }); // each\n\n // make sure we have unique addresses, because there could be street number/apt number groups\n $.each(fullAddresses, function (i, el) {\n if ($.inArray(el, tempAddresses) === -1) {\n tempAddresses.push(el);\n dataAddressKeyFormats[i].fullAddress = fullAddresses[i];\n distinctAddress.push(dataAddressKeyFormats[i]);\n } // if\n }); // each\n\n // show the address results modal with the appropriate message, as long as this is not a validation from an placed order\n if (!bypassResultsModal) {\n BuildAddressResultsModal($parentForm.find(\".txt-address1 .textbox\").attr(\"id\"), \"multiple\", addressString, distinctAddress);\n } // if\n\n // fail\n def.resolve(true);\n } // else\n\n\n\n } // else\n } // if\n },\n fail: function (data) {\n // hide the loading images for the city/state, since there was no return data\n $parentForm.find(\".txt-city, .txt-state, .dd-states\").find(\".input-loading\").hide();\n // pass the validation since there was an error getting the JSON\n def.resolve(false);\n } // $.ajax() Fail.error(function () {\n }); // ajax\n\n } // if\n else {\n // no address validation for non-US countries...\n def.resolve(false);\n } // else\n } // else\n\n break;\n\n // =======================================================\n // === VAL TYPE: Address2 field\n // === REQUIRMENTS: valid apartment / suite/ building #\n // === Data-Validation(s): \"opt-address2\"\n // === https://developerkitcommunity.ups.com/index.php/Address_Validation_Street_Level_XML_Developers_Guide_-_July_9,_2011\n // =======================================================\n\n case \"opt-address2\":\n\n // only perform address line 2 validation if this is in the US\n if ( !IsNonUSCountry($input) && $(\"#bypassed-\" + $input.attr(\"id\")).size() == 0) {\n // grab the parts of the address\n var inAddress1 = $.trim($parentForm.find(\".txt-address1 .textbox\").val()),\n inAddress2 = $.trim($parentForm.find(\".txt-address2 .textbox\").val()),\n inCity = $.trim($parentForm.find(\".txt-city .textbox\").val()),\n useStateDD = $parentForm.find(\".dd-states\").css(\"display\") != \"none\",\n inState = useStateDD ? $parentForm.find(\".dd-states .dropdown\").val() : $.trim($parentForm.find(\".txt-state .textbox\").val()),\n inZip = $.trim($parentForm.find(\".txt-zipcode .textbox\").val());\n\n // make sure we have a complete address so we can validate the address2 line\n if (inAddress1 != \"\" && inCity != \"\" && inState != \"\" && inZip != \"\") {\n\n var addressXML = \"<address><addressline1>\" + inAddress1 + \"</addressline1><addressline2>\" + inAddress2 + \"</addressline2><city>\" + inCity + \"</city><state>\" + inState + \"</state><zip>\" + inZip + \"</zip></address>\",\n $loadingImg = $input.parent().find(\".input-loading\"),\n isMissingApartment = false;\n\n ShowLoadingImage($mask, $input, $loadingImg);\n\n // call the satori web service\n $.ajax({\n type: \"POST\",\n url: \"/AVLUtilities/AddressVerification.aspx\",\n contentType: \"text/xml\",\n dataType: \"text\",\n data: addressXML,\n success: function (msg) {\n $loadingImg.fadeOut(100, function () {\n // parse the ml response\n var xmlDoc = $.parseXML(msg),\n $xml = $(xmlDoc),\n missingApt = $xml.find(\"ismissingaptnumber\");\n // assign the return value for the missing apartment number\n if (missingApt != null && missingApt != \"\") {\n // determine if the address is missing an apartment number\n isMissingApartment = missingApt.text().toLowerCase() === \"true\";\n // if the missing apratment is true, flag so we let this go next time around\n if (isMissingApartment) { address2Flagged = true; }\n // send back the value\n def.resolve(isMissingApartment);\n } // if\n else {\n def.resolve(false);\n } // else\n }); // fadeOut\n },\n error: function (msg) {\n $loadingImg.hide();\n def.resolve(false);\n }\n });\n } // if\n else {\n // not enough addres information to test the address2 data\n def.resolve(false);\n } // else\n } // if\n else {\n def.resolve(false);\n } // else\n\n break;\n\n // =======================================================\n // === VAL TYPE: Zipcode field\n // === REQUIRMENTS: not null, correct zipcode format, valid in US verified by UPS API\n // === Data-Validation(s): \"req-zipcode\"\n // === https://developerkitcommunity.ups.com/index.php/Address_Validation_XML_Developers_Guide_-_July_08,_2013\n // =======================================================\n\n case \"req-zipcode\":\n\n // if the zip code is empty, fail\n if (!IsNotEmpty(value) || (/[\\/\\\\\\\"?&.*:<>|@#%,]/g).test(value)) {\n def.resolve(true)\n } // if\n\n else {\n\n // get the values for the current zip code and country code\n var countryCode = $parentForm.find(\".dd-country .dropdown\").val();\n\n // make sure we have a valid country code and valid ZIP code before checking for city/state population\n if (countryCode == \"US\") {\n\n // only for realtime validation...\n if (!isFormSubmit) {\n // display the loading images for the city/state inputs \n $parentForm.find(\".txt-city, .txt-state, .dd-states\").find(\".input-loading\").show();\n } // if\n\n // build the json request\n var jsonData = { testing: false, country: $parentForm.find(\".dd-country .dropdown\").val(), zipCode: value };\n\n // debug console output\n if (showJSONAddressData) { console.log(jsonData); }\n\n // send the json request to the handler\n $.ajax({\n url: '/MyAccount/CommonControls/ResponsiveForms/Handlers/UPSAddressValidationCityStateZIP.ashx',\n type: 'POST',\n data: JSON.stringify(jsonData),\n contentType: \"application/json; charset=utf-8\",\n dataType: \"json\",\n success: function (data) {\n\n // the json in values produced json out values\n if (data != undefined && data.Response != undefined) {\n\n // assign the two main objects: response details and address result(s)\n var dataResponse = data.Response,\n dataAVResults = data.AddressValidationResults;\n\n // debug console output\n if (showJSONAddressData) { console.log(dataResponse); } // if\n\n // a response has been returned, but check to see if it is an error response \n if (dataResponse.ResponseStatusDescription == \"Failure\") {\n\n // hide any failed validation display for the city / state since there is a failure\n DisplayValidationResult($parentForm.find(\".txt-city\"), $parentForm.find(\".txt-city .textbox\"), false, isFormSubmit)\n DisplayValidationResult($parentForm.find(\".dd-states\"), $parentForm.find(\".dd-states .dropdown\"), false, isFormSubmit)\n\n // only for realtime validation...\n if (!isFormSubmit) {\n // hide the loading images for the city/state, since there was no return data\n $parentForm.find(\".txt-city, .txt-state, .dd-states\").find(\".input-loading\").hide();\n } // if\n\n // we know these error codes result from an invalid zip code\n if (dataResponse.ErrorCode == \"101112\" || dataResponse.ErrorCode == \"20008\") {\n // UPS telling us that this postal code is invalid\n def.resolve(true);\n } // if\n // all other error codes cannot be determined for pass/fail, so pass by default\n else {\n def.resolve(false);\n }\n } // if\n else {\n\n // debug console output\n if (showJSONAddressData) {\n $.each(dataAVResults, function (index, value) {\n console.log(dataAVResults[index]);\n }); // each\n } // if\n\n // only for realtime validation...\n if (!isFormSubmit) {\n // hide the loading images for the state laoder\n $parentForm.find(\".txt-state .input-loading, .dd-states .input-loading\").fadeOut(100);\n\n // hide the loading images for the city/state\n $parentForm.find(\".txt-city .input-loading\").fadeOut(100, function () {\n\n if (dataAVResults.length > 0) {\n // we will assume that the first result will have the more likely state option (cannot do anything else since this is already a drop down)\n var upsState = dataAVResults[0].StateProvinceCode;\n\n // hide any failed validation display for the state\n DisplayValidationResult($parentForm.find(\".dd-states\"), $parentForm.find(\".dd-states .dropdown\"), false, isFormSubmit)\n\n // make sure there is a city response\n if (dataAVResults[0].City != \"\") {\n // assign the city to the textbox value since there is only one result\n if (dataAVResults.length == 1) {\n $parentForm.find(\".txt-city .textbox\").val(CapitalizeFirstLetter(dataAVResults[0].City));\n // hide any failed validation display for the city\n DisplayValidationResult($parentForm.find(\".txt-city\"), $parentForm.find(\".txt-city .textbox\"), false, isFormSubmit)\n } // if\n // assign the cityresults to the textbox autocomplete plugin since there is more than one result\n else {\n\n var cities = new Array(),\n cityAlreadyPresent = false;\n\n // pull out the city values and push into a temp array\n $.each(dataAVResults, function (index, value) {\n cities[index] = CapitalizeFirstLetter(dataAVResults[index].City);\n // if the the city currently set as the city value is in the array, do not clear the value\n if (dataAVResults[index].City.toLowerCase() == $.trim($parentForm.find(\".txt-city .textbox\").val()).toLowerCase()) {\n cityAlreadyPresent = true;\n } // if\n }); // each\n\n // clear the current city value, if exists, since it is not in the returned city array\n if (!cityAlreadyPresent) {\n $parentForm.find(\".txt-city .textbox\").val(\"\");\n // reset the label\n $parentForm.find(\".txt-city\").find(\"label\").removeClass(\"inputted\");\n } // if\n\n $parentForm.find(\".txt-city .textbox\").autocomplete({\n position: { my: \"left top\", at: \"left bottom-1\", of: $parentForm.find(\".txt-city\") },\n delay: 0,\n source: cities,\n minLength: 0,\n select: function (event, ui) {\n var $this = $parentForm.find(\".txt-city .textbox\");\n // set the sibling label as inputted\n $this.parent().find(\"label\").addClass(\"inputted\");\n // hide any failed validation display for the city\n DisplayValidationResult($parentForm.find(\".txt-city\"), $parentForm.find(\".txt-city .textbox\"), false, isFormSubmit)\n }, // onSelect\n close: function (event, ui) {\n // trigger the local storage save...\n $parentForm.find(\".txt-city .textbox\").trigger(\"change\");\n }\n })\n .on(\"focus\", function () {\n if ($(this).hasClass(\"ui-autocomplete-input\")) {\n $(this).autocomplete(\"search\", \"\");\n } // if\n });\n\n\n } // else\n } // if\n\n // assign the state\n // make sure there is a state textbox and it is currently displayed\n if ($parentForm.find(\".txt-state\").size() > 0 && $parentForm.find(\".txt-state\").css(\"display\") != \"none\") {\n // for the state's textbox\n $parentForm.find(\".txt-state .textbox\").val(upsState);\n // remove the warning note if it exists\n DisplayValidationResult($parentForm.find(\".txt-state\"), $parentForm.find(\".txt-state .textbox\"), false, isFormSubmit)\n } // if\n else {\n // for the state's drop down...\n // update the custom dropdown control\n $parentForm.find(\".dd-states select\").val(upsState).trigger(\"update\");\n // remove the warning note if it exists\n DisplayValidationResult($parentForm.find(\".dd-states\"), $parentForm.find(\".dd-states .dropdown\"), false, isFormSubmit)\n\n } // else\n\n // update the label states for the address fieldset\n InitFormLabels($(\"#address-container\"));\n\n // return with passed validation\n def.resolve(false);\n } // if\n else {\n def.resolve(true);\n }\n }); // fadeOut\n } // if\n\n // form submission validation with passed validation\n else {\n def.resolve(false);\n } // else\n\n } // else\n } // if\n\n // no data was returned so we cannot validate at this time, so pass validation :(\n else {\n\n // debug console output\n if (showJSONAddressData) { console.log(data); } // if\n\n // only for realtime validation...\n if (!isFormSubmit) {\n // hide the loading images for the city/state, since there was no return data\n $parentForm.find(\".txt-city, .txt-state, .dd-states\").find(\".input-loading\").hide();\n } // if\n\n def.resolve(false);\n\n } // else\n },\n fail: function (data) {\n // hide the loading images for the city/state, since there was no return data\n $parentForm.find(\".txt-city, .txt-state, .dd-states\").find(\".input-loading\").hide();\n // pass the validation since there was an error getting the JSON\n def.resolve(false);\n } // $.ajax() Fail.error(function () {\n }); // ajax\n\n } // if\n else {\n // Not a US or PR zip code address, check for general validatin\n def.resolve(false);\n } // else\n } // else\n\n break;\n\n // =======================================================\n // === VAL TYPE: CVV field\n // === REQUIRMENTS: not null, positive integer number, either 3 or 4 digits\n // === Data-Validation(s): \"req-cvv\"\n // =======================================================\n\n case \"req-cvv\":\n\n def.resolve(!IsNotEmpty(value) || !IsNumber(value) || value.length < 3 || value.length > 4);\n break;\n\n // =======================================================\n // === VAL TYPE: Credit Card field\n // === REQUIRMENTS: not null, LUHN test (http://en.wikipedia.org/wiki/Luhn)\n // === Data-Validation(s): \"req-creditcard\"\n // =======================================================\n\n case \"req-creditcard\":\n\n def.resolve(!IsLuhnPass(value) || !IsNotZero(value));\n break;\n\n // =======================================================\n // === VAL TYPE: Email field\n // === REQUIRMENTS: not null, correct email format\n // === Data-Validation(s): \"req-email\"\n // =======================================================\n\n case \"req-email\":\n\n def.resolve(!IsEmailAddress(value) || !IsNotEmpty(value));\n break;\n\n // =======================================================\n // === VAL TYPE: Optional Email field\n // === REQUIRMENTS: correct email format\n // === Data-Validation(s): \"optional-email\"\n // =======================================================\n\n case \"opt-email\":\n\n def.resolve(!IsEmailAddress(value) && IsNotEmpty(value));\n break;\n\n // =======================================================\n // === VAL TYPE: Multi Email field\n // === REQUIRMENTS: not null, correct email format\n // === Data-Validation(s): \"req-multi-email\"\n // =======================================================\n\n case \"req-multi-email\":\n\n var isFail = false,\n emailList = value.split(','),\n n;\n\n for (n in emailList) {\n var validEmail = IsEmailAddress(emailList[n]);\n if (!validEmail || !IsNotEmpty(validEmail)) {\n isFail = true\n } // if\n break;\n } // for\n\n def.resolve(isFail);\n\n break;\n\n // =======================================================\n // === VAL TYPE: Optional multi CC Email field\n // === REQUIRMENTS: not null, correct email format\n // === Data-Validation(s): \"opt-multi-email\"\n // =======================================================\n\n case \"opt-multi-email\":\n\n var isFail = false,\n emailList = value.split(','),\n n;\n\n if (IsNotEmpty(emailList)) {\n for (n in emailList) {\n var validEmail = IsEmailAddress(emailList[n]);\n if (!validEmail) {\n isFail = true\n } // if\n break;\n } // for\n } // if\n\n def.resolve(isFail);\n\n break;\n\n // =======================================================\n // === VAL TYPE: Email field for new account\n // === REQUIRMENTS: not null, correct email format, doesn't exist\n // === Data-Validation(s): \"req-email\"\n // === Assistance: modal content, email verification page\n // =======================================================\n\n case \"req-email-newaccount\":\n\n isFail = (!IsEmailAddress(value) || !IsNotEmpty(value));\n $mask.removeAttr('data-warning-override');\n if (IsEmailAddress(value) && IsNotEmpty(value)) {\n\n var $loadingImg = $input.parent().find(\".input-loading\");\n\n ShowLoadingImage($mask, $input, $loadingImg);\n\n // verify the email is valid\n $.get(\"/MyAccount/VerifyEmailAddress.aspx?email=\" + value, function (data) {\n\n $loadingImg.fadeOut(100, function () {\n // the email address is currently registered...\n if (data == \"true\") {\n $mask.attr('data-warning-override', 'This email is already registered. Please enter another email.');\n def.resolve(true);\n // only do if this is instant validation\n if (!isFormSubmit) {\n // assign the email address value to the modal window\n $(\"#email-value\").text(value);\n // trigger the modal window with the conflict message and options\n $.openModal({\n target: '#email-registered',\n showCloseButton: false,\n width: '500px'\n });\n }\n } else if (data === \"guest\") {\n $('.check-guest input').attr('checked', true);\n def.resolve(false);\n } else {\n def.resolve(false);\n }\n }); // fadeOut\n\n }); // get\n } // if\n else {\n\n def.resolve(true);\n } // else\n\n break;\n\n // =======================================================\n // === VAL TYPE: SSN field\n // === REQUIRMENTS: correct ssn format\n // === Data-Validation(s): \"req-ssn\"\n // =======================================================\n\n case \"req-ssn\":\n\n def.resolve(!IsSSN(value) || !IsNotEmpty(value));\n break;\n\n // =======================================================\n // === VAL TYPE: URL field\n // === REQUIRMENTS: not null, correct url format\n // === Data-Validation(s): \"req-url\"\n // =======================================================\n\n case \"req-url\":\n\n def.resolve(!IsURL(value) || !IsNotEmpty(value));\n break;\n\n // =======================================================\n // === VAL TYPE: Date field\n // === REQUIRMENTS: not null, correct date format\n // === Data-Validation(s): \"req-date\"\n // =======================================================\n\n case \"req-date\":\n\n def.resolve(!IsDate(value) || !IsNotEmpty(value));\n break;\n\n // =======================================================\n // === VAL TYPE: Date field\n // === REQUIRMENTS: not null, correct date format\n // === Data-Validation(s): \"req-date-mm-dd-yy\"\n // =======================================================\n\n case \"req-date-mm-dd-yy\":\n\n def.resolve(!IsDateMMDDYY(value) || !IsNotEmpty(value));\n break;\n\n // =======================================================\n // === VAL TYPE: Credit Card Exp Date field\n // === REQUIRMENTS: date later than today\n // === Data-Validation(s): \"req-expyear, req-expmonth\"\n // === NOTES: Must have BOTH supported Data-Validations.\n // =======================================================\n\n \tcase \"req-expmonth\":\n \t\tvar $expYear = $parentForm.find(\"select[data-validation=req-expyear]\"),\n \t\thasMonth = IsNotEmpty(value);\n \t\tif (hasMonth && IsNotEmpty($expYear.val())) {\n \t\t\tValidateInput($expYear);\n \t\t}\n \t\tdef.resolve(!hasMonth);\n \t\tbreak;\n\n case \"req-expyear\":\n\n var now = new Date(),\n nowMonth = now.getMonth() + 1,\n nowYear = now.getFullYear(),\n expMonthString = $($parentForm.find(\"select[data-validation=req-expmonth]\")[0]).val() || '12',\n expMonth = 0,\n expYear = parseInt(value) || 0;\n\n expMonth = (expMonthString[0] == \"0\") ? parseInt(expMonthString[1]) : parseInt(expMonthString);\n\n def.resolve((expYear < nowYear) || (expYear == nowYear && expMonth < nowMonth));\n break;\n\n // =======================================================\n // === VAL TYPE: Date Drop Down Comparison\n // === REQUIRMENTS: greater than date > less than date\n // === Data-Validation(s): \"req-dateddl-gt\", \"req-dateddl-lt\"\n // === NOTES: Must have BOTH supported Data-Validations.\n // =======================================================\n\n case \"req-dateddl-gt\":\n\n var gtDate = new Date(),\n gtDateparts = value.split('/'),\n ltDate = new Date(),\n ltDateparts = $parentForm.find(\"select[data-validation=req-dateddl-lt]\").val().split('/');\n\n gtDate.setDate(parseInt(gtDateparts[0]));\n gtDate.setMonth((parseInt(gtDateparts[1]) - 1));\n gtDate.setYear(parseInt(gtDateparts[2]));\n\n ltDate.setDate(parseInt(ltDateparts[0]));\n ltDate.setMonth((parseInt(ltDateparts[1]) - 1));\n ltDate.setYear(parseInt(ltDateparts[2]));\n\n def.resolve(gtDate.getTime() < ltDate.getTime());\n break;\n\n // =======================================================\n // === VAL TYPE: Email and Confirmation field\n // === REQUIRMENTS: not null, correct email format, matches\n // === Data-Validation(s): \"req-email1\",\"req-email2\"\n // === NOTES: Must have BOTH supported Data-Validations.\n // =======================================================\n\n \tcase \"req-email1\":\n \tcase \"req-email\":\n\n def.resolve(!IsEmailAddress(value) || !IsNotEmpty(value));\n break;\n\n case \"req-email2\":\n\n var email1Val = $parentForm.find(\"input[data-validation=req-email1]\").val();\n\n if (!IsEmailAddress(value) || !IsNotEmpty(value)) {\n def.resolve(true);\n } // if\n else if (value != email1Val) {\n $mask.attr(\"title\", \"The email address and confirmation don't match.\");\n def.resolve(true);\n } // else if\n else {\n def.resolve(false);\n } // else\n break;\n\n\n // =======================================================\n // === VAL TYPE: Password and Confirmation field\n // === REQUIRMENTS: not null, at least 6 characters, matches\n // === Data-Validation(s): \"req-password1\",\"req-password2\"\n // =======================================================\n\n case \"req-password\":\n case \"req-password1\":\n\n if (value.length == 0) { $mask.attr(\"title\", \"Please enter a password.\"); }\n else if (value.length < 6) { $mask.attr(\"title\", \"Your password must be at least 6 characters.\"); }\n else if (value.length > 20) { $mask.attr(\"title\", \"Your password must be 20 characters or less.\"); }\n\n def.resolve(!IsNotEmpty(value) || value.length < 6 || value.length > 20);\n break;\n\n case \"req-password2\":\n\n var password1Val = $parentForm.find(\"input[data-validation=req-password1]\").val();\n\n if (!IsNotEmpty(value)) {\n def.resolve(true);\n } // if\n else if (value != password1Val) {\n $mask.attr(\"title\", \"The password and confirmation don't match.\");\n def.resolve(true);\n } // else if\n else if (value.length < 6) {\n $mask.attr(\"title\", \"Your confirming password must be at least 6 characters.\");\n def.resolve(true);\n } // else if\n else if (value.length > 20) {\n $mask.attr(\"title\", \"Your confirming password must be 20 characters or less.\");\n def.resolve(true);\n } // else if\n else {\n def.resolve(false);\n } // else\n break;\n\n \t// =======================================================\n \t// === VAL TYPE: volumename and trackname field\n \t// === REQUIRMENTS: not null, no special characters\n \t// === Data-Validation(s): \"req-volumename\",\"req-trackname\"\n \t// =======================================================\n\n \tcase \"req-volumename\":\n case \"req-trackname\":\n case \"req-urlpage\":\n var illegalChars = validationType == \"req-volumename\" ? /[\\[\\]\\/\\\\\\\"~'&^$!}{\\;()?.*+=:<>|@#%,]/g : /[\\/\\\\\\\"?.*:<>|@#%]/g;\n \t value = $input.val().replace(/[^\\x00-\\x7F]/g, \"\"); //remove non ascii characters\n \t value = value.replace(illegalChars, \"\"); // remove illegal ascii characters\n \t\t$input.val(value);\n \t\t$input.closest('fieldset').sisyphus().saveAllData();\n \t\tif (isFormSubmit) {\n \t\t\tdef.resolve(!IsNotEmpty(value.trim()));\n \t\t}\n \t\telse{\n \t\t\tdef.resolve(false);\n \t\t}\n \t\tbreak;\n\n \t\t// =======================================================\n \t\t// === VAL TYPE: ISRC field\n \t\t// === REQUIRMENTS: not null, matches ISRC regExp\n \t\t// === Data-Validation(s): \"req-isrc\"\n \t\t// =======================================================\n case \"opt-isrc\":\n if (!IsNotEmpty(value)) {\n def.resolve(false);\n break;\n }\n \tcase \"req-isrc\":\n \t\tdef.resolve( !IsNotEmpty(value) || !/^[a-zA-Z]{2}(-?)[0-9a-zA-Z]{3}(-?)\\d{2}(-?)\\d{5}$/.test(value));\n \t\tbreak;\n\n case \"req-search\":\n def.resolve(!IsNotEmpty(value) || value.trim().toLowerCase() == 'search');\n break;\n\n default:\n // for any data-validation values that have no validation, return with a pass value\n def.resolve(false);\n break;\n } // switch\n\n return def.promise();\n\n } // CheckInputValue", "function defaultValue(v) { }", "function customValidation(input) { \n}", "validate(_value, _utils) {\n return false;\n }", "function canBeValue() { }", "function customValidation(input){\n return input;\n \n}", "function _setValue(a, defaultValue, errorMessage) {\n var b = (typeof a !== 'undefined') ? a : defaultValue;\n\n if(defaultValue == \"no_default\" && b == defaultValue) {\n console.error(errorMessage);\n return false;\n }\n\n return b;\n}", "validator(name, value) {\n switch (name) {\n case 'name':\n return this.nameValidation(value);\n case 'keyword1':\n return this.keywordValidation(value);\n case 'keyword2':\n return this.keywordValidation(value);\n case 'keyword3':\n return this.keywordValidation(value);\n }\n }", "function vaildator(value){\n if(value!=''){\n return value;\n }\n else{\n return '(name not given)';\n }\n}", "function validator(fn)\r\n {\r\n return function()\r\n {\r\n if(($(this).attr(\"required\") == \"required\"))\r\n {\r\n if(!($(this).val())) return false;\r\n if ( this.value == $(this).attr(\"placeholder\") ) return false;\r\n }\r\n\r\n if(fn)\r\n return fn.apply(this);\r\n\r\n return true\r\n }\r\n }", "function valueExists(val, defaultValue)\r\n{\r\n\tif (val != null && val.toString().length > 0)\r\n\t\treturn val;\r\n\t\t\r\n\treturn defaultValue;\r\n}", "function validateValueWithFunc(value, parseFunc, type) {\n if (parseFunc(value))\n console.log('Invalid ' + type);\n else\n console.log('Valid ' + type);\n}", "isValid(value){\n return !isNaN(value);\n }", "validate(name, value) {\n switch (name) {\n case 'name':\n if (!isNotEmpty(value)) {\n return FORM_LOCK_NAME_MISSING\n }\n break\n case 'expirationDuration':\n if (!isPositiveInteger(value)) return FORM_EXPIRATION_DURATION_INVALID\n break\n case 'maxNumberOfKeys':\n if (value !== INFINITY && !isPositiveInteger(value)) {\n return FORM_MAX_KEYS_INVALID\n }\n break\n case 'keyPrice':\n if (!isPositiveNumber(value)) {\n return FORM_KEY_PRICE_INVALID\n }\n break\n }\n return false\n }", "validate(value) { //The validate method recieves (as its first argument) the value to be validated\n if (value < 0) {\n throw new Error('Age must be a positive number!');\n }\n }", "function floatFn(rule,value,callback,source,options){var errors=[];var validate=rule.required||!rule.required&&source.hasOwnProperty(rule.field);if(validate){if((0,_util.isEmptyValue)(value)&&!rule.required){return callback();}_rule2[\"default\"].required(rule,value,source,errors,options);if(value!==undefined){_rule2[\"default\"].type(rule,value,source,errors,options);_rule2[\"default\"].range(rule,value,source,errors,options);}}callback(errors);}", "function floatFn(rule,value,callback,source,options){var errors=[];var validate=rule.required||!rule.required&&source.hasOwnProperty(rule.field);if(validate){if((0,_util.isEmptyValue)(value)&&!rule.required){return callback();}_rule2[\"default\"].required(rule,value,source,errors,options);if(value!==undefined){_rule2[\"default\"].type(rule,value,source,errors,options);_rule2[\"default\"].range(rule,value,source,errors,options);}}callback(errors);}", "function floatFn(rule,value,callback,source,options){var errors=[];var validate=rule.required||!rule.required&&source.hasOwnProperty(rule.field);if(validate){if((0,_util.isEmptyValue)(value)&&!rule.required){return callback();}_rule2[\"default\"].required(rule,value,source,errors,options);if(value!==undefined){_rule2[\"default\"].type(rule,value,source,errors,options);_rule2[\"default\"].range(rule,value,source,errors,options);}}callback(errors);}", "function isInvalid(value) {\n return value === undefined || value !== value;\n}", "function isInvalid(value) {\n return value === undefined || value !== value;\n}", "function isInvalid(value) {\n return value === undefined || value !== value;\n}", "function isInvalid(value) {\n return value === undefined || value !== value;\n}", "function validate(newValue) {\n if(newValue==\"\"){\n target.hasError(true);\n target.validationMessage(options.overrideMessage);\n return target;\n }else\n {\n var n1=parseInt(newValue,10);\n var n2=Number(newValue);\n if(isNaN(n1) ||isNaN(n2)) {\n target.hasError(true);\n target.validationMessage(\"This field is numberic\");\n return target;\n }else{\n if((n1<options.min) || (n1>options.max) ) {\n target.hasError(true);\n target.validationMessage(\"Trebuie sa fie intre \"+options.min+\" si \"+options.max);\n return target;\n\n }else{\n target.hasError(false);\n target.validationMessage(\"all is OK!\");\n return target;\n }\n }\n }\n\n }", "validate(value) {\n if(value < 0){\n throw new Error('Age must be positive')\n }\n }", "_validateInitialPropertyValues() {\n const that = this,\n value = typeof (that.value) === String ? that.value.replace(/\\s/g, '') : that.value.toString().replace(/\\s/g, '');\n\n if (that.mode === 'numeric' && that._numericProcessor.regexScientificNotation.test(value)) {\n that.value = that._numericProcessor.scientificToDecimal(value);\n delete that._valueBeforeCoercion;\n }\n\n //Validates significantDigits\n that.significantDigits = (that.significantDigits !== null) ? Math.min(Math.max(that.significantDigits, 1), 21) : null;\n\n if (that.significantDigits === null && that.precisionDigits === null) {\n that.significantDigits = 8;\n }\n else if (that.significantDigits !== null && that.precisionDigits !== null) {\n that.error(that.localize('significantPrecisionDigits', { elementType: that.nodeName.toLowerCase() }));\n }\n\n //minMax validation\n that._validateMinMax('both', true);\n\n if (that.showTooltip && that.showThumbLabel) {\n that.showTooltip = false;\n }\n }", "function validateAndSetNumericOption(default_value, start, end, id, value){\n\n // regular expression to check if numeric\n var regex = /[^\\d|.]/gi;\n \n // if not numeric or value is out of range, warn\n if ((value.match(regex)) || (start > value) || (value > end)) {\n alert(getMessage('inputRange') + \" \" + start + '-' + end);\n }\n else {\n \n // otherwise, proceed to set property\n setChartProperty(default_value, id, value);\n }\n}", "function date$validateValue(value) {\n if (isNaN(value)) {\n // TODO(floitsch): Use real exception object.\n throw Error(\"Invalid Date\");\n }\n return value;\n}", "validate(value) {\n if (value < 0) {\n throw new Error(\"age must be a positive number\");\n }\n }", "function default_missing_values(default_val)\n{\n\treturn default_val;\n}", "function validate (value, minLength, maxLength = 999) {\n return {\n state: state(value, minLength, maxLength),\n invalidFeedback: invalidFeedback(value, minLength, maxLength),\n validFeedback: validFeedback(value, minLength, maxLength)\n }\n}", "function validateValue(validationType, value) {\n\t\t\t\tif (validationType == 'alpha_numeric') {\n\t\t\t\t\t/*\n\t\t\t\t\tvar Exp = /^[0-9a-zA-Z\\s]+$/;\n\t\t\t\t\treturn value.match(Exp);\n\t\t\t\t\t*/\n\t\t\t\t\treturn value;\n\t\t\t\t} else if (validationType == 'email') {\n\t\t\t\t\tvar re = /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n\t\t\t\t\treturn re.test(value);\n\t\t\t\t} else if (validationType == 'numeric') {\n\t\t\t\t\treturn !isNaN(value)\n\t\t\t\t}\n\t\t\t}", "function validate(value){\r\n const error={\r\n\r\n };\r\n if(!value.title){\r\n error.title='Enter a UserName !';\r\n }\r\n if(!value.categories){\r\n error.categories='Enter a Category !!';\r\n }\r\n if(!value.content){\r\n error.content='Enter some content !!';\r\n }\r\n return error;\r\n}", "function validateUser({ name = \"unknown\" }) {\n return name === \"john\";\n}", "validate( _value, _utils ) {\n\t\t\treturn false;\n\t\t}", "function checkValueType(value, valueStructure) {\n\tif(valueStructure && valueStructure.hasOwnProperty('valueType')) {\n\t\tvar result = false;\n\t\tswitch(valueStructure['valueType']) {\n\t\t case valueTypes[0]: // option\n\t\t if(valueStructure.hasOwnProperty('defaultValue') && valueStructure['defaultValue'].length > 0) {\n\t\t \tif(valueStructure['defaultValue'].indexOf(value) > -1) {\n\t\t \t\tresult = true\n\t\t \t} else {\n\t\t \t\tresult = false;\n\t\t \t\twriteLog(value + ' is not existed in default value.');\n\t\t \t}\n\t\t } else {\n\t\t \tresult = false;\n\t\t \twriteLog('Default value property is not existed.');\n\t\t }\n\n\t\t return result;\n\t\t break;\n\t\t case valueTypes[1]: // number\n\t\t return !isNaN(parseFloat(value)) && isFinite(value);\n\t\t break;\n\t\t default:\n\t\t if(value) {\n\t\t \treturn true;\n\t\t } else {\n\t\t \treturn false;\n\t\t }\n\t\t}\n\t} else {\n\t\twriteLog('valueType property is not existed.');\n\t\treturn false;\n\t}\n}", "function validate(val, affectedKey, affectedKeyGeneric, def, op, skipRequiredCheck, strictRequiredCheck) {\n\n // Get the schema for this key, marking invalid if there isn't one.\n if (!def) {\n invalidKeys.push(Utility.errorObject(\"keyNotInSchema\", affectedKey, val, def, ss));\n return;\n }\n\n // Check for missing required values. The general logic is this:\n // * If the operator is $unset or $rename, it's invalid.\n // * If the value is null, it's invalid.\n // * If the value is undefined and one of the following are true, it's invalid:\n // * We're validating a key of a sub-object.\n // * We're validating a key of an object that is an array item.\n // * We're validating a document (as opposed to a modifier).\n // * We're validating a key under the $set operator in a modifier, and it's an upsert.\n if (!skipRequiredCheck && !def.optional) {\n if (val === null || val === void 0) {\n invalidKeys.push(Utility.errorObject(\"required\", affectedKey, null, def, ss));\n return;\n }\n }\n\n // Value checks are not necessary for null or undefined values\n if (Utility.isNotNullOrUndefined(val)) {\n\n // Check that value is of the correct type\n var typeError = doTypeChecks(def, val, op);\n if (typeError) {\n invalidKeys.push(Utility.errorObject(typeError, affectedKey, val, def, ss));\n return;\n }\n\n // Check value against allowedValues array\n if (def.allowedValues && !_.contains(def.allowedValues, val)) {\n invalidKeys.push(Utility.errorObject(\"notAllowed\", affectedKey, val, def, ss));\n return;\n }\n\n }\n\n // Perform custom validation\n var lastDot = affectedKey.lastIndexOf('.');\n var fieldParentName = lastDot === -1 ? '' : affectedKey.slice(0, lastDot + 1);\n var validators = def.custom ? [def.custom] : [];\n validators = validators.concat(ss._validators).concat(SimpleSchema._validators);\n _.every(validators, function(validator) {\n var errorType = validator.call(_.extend({\n key: affectedKey,\n genericKey: affectedKeyGeneric,\n definition: def,\n isSet: (val !== void 0),\n value: val,\n operator: op,\n field: function(fName) {\n mDoc = mDoc || new MongoObject(obj, ss._blackboxKeys); //create if necessary, cache for speed\n var keyInfo = mDoc.getInfoForKey(fName) || {};\n return {\n isSet: (keyInfo.value !== void 0),\n value: keyInfo.value,\n operator: keyInfo.operator\n };\n },\n siblingField: function(fName) {\n mDoc = mDoc || new MongoObject(obj, ss._blackboxKeys); //create if necessary, cache for speed\n var keyInfo = mDoc.getInfoForKey(fieldParentName + fName) || {};\n return {\n isSet: (keyInfo.value !== void 0),\n value: keyInfo.value,\n operator: keyInfo.operator\n };\n }\n }, extendedCustomContext || {}));\n if (typeof errorType === \"string\") {\n invalidKeys.push(Utility.errorObject(errorType, affectedKey, val, def, ss));\n return false;\n }\n return true;\n });\n }", "static getErrorMessage(value, validator) {\n let content = '';\n let isMultiple = Array.isArray(value);\n\n switch (validator.rule) {\n case 'alpha':\n if (validator.allowDashes && validator.allowSpaces) {\n content = 'letters, dashes and spaces';\n } else if (validator.allowSpaces) {\n content = 'letters and spaces';\n } else if (validator.allowDashes) {\n content = 'letters and dashes';\n } else {\n content = 'letters';\n }\n\n return isMultiple ?\n `Please select options that contain ${content} only.` :\n `Please enter ${content} only.`;\n case 'alphanumeric':\n if (validator.allowDashes && validator.allowSpaces) {\n content = 'letters, numbers, dashes and spaces';\n } else if (validator.allowSpaces) {\n content = 'letters, numbers and spaces';\n } else if (validator.allowDashes) {\n content = 'letters, numbers and dashes';\n } else {\n content = 'letters and numbers';\n }\n\n return isMultiple ?\n `Please select options that contain ${content} only.` :\n `Please enter ${content} only.`;\n case 'number':\n if (validator.allowNegative && validator.allowDecimal) {\n content = 'positive or negative decimal numbers';\n } else if (validator.allowNegative) {\n content = 'positive or negative numbers';\n } else if (validator.allowDecimal) {\n content = 'decimal numbers';\n } else {\n content = 'numbers';\n }\n\n return isMultiple ?\n `Please select options that contain ${content} only.` :\n `Please enter ${content} only.`;\n case 'email':\n return isMultiple ?\n 'Please select only valid email address.' :\n 'Please enter a valid email address.';\n case 'max':\n return isMultiple ?\n `Please select values up to a maximum of ${validator.value}.` :\n `Please enter a value up to a maximum of ${validator.value}.`;\n case 'maxLength':\n return isMultiple ?\n `Please select up to ${validator.value} options.` :\n `Please enter up to ${validator.value} characters.`;\n case 'min':\n return isMultiple ?\n `Please select values up from a minimum of ${validator.value}.` :\n `Please enter a value up from a minimum of ${validator.value}.`;\n case 'minLength':\n return isMultiple ?\n `Please select at least ${validator.value} options.` :\n `Please enter at least ${validator.value} characters.`;\n case 'required':\n return isMultiple ?\n 'Please select at least one option.' :\n 'Please enter a value for this field.';\n case 'sameAs':\n return `Please make sure that the two values match.`;\n default:\n return 'Please enter a correct value for this field.';\n }\n }", "validate(state, setError) {\n let errmsg = null,\n minimum = state.minimum,\n maximum = state.maximum,\n start = state.start;\n\n errmsg = emptyValidator('Owner', state.seqowner);\n if (errmsg) {\n setError('seqowner', errmsg);\n return true;\n } else {\n setError('seqowner', errmsg);\n }\n\n errmsg = emptyValidator('Schema', state.schema);\n if (errmsg) {\n setError('schema', errmsg);\n return true;\n } else {\n setError('schema', errmsg);\n }\n\n if (!this.isNew(state)) {\n errmsg = emptyValidator('Current value', state.current_value);\n if (errmsg) {\n setError('current_value', errmsg);\n return true;\n } else {\n setError('current_value', errmsg);\n }\n\n errmsg = emptyValidator('Increment value', state.increment);\n if (errmsg) {\n setError('increment', errmsg);\n return true;\n } else {\n setError('increment', errmsg);\n }\n\n errmsg = emptyValidator('Minimum value', state.minimum);\n if (errmsg) {\n setError('minimum', errmsg);\n return true;\n } else {\n setError('minimum', errmsg);\n }\n\n errmsg = emptyValidator('Maximum value', state.maximum);\n if (errmsg) {\n setError('maximum', errmsg);\n return true;\n } else {\n setError('maximum', errmsg);\n }\n\n errmsg = emptyValidator('Cache value', state.cache);\n if (errmsg) {\n setError('cache', errmsg);\n return true;\n } else {\n setError('cache', errmsg);\n }\n }\n\n let min_lt = gettext('Minimum value must be less than maximum value.'),\n start_lt = gettext('Start value cannot be less than minimum value.'),\n start_gt = gettext('Start value cannot be greater than maximum value.');\n\n if (isEmptyString(minimum) || isEmptyString(maximum))\n return null;\n\n if ((minimum == 0 && maximum == 0) ||\n (parseInt(minimum, 10) >= parseInt(maximum, 10))) {\n setError('minimum', min_lt);\n return true;\n } else {\n setError('minimum', null);\n }\n\n if (start && minimum && parseInt(start) < parseInt(minimum)) {\n setError('start', start_lt);\n return true;\n } else {\n setError('start', null);\n }\n\n if (start && maximum && parseInt(start) > parseInt(maximum)) {\n setError('start', start_gt);\n return true;\n } else {\n setError('start', null);\n }\n return null;\n }", "_checkValue(value) {\n if (!_.isFunction(value)) {\n throw new Error('functionsDict._checkValue: must provide only Function as values.');\n }\n }", "checkValidation(value, type) {\n switch (type) {\n case \"firstName\":\n return value.length > 0;\n case \"lastName\":\n return value.length > 0;\n case \"email\":\n return validateEmail(value);\n case \"password\":\n return validatePassword(value);\n case \"confirmPassword\":\n return value === this.state.password.value;\n case \"username\":\n return value.length > 6 && this.checkUsername(value);\n default:\n return false;\n }\n }", "acceptValue(value) {\n let accept = !isNaN(value);\n\n if (accept && !(this.okMin(value) && this.okMax(value))) {\n accept = false;\n const current = this.input.value; // current is a string, so compare to int or string... hence == here not ===\n // noinspection EqualityComparisonWithCoercionJS\n\n if (current != value) {\n // The new value is out of range, but we accept it if the current value\n // is also problematic. Consider the case where the input is empty and the\n // minimum value is 100. The user must first type \"1\" and we must accept it\n // if they are to get the opportunity to type the \"0\"s.\n accept = !this.acceptValue(current); // Also, if we are checking the current value, be sure not to infinitely\n // recurse here.\n }\n }\n\n return accept;\n }", "function floatFn(rule, value, callback, source, options) {\n\t\t var errors = [];\n\t\t var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\t\t if (validate) {\n\t\t if ((0, _util.isEmptyValue)(value) && !rule.required) {\n\t\t return callback();\n\t\t }\n\t\t _rule2[\"default\"].required(rule, value, source, errors, options);\n\t\t if (value !== undefined) {\n\t\t _rule2[\"default\"].type(rule, value, source, errors, options);\n\t\t _rule2[\"default\"].range(rule, value, source, errors, options);\n\t\t }\n\t\t }\n\t\t callback(errors);\n\t\t}", "function validateValue(value) {\n // check that value is a a valid Number -> no negative numbers or NaN allowed\n if (typeof value === 'number' && value >= 0 && value === value) return value;\n\n // check that value is a string and can be turned into a valid positive Number\n if (typeof value === 'string') return validateValue(parseInt(value, 10));\n return null;\n}", "validate(value) {\n if (value < 0) {\n throw new Error('Age must be a positive number');\n }\n }", "function calculateValue(testValue, defaultValue) {\n if (testValue) {\n return testValue;\n }\n else {\n return defaultValue;\n }\n }", "function shouldValidate(ctx, value) {\n // when an immediate/initial validation is needed and wasn't done before.\n if (!ctx._ignoreImmediate && ctx.immediate) {\n return true;\n }\n // when the value changes for whatever reason.\n if (ctx.value !== value && ctx.normalizedEvents.length) {\n return true;\n }\n // when it needs validation due to props/cross-fields changes.\n if (ctx._needsValidation) {\n return true;\n }\n // when the initial value is undefined and the field wasn't rendered yet.\n if (!ctx.initialized && value === undefined) {\n return true;\n }\n return false;\n }", "function checkValidInput(value) {\n if (!value || value === \"\") {\n return false;\n } else {\n return true;\n }\n}", "function myValidation(value) {\n //console.log ('value = ', value);\n scope.signupCtrl.validateMenuItem(value)\n .then(function() {\n if (!scope.signupCtrl.error) {\n mCtrl.$setValidity('menuItem', true);\n } else {\n mCtrl.$setValidity('menuItem', false);\n }\n });\n return value;\n }", "function lnameVal() {\n var elm = document.getElementById(\"lname\");\n\n if (elm.validity.valueMissing) {\n elm.setCustomValidity(\"Please enter in your last name!\");\n } else {\n elm.setCustomValidity(\"\");\n }\n}", "function noempty(input_value, default_value)\n{\n if (!input_value)\n {\n return default_value;\n }\n if (input_value.length==0)\n {\n return default_value;\n }\n return input_value;\n}", "validate(value){\n if(value < 0) throw new Error('The age must be a positive number')\n }", "function shouldValidate(ctx, value) {\n // when an immediate/initial validation is needed and wasn't done before.\n if (!ctx._ignoreImmediate && ctx.immediate) {\n return true;\n }\n // when the value changes for whatever reason.\n if (ctx.value !== value && ctx.normalizedEvents.length) {\n return true;\n }\n // when it needs validation due to props/cross-fields changes.\n if (ctx._needsValidation) {\n return true;\n }\n // when the initial value is undefined and the field wasn't rendered yet.\n if (!ctx.initialized && value === undefined) {\n return true;\n }\n return false;\n}", "function shouldValidate(ctx, value) {\n // when an immediate/initial validation is needed and wasn't done before.\n if (!ctx._ignoreImmediate && ctx.immediate) {\n return true;\n }\n // when the value changes for whatever reason.\n if (ctx.value !== value && ctx.normalizedEvents.length) {\n return true;\n }\n // when it needs validation due to props/cross-fields changes.\n if (ctx._needsValidation) {\n return true;\n }\n // when the initial value is undefined and the field wasn't rendered yet.\n if (!ctx.initialized && value === undefined) {\n return true;\n }\n return false;\n}", "function validate(input, val) {\n\t\n\tswitch(input) {\n\t\tcase 'home':\n\t\t\treturn isNumerical(val) && validateLength(val);\n\t\t\tbreak;\n\t\tcase 'mobile':\n\t\t\treturn isNumerical(val) && validateLength(val);\n\t\t\tbreak;\n\t\tcase 'work':\n\t\t\treturn isNumerical(val) && validateLength(val);\n\t\t\tbreak;\n\t\tcase 'country':\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn validateLength(val);\n\t\t\tbreak;\n\t}\n}", "FieldValidation(key, value) {\n switch(key) {\n case 'firstName':\n if(value.length > 15){\n return 'error';\n }\n break;\n case 'lastName':\n if(value.length > 15){\n return 'error';\n }\n break;\n case 'email':\n if(value.match(/^([\\w.%+-]+)@([\\w-]+\\.)+([\\w]{2,})$/i)){\n return 'error';\n }\n break;\n case 'pec':\n if(value.match(/^([\\w.%+-]+)@([\\w-]+\\.)+([\\w]{2,})$/i)){\n return 'error';\n }\n break;\n case 'role':\n if(value.length > 15){\n return 'error';\n }\n case 'password':\n if(value.length > 15){\n return 'error';\n }\n break;\n case 'password2':\n if(!value.match('passowrd')){\n return 'error';\n }\n break;\n case 'phoneNumber':\n if(value.length > 10){\n return 'error';\n }\n break;\n case 'telAz':\n if(value.length > 10){\n return 'error';\n }\n break;\n case 'nomeAzienda':\n if(value.length > 50){\n return 'error';\n }\n break;\n case 'subCategoria':\n if(value.length > 30){\n return 'error';\n }\n break;\n case 'piva':\n if(value.length > 11){\n return 'error';\n }\n break;\n case 'ateco':\n if(value.length > 8){\n return 'error';\n }\n break;\n case 'provCCIAA':\n if(value.length > 2){\n return 'error';\n }\n break;\n case 'numREA':\n if(value.length > 6){\n return 'error';\n }\n break;\n case 'sedeLegInd':\n if(value.length > 30){\n return 'error';\n }\n break;\n case 'sedeLegNum':\n if(value.length > 3){\n return 'error';\n }\n break;\n case 'capLeg':\n if(value.length > 5){\n return 'error';\n }\n break;\n case 'sedeLegFax':\n if(value.length > 10){\n return 'error';\n }\n break;\n case 'sedeAmmInd':\n if(value.length > 30){\n return 'error';\n }\n break;\n case 'sedeAmmNum':\n if(value.length > 3){\n return 'error';\n }\n break;\n case 'capAmm':\n if(value.length > 5){\n return 'error';\n }\n break;\n case 'sedeAmmFax':\n if(value.length > 10){\n return 'error';\n }\n break;\n }\n }", "shouldSetInputTextToDefaultValue (props) {\n let result = (this.previousDefaultValue != props.defaultValue) || (this.previousChangeIndicator != props.changeIndicator)\n return result\n }", "function defaulted(value, defaultValue) {\r\n return value !== undefined ? value : defaultValue;\r\n}", "function defaulted(value, defaultValue) {\r\n return value !== undefined ? value : defaultValue;\r\n}", "function defaulted(value, defaultValue) {\r\n return value !== undefined ? value : defaultValue;\r\n}", "preValidate(key, value, errors, values) {}", "function regexp(rule, value, callback, source, options) {\n\t\t var errors = [];\n\t\t var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\t\t if (validate) {\n\t\t if ((0, _util.isEmptyValue)(value) && !rule.required) {\n\t\t return callback();\n\t\t }\n\t\t _rule2[\"default\"].required(rule, value, source, errors, options);\n\t\t if (!(0, _util.isEmptyValue)(value)) {\n\t\t _rule2[\"default\"].type(rule, value, source, errors, options);\n\t\t }\n\t\t }\n\t\t callback(errors);\n\t\t}", "function defaultValue(test,defaultValue) {\r\n\treturn (typeof test !== 'undefined' ? test : defaultValue);\r\n}", "function validateUserInput(userValue, minValue, maxValue) {\n if (isNumber(userValue)) {\n if (userValue > maxValue || userValue < minValue) {\n return false;\n }\n\n else {\n return true;\n }\n }\n\n else {\n return false;\n }\n}", "_validateMaskValue() {\n const that = this;\n\n if (that.readonly || that.disabled || !that.validation || typeof that.validation !== 'function') {\n return;\n }\n\n const value = that.value;\n\n const success = that.validation(value);\n\n if (!success) {\n that.setAttribute('error', '');\n }\n else {\n that.removeAttribute('error');\n }\n\n that.$.fireEvent('validation', {\n 'success': success\n });\n }", "function floatFn(rule, value, callback, source, options) {\n\t var errors = [];\n\t var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\t if (validate) {\n\t if ((0, _util.isEmptyValue)(value) && !rule.required) {\n\t return callback();\n\t }\n\t _rule2[\"default\"].required(rule, value, source, errors, options);\n\t if (value !== undefined) {\n\t _rule2[\"default\"].type(rule, value, source, errors, options);\n\t _rule2[\"default\"].range(rule, value, source, errors, options);\n\t }\n\t }\n\t callback(errors);\n\t}", "function validateUser({ name = \"unknown\" } = {}) {\n return name === \"john\";\n}", "validate(value){\n if (!validator.isEmail(value)){\n throw new Error('Email invalid')\n }\n }", "function validateValue(value) {\n return (VALID_VALUE_BASE_REGEX.test(value) &&\n !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value));\n}", "function validateValue(value) {\n return (VALID_VALUE_BASE_REGEX.test(value) &&\n !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value));\n}", "function CfnTaskTemplate_DefaultFieldValuePropertyValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));\n }\n errors.collect(cdk.propertyValidator('defaultValue', cdk.requiredValidator)(properties.defaultValue));\n errors.collect(cdk.propertyValidator('defaultValue', cdk.validateString)(properties.defaultValue));\n errors.collect(cdk.propertyValidator('id', cdk.requiredValidator)(properties.id));\n errors.collect(cdk.propertyValidator('id', CfnTaskTemplate_FieldIdentifierPropertyValidator)(properties.id));\n return errors.wrap('supplied properties not correct for \"DefaultFieldValueProperty\"');\n}", "function value(val) { return control_1.default(val); }", "validationHandler(rules, value) {\n let isValid = true;\n\n if (!rules) {\n return true;\n }\n\n if (rules.required) {\n isValid = value.trim() !== \"\" && isValid;\n }\n\n if (rules.minLength) {\n isValid = value.length >= rules.minLength && isValid;\n }\n\n if (rules.maxLength) {\n isValid = value.length <= rules.maxLength && isValid;\n }\n\n if (rules.isEmail) {\n const pattern = /[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/;\n isValid = pattern.test(value) && isValid;\n }\n\n return isValid;\n }", "function integer(rule,value,callback,source,options){var errors=[];var validate=rule.required||!rule.required&&source.hasOwnProperty(rule.field);if(validate){if((0,_util.isEmptyValue)(value)&&!rule.required){return callback();}_rule2[\"default\"].required(rule,value,source,errors,options);if(value!==undefined){_rule2[\"default\"].type(rule,value,source,errors,options);_rule2[\"default\"].range(rule,value,source,errors,options);}}callback(errors);}", "function integer(rule,value,callback,source,options){var errors=[];var validate=rule.required||!rule.required&&source.hasOwnProperty(rule.field);if(validate){if((0,_util.isEmptyValue)(value)&&!rule.required){return callback();}_rule2[\"default\"].required(rule,value,source,errors,options);if(value!==undefined){_rule2[\"default\"].type(rule,value,source,errors,options);_rule2[\"default\"].range(rule,value,source,errors,options);}}callback(errors);}", "function integer(rule,value,callback,source,options){var errors=[];var validate=rule.required||!rule.required&&source.hasOwnProperty(rule.field);if(validate){if((0,_util.isEmptyValue)(value)&&!rule.required){return callback();}_rule2[\"default\"].required(rule,value,source,errors,options);if(value!==undefined){_rule2[\"default\"].type(rule,value,source,errors,options);_rule2[\"default\"].range(rule,value,source,errors,options);}}callback(errors);}", "function validateMinMaxValue(val)\n{\n var dt = P2.getFieldValue(TYPE_NAME);\n if (dt == INT_TYPE || dt == DEC_TYPE)\n {\n if(!val || val.length == 0)\n return \"Min/Max values are required\"\n }\n return null;\n}", "function valueOrDefault(value, defaultValue) {\n\t\treturn typeof value === 'undefined' ? defaultValue : value;\n\t}", "function validateNamedOptionalPropertyEquals(functionName,inputName,optionName,input,expected){if(input!==undefined){validateNamedPropertyEquals(functionName,inputName,optionName,input,expected);}}", "function regexp(rule, value, callback, source, options) {\n\t var errors = [];\n\t var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\t if (validate) {\n\t if ((0, _util.isEmptyValue)(value) && !rule.required) {\n\t return callback();\n\t }\n\t _rule2[\"default\"].required(rule, value, source, errors, options);\n\t if (!(0, _util.isEmptyValue)(value)) {\n\t _rule2[\"default\"].type(rule, value, source, errors, options);\n\t }\n\t }\n\t callback(errors);\n\t}", "function defaulted(value, defaultValue) {\n return value !== undefined ? value : defaultValue;\n }", "function _validateIsNotBlank(def){\n return !isEmpty(def.attrValue);\n}", "function undefinedDefault(value, defaultValue) {\n return (value !== undefined) ? value : defaultValue;\n}" ]
[ "0.7435683", "0.6854287", "0.6585061", "0.64306885", "0.64273626", "0.64273626", "0.6416209", "0.6416209", "0.6416209", "0.6315511", "0.62307525", "0.6194622", "0.616243", "0.6123072", "0.6049483", "0.6043338", "0.6035735", "0.5972668", "0.59355694", "0.5868073", "0.5864089", "0.58516073", "0.58385825", "0.5832593", "0.582822", "0.5813225", "0.58107704", "0.578201", "0.5755125", "0.57478863", "0.57053065", "0.5694874", "0.56768066", "0.5665856", "0.56654286", "0.56654286", "0.56654286", "0.565841", "0.565841", "0.565841", "0.565841", "0.56530213", "0.5644963", "0.56392735", "0.56324095", "0.56321454", "0.56166244", "0.5599544", "0.5599509", "0.5594295", "0.5582197", "0.55819595", "0.5577198", "0.55739766", "0.5567587", "0.5552371", "0.5551524", "0.5537918", "0.5532997", "0.55301255", "0.55249214", "0.55226886", "0.55192125", "0.5506662", "0.5496322", "0.5495236", "0.54834694", "0.5482227", "0.54820627", "0.54742396", "0.5463807", "0.5463807", "0.5461909", "0.5459087", "0.5458943", "0.5454092", "0.5454092", "0.5454092", "0.54507667", "0.5450474", "0.5447534", "0.5433909", "0.5429525", "0.5427197", "0.54248375", "0.5422964", "0.541954", "0.541954", "0.5416965", "0.5416326", "0.5411895", "0.5408941", "0.5408941", "0.5408941", "0.5407779", "0.5404027", "0.53959984", "0.53911436", "0.5388869", "0.5383668", "0.5382677" ]
0.0
-1
Implements a host component that allows optionally setting the props `value` and `defaultValue`. If `multiple` is false, the prop must be a stringable. If `multiple` is true, the prop must be an array of stringables. If `value` is not supplied (or null/undefined), user actions that change the selected option will trigger updates to the rendered options. If it is supplied (and not null/undefined), the rendered options will not update in response to user actions. Instead, the `value` prop must change in order for the rendered options to update. If `defaultValue` is provided, any options with the supplied values will be selected.
function getHostProps$2(element, props) { return _assign({}, props, { value: undefined }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function selectValueType(props,propName,componentName){if(props[propName]==null){return null;}if(props.multiple){if(!Array.isArray(props[propName])){return new Error(\"The `\"+propName+\"` prop supplied to <select> must be an array if \"+\"`multiple` is true.\");}}else {if(Array.isArray(props[propName])){return new Error(\"The `\"+propName+\"` prop supplied to <select> must be a scalar \"+\"value if `multiple` is false.\");}}}", "function selectValueType(props,propName,componentName){if(props[propName] == null){return null;}if(props.multiple){if(!Array.isArray(props[propName])){return new Error(\"The `\" + propName + \"` prop supplied to <select> must be an array if \" + \"`multiple` is true.\");}}else {if(Array.isArray(props[propName])){return new Error(\"The `\" + propName + \"` prop supplied to <select> must be a scalar \" + \"value if `multiple` is false.\");}}}", "function selectValueType(props, propName, componentName) {\n\t if (props[propName] == null) {\n\t return;\n\t }\n\t if (props.multiple) {\n\t if (!Array.isArray(props[propName])) {\n\t return new Error(\n\t (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n\t (\"`multiple` is true.\")\n\t );\n\t }\n\t } else {\n\t if (Array.isArray(props[propName])) {\n\t return new Error(\n\t (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n\t (\"value if `multiple` is false.\")\n\t );\n\t }\n\t }\n\t}", "function selectValueType(props, propName, componentName) {\n\t if (props[propName] == null) {\n\t return;\n\t }\n\t if (props.multiple) {\n\t if (!Array.isArray(props[propName])) {\n\t return new Error(\n\t (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n\t (\"`multiple` is true.\")\n\t );\n\t }\n\t } else {\n\t if (Array.isArray(props[propName])) {\n\t return new Error(\n\t (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n\t (\"value if `multiple` is false.\")\n\t );\n\t }\n\t }\n\t}", "function updateOptions() {\n /*jshint validthis:true */\n if (this.props.value == null) {\n return;\n }\n var options = this.getDOMNode().options;\n var selectedValue = '' + this.props.value;\n\n for (var i = 0, l = options.length; i < l; i++) {\n var selected = this.props.multiple ?\n selectedValue.indexOf(options[i].value) >= 0 :\n selected = options[i].value === selectedValue;\n\n if (selected !== options[i].selected) {\n options[i].selected = selected;\n }\n }\n}", "function useSelect(props) {\n const {\n buttonRef: buttonRefProp,\n defaultValue: defaultValueProp,\n disabled = false,\n listboxId: listboxIdProp,\n listboxRef: listboxRefProp,\n multiple = false,\n onChange,\n onHighlightChange,\n onOpenChange,\n open = false,\n options,\n optionStringifier = _defaultOptionStringifier.default,\n value: valueProp\n } = props;\n const buttonRef = React.useRef(null);\n const handleButtonRef = (0, _utils.unstable_useForkRef)(buttonRefProp, buttonRef);\n const listboxRef = React.useRef(null);\n const listboxId = (0, _utils.unstable_useId)(listboxIdProp);\n let defaultValue;\n if (valueProp === undefined && defaultValueProp === undefined) {\n defaultValue = [];\n } else if (defaultValueProp !== undefined) {\n defaultValue = multiple ? defaultValueProp : [defaultValueProp];\n }\n const value = React.useMemo(() => {\n if (valueProp !== undefined) {\n return multiple ? valueProp : [valueProp];\n }\n return undefined;\n }, [valueProp, multiple]);\n const optionsMap = React.useMemo(() => {\n const map = new Map();\n options.forEach(option => {\n map.set(option.value, option);\n });\n return map;\n }, [options]);\n\n // prevents closing the listbox on keyUp right after opening it\n const ignoreEnterKeyUp = React.useRef(false);\n\n // prevents reopening the listbox when button is clicked\n // (listbox closes on lost focus, then immediately reopens on click)\n const ignoreClick = React.useRef(false);\n\n // Ensure the listbox is focused after opening\n const [listboxFocusRequested, requestListboxFocus] = React.useState(false);\n const focusListboxIfRequested = React.useCallback(() => {\n if (listboxFocusRequested && listboxRef.current != null) {\n listboxRef.current.focus();\n requestListboxFocus(false);\n }\n }, [listboxFocusRequested]);\n const handleListboxRef = (0, _utils.unstable_useForkRef)(listboxRefProp, listboxRef, focusListboxIfRequested);\n const {\n notifySelectionChanged,\n notifyHighlightChanged,\n registerHighlightChangeHandler,\n registerSelectionChangeHandler\n } = (0, _useSelectChangeNotifiers.default)();\n React.useEffect(() => {\n focusListboxIfRequested();\n }, [focusListboxIfRequested]);\n React.useEffect(() => {\n requestListboxFocus(open);\n }, [open]);\n const createHandleMouseDown = otherHandlers => event => {\n var _otherHandlers$onMous;\n otherHandlers == null ? void 0 : (_otherHandlers$onMous = otherHandlers.onMouseDown) == null ? void 0 : _otherHandlers$onMous.call(otherHandlers, event);\n if (!event.defaultPrevented && open) {\n ignoreClick.current = true;\n }\n };\n const createHandleButtonClick = otherHandlers => event => {\n var _otherHandlers$onClic;\n otherHandlers == null ? void 0 : (_otherHandlers$onClic = otherHandlers.onClick) == null ? void 0 : _otherHandlers$onClic.call(otherHandlers, event);\n if (!event.defaultPrevented && !ignoreClick.current) {\n onOpenChange == null ? void 0 : onOpenChange(!open);\n }\n ignoreClick.current = false;\n };\n const createHandleButtonKeyDown = otherHandlers => event => {\n var _otherHandlers$onKeyD;\n otherHandlers == null ? void 0 : (_otherHandlers$onKeyD = otherHandlers.onKeyDown) == null ? void 0 : _otherHandlers$onKeyD.call(otherHandlers, event);\n if (event.defaultPrevented) {\n return;\n }\n if (event.key === 'Enter') {\n ignoreEnterKeyUp.current = true;\n }\n if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {\n event.preventDefault();\n onOpenChange == null ? void 0 : onOpenChange(true);\n }\n };\n const createHandleListboxKeyUp = otherHandlers => event => {\n var _otherHandlers$onKeyU;\n otherHandlers == null ? void 0 : (_otherHandlers$onKeyU = otherHandlers.onKeyUp) == null ? void 0 : _otherHandlers$onKeyU.call(otherHandlers, event);\n if (event.defaultPrevented) {\n return;\n }\n const closingKeys = multiple ? ['Escape'] : ['Escape', 'Enter', ' '];\n if (open && !ignoreEnterKeyUp.current && closingKeys.includes(event.key)) {\n var _buttonRef$current;\n buttonRef == null ? void 0 : (_buttonRef$current = buttonRef.current) == null ? void 0 : _buttonRef$current.focus();\n }\n ignoreEnterKeyUp.current = false;\n };\n const createHandleListboxItemClick = React.useCallback(otherHandlers => event => {\n var _otherHandlers$onClic2;\n otherHandlers == null ? void 0 : (_otherHandlers$onClic2 = otherHandlers.onClick) == null ? void 0 : _otherHandlers$onClic2.call(otherHandlers, event);\n if (event.defaultPrevented) {\n return;\n }\n if (!multiple) {\n onOpenChange == null ? void 0 : onOpenChange(false);\n }\n }, [multiple, onOpenChange]);\n const createHandleListboxBlur = otherHandlers => event => {\n var _otherHandlers$onBlur;\n otherHandlers == null ? void 0 : (_otherHandlers$onBlur = otherHandlers.onBlur) == null ? void 0 : _otherHandlers$onBlur.call(otherHandlers, event);\n if (!event.defaultPrevented) {\n onOpenChange == null ? void 0 : onOpenChange(false);\n }\n };\n const listboxReducer = React.useCallback((state, action) => {\n const newState = (0, _useListbox.defaultListboxReducer)(state, action);\n switch (action.type) {\n case _useListbox.ActionTypes.keyDown:\n // change selection when listbox is closed\n if ((action.event.key === 'ArrowUp' || action.event.key === 'ArrowDown') && !open && !multiple) {\n return (0, _extends2.default)({}, newState, {\n selectedValues: newState.highlightedValue != null ? [newState.highlightedValue] : []\n });\n }\n break;\n case _useListbox.ActionTypes.blur:\n case _useListbox.ActionTypes.setValue:\n case _useListbox.ActionTypes.optionsChange:\n return (0, _extends2.default)({}, newState, {\n highlightedValue: newState.selectedValues.length > 0 ? newState.selectedValues[0] : null\n });\n default:\n return newState;\n }\n return newState;\n }, [open, multiple]);\n const {\n getRootProps: getButtonRootProps,\n active: buttonActive,\n focusVisible: buttonFocusVisible\n } = (0, _useButton.default)({\n disabled,\n ref: handleButtonRef\n });\n const optionValues = React.useMemo(() => options.map(o => o.value), [options]);\n const isOptionDisabled = React.useCallback(valueToCheck => {\n var _option$disabled;\n const option = optionsMap.get(valueToCheck);\n return (_option$disabled = option == null ? void 0 : option.disabled) != null ? _option$disabled : false;\n }, [optionsMap]);\n const stringifyOption = React.useCallback(valueToCheck => {\n const option = optionsMap.get(valueToCheck);\n if (!option) {\n return '';\n }\n return optionStringifier(option);\n }, [optionsMap, optionStringifier]);\n const useListboxParameters = {\n defaultValue,\n id: listboxId,\n isOptionDisabled,\n listboxRef: handleListboxRef,\n onChange: (e, newValues) => {\n if (multiple) {\n onChange == null ? void 0 : onChange(e, newValues);\n } else {\n var _newValues$;\n onChange == null ? void 0 : onChange(e, (_newValues$ = newValues[0]) != null ? _newValues$ : null);\n }\n },\n onHighlightChange: (e, newValue) => {\n onHighlightChange == null ? void 0 : onHighlightChange(e, newValue != null ? newValue : null);\n },\n options: optionValues,\n optionStringifier: stringifyOption,\n selectionLimit: multiple ? null : 1,\n stateReducer: listboxReducer,\n value\n };\n const {\n getRootProps: getListboxRootProps,\n getOptionProps: getListboxOptionProps,\n getOptionState,\n highlightedOption,\n selectedOption\n } = (0, _useListbox.default)(useListboxParameters);\n React.useEffect(() => {\n notifySelectionChanged(selectedOption);\n }, [selectedOption, notifySelectionChanged]);\n React.useEffect(() => {\n notifyHighlightChanged(highlightedOption);\n }, [highlightedOption, notifyHighlightChanged]);\n const getButtonProps = (otherHandlers = {}) => {\n return (0, _extends2.default)({}, getButtonRootProps((0, _extends2.default)({}, otherHandlers, {\n onClick: createHandleButtonClick(otherHandlers),\n onMouseDown: createHandleMouseDown(otherHandlers),\n onKeyDown: createHandleButtonKeyDown(otherHandlers)\n })), {\n role: 'combobox',\n 'aria-expanded': open,\n 'aria-haspopup': 'listbox',\n 'aria-controls': listboxId\n });\n };\n const getListboxProps = (otherHandlers = {}) => getListboxRootProps((0, _extends2.default)({}, otherHandlers, {\n onBlur: createHandleListboxBlur(otherHandlers),\n onKeyUp: createHandleListboxKeyUp(otherHandlers)\n }));\n const getOptionProps = React.useCallback((optionValue, otherHandlers = {}) => {\n return getListboxOptionProps(optionValue, (0, _extends2.default)({}, otherHandlers, {\n onClick: createHandleListboxItemClick(otherHandlers)\n }));\n }, [getListboxOptionProps, createHandleListboxItemClick]);\n React.useDebugValue({\n selectedOption,\n highlightedOption,\n open\n });\n const contextValue = React.useMemo(() => ({\n listboxRef,\n getOptionProps,\n getOptionState,\n registerHighlightChangeHandler,\n registerSelectionChangeHandler\n }), [getOptionProps, getOptionState, registerHighlightChangeHandler, registerSelectionChangeHandler]);\n if (props.multiple) {\n return {\n buttonActive,\n buttonFocusVisible,\n disabled,\n getButtonProps,\n getListboxProps,\n contextValue,\n open,\n value: selectedOption,\n highlightedOption\n };\n }\n return {\n buttonActive,\n buttonFocusVisible,\n disabled,\n getButtonProps,\n getListboxProps,\n contextValue,\n open,\n value: selectedOption.length > 0 ? selectedOption[0] : null,\n highlightedOption\n };\n}", "function selectValueType(props, propName, componentName) {\n\t if (props[propName] == null) {\n\t return null;\n\t }\n\t if (props.multiple) {\n\t if (!Array.isArray(props[propName])) {\n\t return new Error(\n\t (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n\t (\"`multiple` is true.\")\n\t );\n\t }\n\t } else {\n\t if (Array.isArray(props[propName])) {\n\t return new Error(\n\t (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n\t (\"value if `multiple` is false.\")\n\t );\n\t }\n\t }\n\t}", "function selectValueType(props, propName, componentName) {\n\t if (props[propName] == null) {\n\t return null;\n\t }\n\t if (props.multiple) {\n\t if (!Array.isArray(props[propName])) {\n\t return new Error(\n\t (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n\t (\"`multiple` is true.\")\n\t );\n\t }\n\t } else {\n\t if (Array.isArray(props[propName])) {\n\t return new Error(\n\t (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n\t (\"value if `multiple` is false.\")\n\t );\n\t }\n\t }\n\t}", "function selectValueType(props, propName, componentName) {\n\t if (props[propName] == null) {\n\t return null;\n\t }\n\t if (props.multiple) {\n\t if (!Array.isArray(props[propName])) {\n\t return new Error(\n\t (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n\t (\"`multiple` is true.\")\n\t );\n\t }\n\t } else {\n\t if (Array.isArray(props[propName])) {\n\t return new Error(\n\t (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n\t (\"value if `multiple` is false.\")\n\t );\n\t }\n\t }\n\t}", "function selectValueType(props, propName, componentName) {\n\t if (props[propName] == null) {\n\t return null;\n\t }\n\t if (props.multiple) {\n\t if (!Array.isArray(props[propName])) {\n\t return new Error(\n\t (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n\t (\"`multiple` is true.\")\n\t );\n\t }\n\t } else {\n\t if (Array.isArray(props[propName])) {\n\t return new Error(\n\t (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n\t (\"value if `multiple` is false.\")\n\t );\n\t }\n\t }\n\t}", "function selectValueType(props, propName, componentName) {\n\t if (props[propName] == null) {\n\t return null;\n\t }\n\t if (props.multiple) {\n\t if (!Array.isArray(props[propName])) {\n\t return new Error(\n\t (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n\t (\"`multiple` is true.\")\n\t );\n\t }\n\t } else {\n\t if (Array.isArray(props[propName])) {\n\t return new Error(\n\t (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n\t (\"value if `multiple` is false.\")\n\t );\n\t }\n\t }\n\t}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return;\n }\n if (props.multiple) {\n invariant(\n Array.isArray(props[propName]),\n 'The `%s` prop supplied to <select> must be an array if `multiple` is ' +\n 'true.',\n propName\n );\n } else {\n invariant(\n !Array.isArray(props[propName]),\n 'The `%s` prop supplied to <select> must be a scalar value if ' +\n '`multiple` is false.',\n propName\n );\n }\n}", "function MultiSelect(props) {\n // props = Options, index of section, add/remove function from parent, default (preselected) values, in sync with other MultiSelect Components?\n // props = [ options:Array[obj], index:int, add:func, remove:func, defaultOptions:Array[obj], sync:bool ]\n\n const [currentlySelected, setCurrentlySelected] = useState([]);\n\n useEffect(() => {\n if (props.defaultOptions) {\n let replaceSelected = cloneDeep(props.defaultOptions);\n replaceSelected.sort(sortByLabel);\n setCurrentlySelected(replaceSelected);\n }\n }, [props.defaultOptions])\n\n const [currentlyNotSelected, setCurrentlyNotSelected] = useState([]);\n\n useEffect(() => {\n let replace = cloneDeep(props.options);\n // if props.sync, let parent component handle props.options instead\n if (props.defaultOptions && !props.sync) {\n // loop through each section to check for selected inputs\n if (props.defaultOptions.length > 0) {\n for (let i = 0; i < props.defaultOptions.length; i++) {\n const selected = props.defaultOptions[i];\n // loop through list of unselected inputs and compare\n for (let x = replace.length; x > 0; x--) {\n const input = replace.pop();\n // if not the selected input, add back to unselected\n if (input.label !== selected.label)\n replace.unshift(input);\n }\n }\n }\n }\n replace.sort(sortByLabel);\n setCurrentlyNotSelected(replace);\n }, [props.options, props.defaultOptions, props.sync])\n\n const [hasDropdown, setHasDropdown] = useState(false);\n const [searchInput, setSearchInput] = useState(\"\");\n\n const searchInputRef = useRef(null);\n\n // handleDropDown:func()\n // => check if dropdown is true\n // => true: close dropdown (display: none)\n // => false: dropdown (display: block)\n const handleDropDown = (e) => {\n if (e.key === \"Enter\" || e.key === undefined) {\n searchInputRef.current.value = \"\";\n setSearchInput(\"\");\n setHasDropdown(!hasDropdown);\n }\n };\n\n const handleSearchInput = (e) => setSearchInput(e.target.value);\n\n // handleSelectOption:func(e)\n // => add to currentlySelected\n // => call add function (prop)\n // => remove from currentlyNotSelected\n const handleSelectOption = (e) => {\n if (e.key === \"Enter\" || e.key === undefined) {\n let optionIndex = e.target.getAttribute(\"data-id\");\n\n let replaceSelected = cloneDeep(currentlySelected);\n let replaceNotSelected = cloneDeep(currentlyNotSelected);\n let transfer = replaceNotSelected.splice(optionIndex, 1);\n replaceSelected.push(...transfer);\n\n if (props.add !== undefined)\n props.add(...transfer, props.dataId);\n\n setCurrentlySelected(replaceSelected);\n setCurrentlyNotSelected(replaceNotSelected);\n }\n }\n\n // handleRemoveOption:func(e)\n // => remove from currentlySelected\n // => call remove function (prop)\n // => add to currentlyNotSelected\n const handleRemoveOption = (e) => {\n let optionIndex = e.target.getAttribute(\"data-id\");\n\n let replaceSelected = cloneDeep(currentlySelected);\n let replaceNotSelected = cloneDeep(currentlyNotSelected);\n let transfer = replaceSelected.splice(optionIndex, 1);\n replaceNotSelected.push(...transfer);\n\n if (props.rm !== undefined)\n if (props.dataId === undefined)\n console.error(\"Unable to call remove function, dataId is empty!\")\n else\n props.rm(...transfer, props.dataId);\n\n setCurrentlySelected(replaceSelected);\n setCurrentlyNotSelected(replaceNotSelected);\n }\n\n\n return (\n <div className=\"multiSelect\">\n <div className=\"multiSelectTop\" style={hasDropdown ? {} : { borderBottom: \"#e6e6e6 solid 1px\" }}>\n <div className=\"selectedBox\">\n {\n currentlySelected.map((option, index) => {\n return (\n <span key={index} className=\"selected noselect\">\n {option.label}\n <input data-id={index} onClick={handleRemoveOption} type=\"button\" value=\"&#10005;\" />\n </span>\n );\n })\n }\n </div>\n\n <div className=\"dropdownButton\" tabIndex=\"0\" onKeyPress={handleDropDown} onClick={handleDropDown}><i className=\"downArrow\"></i></div>\n </div>\n <div className=\"dropdown\" style={hasDropdown ? {} : { display: \"none\" }}>\n <input ref={searchInputRef} placeholder=\"Search\" className=\"selectSearch\" onChange={handleSearchInput} />\n <ul style={currentlyNotSelected.length === 0 ? { textAlign: \"center\", padding: \"10px\" } : {}}>\n {\n (currentlyNotSelected.length !== 0 && hasDropdown ? currentlyNotSelected.map((option, index) => {\n if (searchInput === \"\" || option.label.toUpperCase().includes(searchInput.toUpperCase())) {\n return (\n <li data-id={index}\n key={index}\n tabIndex=\"0\"\n onKeyPress={handleSelectOption}\n onClick={handleSelectOption}\n className=\"noselect\"\n >\n {option.label}\n </li>\n );\n }\n\n return null;\n }) : <span>List is empty!</span>)\n }\n </ul>\n </div>\n </div>\n );\n}", "writeValue(value) {\n this.value = value;\n let optionSelectedStateSetter;\n\n if (Array.isArray(value)) {\n // convert values to ids\n const ids = value.map(v => this._getOptionId(v));\n\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(ids.indexOf(o.toString()) > -1);\n };\n } else {\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(false);\n };\n }\n\n this._optionMap.forEach(optionSelectedStateSetter);\n }", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function useSelect(props) {\n const {\n buttonRef: buttonRefProp,\n defaultOpen = false,\n defaultValue: defaultValueProp,\n disabled = false,\n listboxId: listboxIdProp,\n listboxRef: listboxRefProp,\n multiple = false,\n onChange,\n onHighlightChange,\n onOpenChange,\n open: openProp,\n options: optionsParam,\n optionStringifier = defaultOptionStringifier,\n value: valueProp\n } = props;\n const buttonRef = React.useRef(null);\n const handleButtonRef = useForkRef(buttonRefProp, buttonRef);\n const listboxRef = React.useRef(null);\n const listboxId = useId(listboxIdProp);\n let defaultValue;\n if (valueProp === undefined && defaultValueProp === undefined) {\n defaultValue = [];\n } else if (defaultValueProp !== undefined) {\n defaultValue = multiple ? defaultValueProp : [defaultValueProp];\n }\n const value = React.useMemo(() => {\n if (valueProp !== undefined) {\n return multiple ? valueProp : [valueProp];\n }\n return undefined;\n }, [valueProp, multiple]);\n const {\n subitems,\n contextValue: compoundComponentContextValue\n } = useCompoundParent();\n const options = React.useMemo(() => {\n if (optionsParam != null) {\n return new Map(optionsParam.map((option, index) => [option.value, {\n value: option.value,\n label: option.label,\n disabled: option.disabled,\n ref: /*#__PURE__*/React.createRef(),\n id: `${listboxId}_${index}`\n }]));\n }\n return subitems;\n }, [optionsParam, subitems, listboxId]);\n\n // prevents closing the listbox on keyUp right after opening it\n const ignoreEnterKeyUp = React.useRef(false);\n\n // prevents reopening the listbox when button is clicked\n // (listbox closes on lost focus, then immediately reopens on click)\n const ignoreClick = React.useRef(false);\n\n // Ensure the listbox is focused after opening\n const [listboxFocusRequested, requestListboxFocus] = React.useState(false);\n const focusListboxIfRequested = React.useCallback(() => {\n if (listboxFocusRequested && listboxRef.current != null) {\n listboxRef.current.focus();\n requestListboxFocus(false);\n }\n }, [listboxFocusRequested]);\n const handleListboxRef = useForkRef(listboxRefProp, listboxRef, focusListboxIfRequested);\n const {\n getRootProps: getButtonRootProps,\n active: buttonActive,\n focusVisible: buttonFocusVisible,\n rootRef: mergedButtonRef\n } = useButton({\n disabled,\n rootRef: handleButtonRef\n });\n const optionValues = React.useMemo(() => Array.from(options.keys()), [options]);\n const isItemDisabled = React.useCallback(valueToCheck => {\n const option = options.get(valueToCheck);\n return option?.disabled ?? false;\n }, [options]);\n const stringifyOption = React.useCallback(valueToCheck => {\n const option = options.get(valueToCheck);\n if (!option) {\n return '';\n }\n return optionStringifier(option);\n }, [options, optionStringifier]);\n const controlledState = React.useMemo(() => ({\n selectedValues: value,\n open: openProp\n }), [value, openProp]);\n const getItemId = React.useCallback(itemValue => options.get(itemValue)?.id, [options]);\n const handleSelectionChange = React.useCallback((event, newValues) => {\n if (multiple) {\n onChange?.(event, newValues);\n } else {\n onChange?.(event, newValues[0] ?? null);\n }\n }, [multiple, onChange]);\n const handleHighlightChange = React.useCallback((event, newValue) => {\n onHighlightChange?.(event, newValue ?? null);\n }, [onHighlightChange]);\n const handleStateChange = React.useCallback((e, field, fieldValue) => {\n if (field === 'open') {\n onOpenChange?.(fieldValue);\n if (fieldValue === false && e?.type !== 'blur') {\n buttonRef.current?.focus();\n }\n }\n }, [onOpenChange]);\n const useListParameters = {\n getInitialState: () => ({\n highlightedValue: null,\n selectedValues: defaultValue ?? [],\n open: defaultOpen\n }),\n getItemId,\n controlledProps: controlledState,\n isItemDisabled,\n rootRef: handleListboxRef,\n onChange: handleSelectionChange,\n onHighlightChange: handleHighlightChange,\n onStateChange: handleStateChange,\n reducerActionContext: React.useMemo(() => ({\n multiple\n }), [multiple]),\n items: optionValues,\n itemStringifier: stringifyOption,\n selectionMode: multiple ? 'multiple' : 'single',\n stateReducer: selectReducer\n };\n const {\n dispatch,\n getRootProps: getListboxRootProps,\n contextValue: listContextValue,\n state: {\n open,\n highlightedValue: highlightedOption,\n selectedValues: selectedOptions\n },\n rootRef: mergedListboxRef\n } = useList(useListParameters);\n React.useEffect(() => {\n focusListboxIfRequested();\n }, [focusListboxIfRequested]);\n React.useEffect(() => {\n requestListboxFocus(open);\n }, [open]);\n const createHandleMouseDown = otherHandlers => event => {\n otherHandlers?.onMouseDown?.(event);\n if (!event.defaultPrevented && open) {\n ignoreClick.current = true;\n }\n };\n const createHandleButtonClick = otherHandlers => event => {\n otherHandlers?.onClick?.(event);\n if (!event.defaultPrevented && !ignoreClick.current) {\n const action = {\n type: SelectActionTypes.buttonClick,\n event\n };\n dispatch(action);\n }\n ignoreClick.current = false;\n };\n const createHandleButtonKeyDown = otherHandlers => event => {\n otherHandlers?.onKeyDown?.(event);\n if (event.defaultPrevented) {\n return;\n }\n if (event.key === 'Enter') {\n ignoreEnterKeyUp.current = true;\n }\n if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {\n event.preventDefault();\n dispatch({\n type: SelectActionTypes.buttonArrowKeyDown,\n key: event.key,\n event\n });\n }\n };\n const createHandleListboxKeyUp = otherHandlers => event => {\n otherHandlers?.onKeyUp?.(event);\n if (event.defaultPrevented) {\n return;\n }\n const closingKeys = multiple ? ['Escape'] : ['Escape', 'Enter', ' '];\n if (open && !ignoreEnterKeyUp.current && closingKeys.includes(event.key)) {\n buttonRef?.current?.focus();\n }\n ignoreEnterKeyUp.current = false;\n };\n useEnhancedEffect(() => {\n // Scroll to the currently highlighted option.\n if (highlightedOption != null) {\n const optionRef = options.get(highlightedOption)?.ref;\n if (!listboxRef.current || !optionRef?.current) {\n return;\n }\n const listboxClientRect = listboxRef.current.getBoundingClientRect();\n const optionClientRect = optionRef.current.getBoundingClientRect();\n if (optionClientRect.top < listboxClientRect.top) {\n listboxRef.current.scrollTop -= listboxClientRect.top - optionClientRect.top;\n } else if (optionClientRect.bottom > listboxClientRect.bottom) {\n listboxRef.current.scrollTop += optionClientRect.bottom - listboxClientRect.bottom;\n }\n }\n }, [highlightedOption, options]);\n const getButtonProps = (otherHandlers = {}) => {\n return _extends({}, getButtonRootProps(_extends({}, otherHandlers, {\n onClick: createHandleButtonClick(otherHandlers),\n onMouseDown: createHandleMouseDown(otherHandlers),\n onKeyDown: createHandleButtonKeyDown(otherHandlers)\n })), {\n role: 'combobox',\n 'aria-expanded': open,\n 'aria-haspopup': 'listbox',\n 'aria-controls': listboxId\n });\n };\n const getOptionMetadata = React.useCallback(optionValue => options.get(optionValue), [options]);\n const getListboxProps = (otherHandlers = {}) => {\n return _extends({}, getListboxRootProps(_extends({}, otherHandlers, {\n onKeyUp: createHandleListboxKeyUp(otherHandlers)\n })), {\n id: listboxId,\n role: 'listbox',\n 'aria-multiselectable': multiple ? 'true' : undefined\n });\n };\n React.useDebugValue({\n selectedOptions,\n highlightedOption,\n open\n });\n const contextValue = React.useMemo(() => _extends({}, listContextValue, compoundComponentContextValue), [listContextValue, compoundComponentContextValue]);\n let selectValue;\n if (props.multiple) {\n selectValue = selectedOptions;\n } else {\n selectValue = selectedOptions.length > 0 ? selectedOptions[0] : null;\n }\n return {\n buttonActive,\n buttonFocusVisible,\n buttonRef: mergedButtonRef,\n contextValue,\n disabled,\n dispatch,\n getButtonProps,\n getListboxProps,\n getOptionMetadata,\n listboxRef: mergedListboxRef,\n open,\n options: optionValues,\n value: selectValue,\n highlightedOption\n };\n}", "writeValue(value) {\n this.value = value;\n let optionSelectedStateSetter;\n if (Array.isArray(value)) {\n // convert values to ids\n const ids = value.map((v) => this._getOptionId(v));\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(ids.indexOf(o.toString()) > -1);\n };\n }\n else {\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(false);\n };\n }\n this._optionMap.forEach(optionSelectedStateSetter);\n }", "writeValue(value) {\n this.value = value;\n let optionSelectedStateSetter;\n if (Array.isArray(value)) {\n // convert values to ids\n const ids = value.map((v) => this._getOptionId(v));\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(ids.indexOf(o.toString()) > -1);\n };\n }\n else {\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(false);\n };\n }\n this._optionMap.forEach(optionSelectedStateSetter);\n }", "writeValue(value) {\n this.value = value;\n let optionSelectedStateSetter;\n if (Array.isArray(value)) {\n // convert values to ids\n const ids = value.map((v) => this._getOptionId(v));\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(ids.indexOf(o.toString()) > -1);\n };\n }\n else {\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(false);\n };\n }\n this._optionMap.forEach(optionSelectedStateSetter);\n }", "writeValue(value) {\n this.value = value;\n let optionSelectedStateSetter;\n if (Array.isArray(value)) {\n // convert values to ids\n const ids = value.map((v) => this._getOptionId(v));\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(ids.indexOf(o.toString()) > -1);\n };\n }\n else {\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(false);\n };\n }\n this._optionMap.forEach(optionSelectedStateSetter);\n }", "writeValue(value) {\n this.value = value;\n let optionSelectedStateSetter;\n if (Array.isArray(value)) {\n // convert values to ids\n const ids = value.map((v) => this._getOptionId(v));\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(ids.indexOf(o.toString()) > -1);\n };\n }\n else {\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(false);\n };\n }\n this._optionMap.forEach(optionSelectedStateSetter);\n }", "writeValue(value) {\n this.value = value;\n let optionSelectedStateSetter;\n if (Array.isArray(value)) {\n // convert values to ids\n const ids = value.map((v) => this._getOptionId(v));\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(ids.indexOf(o.toString()) > -1);\n };\n }\n else {\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(false);\n };\n }\n this._optionMap.forEach(optionSelectedStateSetter);\n }", "writeValue(value) {\n this.value = value;\n let optionSelectedStateSetter;\n if (Array.isArray(value)) {\n // convert values to ids\n const ids = value.map((v) => this._getOptionId(v));\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(ids.indexOf(o.toString()) > -1);\n };\n }\n else {\n optionSelectedStateSetter = (opt, o) => {\n opt._setSelected(false);\n };\n }\n this._optionMap.forEach(optionSelectedStateSetter);\n }", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return null;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return null;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return null;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return null;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return null;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return null;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return null;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return null;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return null;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return null;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function selectValueType(props, propName, componentName) {\n if (props[propName] == null) {\n return null;\n }\n if (props.multiple) {\n if (!Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be an array if \") +\n (\"`multiple` is true.\")\n );\n }\n } else {\n if (Array.isArray(props[propName])) {\n return new Error(\n (\"The `\" + propName + \"` prop supplied to <select> must be a scalar \") +\n (\"value if `multiple` is false.\")\n );\n }\n }\n}", "function checkSelectPropTypes(props){{ReactControlledValuePropTypes.checkPropTypes('select',props);for(var i=0;i<valuePropNames.length;i++){var propName=valuePropNames[i];if(props[propName]==null){continue;}var isArray=Array.isArray(props[propName]);if(props.multiple&&!isArray){error('The `%s` prop supplied to <select> must be an array if '+'`multiple` is true.%s',propName,getDeclarationErrorAddendum());}else if(!props.multiple&&isArray){error('The `%s` prop supplied to <select> must be a scalar '+'value if `multiple` is false.%s',propName,getDeclarationErrorAddendum());}}}}", "function checkSelectPropTypes(props){{ReactControlledValuePropTypes.checkPropTypes('select',props);for(var i=0;i<valuePropNames.length;i++){var propName=valuePropNames[i];if(props[propName]==null){continue;}var isArray=Array.isArray(props[propName]);if(props.multiple&&!isArray){error('The `%s` prop supplied to <select> must be an array if '+'`multiple` is true.%s',propName,getDeclarationErrorAddendum());}else if(!props.multiple&&isArray){error('The `%s` prop supplied to <select> must be a scalar '+'value if `multiple` is false.%s',propName,getDeclarationErrorAddendum());}}}}", "function checkSelectPropTypes(props){{ReactControlledValuePropTypes.checkPropTypes('select',props);for(var i=0;i<valuePropNames.length;i++){var propName=valuePropNames[i];if(props[propName]==null){continue;}var isArray=Array.isArray(props[propName]);if(props.multiple&&!isArray){error('The `%s` prop supplied to <select> must be an array if '+'`multiple` is true.%s',propName,getDeclarationErrorAddendum());}else if(!props.multiple&&isArray){error('The `%s` prop supplied to <select> must be a scalar '+'value if `multiple` is false.%s',propName,getDeclarationErrorAddendum());}}}}", "function checkSelectPropTypes(props){ReactControlledValuePropTypes.checkPropTypes('select',props);for(var i=0;i<valuePropNames.length;i++){var propName=valuePropNames[i];if(props[propName]==null){continue;}var isArray=Array.isArray(props[propName]);if(props.multiple&&!isArray){warning$1(false,'The `%s` prop supplied to <select> must be an array if '+'`multiple` is true.%s',propName,getDeclarationErrorAddendum());}else if(!props.multiple&&isArray){warning$1(false,'The `%s` prop supplied to <select> must be a scalar '+'value if `multiple` is false.%s',propName,getDeclarationErrorAddendum());}}}", "function checkSelectPropTypes(props){ReactControlledValuePropTypes.checkPropTypes('select',props);for(var i=0;i<valuePropNames.length;i++){var propName=valuePropNames[i];if(props[propName]==null){continue;}var isArray=Array.isArray(props[propName]);if(props.multiple&&!isArray){warning$1(false,'The `%s` prop supplied to <select> must be an array if '+'`multiple` is true.%s',propName,getDeclarationErrorAddendum());}else if(!props.multiple&&isArray){warning$1(false,'The `%s` prop supplied to <select> must be a scalar '+'value if `multiple` is false.%s',propName,getDeclarationErrorAddendum());}}}", "constructor(value, selected) {\r\n this.value = value;\r\n this.selected = selected;\r\n }", "function checkSelectPropTypes(props){ReactControlledValuePropTypes.checkPropTypes('select',props,getCurrentFiberStackAddendum$3);for(var i=0;i<valuePropNames.length;i++){var propName=valuePropNames[i];if(props[propName]==null){continue;}var isArray=Array.isArray(props[propName]);if(props.multiple&&!isArray){warning(false,'The `%s` prop supplied to <select> must be an array if '+'`multiple` is true.%s',propName,getDeclarationErrorAddendum());}else if(!props.multiple&&isArray){warning(false,'The `%s` prop supplied to <select> must be a scalar '+'value if `multiple` is false.%s',propName,getDeclarationErrorAddendum());}}}", "function checkSelectPropTypes(props){ReactControlledValuePropTypes.checkPropTypes('select',props,getCurrentFiberStackAddendum$3);for(var i=0;i<valuePropNames.length;i++){var propName=valuePropNames[i];if(props[propName]==null){continue;}var isArray=Array.isArray(props[propName]);if(props.multiple&&!isArray){warning(false,'The `%s` prop supplied to <select> must be an array if '+'`multiple` is true.%s',propName,getDeclarationErrorAddendum());}else if(!props.multiple&&isArray){warning(false,'The `%s` prop supplied to <select> must be a scalar '+'value if `multiple` is false.%s',propName,getDeclarationErrorAddendum());}}}", "function checkSelectPropTypes(props){ReactControlledValuePropTypes.checkPropTypes('select',props,getCurrentFiberStackAddendum$4);for(var i=0;i<valuePropNames.length;i++){var propName=valuePropNames[i];if(props[propName]==null){continue;}var isArray=Array.isArray(props[propName]);if(props.multiple&&!isArray){warning(false,'The `%s` prop supplied to <select> must be an array if '+'`multiple` is true.%s',propName,getDeclarationErrorAddendum());}else if(!props.multiple&&isArray){warning(false,'The `%s` prop supplied to <select> must be a scalar '+'value if `multiple` is false.%s',propName,getDeclarationErrorAddendum());}}}", "function checkSelectPropTypes(props){ReactControlledValuePropTypes.checkPropTypes('select',props,getCurrentFiberStackAddendum$4);for(var i=0;i<valuePropNames.length;i++){var propName=valuePropNames[i];if(props[propName]==null){continue;}var isArray=Array.isArray(props[propName]);if(props.multiple&&!isArray){warning(false,'The `%s` prop supplied to <select> must be an array if '+'`multiple` is true.%s',propName,getDeclarationErrorAddendum());}else if(!props.multiple&&isArray){warning(false,'The `%s` prop supplied to <select> must be a scalar '+'value if `multiple` is false.%s',propName,getDeclarationErrorAddendum());}}}", "function checkSelectPropTypes(props){ReactControlledValuePropTypes.checkPropTypes('select',props,getCurrentFiberStackAddendum$4);for(var i=0;i<valuePropNames.length;i++){var propName=valuePropNames[i];if(props[propName]==null){continue;}var isArray=Array.isArray(props[propName]);if(props.multiple&&!isArray){warning(false,'The `%s` prop supplied to <select> must be an array if '+'`multiple` is true.%s',propName,getDeclarationErrorAddendum());}else if(!props.multiple&&isArray){warning(false,'The `%s` prop supplied to <select> must be a scalar '+'value if `multiple` is false.%s',propName,getDeclarationErrorAddendum());}}}", "setOptions(prop, value) {\n\t\t\t\tset({ options: true, prop }, value);\n\t\t\t}", "function checkSelectPropTypes(props){{checkControlledValueProps('select',props);for(var i=0;i<valuePropNames.length;i++){var propName=valuePropNames[i];if(props[propName]==null){continue;}var isArray=Array.isArray(props[propName]);if(props.multiple&&!isArray){error('The `%s` prop supplied to <select> must be an array if '+'`multiple` is true.%s',propName,getDeclarationErrorAddendum());}else if(!props.multiple&&isArray){error('The `%s` prop supplied to <select> must be a scalar '+'value if `multiple` is false.%s',propName,getDeclarationErrorAddendum());}}}}", "function checkSelectPropTypes(props){{checkControlledValueProps('select',props);for(var i=0;i<valuePropNames.length;i++){var propName=valuePropNames[i];if(props[propName]==null){continue;}var isArray=Array.isArray(props[propName]);if(props.multiple&&!isArray){error('The `%s` prop supplied to <select> must be an array if '+'`multiple` is true.%s',propName,getDeclarationErrorAddendum());}else if(!props.multiple&&isArray){error('The `%s` prop supplied to <select> must be a scalar '+'value if `multiple` is false.%s',propName,getDeclarationErrorAddendum());}}}}", "function checkSelectPropTypes(inst, props) {\n\t var owner = inst._currentElement._owner;\n\t LinkedValueUtils.checkPropTypes('select', props, owner);\n\t\n\t if (props.valueLink !== undefined && !didWarnValueLink) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n\t didWarnValueLink = true;\n\t }\n\t\n\t for (var i = 0; i < valuePropNames.length; i++) {\n\t var propName = valuePropNames[i];\n\t if (props[propName] == null) {\n\t continue;\n\t }\n\t var isArray = Array.isArray(props[propName]);\n\t if (props.multiple && !isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t } else if (!props.multiple && isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t }\n\t }\n\t}", "function checkSelectPropTypes(inst, props) {\n\t var owner = inst._currentElement._owner;\n\t LinkedValueUtils.checkPropTypes('select', props, owner);\n\t\n\t if (props.valueLink !== undefined && !didWarnValueLink) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n\t didWarnValueLink = true;\n\t }\n\t\n\t for (var i = 0; i < valuePropNames.length; i++) {\n\t var propName = valuePropNames[i];\n\t if (props[propName] == null) {\n\t continue;\n\t }\n\t var isArray = Array.isArray(props[propName]);\n\t if (props.multiple && !isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t } else if (!props.multiple && isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t }\n\t }\n\t}", "function checkSelectPropTypes(inst, props) {\n\t var owner = inst._currentElement._owner;\n\t LinkedValueUtils.checkPropTypes('select', props, owner);\n\t\n\t if (props.valueLink !== undefined && !didWarnValueLink) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n\t didWarnValueLink = true;\n\t }\n\t\n\t for (var i = 0; i < valuePropNames.length; i++) {\n\t var propName = valuePropNames[i];\n\t if (props[propName] == null) {\n\t continue;\n\t }\n\t var isArray = Array.isArray(props[propName]);\n\t if (props.multiple && !isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t } else if (!props.multiple && isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t }\n\t }\n\t}", "function checkSelectPropTypes(inst, props) {\n\t var owner = inst._currentElement._owner;\n\t LinkedValueUtils.checkPropTypes('select', props, owner);\n\t\n\t if (props.valueLink !== undefined && !didWarnValueLink) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n\t didWarnValueLink = true;\n\t }\n\t\n\t for (var i = 0; i < valuePropNames.length; i++) {\n\t var propName = valuePropNames[i];\n\t if (props[propName] == null) {\n\t continue;\n\t }\n\t var isArray = Array.isArray(props[propName]);\n\t if (props.multiple && !isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t } else if (!props.multiple && isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t }\n\t }\n\t}", "function checkSelectPropTypes(inst, props) {\n\t var owner = inst._currentElement._owner;\n\t LinkedValueUtils.checkPropTypes('select', props, owner);\n\t\n\t if (props.valueLink !== undefined && !didWarnValueLink) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n\t didWarnValueLink = true;\n\t }\n\t\n\t for (var i = 0; i < valuePropNames.length; i++) {\n\t var propName = valuePropNames[i];\n\t if (props[propName] == null) {\n\t continue;\n\t }\n\t var isArray = Array.isArray(props[propName]);\n\t if (props.multiple && !isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t } else if (!props.multiple && isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t }\n\t }\n\t}", "function checkSelectPropTypes(inst, props) {\n\t var owner = inst._currentElement._owner;\n\t LinkedValueUtils.checkPropTypes('select', props, owner);\n\t\n\t if (props.valueLink !== undefined && !didWarnValueLink) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n\t didWarnValueLink = true;\n\t }\n\t\n\t for (var i = 0; i < valuePropNames.length; i++) {\n\t var propName = valuePropNames[i];\n\t if (props[propName] == null) {\n\t continue;\n\t }\n\t var isArray = Array.isArray(props[propName]);\n\t if (props.multiple && !isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t } else if (!props.multiple && isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t }\n\t }\n\t}", "function checkSelectPropTypes(inst, props) {\n\t var owner = inst._currentElement._owner;\n\t LinkedValueUtils.checkPropTypes('select', props, owner);\n\t\n\t if (props.valueLink !== undefined && !didWarnValueLink) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n\t didWarnValueLink = true;\n\t }\n\t\n\t for (var i = 0; i < valuePropNames.length; i++) {\n\t var propName = valuePropNames[i];\n\t if (props[propName] == null) {\n\t continue;\n\t }\n\t var isArray = Array.isArray(props[propName]);\n\t if (props.multiple && !isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t } else if (!props.multiple && isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t }\n\t }\n\t}", "function checkSelectPropTypes(inst, props) {\n\t var owner = inst._currentElement._owner;\n\t LinkedValueUtils.checkPropTypes('select', props, owner);\n\t\n\t if (props.valueLink !== undefined && !didWarnValueLink) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n\t didWarnValueLink = true;\n\t }\n\t\n\t for (var i = 0; i < valuePropNames.length; i++) {\n\t var propName = valuePropNames[i];\n\t if (props[propName] == null) {\n\t continue;\n\t }\n\t var isArray = Array.isArray(props[propName]);\n\t if (props.multiple && !isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t } else if (!props.multiple && isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t }\n\t }\n\t}", "function checkSelectPropTypes(inst, props) {\n\t var owner = inst._currentElement._owner;\n\t LinkedValueUtils.checkPropTypes('select', props, owner);\n\t\n\t if (props.valueLink !== undefined && !didWarnValueLink) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n\t didWarnValueLink = true;\n\t }\n\t\n\t for (var i = 0; i < valuePropNames.length; i++) {\n\t var propName = valuePropNames[i];\n\t if (props[propName] == null) {\n\t continue;\n\t }\n\t var isArray = Array.isArray(props[propName]);\n\t if (props.multiple && !isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t } else if (!props.multiple && isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t }\n\t }\n\t}", "function checkSelectPropTypes(inst, props) {\n\t var owner = inst._currentElement._owner;\n\t LinkedValueUtils.checkPropTypes('select', props, owner);\n\t\n\t if (props.valueLink !== undefined && !didWarnValueLink) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n\t didWarnValueLink = true;\n\t }\n\t\n\t for (var i = 0; i < valuePropNames.length; i++) {\n\t var propName = valuePropNames[i];\n\t if (props[propName] == null) {\n\t continue;\n\t }\n\t var isArray = Array.isArray(props[propName]);\n\t if (props.multiple && !isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t } else if (!props.multiple && isArray) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n\t }\n\t }\n\t}", "function valueProp() {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var props = args[0],\n propName = args[1],\n Component = args[2];\n\n\n if ((0, _util.isLabelInValue)(props)) {\n var _err = genArrProps(_propTypes2['default'].shape({\n label: _propTypes2['default'].node,\n value: _propTypes2['default'].string\n })).apply(undefined, args);\n if (_err) {\n return new Error('Invalid prop `' + propName + '` supplied to `' + Component + '`. ' + 'You should use { label: string, value: string } or [{ label: string, value: string }] instead.');\n }\n return null;\n }\n\n var err = genArrProps(_propTypes2['default'].string).apply(undefined, args);\n if (err) {\n return new Error('Invalid prop `' + propName + '` supplied to `' + Component + '`. ' + 'You should use string or [string] instead.');\n }\n return null;\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}", "function checkSelectPropTypes(inst, props) {\n var owner = inst._currentElement._owner;\n LinkedValueUtils.checkPropTypes('select', props, owner);\n\n if (props.valueLink !== undefined && !didWarnValueLink) {\n process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;\n didWarnValueLink = true;\n }\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var isArray = Array.isArray(props[propName]);\n if (props.multiple && !isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n } else if (!props.multiple && isArray) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;\n }\n }\n}" ]
[ "0.6099009", "0.6063872", "0.5824494", "0.5824494", "0.5734369", "0.57118917", "0.570597", "0.570597", "0.570597", "0.570597", "0.570597", "0.5685921", "0.5680946", "0.56419384", "0.563298", "0.563298", "0.563298", "0.563298", "0.563298", "0.563298", "0.563298", "0.563298", "0.563298", "0.563298", "0.563298", "0.563298", "0.563298", "0.563298", "0.563298", "0.55748326", "0.5525029", "0.5525029", "0.5525029", "0.5525029", "0.5525029", "0.5525029", "0.5525029", "0.5512888", "0.5512888", "0.5512888", "0.5512888", "0.5512888", "0.5512888", "0.5512888", "0.5512888", "0.5512888", "0.5512888", "0.5512888", "0.54456574", "0.54456574", "0.54456574", "0.5439342", "0.5439342", "0.5437094", "0.54330206", "0.54330206", "0.5429325", "0.5429325", "0.5429325", "0.5422687", "0.54145956", "0.54145956", "0.53986806", "0.53986806", "0.53986806", "0.53986806", "0.53986806", "0.53986806", "0.53986806", "0.53986806", "0.53986806", "0.53986806", "0.5390838", "0.53863007", "0.53863007", "0.53863007", "0.53863007", "0.53863007", "0.53863007", "0.53863007", "0.53863007", "0.53863007", "0.53863007", "0.53863007", "0.53863007", "0.53863007", "0.53863007", "0.53863007", "0.53863007", "0.53863007", "0.53863007", "0.53863007", "0.53863007", "0.53863007", "0.53863007", "0.53863007", "0.53863007", "0.53863007", "0.53863007", "0.53863007", "0.53863007" ]
0.0
-1
Implements a host component that allows setting `value`, and `defaultValue`. This differs from the traditional DOM API because value is usually set as PCDATA children. If `value` is not supplied (or null/undefined), user actions that affect the value will trigger updates to the element. If `value` is supplied (and not null/undefined), the rendered element will not trigger updates to the element. Instead, the `value` prop must change in order for the rendered element to be updated. The rendered element will be initialized with an empty value, the prop `defaultValue` if specified, or the children content (deprecated).
function getHostProps$3(element, props) { var node = element; if (!(props.dangerouslySetInnerHTML == null)) { { throw Error( "`dangerouslySetInnerHTML` does not make sense on <textarea>." ); } } // Always set children to the same thing. In IE9, the selection range will // get reset if `textContent` is mutated. We could add a check in setTextContent // to only set the value if/when the value differs from the node value (which would // completely solve this IE9 bug), but Sebastian+Sophie seemed to like this // solution. The value can be a boolean or object so that's why it's forced // to be a string. var hostProps = _assign({}, props, { value: undefined, defaultValue: undefined, children: toString(node._wrapperState.initialValue) }); return hostProps; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set value(val) {\n if (this.#el) this.#el.value = val;\n else this.#value = val;\n }", "setValue(value){\n const thisWidget = this;\n const newValue = thisWidget.parseValue(value);\n \n /* TODO: Add validation */\n if(newValue !=thisWidget.value && thisWidget.isValid(newValue)){\n thisWidget.value = newValue;\n thisWidget.announce();\n }\n thisWidget.renderValue();\n }", "writeValue(value) {\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "writeValue(value) {\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "writeValue(value) {\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "writeValue(value) {\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "writeValue(value) {\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "writeValue(value) {\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "writeValue(value) {\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "setValue(value) {\n ReactDOM.findDOMNode(this).value = value;\n }", "setValue(value, {update=true} = {}) {\n let numpad = this.numpad.querySelector('.value')\n if (numpad) numpad.setAttribute('text', {value})\n this.el.setAttribute('text', {value})\n this.inputField.value = value\n if (update && this.data.target)\n {\n this.data.target.setAttribute(this.data.component, {[this.data.property]: value})\n }\n }", "function setDefaultValue(node, type, value) {\n if (type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) node.defaultValue = toString(node._wrapperState.initialValue);\n else if (node.defaultValue !== toString(value)) node.defaultValue = toString(value);\n }\n }", "writeValue(value) {\n // The value needs to be normalized for IE9, otherwise it is set to 'null' when null\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "writeValue(value) {\n // The value needs to be normalized for IE9, otherwise it is set to 'null' when null\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "writeValue(value) {\n // The value needs to be normalized for IE9, otherwise it is set to 'null' when null\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "writeValue(value) {\n // The value needs to be normalized for IE9, otherwise it is set to 'null' when null\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "writeValue(value) {\n // The value needs to be normalized for IE9, otherwise it is set to 'null' when null\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "writeValue(value) {\n // The value needs to be normalized for IE9, otherwise it is set to 'null' when null\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "writeValue(value) {\n // The value needs to be normalized for IE9, otherwise it is set to 'null' when null\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "constructor(value, parentNode = null){\n this.children = [];\n this.value = value;\n this.parent = parentNode;\n }", "function patchDOMProp(el, key, value, // the following args are passed only due to potential innerHTML/textContent\n// overriding existing VNodes, in which case the old tree must be properly\n// unmounted.\nprevChildren, parentComponent, parentSuspense, unmountChildren) {\n if (key === 'innerHTML' || key === 'textContent') {\n if (prevChildren) unmountChildren(prevChildren, parentComponent, parentSuspense);\n el[key] = value == null ? '' : value;\n return;\n }\n if (key === 'value' && el.tagName !== 'PROGRESS' && // custom elements may use _value internally\n !el.tagName.includes('-')) {\n // store value as _value as well since\n // non-string values will be stringified.\n el._value = value;\n const newValue = value == null ? '' : value;\n if (el.value !== newValue || // #4956: always set for OPTION elements because its value falls back to\n // textContent if no value attribute is present. And setting .value for\n // OPTION has no side effect\n el.tagName === 'OPTION') el.value = newValue;\n if (value == null) el.removeAttribute(key);\n return;\n }\n if (value === '' || value == null) {\n const type = typeof el[key];\n if (type === 'boolean') {\n // e.g. <select multiple> compiles to { multiple: '' }\n el[key] = _shared.includeBooleanAttr(value);\n return;\n } else if (value == null && type === 'string') {\n // e.g. <div :id=\"null\">\n el[key] = '';\n el.removeAttribute(key);\n return;\n } else if (type === 'number') {\n // e.g. <img :width=\"null\">\n // the value of some IDL attr must be greater than 0, e.g. input.size = 0 -> error\n try {\n el[key] = 0;\n } catch (_a) {\n }\n el.removeAttribute(key);\n return;\n }\n }\n // some properties perform value validation and throw\n try {\n el[key] = value;\n } catch (e) {\n _runtimeCore.warn(`Failed setting prop \"${key}\" on <${el.tagName.toLowerCase()}>: ` + `value ${value} is invalid.`, e);\n }\n}", "function patchDOMProp(el, key, value, \n // the following args are passed only due to potential innerHTML/textContent\n // overriding existing VNodes, in which case the old tree must be properly\n // unmounted.\n prevChildren, parentComponent, parentSuspense, unmountChildren) {\n if (key === 'innerHTML' || key === 'textContent') {\n if (prevChildren) {\n unmountChildren(prevChildren, parentComponent, parentSuspense);\n }\n el[key] = value == null ? '' : value;\n return;\n }\n if (key === 'value' && el.tagName !== 'PROGRESS') {\n // store value as _value as well since\n // non-string values will be stringified.\n el._value = value;\n var newValue = value == null ? '' : value;\n if (el.value !== newValue) {\n el.value = newValue;\n }\n return;\n }\n if (value === '' && typeof el[key] === 'boolean') {\n // e.g. <select multiple> compiles to { multiple: '' }\n el[key] = true;\n }\n else if (value == null && typeof el[key] === 'string') {\n // e.g. <div :id=\"null\">\n el[key] = '';\n el.removeAttribute(key);\n }\n else {\n // some properties perform value validation and throw\n try {\n el[key] = value;\n }\n catch (e) {\n if ((true)) {\n warn(\"Failed setting prop \\\"\" + key + \"\\\" on <\" + (el.tagName.toLowerCase()) + \">: \" +\n \"value \" + value + \" is invalid.\", e);\n }\n }\n }\n }", "function patchDOMProp(el, key, value, \n // the following args are passed only due to potential innerHTML/textContent\n // overriding existing VNodes, in which case the old tree must be properly\n // unmounted.\n prevChildren, parentComponent, parentSuspense, unmountChildren) {\n if (key === 'innerHTML' || key === 'textContent') {\n if (prevChildren) {\n unmountChildren(prevChildren, parentComponent, parentSuspense);\n }\n el[key] = value == null ? '' : value;\n return;\n }\n if (key === 'value' && el.tagName !== 'PROGRESS') {\n // store value as _value as well since\n // non-string values will be stringified.\n el._value = value;\n var newValue = value == null ? '' : value;\n if (el.value !== newValue) {\n el.value = newValue;\n }\n return;\n }\n if (value === '' && typeof el[key] === 'boolean') {\n // e.g. <select multiple> compiles to { multiple: '' }\n el[key] = true;\n }\n else if (value == null && typeof el[key] === 'string') {\n // e.g. <div :id=\"null\">\n el[key] = '';\n el.removeAttribute(key);\n }\n else {\n // some properties perform value validation and throw\n try {\n el[key] = value;\n }\n catch (e) {\n if ((true)) {\n warn(\"Failed setting prop \\\"\" + key + \"\\\" on <\" + (el.tagName.toLowerCase()) + \">: \" +\n \"value \" + value + \" is invalid.\", e);\n }\n }\n }\n }", "setValue(value) {\n //this.findDOMNode(this).value = value;\n }", "set value(value){\n const thisWidget = this;\n const newValue = thisWidget.parseValue(value);\n \n //add validation\n if (newValue != thisWidget.correctValue && thisWidget.isValid(newValue)) {\n thisWidget.correctValue = newValue;\n thisWidget.announce();\n } \n thisWidget.renderValue();\n }", "writeValue(value) {\n // The value needs to be normalized for IE9, otherwise it is set to 'null' when null\n const normalizedValue = value == null ? '' : value;\n this.setProperty('value', normalizedValue);\n }", "function patchDOMProp(el, key, value, \r\n// the following args are passed only due to potential innerHTML/textContent\r\n// overriding existing VNodes, in which case the old tree must be properly\r\n// unmounted.\r\nprevChildren, parentComponent, parentSuspense, unmountChildren) {\r\n if (key === 'innerHTML' || key === 'textContent') {\r\n if (prevChildren) {\r\n unmountChildren(prevChildren, parentComponent, parentSuspense);\r\n }\r\n el[key] = value == null ? '' : value;\r\n return;\r\n }\r\n if (key === 'value' && el.tagName !== 'PROGRESS') {\r\n // store value as _value as well since\r\n // non-string values will be stringified.\r\n el._value = value;\r\n el.value = value == null ? '' : value;\r\n return;\r\n }\r\n if (value === '' && typeof el[key] === 'boolean') {\r\n // e.g. <select multiple> compiles to { multiple: '' }\r\n el[key] = true;\r\n }\r\n else if (value == null && typeof el[key] === 'string') {\r\n // e.g. <div :id=\"null\">\r\n el[key] = '';\r\n }\r\n else {\r\n // some properties perform value validation and throw\r\n try {\r\n el[key] = value;\r\n }\r\n catch (e) {\r\n {\r\n warn(`Failed setting prop \"${key}\" on <${el.tagName.toLowerCase()}>: ` +\r\n `value ${value} is invalid.`, e);\r\n }\r\n }\r\n }\r\n}", "constructor(defaultValue) {\n\t\tsuper(); \n\t\tthis.defaultValue = defaultValue;\n\t}", "writeValue(value) {\n const normalizedValue = value == null ? '' : value;\n this.setProperty('value', normalizedValue);\n }", "function value(val) { return control_1.default(val); }", "setValue(value) {\n this.value = value;\n }", "setValue(value, options = {}) {\n return super.setValue(value, options);\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "initialValueChanged(previous, next) {\n // If the value is clean and the component is connected to the DOM\n // then set value equal to the attribute value.\n if (!this.dirtyValue) {\n this.value = this.initialValue;\n this.dirtyValue = false;\n }\n }", "function setValue( value ) {\n\n\t\t\t_state = _stateEnum[ \"entry\" ];\n\t\t\t_widget[ \"content\" ][ \"impl\" ].className = \"entry\";\n\t\t\t_widget[ \"content\" ][ \"impl\" ].value = value;\n\n\t\t\tif ( ! isValid() ) {\n\n\t\t\t\t_widget[ \"content\" ][ \"impl\" ].className = \"invalid\";\n\t\t\t}\n\n\t\t\treturn _that;\t\n\t\t}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' ||\n node.ownerDocument.activeElement !== node\n ) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if (// Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "refreshValue() {\n if (this.isObject(this.markupElemIds) && this.isNumber(this.markupElemIds.value)) {\n const _value = this.isString(this.value) ?\n this.value : JSON.stringify(this.value);\n this.setMarkupOfPart('value', _value);\n }\n return this;\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "onInputValueChange() {\n assert && assert( this.node.inputValue !== undefined, 'use null to remove input value attribute' );\n\n if ( this.node.inputValue === null ) {\n this.removeAttributeFromElement( 'value' );\n }\n else {\n\n // type conversion for DOM spec\n const valueString = `${this.node.inputValue}`;\n this.setAttributeToElement( 'value', valueString, { asProperty: true } );\n }\n }", "set value(_value) {\n this.setValue(_value);\n }", "set value(value) {}", "function patchDOMProp(el, key, value, \r\n// the following args are passed only due to potential innerHTML/textContent\r\n// overriding existing VNodes, in which case the old tree must be properly\r\n// unmounted.\r\nprevChildren, parentComponent, parentSuspense, unmountChildren) {\r\n if (key === 'innerHTML' || key === 'textContent') {\r\n if (prevChildren) {\r\n unmountChildren(prevChildren, parentComponent, parentSuspense);\r\n }\r\n el[key] = value == null ? '' : value;\r\n return;\r\n }\r\n if (key === 'value' && el.tagName !== 'PROGRESS') {\r\n // store value as _value as well since\r\n // non-string values will be stringified.\r\n el._value = value;\r\n const newValue = value == null ? '' : value;\r\n if (el.value !== newValue) {\r\n el.value = newValue;\r\n }\r\n return;\r\n }\r\n if (value === '' || value == null) {\r\n const type = typeof el[key];\r\n if (value === '' && type === 'boolean') {\r\n // e.g. <select multiple> compiles to { multiple: '' }\r\n el[key] = true;\r\n return;\r\n }\r\n else if (value == null && type === 'string') {\r\n // e.g. <div :id=\"null\">\r\n el[key] = '';\r\n el.removeAttribute(key);\r\n return;\r\n }\r\n else if (type === 'number') {\r\n // e.g. <img :width=\"null\">\r\n el[key] = 0;\r\n el.removeAttribute(key);\r\n return;\r\n }\r\n }\r\n // some properties perform value validation and throw\r\n try {\r\n el[key] = value;\r\n }\r\n catch (e) {\r\n if ((true)) {\r\n (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`Failed setting prop \"${key}\" on <${el.tagName.toLowerCase()}>: ` +\r\n `value ${value} is invalid.`, e);\r\n }\r\n }\r\n}", "function patchDOMProp(el, key, value, \n// the following args are passed only due to potential innerHTML/textContent\n// overriding existing VNodes, in which case the old tree must be properly\n// unmounted.\nprevChildren, parentComponent, parentSuspense, unmountChildren) {\n if (key === 'innerHTML' || key === 'textContent') {\n if (prevChildren) {\n unmountChildren(prevChildren, parentComponent, parentSuspense);\n }\n el[key] = value == null ? '' : value;\n return;\n }\n if (key === 'value' && el.tagName !== 'PROGRESS') {\n // store value as _value as well since\n // non-string values will be stringified.\n el._value = value;\n const newValue = value == null ? '' : value;\n if (el.value !== newValue) {\n el.value = newValue;\n }\n return;\n }\n if (value === '' || value == null) {\n const type = typeof el[key];\n if (value === '' && type === 'boolean') {\n // e.g. <select multiple> compiles to { multiple: '' }\n el[key] = true;\n return;\n }\n else if (value == null && type === 'string') {\n // e.g. <div :id=\"null\">\n el[key] = '';\n el.removeAttribute(key);\n return;\n }\n else if (type === 'number') {\n // e.g. <img :width=\"null\">\n el[key] = 0;\n el.removeAttribute(key);\n return;\n }\n }\n // some properties perform value validation and throw\n try {\n el[key] = value;\n }\n catch (e) {\n if ((true)) {\n (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`Failed setting prop \"${key}\" on <${el.tagName.toLowerCase()}>: ` +\n `value ${value} is invalid.`, e);\n }\n }\n}", "function updateElementValue(element,attr,value){// Support: IE9 only\n// In IE9 values are converted to string (e.g. `input.value = null` results in `input.value === 'null'`).\nvar propValue=isDefined(value)?value:msie===9?'':null;element.prop('value',propValue);attr.$set('value',value);}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n }", "set _textWhenEmpty(aValue) {\n if (this._emptyTextNode) {\n this._emptyTextNode.setAttribute(\"value\", aValue);\n }\n this._emptyTextValue = aValue;\n this._showEmptyText();\n }", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n }\n else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n }", "set value(val) {\n const input = this.refs.myInput\n input.value = val\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "renderValue(){\n const thisWidget = this;\n \n thisWidget.dom.wrapper.innerHTML = thisWidget.correctvalue;\n }", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n}", "function patchDOMProp(el, key, value, \n// the following args are passed only due to potential innerHTML/textContent\n// overriding existing VNodes, in which case the old tree must be properly\n// unmounted.\nprevChildren, parentComponent, parentSuspense, unmountChildren) {\n if (key === 'innerHTML' || key === 'textContent') {\n if (prevChildren) {\n unmountChildren(prevChildren, parentComponent, parentSuspense);\n }\n el[key] = value == null ? '' : value;\n return;\n }\n if (key === 'value' && el.tagName !== 'PROGRESS') {\n // store value as _value as well since\n // non-string values will be stringified.\n el._value = value;\n const newValue = value == null ? '' : value;\n if (el.value !== newValue) {\n el.value = newValue;\n }\n if (value == null) {\n el.removeAttribute(key);\n }\n return;\n }\n if (value === '' || value == null) {\n const type = typeof el[key];\n if (value === '' && type === 'boolean') {\n // e.g. <select multiple> compiles to { multiple: '' }\n el[key] = true;\n return;\n }\n else if (value == null && type === 'string') {\n // e.g. <div :id=\"null\">\n el[key] = '';\n el.removeAttribute(key);\n return;\n }\n else if (type === 'number') {\n // e.g. <img :width=\"null\">\n // the value of some IDL attr must be greater than 0, e.g. input.size = 0 -> error\n try {\n el[key] = 0;\n }\n catch (_a) { }\n el.removeAttribute(key);\n return;\n }\n }\n // some properties perform value validation and throw\n try {\n el[key] = value;\n }\n catch (e) {\n if ((true)) {\n (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`Failed setting prop \"${key}\" on <${el.tagName.toLowerCase()}>: ` +\n `value ${value} is invalid.`, e);\n }\n }\n}", "function ConstantInputWidget(value) {\n\tWidget.apply(this);\n\tthis.behaviors.value = constant_b(value);\n\tthis.behaviors.inputElems = [];\n\tthis.dom = SPAN();\n}", "function patchDOMProp(el, key, value, \n// the following args are passed only due to potential innerHTML/textContent\n// overriding existing VNodes, in which case the old tree must be properly\n// unmounted.\nprevChildren, parentComponent, parentSuspense, unmountChildren) {\n if (key === 'innerHTML' || key === 'textContent') {\n if (prevChildren) {\n unmountChildren(prevChildren, parentComponent, parentSuspense);\n }\n el[key] = value == null ? '' : value;\n return;\n }\n if (key === 'value' &&\n el.tagName !== 'PROGRESS' &&\n // custom elements may use _value internally\n !el.tagName.includes('-')) {\n // store value as _value as well since\n // non-string values will be stringified.\n el._value = value;\n const newValue = value == null ? '' : value;\n if (el.value !== newValue ||\n // #4956: always set for OPTION elements because its value falls back to\n // textContent if no value attribute is present. And setting .value for\n // OPTION has no side effect\n el.tagName === 'OPTION') {\n el.value = newValue;\n }\n if (value == null) {\n el.removeAttribute(key);\n }\n return;\n }\n let needRemove = false;\n if (value === '' || value == null) {\n const type = typeof el[key];\n if (type === 'boolean') {\n // e.g. <select multiple> compiles to { multiple: '' }\n value = includeBooleanAttr(value);\n }\n else if (value == null && type === 'string') {\n // e.g. <div :id=\"null\">\n value = '';\n needRemove = true;\n }\n else if (type === 'number') {\n // e.g. <img :width=\"null\">\n value = 0;\n needRemove = true;\n }\n }\n // some properties perform value validation and throw,\n // some properties has getter, no setter, will error in 'use strict'\n // eg. <select :type=\"null\"></select> <select :willValidate=\"null\"></select>\n try {\n el[key] = value;\n }\n catch (e) {\n }\n needRemove && el.removeAttribute(key);\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}" ]
[ "0.64184606", "0.59918016", "0.59759474", "0.59759474", "0.59759474", "0.59759474", "0.59759474", "0.59759474", "0.59759474", "0.5951113", "0.5926322", "0.5898258", "0.5878531", "0.5878531", "0.5878531", "0.5878531", "0.5878531", "0.5878531", "0.5878531", "0.58231217", "0.57654357", "0.567768", "0.567768", "0.5669946", "0.5617581", "0.5610032", "0.559872", "0.5594031", "0.5593625", "0.5591625", "0.5577961", "0.5576611", "0.55610985", "0.55610985", "0.55610985", "0.55610985", "0.55477214", "0.5540735", "0.55395436", "0.55349004", "0.55278295", "0.55195403", "0.55195403", "0.55195403", "0.55195403", "0.55195403", "0.55195403", "0.55195403", "0.55195403", "0.55195403", "0.55195403", "0.55195403", "0.55195403", "0.55195403", "0.55195403", "0.55195403", "0.5518779", "0.55067176", "0.55036885", "0.5502874", "0.54717046", "0.5457906", "0.5451311", "0.54467005", "0.543599", "0.54303104", "0.54301405", "0.54301405", "0.54301405", "0.54301405", "0.54301405", "0.54301405", "0.54301405", "0.54301405", "0.54301405", "0.5420679", "0.5416805", "0.5416805", "0.5416805", "0.5416805", "0.5416805", "0.5416805", "0.5416805", "0.5416805", "0.5416805", "0.5416805", "0.5416805", "0.5416805", "0.5416805", "0.5416805", "0.5416805", "0.5416805", "0.5416805", "0.5416805", "0.5416805", "0.5416805", "0.54158837", "0.5414063", "0.5410242", "0.54043967", "0.54043967" ]
0.0
-1
Assumes there is no parent namespace.
function getIntrinsicNamespace(type) { switch (type) { case 'svg': return SVG_NAMESPACE; case 'math': return MATH_NAMESPACE; default: return HTML_NAMESPACE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getParentObject(){\r\n var obj = parent;\r\n if (namespace !== \"\") {\r\n for (var i = 0, ii = namespace.split(\".\"); i < ii.length; i++) {\r\n obj = obj[ii[i]];\r\n }\r\n }\r\n return obj.easyXDM;\r\n}", "function namespaceHTMLInternal() {\n instructionState.lFrame.currentNamespace = null;\n}", "function namespaceHTMLInternal() {\n instructionState.lFrame.currentNamespace = null;\n}", "function namespaceHTMLInternal() {\n instructionState.lFrame.currentNamespace = null;\n}", "function namespaceHTMLInternal() {\n instructionState.lFrame.currentNamespace = null;\n}", "function namespaceHTMLInternal() {\n instructionState.lFrame.currentNamespace = null;\n}", "function namespaceHTMLInternal() {\n instructionState.lFrame.currentNamespace = null;\n}", "function namespaceHTMLInternal() {\n instructionState.lFrame.currentNamespace = null;\n}", "function getParentObject(){\n var obj = parent;\n if (namespace !== \"\") {\n for (var i = 0, ii = namespace.split(\".\"); i < ii.length; i++) {\n obj = obj[ii[i]];\n }\n }\n return obj.easyXDM;\n }", "function NamespaceContext(){\n this.ns = null; //full namespace string e.g. www.bond.co.uk/jsocs/something\n this.type_ = {}; //e.g. type_[mytype] types referenceable by rulesets in this or parent context\n //this.rootRuleSet = null; //tree of RuleSets NOT USED?\n this.ns_ = {}; //e.g. ns_[prefix] = {other ns context} other namespace rules this context references\n}", "function SVGParent() {}", "function exitNamespace() {\n namespaceStack.shift();\n return fw.utils.currentNamespace();\n}", "function ParentWithStatic() { }", "static isNamespace(structure) {\r\n return structure.kind === StructureKind_1.StructureKind.Namespace;\r\n }", "get namespace() {\r var def = Utils.calculateHash(this.file).slice(0, 10);\r return this.meta.getOrSet('namespace', def);\r }", "function namespaceHTMLInternal() {\n instructionState.lFrame.currentNamespace = null;\n }", "function ensureNamespace(namespace){\n var current = exports;\n namespace.split('.').forEach(function(name){\n if(typeof current[name] === 'undefined'){\n current[name] = {};\n }\n current = current[name];\n });\n }", "isAtRootLevel() {\n return this.namespaceAndFunctionDepth === 0;\n }", "function namespace(ns) {\n 'use strict';\n \n if (namespaces.indexOf(ns) === -1) {\n var segments = ns.split(\".\").reverse(),\n /*\n Inner recursive function to add a new object if not defined\n */\n createSegment = function (segments, currentSegment) {\n if (segments.length === 0) {\n return;\n }\n var segment = segments.pop();\n // prevent overwriting of existing segment\n if(currentSegment[segment] === undefined) {\n currentSegment[segment] = {};\n }\n createSegment(segments, currentSegment[segment]);\n };\n namespaces.push(ns);\n createSegment(segments, window);\n }\n}", "function isNamespace(thing) {\n return isObject(thing) && !!thing.__isNamespace;\n}", "parentFunction(){\n return \"This is coming from the parent!\";\n }", "function Namespace(inheritedNamespace) { \n function Namespace() {}; \n Namespace.prototype = inheritedNamespace; \n return new Namespace(); \n}", "function Namespaces() {\n this.nsByPfx = new Object();\n this.pfxByNs = new Object();\n this.index = 0;\n}", "static GetParentBone() {}", "function enterNamespaceName(namespaceName) {\n namespaceStack.unshift( namespaceName );\n return fw.namespace( fw.utils.currentNamespaceName() );\n}", "GetComponentsInParent() {}", "GetComponentsInParent() {}", "GetComponentsInParent() {}", "GetComponentsInParent() {}", "constructor() {\n super(NameSpace);\n }", "function TestRoot() {}", "namespace(source, importAs, importFrom) {\n return ensureNamespaceImportPresent(source.getSourceFile(), importAs, importFrom, statementToAdd => source.addStatement(statementToAdd, true));\n }", "getParent(){return this.__parent}", "isRoot () {\r\n return this.parent === null\r\n }", "function hasNamespace(node) {\n const specifiers = node.specifiers.\n filter(specifier => specifier.type === 'ImportNamespaceSpecifier');\n return specifiers.length > 0;\n}", "getBaseNamespace(text) {\n const parts = text.split('.');\n if (parts.length > 1) {\n return parts[0];\n }\n }", "function getNamespace(subtree, path) {\n if (path.length === 1) return subtree\n\n const namespace = path.shift()\n subtree.modules[namespace] = {\n modules: {},\n namespaced: true,\n ...subtree.modules[namespace],\n }\n return getNamespace(subtree.modules[namespace], path)\n}", "function getNamespace(subtree, path) {\n if (path.length === 1) return subtree\n\n const namespace = path.shift()\n subtree.modules[namespace] = {\n modules: {},\n namespaced: true,\n ...subtree.modules[namespace],\n }\n return getNamespace(subtree.modules[namespace], path)\n}", "isRoot() {\nreturn this.parent === null;\n}", "requireParent() {\n return \"SCServer\";\n }", "function namespaceExists(nameSpace, libNodes)\n{\n var ret = false;\n \n for(var i=0; i<libNodes.length; i++)\n {\n if (libNodes[i].name == nameSpace) {\n ret = true;\n }\n }\n return ret;\n}", "function enterNamespace(namespace) {\n namespaceStack.unshift( namespace.getName() );\n return namespace;\n}", "function getNamespace(subtree, path) {\n if (path.length === 1) return subtree\n\n const namespace = path.shift()\n subtree[namespace] = {\n ...subtree[namespace],\n }\n return getNamespace(subtree[namespace], path)\n}", "static get localizeNamespaces() {}", "function interiorNamespace(element) {\n if (element && element.namespaceURI === _domHelperBuildHtmlDom.svgNamespace && !_domHelperBuildHtmlDom.svgHTMLIntegrationPoints[element.tagName]) {\n return _domHelperBuildHtmlDom.svgNamespace;\n } else {\n return null;\n }\n}", "addParent(node, parent) {\n // implement by subclass\n }", "function interiorNamespace(element) {\n if (element && element.namespaceURI === _domHelperBuildHtmlDom.svgNamespace && !_domHelperBuildHtmlDom.svgHTMLIntegrationPoints[element.tagName]) {\n return _domHelperBuildHtmlDom.svgNamespace;\n } else {\n return null;\n }\n }", "function interiorNamespace(element) {\n if (element && element.namespaceURI === _domHelperBuildHtmlDom.svgNamespace && !_domHelperBuildHtmlDom.svgHTMLIntegrationPoints[element.tagName]) {\n return _domHelperBuildHtmlDom.svgNamespace;\n } else {\n return null;\n }\n }", "function Xml_GetNamedAncestor(objNode,strAncestorName,blnEexcludSelf)\r\n{\r\n // Validate recieved arguments.\r\n if(objNode && !Aux_IsNullOrEmpty(strAncestorName))\r\n {\r\n return Xml_SelectSingleNode(\"ancestor\"+(blnEexcludSelf?\"\":\"-or-self\")+\"::\"+strAncestorName+\"[1]\",objNode);\r\n }\r\n \r\n return null;\r\n}", "create_namespace(dotted_name, value) {\n let parent = this;\n let parts = dotted_name.split('.');\n parts.forEach((part, i) => {\n if (parent[part] === undefined) {\n if (i === parts.length - 1 && value !== undefined) {\n parent[part] = value;\n } else {\n parent[part] = {};\n }\n }\n parent = parent[part];\n });\n return parent;\n }", "function getNamespace (namespace) {\n let namespaces = namespace.split(\".\");\n let parent = chrome;\n for (let name of namespaces) {\n parent[name] = parent[name] || createObjectIn(unsafeWindow);\n parent = parent[name];\n }\n return parent;\n}", "function _resyncParent() {\n if (this.parentPath) {\n this.parent = this.parentPath.node;\n }\n}", "function n(t){if(!t)throw new TypeError(\"argument namespace is required\");function e(t){}return e._file=void 0,e._ignored=!0,e._namespace=t,e._traced=!1,e._warned=Object.create(null),e.function=i,e.property=o,e}", "function extend( ns, ns_string ) { \n var parts = ns_string.split('.'), \n parent = ns, \n pl, i; \n if (parts[0] == \"CALC\") { \n parts = parts.slice(1); \n } \n pl = parts.length; \n for (i = 0; i < pl; i++) { \n //create a property if it doesnt exist \n if (typeof parent[parts[i]] == 'undefined') { \n parent[parts[i]] = {}; \n } \n parent = parent[parts[i]]; \n } \n return parent; \n }", "function _getOuterContainerOrSelf(node) {\n\t var view = node.view;\n\t while (_isNgContainer(node.parent, view)) {\n\t node = node.parent;\n\t }\n\t return node;\n\t}", "function initNameSpace() {\r\n getTopStories();\r\n }", "getFirstChild() {}", "get parent () { return this._parent; }", "function hc_nodeparentnode() {\n var success;\n var doc;\n var elementList;\n var employeeNode;\n var parentNode;\n var parentName;\n doc = load(\"hc_staff\");\n elementList = doc.getElementsByTagName(\"p\");\n employeeNode = elementList.item(1);\n parentNode = employeeNode.parentNode;\n\n parentName = parentNode.nodeName;\n\n assertEqualsAutoCase(\"element\", \"parentNodeName\",\"body\",parentName);\n \n}", "setParent(prnt) {\nreturn this.parent = prnt;\n}", "function r(e){if(!e)throw new TypeError(\"argument namespace is required\");function t(e){}return t._file=void 0,t._ignored=!0,t._namespace=e,t._traced=!1,t._warned=Object.create(null),t.function=i,t.property=o,t}", "function r(e){if(!e)throw new TypeError(\"argument namespace is required\");function t(e){}return t._file=void 0,t._ignored=!0,t._namespace=e,t._traced=!1,t._warned=Object.create(null),t.function=i,t.property=o,t}", "get ns() {\n return this._ns;\n }", "function SmalltalkRoot () {\n }", "function getNSLayer(inNode, inName) {\n\n\tvar node, i;\n\n\tnode = inNode[inName];\n\tfor (i = 0; !node && inNode.layers && i < inNode.layers.length; i++) {\n\t\tnode = getNSLayer(inNode.layers[i].document,inName);\n\t}\n\treturn node;\n}", "function namespace__(){this.namespace_=( joo.MemberDeclaration.NAMESPACE_INTERNAL);}", "get parentName () {\n\t\treturn Object.getPrototypeOf(this.constructor).name\n\t}", "function testGetNamespace() {\r\n\tvar testStencilSet = new ORYX.Core.StencilSet.StencilSet(\"TestStencilSet\")\r\n\tvar namespace = testStencilSet.namespace()\r\n\r\n\tassertEquals(\"Check namespace of testStencilSet\", namespace, \"http://b3mn.org/stencilset/testB#\")\r\n}", "function namespaceStart(base, test) {\n if (test.namespace === undefined) {\n return namespace_1.isNamespaceDefault(base) && base.path.startsWith(test.path) || !!base.namespace && base.namespace.startsWith(test.path);\n } else {\n return namespace_1.namesEqual(base, test) && base.path.startsWith(test.path);\n }\n}", "get namespace() {\n return this._namespace\n }", "function _resyncParent() {\n\t if (this.parentPath) {\n\t this.parent = this.parentPath.node;\n\t }\n\t}", "function _resyncParent() {\n\t if (this.parentPath) {\n\t this.parent = this.parentPath.node;\n\t }\n\t}", "getParent() {\nreturn this.parent;\n}", "function checkSubtree() {\n \n}", "GetComponentInParent() {}", "GetComponentInParent() {}", "GetComponentInParent() {}", "GetComponentInParent() {}", "function getFirstParentNative(tNode){var parent=tNode.parent;while(parent&&parent.type===5/* IcuContainer */){parent=parent.parent;}return parent;}", "function isAncestor(instA,instB){!('_nativeNode' in instA)?process.env.NODE_ENV!=='production'?invariant(false,'isAncestor: Invalid argument.'):invariant(false):void 0;!('_nativeNode' in instB)?process.env.NODE_ENV!=='production'?invariant(false,'isAncestor: Invalid argument.'):invariant(false):void 0;while(instB){if(instB===instA){return true;}instB=instB._nativeParent;}return false;}", "function isAncestor(instA,instB){!('_nativeNode' in instA)?process.env.NODE_ENV!=='production'?invariant(false,'isAncestor: Invalid argument.'):invariant(false):void 0;!('_nativeNode' in instB)?process.env.NODE_ENV!=='production'?invariant(false,'isAncestor: Invalid argument.'):invariant(false):void 0;while(instB){if(instB===instA){return true;}instB=instB._nativeParent;}return false;}", "function isHtmlNamespace(node) {\n var ns;\n return typeof node.namespaceURI == UNDEF || ((ns = node.namespaceURI) === null || ns == \"http://www.w3.org/1999/xhtml\");\n }", "function isHtmlNamespace(node) {\n var ns;\n return typeof node.namespaceURI == UNDEF || ((ns = node.namespaceURI) === null || ns == \"http://www.w3.org/1999/xhtml\");\n }", "function isHtmlNamespace(node) {\n var ns;\n return typeof node.namespaceURI == UNDEF || ((ns = node.namespaceURI) === null || ns == \"http://www.w3.org/1999/xhtml\");\n }", "function isHtmlNamespace(node) {\n var ns;\n return typeof node.namespaceURI == UNDEF || ((ns = node.namespaceURI) === null || ns == \"http://www.w3.org/1999/xhtml\");\n }", "function isHtmlNamespace(node) {\n var ns;\n return typeof node.namespaceURI == UNDEF || ((ns = node.namespaceURI) === null || ns == \"http://www.w3.org/1999/xhtml\");\n }", "function isHtmlNamespace(node) {\n var ns;\n return typeof node.namespaceURI == UNDEF || ((ns = node.namespaceURI) === null || ns == \"http://www.w3.org/1999/xhtml\");\n }", "static _getSpaceRoot(){\n return process.cwd(); //path.dirname(module.parent.paths[0])\n }", "constructor () {\n this._isRoot = true;\n }", "function it(e){e.parent=null,ae(e)}", "selectNamespace() {\n //alert(JSON.stringify(this.formData.namespaceParent, null, 4));\n var nameSpaceName = null;\n try {\n nameSpaceName = this.formData.namespaceParent['fqn'];\n this.getPointerAccount(nameSpaceName);\n } catch(err) {};\n \n if (nameSpaceName != null) {\n // clear json msg\n this.transMessage ='';\n // Get transactions\n this.getTransactions(false);\n\n } else { //clean if no namespace is selected\n this.formData.pointerAdd = '';\n this.formData.recipient = '';\n this.formData.recipientPublicKey = '';\n this.ip1 ='';\n this.organization = '';\n this.country = '';\n this.address = '';\n this.phone = '';\n this.email = '';\n this.other = '';\n this.charactersLeft = 1024;\n this.formData.message = '';\n this.transMessage ='';\n }\n }", "initializing() {\n this.getParentProject();\n }", "function parent() {\r\n // name is accessible here\r\n // likes is not accessible here\r\n function child() {\r\n // Innermost level of the scope chain\r\n // name is also accessible here\r\n var likes = 'Coding';\r\n }\r\n }", "function isHtmlNamespace(node) {\r\n var ns;\r\n return typeof node.namespaceURI == UNDEF || ((ns = node.namespaceURI) === null || ns == \"http://www.w3.org/1999/xhtml\");\r\n }", "function isHtmlNamespace(node) {\n var ns;\n return typeof node.namespaceURI == UNDEF || ((ns = node.namespaceURI) === null || ns == \"http://www.w3.org/1999/xhtml\");\n }", "function isHtmlNamespace(node) {\n var ns;\n return typeof node.namespaceURI == UNDEF || ((ns = node.namespaceURI) === null || ns == \"http://www.w3.org/1999/xhtml\");\n }", "function isHtmlNamespace(node) {\n var ns;\n return typeof node.namespaceURI == UNDEF || ((ns = node.namespaceURI) === null || ns == \"http://www.w3.org/1999/xhtml\");\n }", "function isHtmlNamespace(node) {\n var ns;\n return typeof node.namespaceURI == UNDEF || ((ns = node.namespaceURI) === null || ns == \"http://www.w3.org/1999/xhtml\");\n }", "function isHtmlNamespace(node) {\n var ns;\n return typeof node.namespaceURI == UNDEF || ((ns = node.namespaceURI) === null || ns == \"http://www.w3.org/1999/xhtml\");\n }", "function isHtmlNamespace(node) {\n var ns;\n return typeof node.namespaceURI == UNDEF || ((ns = node.namespaceURI) === null || ns == \"http://www.w3.org/1999/xhtml\");\n }", "static getSymbolParent(symbol) {\n return symbol.parent;\n }" ]
[ "0.59294087", "0.5788852", "0.5788852", "0.5788852", "0.5788852", "0.5788852", "0.5788852", "0.57438385", "0.56890935", "0.5673484", "0.56610936", "0.5640146", "0.5580239", "0.544239", "0.5442175", "0.5410278", "0.5397606", "0.53690296", "0.53592485", "0.5327534", "0.532705", "0.53229856", "0.53193605", "0.5313098", "0.5301471", "0.5295859", "0.5295859", "0.5295859", "0.5295859", "0.52877384", "0.52611893", "0.5261078", "0.52534926", "0.5248971", "0.52380115", "0.5237931", "0.52243704", "0.52243704", "0.52125657", "0.52120775", "0.5210552", "0.520527", "0.52020544", "0.5198533", "0.51924735", "0.51919633", "0.5177351", "0.5177351", "0.5165444", "0.5161359", "0.51606065", "0.5149667", "0.5135195", "0.51351124", "0.51234186", "0.51139593", "0.51106435", "0.51094973", "0.51002544", "0.50913143", "0.50814754", "0.50814754", "0.50765157", "0.50761247", "0.50760674", "0.506947", "0.5066843", "0.50630665", "0.5061734", "0.506166", "0.50544775", "0.50544775", "0.5048569", "0.5023388", "0.5022544", "0.5022544", "0.5022544", "0.5022544", "0.50127286", "0.4995106", "0.4995106", "0.4991204", "0.4991204", "0.4991204", "0.4991204", "0.4991204", "0.4991204", "0.4990565", "0.49904794", "0.4982848", "0.4979333", "0.4978937", "0.49788004", "0.4974179", "0.497409", "0.497409", "0.497409", "0.497409", "0.497409", "0.497409", "0.4973739" ]
0.0
-1
Do not use the below two methods directly! Instead use constants exported from DOMTopLevelEventTypes in ReactDOM. (It is the only module that is allowed to access these methods.)
function unsafeCastStringToDOMTopLevelType(topLevelType) { return topLevelType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleTopLevel(topLevelType,targetInst,nativeEvent,nativeEventTarget){var events=extractEvents(topLevelType,targetInst,nativeEvent,nativeEventTarget);runEventQueueInBatch(events);}", "function handleTopLevel(topLevelType,targetInst,nativeEvent,nativeEventTarget){var events=extractEvents(topLevelType,targetInst,nativeEvent,nativeEventTarget);runEventQueueInBatch(events);}", "function handleTopLevel(topLevelType,targetInst,nativeEvent,nativeEventTarget){var events=extractEvents(topLevelType,targetInst,nativeEvent,nativeEventTarget);runEventQueueInBatch(events);}", "function makeNativeSimulator(eventType, topLevelType) {\n return function (domComponentOrNode, nativeEventData) {\n var fakeNativeEvent = new Event(eventType);\n _assign(fakeNativeEvent, nativeEventData);\n if (ReactTestUtils.isDOMComponent(domComponentOrNode)) {\n simulateNativeEventOnDOMComponent(topLevelType, domComponentOrNode, fakeNativeEvent);\n } else if (domComponentOrNode.tagName) {\n // Will allow on actual dom nodes.\n simulateNativeEventOnNode(topLevelType, domComponentOrNode, fakeNativeEvent);\n }\n };\n}", "function extractEvents$2(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget,eventSystemFlags,targetContainer){var isOverEvent=domEventName==='mouseover'||domEventName==='pointerover';var isOutEvent=domEventName==='mouseout'||domEventName==='pointerout';if(isOverEvent&&(eventSystemFlags&IS_REPLAYED)===0){// If this is an over event with a target, we might have already dispatched\n// the event in the out event of the other target. If this is replayed,\n// then it's because we couldn't dispatch against this target previously\n// so we have to do it now instead.\nvar related=nativeEvent.relatedTarget||nativeEvent.fromElement;if(related){// If the related node is managed by React, we can assume that we have\n// already dispatched the corresponding events during its mouseout.\nif(getClosestInstanceFromNode(related)||isContainerMarkedAsRoot(related)){return;}}}if(!isOutEvent&&!isOverEvent){// Must not be a mouse or pointer in or out - ignoring.\nreturn;}var win;// TODO: why is this nullable in the types but we read from it?\nif(nativeEventTarget.window===nativeEventTarget){// `nativeEventTarget` is probably a window object.\nwin=nativeEventTarget;}else{// TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.\nvar doc=nativeEventTarget.ownerDocument;if(doc){win=doc.defaultView||doc.parentWindow;}else{win=window;}}var from;var to;if(isOutEvent){var _related=nativeEvent.relatedTarget||nativeEvent.toElement;from=targetInst;to=_related?getClosestInstanceFromNode(_related):null;if(to!==null){var nearestMounted=getNearestMountedFiber(to);if(to!==nearestMounted||to.tag!==HostComponent&&to.tag!==HostText){to=null;}}}else{// Moving to a node from outside the window.\nfrom=null;to=targetInst;}if(from===to){// Nothing pertains to our managed components.\nreturn;}var SyntheticEventCtor=SyntheticMouseEvent;var leaveEventType='onMouseLeave';var enterEventType='onMouseEnter';var eventTypePrefix='mouse';if(domEventName==='pointerout'||domEventName==='pointerover'){SyntheticEventCtor=SyntheticPointerEvent;leaveEventType='onPointerLeave';enterEventType='onPointerEnter';eventTypePrefix='pointer';}var fromNode=from==null?win:getNodeFromInstance(from);var toNode=to==null?win:getNodeFromInstance(to);var leave=new SyntheticEventCtor(leaveEventType,eventTypePrefix+'leave',from,nativeEvent,nativeEventTarget);leave.target=fromNode;leave.relatedTarget=toNode;var enter=null;// We should only process this nativeEvent if we are processing\n// the first ancestor. Next time, we will ignore the event.\nvar nativeTargetInst=getClosestInstanceFromNode(nativeEventTarget);if(nativeTargetInst===targetInst){var enterEvent=new SyntheticEventCtor(enterEventType,eventTypePrefix+'enter',to,nativeEvent,nativeEventTarget);enterEvent.target=toNode;enterEvent.relatedTarget=fromNode;enter=enterEvent;}accumulateEnterLeaveTwoPhaseListeners(dispatchQueue,leave,enter,from,to);}", "function makeNativeSimulator(eventType, topLevelType) {\n return function (domComponentOrNode, nativeEventData) {\n var fakeNativeEvent = new Event(eventType);\n\n _assign(fakeNativeEvent, nativeEventData);\n\n if (ReactTestUtils.isDOMComponent(domComponentOrNode)) {\n simulateNativeEventOnDOMComponent(topLevelType, domComponentOrNode, fakeNativeEvent);\n } else if (domComponentOrNode.tagName) {\n // Will allow on actual dom nodes.\n simulateNativeEventOnNode(topLevelType, domComponentOrNode, fakeNativeEvent);\n }\n };\n}", "function extractEvents$2(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget,eventSystemFlags,targetContainer){var isOverEvent=domEventName==='mouseover'||domEventName==='pointerover';var isOutEvent=domEventName==='mouseout'||domEventName==='pointerout';if(isOverEvent&&(eventSystemFlags&IS_REPLAYED)===0){// If this is an over event with a target, we might have already dispatched\n// the event in the out event of the other target. If this is replayed,\n// then it's because we couldn't dispatch against this target previously\n// so we have to do it now instead.\nvar related=nativeEvent.relatedTarget||nativeEvent.fromElement;if(related){// If the related node is managed by React, we can assume that we have\n// already dispatched the corresponding events during its mouseout.\nif(getClosestInstanceFromNode(related)||isContainerMarkedAsRoot(related)){return;}}}if(!isOutEvent&&!isOverEvent){// Must not be a mouse or pointer in or out - ignoring.\nreturn;}var win;// TODO: why is this nullable in the types but we read from it?\nif(nativeEventTarget.window===nativeEventTarget){// `nativeEventTarget` is probably a window object.\nwin=nativeEventTarget;}else {// TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.\nvar doc=nativeEventTarget.ownerDocument;if(doc){win=doc.defaultView||doc.parentWindow;}else {win=window;}}var from;var to;if(isOutEvent){var _related=nativeEvent.relatedTarget||nativeEvent.toElement;from=targetInst;to=_related?getClosestInstanceFromNode(_related):null;if(to!==null){var nearestMounted=getNearestMountedFiber(to);if(to!==nearestMounted||to.tag!==HostComponent&&to.tag!==HostText){to=null;}}}else {// Moving to a node from outside the window.\nfrom=null;to=targetInst;}if(from===to){// Nothing pertains to our managed components.\nreturn;}var SyntheticEventCtor=SyntheticMouseEvent;var leaveEventType='onMouseLeave';var enterEventType='onMouseEnter';var eventTypePrefix='mouse';if(domEventName==='pointerout'||domEventName==='pointerover'){SyntheticEventCtor=SyntheticPointerEvent;leaveEventType='onPointerLeave';enterEventType='onPointerEnter';eventTypePrefix='pointer';}var fromNode=from==null?win:getNodeFromInstance(from);var toNode=to==null?win:getNodeFromInstance(to);var leave=new SyntheticEventCtor(leaveEventType,eventTypePrefix+'leave',from,nativeEvent,nativeEventTarget);leave.target=fromNode;leave.relatedTarget=toNode;var enter=null;// We should only process this nativeEvent if we are processing\n// the first ancestor. Next time, we will ignore the event.\nvar nativeTargetInst=getClosestInstanceFromNode(nativeEventTarget);if(nativeTargetInst===targetInst){var enterEvent=new SyntheticEventCtor(enterEventType,eventTypePrefix+'enter',to,nativeEvent,nativeEventTarget);enterEvent.target=toNode;enterEvent.relatedTarget=fromNode;enter=enterEvent;}accumulateEnterLeaveTwoPhaseListeners(dispatchQueue,leave,enter,from,to);}", "function InternalEvent() { }", "function InternalEvent() { }", "function InternalEvent() { }", "function InternalEvent() { }", "function InternalEvent() { }", "function InternalEvent() {}", "function extractEvents(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget,eventSystemFlags,targetContainer){extractCompositionEvent(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget);extractBeforeInputEvent(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget);}", "function extractEvents(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget,eventSystemFlags,targetContainer){extractCompositionEvent(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget);extractBeforeInputEvent(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget);}", "function Browser_GetMouseDownEventType(event)\n{\n\t//switch on event type first\n\tswitch (event.type)\n\t{\n\t\tcase window.__BROWSER_EVENT_MOUSEDOWN:\n\t\t\t//no mouse button?\n\t\t\tif (!event.button)\n\t\t\t{\n\t\t\t\t//return the event directly as it was triggered by the camera\n\t\t\t\treturn event.type;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//check button\n\t\t\t\tswitch (event.button)\n\t\t\t\t{\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\t//has to be left button\n\t\t\t\t\t\treturn window.__BROWSER_EVENT_MOUSEDOWN;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\t//switch according to browser\n\t\t\t\t\t\tswitch (window.__BROWSER_TYPE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase __BROWSER_IE:\n\t\t\t\t\t\t\t\t//has to be left button\n\t\t\t\t\t\t\t\treturn window.__BROWSER_EVENT_MOUSEDOWN;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase __BROWSER_EVENT_CLICK:\n\t\tcase window.__BROWSER_EVENT_MOUSEUP:\n\t\tcase __BROWSER_EVENT_MOUSERIGHT:\n\t\tcase __BROWSER_EVENT_DOUBLECLICK:\n\n\t\t\t//return it\n\t\t\treturn event.type;\n\t}\n\t//failed\n\treturn false;\n}", "function Utilities_GetEvent(e)\r\n{\r\n return e || window.event;\r\n}", "function handleEventsForInputEventIE(\n\t topLevelType,\n\t topLevelTarget,\n\t topLevelTargetID) {\n\t if (topLevelType === topLevelTypes.topFocus) {\n\t // In IE8, we can capture almost all .value changes by adding a\n\t // propertychange handler and looking for events with propertyName\n\t // equal to 'value'\n\t // In IE9, propertychange fires for most input events but is buggy and\n\t // doesn't fire when text is deleted, but conveniently, selectionchange\n\t // appears to fire in all of the remaining cases so we catch those and\n\t // forward the event if the value has changed\n\t // In either case, we don't want to call the event handler if the value\n\t // is changed from JS so we redefine a setter for `.value` that updates\n\t // our activeElementValue variable, allowing us to ignore those changes\n\t //\n\t // stopWatching() should be a noop here but we call it just in case we\n\t // missed a blur event somehow.\n\t stopWatchingForValueChange();\n\t startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n\t } else if (topLevelType === topLevelTypes.topBlur) {\n\t stopWatchingForValueChange();\n\t }\n\t}", "function handleEventsForInputEventIE(\n\t topLevelType,\n\t topLevelTarget,\n\t topLevelTargetID) {\n\t if (topLevelType === topLevelTypes.topFocus) {\n\t // In IE8, we can capture almost all .value changes by adding a\n\t // propertychange handler and looking for events with propertyName\n\t // equal to 'value'\n\t // In IE9, propertychange fires for most input events but is buggy and\n\t // doesn't fire when text is deleted, but conveniently, selectionchange\n\t // appears to fire in all of the remaining cases so we catch those and\n\t // forward the event if the value has changed\n\t // In either case, we don't want to call the event handler if the value\n\t // is changed from JS so we redefine a setter for `.value` that updates\n\t // our activeElementValue variable, allowing us to ignore those changes\n\t //\n\t // stopWatching() should be a noop here but we call it just in case we\n\t // missed a blur event somehow.\n\t stopWatchingForValueChange();\n\t startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n\t } else if (topLevelType === topLevelTypes.topBlur) {\n\t stopWatchingForValueChange();\n\t }\n\t}", "function handleEventsForInputEventIE(\n\t topLevelType,\n\t topLevelTarget,\n\t topLevelTargetID) {\n\t if (topLevelType === topLevelTypes.topFocus) {\n\t // In IE8, we can capture almost all .value changes by adding a\n\t // propertychange handler and looking for events with propertyName\n\t // equal to 'value'\n\t // In IE9, propertychange fires for most input events but is buggy and\n\t // doesn't fire when text is deleted, but conveniently, selectionchange\n\t // appears to fire in all of the remaining cases so we catch those and\n\t // forward the event if the value has changed\n\t // In either case, we don't want to call the event handler if the value\n\t // is changed from JS so we redefine a setter for `.value` that updates\n\t // our activeElementValue variable, allowing us to ignore those changes\n\t //\n\t // stopWatching() should be a noop here but we call it just in case we\n\t // missed a blur event somehow.\n\t stopWatchingForValueChange();\n\t startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n\t } else if (topLevelType === topLevelTypes.topBlur) {\n\t stopWatchingForValueChange();\n\t }\n\t}", "function handleEventsForInputEventIE(\n\t topLevelType,\n\t topLevelTarget,\n\t topLevelTargetID) {\n\t if (topLevelType === topLevelTypes.topFocus) {\n\t // In IE8, we can capture almost all .value changes by adding a\n\t // propertychange handler and looking for events with propertyName\n\t // equal to 'value'\n\t // In IE9, propertychange fires for most input events but is buggy and\n\t // doesn't fire when text is deleted, but conveniently, selectionchange\n\t // appears to fire in all of the remaining cases so we catch those and\n\t // forward the event if the value has changed\n\t // In either case, we don't want to call the event handler if the value\n\t // is changed from JS so we redefine a setter for `.value` that updates\n\t // our activeElementValue variable, allowing us to ignore those changes\n\t //\n\t // stopWatching() should be a noop here but we call it just in case we\n\t // missed a blur event somehow.\n\t stopWatchingForValueChange();\n\t startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n\t } else if (topLevelType === topLevelTypes.topBlur) {\n\t stopWatchingForValueChange();\n\t }\n\t}", "function handleEventsForInputEventIE(\n\t topLevelType,\n\t topLevelTarget,\n\t topLevelTargetID) {\n\t if (topLevelType === topLevelTypes.topFocus) {\n\t // In IE8, we can capture almost all .value changes by adding a\n\t // propertychange handler and looking for events with propertyName\n\t // equal to 'value'\n\t // In IE9, propertychange fires for most input events but is buggy and\n\t // doesn't fire when text is deleted, but conveniently, selectionchange\n\t // appears to fire in all of the remaining cases so we catch those and\n\t // forward the event if the value has changed\n\t // In either case, we don't want to call the event handler if the value\n\t // is changed from JS so we redefine a setter for `.value` that updates\n\t // our activeElementValue variable, allowing us to ignore those changes\n\t //\n\t // stopWatching() should be a noop here but we call it just in case we\n\t // missed a blur event somehow.\n\t stopWatchingForValueChange();\n\t startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n\t } else if (topLevelType === topLevelTypes.topBlur) {\n\t stopWatchingForValueChange();\n\t }\n\t}", "function handleEventsForInputEventIE(\n\t topLevelType,\n\t topLevelTarget,\n\t topLevelTargetID) {\n\t if (topLevelType === topLevelTypes.topFocus) {\n\t // In IE8, we can capture almost all .value changes by adding a\n\t // propertychange handler and looking for events with propertyName\n\t // equal to 'value'\n\t // In IE9, propertychange fires for most input events but is buggy and\n\t // doesn't fire when text is deleted, but conveniently, selectionchange\n\t // appears to fire in all of the remaining cases so we catch those and\n\t // forward the event if the value has changed\n\t // In either case, we don't want to call the event handler if the value\n\t // is changed from JS so we redefine a setter for `.value` that updates\n\t // our activeElementValue variable, allowing us to ignore those changes\n\t //\n\t // stopWatching() should be a noop here but we call it just in case we\n\t // missed a blur event somehow.\n\t stopWatchingForValueChange();\n\t startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n\t } else if (topLevelType === topLevelTypes.topBlur) {\n\t stopWatchingForValueChange();\n\t }\n\t}", "function handleEventsForInputEventIE(\n\t topLevelType,\n\t topLevelTarget,\n\t topLevelTargetID) {\n\t if (topLevelType === topLevelTypes.topFocus) {\n\t // In IE8, we can capture almost all .value changes by adding a\n\t // propertychange handler and looking for events with propertyName\n\t // equal to 'value'\n\t // In IE9, propertychange fires for most input events but is buggy and\n\t // doesn't fire when text is deleted, but conveniently, selectionchange\n\t // appears to fire in all of the remaining cases so we catch those and\n\t // forward the event if the value has changed\n\t // In either case, we don't want to call the event handler if the value\n\t // is changed from JS so we redefine a setter for `.value` that updates\n\t // our activeElementValue variable, allowing us to ignore those changes\n\t //\n\t // stopWatching() should be a noop here but we call it just in case we\n\t // missed a blur event somehow.\n\t stopWatchingForValueChange();\n\t startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n\t } else if (topLevelType === topLevelTypes.topBlur) {\n\t stopWatchingForValueChange();\n\t }\n\t}", "function u(e) {\n return function(t, n) {\n var o = new r(e);\n l(o, n), S.isDOMComponent(t) ? S.simulateNativeEventOnDOMComponent(e, t, o) : t.tagName && // Will allow on actual dom nodes.\n S.simulateNativeEventOnNode(e, t, o);\n };\n }", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleEventsForInputEventIE(\n topLevelType,\n topLevelTarget,\n topLevelTargetID) {\n if (topLevelType === topLevelTypes.topFocus) {\n // In IE8, we can capture almost all .value changes by adding a\n // propertychange handler and looking for events with propertyName\n // equal to 'value'\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n } else if (topLevelType === topLevelTypes.topBlur) {\n stopWatchingForValueChange();\n }\n}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\t\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\t\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\t\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\t\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\t\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\t\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\t\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\t\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\t\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\t\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\t\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\t\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\t\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\t\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t var path = bookKeeping.nativeEvent.path;\n\t var currentNativeTarget = path[0];\n\t var eventsFired = 0;\n\t for (var i = 0; i < path.length; i++) {\n\t var currentPathElement = path[i];\n\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t currentNativeTarget = path[i + 1];\n\t }\n\t // TODO: slow\n\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t if (reactParent === currentPathElement) {\n\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t bookKeeping.ancestors.push(currentPathElement);\n\n\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t eventsFired++;\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n\t // Jump to the root of this React render tree\n\t while (currentPathElementID !== newRootID) {\n\t i++;\n\t currentPathElement = path[i];\n\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t }\n\t }\n\t }\n\t if (eventsFired === 0) {\n\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t }\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n var path = bookKeeping.nativeEvent.path;\n var currentNativeTarget = path[0];\n var eventsFired = 0;\n for (var i = 0; i < path.length; i++) {\n var currentPathElement = path[i];\n if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n currentNativeTarget = path[i + 1];\n }\n // TODO: slow\n var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n if (reactParent === currentPathElement) {\n var currentPathElementID = ReactMount.getID(currentPathElement);\n var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n bookKeeping.ancestors.push(currentPathElement);\n\n var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n eventsFired++;\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n // Jump to the root of this React render tree\n while (currentPathElementID !== newRootID) {\n i++;\n currentPathElement = path[i];\n currentPathElementID = ReactMount.getID(currentPathElement);\n }\n }\n }\n if (eventsFired === 0) {\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n }\n}", "function handleTopLevelWithPath(bookKeeping) {\n var path = bookKeeping.nativeEvent.path;\n var currentNativeTarget = path[0];\n var eventsFired = 0;\n for (var i = 0; i < path.length; i++) {\n var currentPathElement = path[i];\n if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n currentNativeTarget = path[i + 1];\n }\n // TODO: slow\n var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n if (reactParent === currentPathElement) {\n var currentPathElementID = ReactMount.getID(currentPathElement);\n var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n bookKeeping.ancestors.push(currentPathElement);\n\n var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n eventsFired++;\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n // Jump to the root of this React render tree\n while (currentPathElementID !== newRootID) {\n i++;\n currentPathElement = path[i];\n currentPathElementID = ReactMount.getID(currentPathElement);\n }\n }\n }\n if (eventsFired === 0) {\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n }\n}", "function handleTopLevelWithPath(bookKeeping) {\n var path = bookKeeping.nativeEvent.path;\n var currentNativeTarget = path[0];\n var eventsFired = 0;\n for (var i = 0; i < path.length; i++) {\n var currentPathElement = path[i];\n if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n currentNativeTarget = path[i + 1];\n }\n // TODO: slow\n var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n if (reactParent === currentPathElement) {\n var currentPathElementID = ReactMount.getID(currentPathElement);\n var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n bookKeeping.ancestors.push(currentPathElement);\n\n var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n eventsFired++;\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n // Jump to the root of this React render tree\n while (currentPathElementID !== newRootID) {\n i++;\n currentPathElement = path[i];\n currentPathElementID = ReactMount.getID(currentPathElement);\n }\n }\n }\n if (eventsFired === 0) {\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n }\n}", "function handleTopLevelWithPath(bookKeeping) {\n var path = bookKeeping.nativeEvent.path;\n var currentNativeTarget = path[0];\n var eventsFired = 0;\n for (var i = 0; i < path.length; i++) {\n var currentPathElement = path[i];\n if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n currentNativeTarget = path[i + 1];\n }\n // TODO: slow\n var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n if (reactParent === currentPathElement) {\n var currentPathElementID = ReactMount.getID(currentPathElement);\n var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n bookKeeping.ancestors.push(currentPathElement);\n\n var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n eventsFired++;\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n // Jump to the root of this React render tree\n while (currentPathElementID !== newRootID) {\n i++;\n currentPathElement = path[i];\n currentPathElementID = ReactMount.getID(currentPathElement);\n }\n }\n }\n if (eventsFired === 0) {\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n }\n}", "function handleTopLevelWithPath(bookKeeping) {\n var path = bookKeeping.nativeEvent.path;\n var currentNativeTarget = path[0];\n var eventsFired = 0;\n for (var i = 0; i < path.length; i++) {\n var currentPathElement = path[i];\n if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n currentNativeTarget = path[i + 1];\n }\n // TODO: slow\n var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n if (reactParent === currentPathElement) {\n var currentPathElementID = ReactMount.getID(currentPathElement);\n var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n bookKeeping.ancestors.push(currentPathElement);\n\n var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n eventsFired++;\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n // Jump to the root of this React render tree\n while (currentPathElementID !== newRootID) {\n i++;\n currentPathElement = path[i];\n currentPathElementID = ReactMount.getID(currentPathElement);\n }\n }\n }\n if (eventsFired === 0) {\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n }\n}", "function handleTopLevelWithPath(bookKeeping) {\n var path = bookKeeping.nativeEvent.path;\n var currentNativeTarget = path[0];\n var eventsFired = 0;\n for (var i = 0; i < path.length; i++) {\n var currentPathElement = path[i];\n if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n currentNativeTarget = path[i + 1];\n }\n // TODO: slow\n var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n if (reactParent === currentPathElement) {\n var currentPathElementID = ReactMount.getID(currentPathElement);\n var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n bookKeeping.ancestors.push(currentPathElement);\n\n var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n eventsFired++;\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n // Jump to the root of this React render tree\n while (currentPathElementID !== newRootID) {\n i++;\n currentPathElement = path[i];\n currentPathElementID = ReactMount.getID(currentPathElement);\n }\n }\n }\n if (eventsFired === 0) {\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n }\n}", "function handleTopLevelWithPath(bookKeeping) {\n var path = bookKeeping.nativeEvent.path;\n var currentNativeTarget = path[0];\n var eventsFired = 0;\n for (var i = 0; i < path.length; i++) {\n var currentPathElement = path[i];\n if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n currentNativeTarget = path[i + 1];\n }\n // TODO: slow\n var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n if (reactParent === currentPathElement) {\n var currentPathElementID = ReactMount.getID(currentPathElement);\n var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n bookKeeping.ancestors.push(currentPathElement);\n\n var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n eventsFired++;\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n // Jump to the root of this React render tree\n while (currentPathElementID !== newRootID) {\n i++;\n currentPathElement = path[i];\n currentPathElementID = ReactMount.getID(currentPathElement);\n }\n }\n }\n if (eventsFired === 0) {\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n }\n}", "function handleTopLevelWithPath(bookKeeping) {\n var path = bookKeeping.nativeEvent.path;\n var currentNativeTarget = path[0];\n var eventsFired = 0;\n for (var i = 0; i < path.length; i++) {\n var currentPathElement = path[i];\n if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n currentNativeTarget = path[i + 1];\n }\n // TODO: slow\n var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n if (reactParent === currentPathElement) {\n var currentPathElementID = ReactMount.getID(currentPathElement);\n var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n bookKeeping.ancestors.push(currentPathElement);\n\n var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n eventsFired++;\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n // Jump to the root of this React render tree\n while (currentPathElementID !== newRootID) {\n i++;\n currentPathElement = path[i];\n currentPathElementID = ReactMount.getID(currentPathElement);\n }\n }\n }\n if (eventsFired === 0) {\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n }\n}", "function handleTopLevelWithPath(bookKeeping) {\n var path = bookKeeping.nativeEvent.path;\n var currentNativeTarget = path[0];\n var eventsFired = 0;\n for (var i = 0; i < path.length; i++) {\n var currentPathElement = path[i];\n if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n currentNativeTarget = path[i + 1];\n }\n // TODO: slow\n var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n if (reactParent === currentPathElement) {\n var currentPathElementID = ReactMount.getID(currentPathElement);\n var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n bookKeeping.ancestors.push(currentPathElement);\n\n var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n eventsFired++;\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n // Jump to the root of this React render tree\n while (currentPathElementID !== newRootID) {\n i++;\n currentPathElement = path[i];\n currentPathElementID = ReactMount.getID(currentPathElement);\n }\n }\n }\n if (eventsFired === 0) {\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n }\n}", "function handleTopLevelWithPath(bookKeeping) {\n var path = bookKeeping.nativeEvent.path;\n var currentNativeTarget = path[0];\n var eventsFired = 0;\n for (var i = 0; i < path.length; i++) {\n var currentPathElement = path[i];\n if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n currentNativeTarget = path[i + 1];\n }\n // TODO: slow\n var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n if (reactParent === currentPathElement) {\n var currentPathElementID = ReactMount.getID(currentPathElement);\n var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n bookKeeping.ancestors.push(currentPathElement);\n\n var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n eventsFired++;\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n // Jump to the root of this React render tree\n while (currentPathElementID !== newRootID) {\n i++;\n currentPathElement = path[i];\n currentPathElementID = ReactMount.getID(currentPathElement);\n }\n }\n }\n if (eventsFired === 0) {\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n }\n}", "function handleTopLevelWithPath(bookKeeping) {\n var path = bookKeeping.nativeEvent.path;\n var currentNativeTarget = path[0];\n var eventsFired = 0;\n for (var i = 0; i < path.length; i++) {\n var currentPathElement = path[i];\n if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n currentNativeTarget = path[i + 1];\n }\n // TODO: slow\n var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n if (reactParent === currentPathElement) {\n var currentPathElementID = ReactMount.getID(currentPathElement);\n var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n bookKeeping.ancestors.push(currentPathElement);\n\n var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n eventsFired++;\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n // Jump to the root of this React render tree\n while (currentPathElementID !== newRootID) {\n i++;\n currentPathElement = path[i];\n currentPathElementID = ReactMount.getID(currentPathElement);\n }\n }\n }\n if (eventsFired === 0) {\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n }\n}", "function handleTopLevelWithPath(bookKeeping) {\n var path = bookKeeping.nativeEvent.path;\n var currentNativeTarget = path[0];\n var eventsFired = 0;\n for (var i = 0; i < path.length; i++) {\n var currentPathElement = path[i];\n if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n currentNativeTarget = path[i + 1];\n }\n // TODO: slow\n var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n if (reactParent === currentPathElement) {\n var currentPathElementID = ReactMount.getID(currentPathElement);\n var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n bookKeeping.ancestors.push(currentPathElement);\n\n var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n eventsFired++;\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n // Jump to the root of this React render tree\n while (currentPathElementID !== newRootID) {\n i++;\n currentPathElement = path[i];\n currentPathElementID = ReactMount.getID(currentPathElement);\n }\n }\n }\n if (eventsFired === 0) {\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n }\n}", "function handleTopLevelWithPath(bookKeeping) {\n var path = bookKeeping.nativeEvent.path;\n var currentNativeTarget = path[0];\n var eventsFired = 0;\n for (var i = 0; i < path.length; i++) {\n var currentPathElement = path[i];\n if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n currentNativeTarget = path[i + 1];\n }\n // TODO: slow\n var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n if (reactParent === currentPathElement) {\n var currentPathElementID = ReactMount.getID(currentPathElement);\n var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n bookKeeping.ancestors.push(currentPathElement);\n\n var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n eventsFired++;\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n // Jump to the root of this React render tree\n while (currentPathElementID !== newRootID) {\n i++;\n currentPathElement = path[i];\n currentPathElementID = ReactMount.getID(currentPathElement);\n }\n }\n }\n if (eventsFired === 0) {\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n }\n}", "function handleTopLevelWithPath(bookKeeping) {\n var path = bookKeeping.nativeEvent.path;\n var currentNativeTarget = path[0];\n var eventsFired = 0;\n for (var i = 0; i < path.length; i++) {\n var currentPathElement = path[i];\n if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n currentNativeTarget = path[i + 1];\n }\n // TODO: slow\n var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n if (reactParent === currentPathElement) {\n var currentPathElementID = ReactMount.getID(currentPathElement);\n var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n bookKeeping.ancestors.push(currentPathElement);\n\n var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n eventsFired++;\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\n // Jump to the root of this React render tree\n while (currentPathElementID !== newRootID) {\n i++;\n currentPathElement = path[i];\n currentPathElementID = ReactMount.getID(currentPathElement);\n }\n }\n }\n if (eventsFired === 0) {\n ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n }\n}", "function extractEvents$3(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget,eventSystemFlags,targetContainer){var targetNode=targetInst?getNodeFromInstance(targetInst):window;switch(domEventName){// Track the input node that has focus.\ncase'focusin':if(isTextInputElement(targetNode)||targetNode.contentEditable==='true'){activeElement$1=targetNode;activeElementInst$1=targetInst;lastSelection=null;}break;case'focusout':activeElement$1=null;activeElementInst$1=null;lastSelection=null;break;// Don't fire the event while the user is dragging. This matches the\n// semantics of the native select event.\ncase'mousedown':mouseDown=true;break;case'contextmenu':case'mouseup':case'dragend':mouseDown=false;constructSelectEvent(dispatchQueue,nativeEvent,nativeEventTarget);break;// Chrome and IE fire non-standard event when selection is changed (and\n// sometimes when it hasn't). IE's event fires out of order with respect\n// to key and input events on deletion, so we discard it.\n//\n// Firefox doesn't support selectionchange, so check selection status\n// after each key entry. The selection changes after keydown and before\n// keyup, but we check on keydown as well in the case of holding down a\n// key, when multiple keydown events are fired but only one keyup is.\n// This is also our approach for IE handling, for the reason above.\ncase'selectionchange':if(skipSelectionChangeEvent){break;}// falls through\ncase'keydown':case'keyup':constructSelectEvent(dispatchQueue,nativeEvent,nativeEventTarget);}}", "function extractEvents$3(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget,eventSystemFlags,targetContainer){var targetNode=targetInst?getNodeFromInstance(targetInst):window;switch(domEventName){// Track the input node that has focus.\ncase'focusin':if(isTextInputElement(targetNode)||targetNode.contentEditable==='true'){activeElement$1=targetNode;activeElementInst$1=targetInst;lastSelection=null;}break;case'focusout':activeElement$1=null;activeElementInst$1=null;lastSelection=null;break;// Don't fire the event while the user is dragging. This matches the\n// semantics of the native select event.\ncase'mousedown':mouseDown=true;break;case'contextmenu':case'mouseup':case'dragend':mouseDown=false;constructSelectEvent(dispatchQueue,nativeEvent,nativeEventTarget);break;// Chrome and IE fire non-standard event when selection is changed (and\n// sometimes when it hasn't). IE's event fires out of order with respect\n// to key and input events on deletion, so we discard it.\n//\n// Firefox doesn't support selectionchange, so check selection status\n// after each key entry. The selection changes after keydown and before\n// keyup, but we check on keydown as well in the case of holding down a\n// key, when multiple keydown events are fired but only one keyup is.\n// This is also our approach for IE handling, for the reason above.\ncase'selectionchange':if(skipSelectionChangeEvent){break;}// falls through\ncase'keydown':case'keyup':constructSelectEvent(dispatchQueue,nativeEvent,nativeEventTarget);}}", "function handleTopLevel(topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n\t var events = extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);\n\t runEventQueueInBatch(events);\n\t}", "function handleTopLevelWithPath(bookKeeping) {\n\t\t var path = bookKeeping.nativeEvent.path;\n\t\t var currentNativeTarget = path[0];\n\t\t var eventsFired = 0;\n\t\t for (var i = 0; i < path.length; i++) {\n\t\t var currentPathElement = path[i];\n\t\t if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {\n\t\t currentNativeTarget = path[i + 1];\n\t\t }\n\t\t // TODO: slow\n\t\t var reactParent = ReactMount.getFirstReactDOM(currentPathElement);\n\t\t if (reactParent === currentPathElement) {\n\t\t var currentPathElementID = ReactMount.getID(currentPathElement);\n\t\t var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);\n\t\t bookKeeping.ancestors.push(currentPathElement);\n\t\t\n\t\t var topLevelTargetID = ReactMount.getID(currentPathElement) || '';\n\t\t eventsFired++;\n\t\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);\n\t\t\n\t\t // Jump to the root of this React render tree\n\t\t while (currentPathElementID !== newRootID) {\n\t\t i++;\n\t\t currentPathElement = path[i];\n\t\t currentPathElementID = ReactMount.getID(currentPathElement);\n\t\t }\n\t\t }\n\t\t }\n\t\t if (eventsFired === 0) {\n\t\t ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n\t\t }\n\t\t}", "function mouseevent(e){\n\t// console.log(`Event Type = ${e.type}`);\n}", "componentWillMount() {\n document.addEventListener('mousedown', this.handleClickOutside, false);\n }", "function DocumentEvent()\n\t{\n\t\tthrow new Error(\"Illegal operation: do not instantiate DocumentEvent, simply use its static constants.\");\n\t}", "componentDidMount() {\r\n document.addEventListener(\"mousedown\", this.handleClickOutside);\r\n }", "componentDidMount() {\n document.addEventListener(\"mousedown\", this.handleClickOutside);\n }", "componentDidMount() {\n document.addEventListener(\"mousedown\", this.handleClickOutside);\n }", "function makeNativeSimulator(eventType) {\n\t return function (domComponentOrNode, nativeEventData) {\n\t var fakeNativeEvent = new Event(eventType);\n\t _assign(fakeNativeEvent, nativeEventData);\n\t if (ReactTestUtils.isDOMComponent(domComponentOrNode)) {\n\t ReactTestUtils.simulateNativeEventOnDOMComponent(eventType, domComponentOrNode, fakeNativeEvent);\n\t } else if (domComponentOrNode.tagName) {\n\t // Will allow on actual dom nodes.\n\t ReactTestUtils.simulateNativeEventOnNode(eventType, domComponentOrNode, fakeNativeEvent);\n\t }\n\t };\n\t}", "function makeNativeSimulator(eventType) {\n\t return function (domComponentOrNode, nativeEventData) {\n\t var fakeNativeEvent = new Event(eventType);\n\t _assign(fakeNativeEvent, nativeEventData);\n\t if (ReactTestUtils.isDOMComponent(domComponentOrNode)) {\n\t ReactTestUtils.simulateNativeEventOnDOMComponent(eventType, domComponentOrNode, fakeNativeEvent);\n\t } else if (domComponentOrNode.tagName) {\n\t // Will allow on actual dom nodes.\n\t ReactTestUtils.simulateNativeEventOnNode(eventType, domComponentOrNode, fakeNativeEvent);\n\t }\n\t };\n\t}" ]
[ "0.6492498", "0.6492498", "0.6492498", "0.62708116", "0.6237896", "0.62295246", "0.62265676", "0.62011015", "0.62011015", "0.62011015", "0.62011015", "0.62011015", "0.6125231", "0.60379905", "0.60379905", "0.5929177", "0.5902268", "0.5901559", "0.5901559", "0.5901559", "0.5901559", "0.5901559", "0.5901559", "0.5901559", "0.5886884", "0.5820312", "0.5820312", "0.5820312", "0.5820312", "0.5820312", "0.5820312", "0.5820312", "0.5820312", "0.5820312", "0.5820312", "0.5820312", "0.5820312", "0.5820312", "0.5820312", "0.5820312", "0.5820312", "0.5820312", "0.5820312", "0.5820312", "0.5820312", "0.5820312", "0.5820312", "0.5820312", "0.5820312", "0.5820312", "0.5820312", "0.5820312", "0.5788694", "0.5788694", "0.5788694", "0.5788694", "0.5788694", "0.5788694", "0.5788694", "0.578615", "0.578615", "0.578615", "0.578615", "0.578615", "0.578615", "0.578615", "0.578615", "0.578615", "0.578615", "0.578615", "0.578615", "0.578615", "0.578615", "0.578615", "0.578615", "0.5755897", "0.5755897", "0.5755897", "0.5755897", "0.5755897", "0.5755897", "0.5755897", "0.5755897", "0.5755897", "0.5755897", "0.5755897", "0.5755897", "0.5755897", "0.5755897", "0.5753583", "0.5753583", "0.5753482", "0.57484484", "0.57476985", "0.57364875", "0.57335544", "0.57224494", "0.57127976", "0.57127976", "0.5707817", "0.5707817" ]
0.0
-1
`ReactInstanceMap` maintains a mapping from a public facing stateful instance (key) and the internal representation (value). This allows public methods to accept the user facing instance as an argument and map them back to internal methods. Note that this module is currently shared and assumed to be stateless. If this becomes an actual Map, that will break.
function get(key) { return key._reactInternalFiber; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mapWrapper(key)\n{\n\tthis.key = key;\n}", "function Map() {\n\tthis.keys = [];\n\tthis.values = [];\n\n\t// add a key / value pair to map\n\tthis.add = function(key, value) {\n\t\tthis.keys.push(key);\n\t\tthis.values.push(value);\n\t}\n\n\t// get value from key\n\tthis.get = function(key) {\n\t\treturn this.keys.indexOf(key) != -1 ? this.values[this.keys.indexOf(key)] : null;\n\n\t}\n}", "function Map(implementation){\n\tvar map;\n\t\n\tswitch(implementation){\n\t\tcase 'hashMap':\n\t\t\tmap = new HashMap();\n\t\tbreak;\n\t\tdefault:\n\t\t\ttry{\n\t\t\t\tmap = instantiate(implementation)\n\t\t\t} catch(e) {\n\t\t\t\tthrow Error(\"Undefined implemantation name \" + implementation);\n\t\t\t}\n\t}\n\tInterface.ensureImplements(map, MapInterface);\n\treturn map;\n}", "function Map() {\n this.container = new Object();\n}", "function InvokeDefinitionMap() {\n this.map = [];\n this.lookup_table = {}; // Just for building dictionary\n}", "function Map() {\r\n this.keys = [];\r\n this.values = [];\r\n}", "function Map() {\n\t\tthis._values = {};\n\t}", "function Map(index, type) {\n\n // Constants -------------------------------------------------------------------\n\n const ID_PROP = '_id';\n\n // Instances -------------------------------------------------------------------\n\n // Keep track of the entry listeners added by the user.\n var _entryListeners = [];\n\n\t// Privates --------------------------------------------------------------------\n\n /**\n * Adds an entry listener which can be notified via callback function when an entry is added,\n * removed, updated or evicted from the map. These notifications will occur asynchronously and\n * they occur _after_ the event has been performed on the cache.\n *\n * The listener will have to provide at least one valid callback function. The function names\n * are entryAdded(entry), entryRemoved(entry), entryUpdated(entry) and entryEvicted(entry). If\n * the entry is a JSON object (which they all are), the entry will be a parsed JSON object. If\n * not, the entry parameter will be passed as-is.\n *\n * Each listener has a name property that uniquely identifies the listener. This is a bit of\n * a hack to prevent multiple listeners from being registered when the JS platform reloads\n * modules when they have been modified. In these cases, the registerListener() functions\n * fire again when the module is reloaded, and there is insufficient uniqueness in the\n * current set of parameters to determine if the registration is a duplicate or two\n * different listeners on the same event.\n *\n * @param listener\n */\n var addEntryListener = function(listener) {\n if (!listener.entryAdded && !listener.entryRemoved &&\n !listener.entryUpdated && !listener.entryEvicted) {\n throw 'EntryListener must implement a valid callback function.';\n }\n\n if (!listener.name) {\n throw 'EntryListener must have a unique name.';\n }\n\n // Remove a listener with the same name if it exists\n _entryListeners = _entryListeners.filter(function (l) {\n return listener.name !== l.name\n });\n\n _entryListeners.push(listener);\n };\n\n var clearEntryListeners = function() {\n _entryListeners = [];\n };\n\n var invokeListeners = function(eventName, event) {\n log.debug('Received internal event: {}, checking for listeners among [{}] candidates.',\n eventName, _entryListeners.length);\n if (_entryListeners.length > 0) {\n // Create the object we will be passing into each of our listeners\n var entry = {\n key: event.key,\n index: index,\n type: type,\n source: name,\n value: event.value,\n oldValue: event.oldValue\n };\n\n if (typeof entry.value === 'string') {\n try {\n entry.value = JSON.parse(entry.value);\n } catch(e) {\n }\n }\n\n if (typeof entry.oldValue === 'string') {\n try {\n entry.oldValue = JSON.parse(entry.oldValue);\n } catch(e) {\n }\n }\n\n for (var i = 0; i < _entryListeners.length; i++) {\n var handler = _entryListeners[i][eventName];\n if (handler) {\n executor.submit(createTask(eventName, handler, entry));\n }\n }\n }\n\n function createTask(eventName, func, entry) {\n return new java.lang.Runnable({\n run: function() {\n try {\n func(entry);\n } catch (e) {\n log.error('Error executing listener event: {}', eventName, e);\n }\n }\n });\n }\n };\n\n\t/**\n\t * Put can be called with or without a 'key' parameter. If the key parameter is not present, the\n\t * JSON value object is queried for an '_id' property. If found, the ID_PROP is the key. If not\n\t * found, a new UUID is generated and used as the key.\n\t *\n\t * This is completely arbitrary, but I am stipulating the key is a string and the value is an\n\t * object. If we decide later to allow values to be a string, date, or something else, this\n\t * logic will have to be rewritten.\n\t *\n\t * @params {string, object [,ttl, units]}\n\t * @params {object [,ttl, units]}\n\t *\n\t */\n\tvar put = function() {\n if (arguments.length === 0)\n throw 'IllegalArgumentException, map.put requires at least one argument.';\n\n var args = Array.prototype.slice.call(arguments);\n\n var result = putValue.apply(this, args);\n\n if (typeof result === 'string') {\n return JSON.parse(result);\n } else {\n return null;\n }\n\t};\n\n\n\tvar putValue = function() {\n\t\tvar args = Array.prototype.slice.call(arguments);\n\t\tvar types = args.map(function(arg) {\n\t\t\treturn typeof arg;\n\t\t});\n\n\t\t// If the first parameter is a string, it is our key\n\t\tif (types[0] === 'string') {\n\t\t\treturn putKeyValue.apply(this, args);\n\t\t}\n\n\t\t// If the first parameter is an object, we have to check to see if it has a key. If so, we\n\t\t// will use it, otherwise we will generate a new key.\n\t\tif (types[0] === 'object') {\n\t\t\tvar value = args[0];\n\t\t\tvar key = value[ID_PROP];\n\t\t\tif (!key) key = value[ID_PROP] = generateId();\n\n\t\t\t// push the key into the argument list and invoke putKeyValue\n\t\t\targs.unshift(key);\n\t\t\treturn putKeyValue.apply(this, args);\n\t\t}\n\n\t\tthrow 'IllegalArgumentException, map.put requires the first parameter to be a string or an ' +\n\t\t\t\t'object.';\n\t};\n\n\n\t/**\n\t * Puts an entry into this map with a given ttl (time to live) value.\n\t * Entry will expire and get evicted after the ttl.\n\t *\n\t * @param key {String} key of the entry\n\t * @param value {Object} value of the entry\n\t * @param ttl {Number} maximum time for this entry to stay in the map\n\t * @param timeunit {String} time unit for the ttl\n\t * @return {Object} old value of the entry\n\t */\n\tvar putKeyValue = function(key, value, ttl, timeunit) {\n\t\tlog.debug('Putting into map <' + name + '>: ' + key);\n\n if(!ttl) ttl = 0;\n if(!timeunit) timeunit = java.util.concurrent.TimeUnit.MILLISECONDS;\n if (typeof timeunit === 'string') timeunit = java.util.concurrent.TimeUnit.valueOf(timeunit);\n\n\t\tdelete value._type;\n\t\tdelete value._version;\n\t\tdelete value._index;\n\t\tdelete value._score;\n\n var json = JSON.stringify(value);\n\t\treturn map.put(key, json, ttl, timeunit);\n\t};\n\n\t/**\n\t * Returns the value to which the specified key is mapped,\n\t * or {@code null} if this map contains no mapping for the key.\n\t *\n\t * <p>If this map permits null values, then a return value of\n\t * {@code null} does not <i>necessarily</i> indicate that the map\n\t * contains no mapping for the key; it's also possible that the map\n\t * explicitly maps the key to {@code null}. The {@link #containsKey\n\t * containsKey} operation may be used to distinguish these two cases.\n\t *\n\t * @param key the key whose associated value is to be returned\n\t * @return the value to which the specified key is mapped, or\n\t * {@code null} if this map contains no mapping for the key\n\t */\n\tvar get = function(key) {\n\t\tif (typeof key === 'object') return queryGet(key);\n\t\tlog.debug('Getting from map [{}]: {}', name, key);\n\t\tvar value = map.get(key);\n\t\tif (typeof value === 'string') {\n\t\t\treturn JSON.parse(value);\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t};\n\n\n /**\n * Returns a set view of the keys contained in this map. The set is\n * backed by the map, so changes to the map are reflected in the set, and\n * vice-versa. If the map is modified while an iteration over the set is\n * in progress (except through the iterator's own <tt>remove</tt>\n * operation), the results of the iteration are undefined. The set\n * supports element removal, which removes the corresponding mapping from\n * the map, via the <tt>Iterator.remove</tt>, <tt>Set.remove</tt>,\n * <tt>removeAll</tt> <tt>retainAll</tt>, and <tt>clear</tt> operations.\n * It does not support the add or <tt>addAll</tt> operations.\n *\n * @return a set view of the keys contained in this map.\n */\n\tvar keySet = function() {\n return map.keySet();\n\t};\n\n /**\n * Determines if the key passed is in the cache. Does not use the MapLoader to find the\n * key. Useful for testing map eviction.\n *\n * @param key\n */\n var hasKey = function ( key ) {\n var predicate = new com.hazelcast.query.Predicate( {\n apply: function(entry) {\n return entry.key === key;\n }\n } );\n var keys = map.keySet(predicate);\n return keys.size() > 0;\n };\n\n\tvar count = function(query) {\n\t\treturn elastic.count(query, index, type);\n\t};\n\n\n\tvar evict = function(key) {\n\t\tlog.debug('Evicting from map <' + name + '>: ' + key);\n\t\treturn map.evict(key);\n\t};\n\n\n\t//var refresh = function(query) {\n var refresh = function(query) {\n\t\treturn elastic.refresh(index);\n\t};\n\n\n\t/**\n\t * Removes the mapping for a key from this map if it is present\n\t * (optional operation). More formally, if this map contains a mapping\n\t * from key <tt>k</tt> to value <tt>v</tt> such that\n\t * <code>(key==null ? k==null : key.equals(k))</code>, that mapping\n\t * is removed. (The map can contain at most one such mapping.)\n\t *\n\t * <p>Returns the value to which this map previously associated the key,\n\t * or <tt>null</tt> if the map contained no mapping for the key.\n\t *\n\t * <p>The map will not contain a mapping for the specified key once the\n\t * call returns.\n\t *\n\t * @param key key whose mapping is to be removed from the map\n\t * @return the previous value associated with <tt>key</tt>, or\n\t * <tt>null</tt> if there was no mapping for <tt>key</tt>.\n\t */\n\tvar remove = function(key) {\n\t\tif (typeof key === 'object') return queryRemove(key);\n\t\tlog.debug('Removing from map [{}] using key: {}', name, key);\n\t\tvar previous = map.remove(key);\n\t\treturn (previous) ? JSON.parse(previous) : null;\n\t};\n\n\n\t/**\n\t * Removes all of the mappings from this map (optional operation).\n\t * The map will be empty after this call returns.\n\t */\n\tvar clear = function() {\n\t\tmap.clear();\n\t};\n\n\tvar size = function() {\n\t\treturn map.size();\n\t};\n\n\n\n\t/**\n\t * Hazelcast's strength is not querying because it is possible for some data to not yet be in\n\t * the in-memory cache. Because of this, querying is better suited to be performed against\n\t * Elastic Search or some other backing store which has access to the full set of data.\n\t *\n\t * @param json Object that describes the ES query\n\t */\n\tvar queryGet = function(json) {\n //var splitArr = name.split(\"-\");\n\t\tlog.debug('Searching map [{}]: {}', name, JSON.stringify(json));\n\t\treturn elastic.search(json, index, type);\n\t};\n\n\t/**\n\t * The query used to remove items from the map will be an ElasticSearch query. We don't\n\t * currently have a way to easily determine which id's are affected by the query, so we will\n\t * evict all elements from the map.\n\t *\n\t * // todo: It may be feasible to run the query and get the ids of all elements affected,\n\t * then evict them individually from the Hazelcase map by id,\n\t *\n\t * @param json\n\t */\n\tvar queryRemove = function(json) {\n\t\tlog.debug('Removing from map [{}] using query.: {}', name, JSON.stringify(json));\n\t\telastic.remove(json, index, type);\n\t\tmap.clear();\n\t};\n\n\n\tvar toString = function() {\n\t\treturn 'Hazelcast Map [' + name + ']';\n\t};\n\n\t// Constructors ----------------------------------------------------------------\n\n if (name === 'undefined' || type === 'undefined' || name === null || type === null)\n {\n\t throw 'Name of index and type of map must be set.';\n }\n\n // The name of the map in Hazelcast is a concatination of index and type.\n var name = index + '-' + type;\n\n // Use the Hazelcast instance to retrieve the map by name\n \tvar map = hazelcast.getMap(name);\n\n // attach a listener to the map to be notified of any events that occur on the map.\n var listener = new com.hazelcast.core.EntryListener({\n entryAdded: function(event) {\n invokeListeners('entryAdded', event);\n\t },\n entryRemoved: function(event) {\n invokeListeners('entryRemoved', event);\n\t },\n entryUpdated: function(event) {\n invokeListeners('entryUpdated', event);\n\t },\n entryEvicted: function(event) {\n invokeListeners('entryEvicted', event);\n\t }\n });\n\n // We use the local version of the entry listener because we usually only want one node in the\n // cluster to handle the event. If all of our nodes were notified when an event fired, we would\n // have to do some distributed gymnastics to ensure only one node handled the event. So, this\n // local event listening is very crucial, and provides excellent performance.\n log.debug('Adding Hazelcast event listener to map [{}]', name);\n map.addLocalEntryListener(listener);\n\n\n\treturn {\n addEntryListener: addEntryListener,\n clearEntryListeners: clearEntryListeners,\n\t\tclear: clear,\n\t\tevict: evict,\n\t\tget: get,\n\t\tkeySet: keySet,\n\t\thasKey: hasKey,\n\t\thzObject: map,\n index: index,\n type: type,\n\t\tname: name,\n\t\tput: put,\n\t\tcount: count,\n\t\tremove: remove,\n\t\trefresh: refresh,\n\t\tsize: size,\n\t\ttoString: toString\n\t};\n}", "function Map() {}", "function CachedMap(mappingFunction) {\n this._map = mappingFunction || null;\n this._cachedOutput = null;\n this._cachedInput = Number.NaN; //never valid as input\n }", "function Map() {\n this.dict = {};\n\n /**\n * Returns the number of key-value mappings in this map.\n * @method\n */\n this.size = function () {\n return Object.keys(this.dict).length;\n };\n\n /**\n * Returns true if this map contains no key-value mappings.\n * @method\n */\n this.isEmpty = function () {\n return Object.keys(this.dict).length == 0;\n };\n\n /**\n * Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.\n * @method\n */\n this.get = function (key) {\n return this.dict[key];\n };\n\n /**\n * Returns true if this map contains a mapping for the specified key.\n * @method\n */\n this.containsKey = function (key) {\n if (this.get(key) !== undefined) {\n return true;\n } else {\n return false;\n }\n };\n\n /**\n * Associates the specified value with the specified key in this map. If the map previously contained a mapping for the key, the old value is replaced.\n * @method\n */\n this.put = function (key, value) {\n this.dict[key] = value;\n };\n\n /**\n * Removes the mapping for the specified key from this map if present.\n * @method\n */\n this.remove = function (key) {\n try {\n 'use strict';\n delete this.dict[key];\n } catch (e) {\n console.log(e);\n }\n };\n\n /**\n * Removes all of the mappings from this map. The map will be empty after this call returns.\n * @method\n */\n this.clear = function () {\n this.dict = {};\n };\n\n /**\n * Executes the given callback for each entry in this map until all entries have been processed.\n * The given callback will be passed a map entry as parameter. So, for example...\n *\n * function myCallback(mapEntryItem) {\n * \t\tconsole.log('I will process this item: ' + mapEntryItem.text);\n * }\n *\n * myMap.forEach(myCallback);\n *\n * @method\n */\n this.forEach = function (callback) {\n var len = this.size();\n for (i = 0; i < len; i++) {\n var item = this.get(Object.keys(this.dict)[i]);\n callback(item);\n }\n };\n\n this.first = function (callback) {\n var len = this.size();\n for (i = 0; i < len && i < 1; i++) {\n var item = this.get(Object.keys(this.dict)[0]);\n callback(Object.keys(this.dict)[0], item);\n }\n };\n\n this.forAll = function (callback) {\n var len = this.size();\n for (i = 0; i < len; i++) {\n var key = Object.keys(this.dict)[i];\n var item = this.get(key);\n callback(key, item);\n }\n };\n}", "function getInstanceContext(instanceId) {\n return instanceMap[instanceId]; \n }", "function ObjectMap ()\n\t{\n\t\t\n\t\t/**\n\t\t * Key value pairs\n\t\t * \n\t\t * @type {array of objects}\n\t\t */\n\t\tthis._keyValuePairs = [];\n\t}", "function mapState(state) {\n return {\n counterValue: state.counterValue\n }\n}", "add(index, instance) {\n // Add a single object only one parameter is passed\n // so index = instance\n if( instance === undefined) this.map.set( 0, index );\n else this.map.set( index, instance );\n }", "function Map() {\n this.members = {};\n this.length = 0;\n }", "function ValueMap(data) {\n this.data = data || {};\n}", "function h$Map() {\n this._pairsKeys = [];\n this._pairsValues = [];\n this._keys = [];\n this._size = 0;\n}", "function h$Map() {\n this._pairsKeys = [];\n this._pairsValues = [];\n this._keys = [];\n this._size = 0;\n}", "function h$Map() {\n this._pairsKeys = [];\n this._pairsValues = [];\n this._keys = [];\n this._size = 0;\n}", "function h$Map() {\n this._pairsKeys = [];\n this._pairsValues = [];\n this._keys = [];\n this._size = 0;\n}", "function get(key){return key._reactInternalFiber;}", "function get(key){return key._reactInternalFiber;}", "function get(key){return key._reactInternalFiber;}", "function get(key){return key._reactInternalFiber;}", "function get(key){return key._reactInternalFiber;}", "function get(key){return key._reactInternalFiber;}", "function get(key){return key._reactInternalFiber;}", "function get(key){return key._reactInternalFiber;}", "function get(key){return key._reactInternalFiber;}", "function get(key){return key._reactInternalFiber;}", "function get(key){return key._reactInternalFiber;}", "function TsMap(intrator) {\n // Used to store keys.\n this.keyStore = [];\n // Used to store values.\n this.valueStore = [];\n // The Map's size,\n // increase at function set,\n // decrease at function remove,\n // clear at function clear.\n this.size = 0;\n if (intrator) {\n for (var _i = 0, intrator_1 = intrator; _i < intrator_1.length; _i++) {\n var item = intrator_1[_i];\n this.keyStore.push(item[0]);\n this.valueStore.push(item[1]);\n this.size++;\n }\n }\n }", "function Map() {\n if (this instanceof Map) {\n this._keys = OrderedSet.create();\n this._values = Object.create(null);\n this.size = 0;\n } else {\n missingNew('Map');\n }\n }", "function get(key){return key._reactInternals;}", "function get(key){return key._reactInternals;}", "function MapCache() {\n this.__data__ = {};\n}", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function MapCache() {\n this.__data__ = {};\n }", "function createAutoBindMap(){if(!current.__reactAutoBindMap){return;}var __reactAutoBindMap={};for(var name in current.__reactAutoBindMap){if(typeof proxy[name]==='function'&&current.__reactAutoBindMap.hasOwnProperty(name)){__reactAutoBindMap[name]=proxy[name];}}return __reactAutoBindMap;}", "function createAutoBindMap(){if(!current.__reactAutoBindMap){return;}var __reactAutoBindMap={};for(var name in current.__reactAutoBindMap){if(typeof proxy[name]==='function'&&current.__reactAutoBindMap.hasOwnProperty(name)){__reactAutoBindMap[name]=proxy[name];}}return __reactAutoBindMap;}", "function MapCache() {\n this.__data__ = {};\n }", "render() {\n return(\n <div className=\"drumkit\">\n <div className=\"keys\">\n {\n Object.keys(this.state.keymaps)\n .map(key => <Keys key={key} map={this.state.keymaps[key]} index={key} className={this.state.keymaps[key].className} />)\n }\n </div>\n </div>\n )\n }", "function Map() {\n var keys = [], values = [];\n\n return {\n contains: function (key) {\n var at = keys.indexOf(key);\n return at > -1;\n },\n get: function (key) {\n var at = keys.indexOf(key);\n if (at >= 0) {\n return values[at];\n }\n },\n put: function (key, value) {\n var at = keys.indexOf(key);\n if (at < 0) {\n at = keys.length;\n }\n keys[at] = key;\n values[at] = value;\n },\n remove: function (key) {\n var at = keys.indexOf(key);\n if (at >= 0) {\n keys.splice(at, 1);\n values.splice(at, 1);\n }\n }\n }\n}", "_saveInstanceProperties() {\n for (const [p] of this.constructor\n ._classProperties) {\n if (this.hasOwnProperty(p)) {\n const value = this[p];\n delete this[p];\n if (!this._instanceProperties) {\n this._instanceProperties = new Map();\n }\n this._instanceProperties.set(p, value);\n }\n }\n }", "function Map() {\n\t\t this.items = Object.create(null);\n\t\t this.length = 0;\n\t\t this.next = 0;\n\t\t }", "static getInstance(key) {\n if (Model.instanceMap[key] == null) {\n Model.instanceMap[key] = new Model(key);\n }\n\n return Model.instanceMap[key];\n }", "function HashMap(){\n return {\n get: function(k){\n return this.store[k];\n },\n set: function(k, v){\n this.store[k] = v;\n return this;\n },\n has: function(k){\n return this.store[k] !== undefined;\n },\n delete: function(k){\n if(this.store[k] !== undefined){\n delete this.store[k];\n return true;\n }\n return false;\n },\n entries: function(){\n var entries = [];\n for(key in this.store){\n entries.push([key, this.store[key]]);\n }\n return entries;\n },\n forEach: function(callback, thisArg){\n for(key in this.store){\n if(thisArg !== undefined){\n thisArg.callback(key, this.store[key]);\n }else{\n callback(key, this.store[key]);\n }\n }\n },\n keys: function(){\n var keys = [];\n for(key in this.store){\n keys.push(key);\n }\n return keys;\n },\n values: function(){\n var values = [];\n for(key in this.store){\n values.push(this.store[key]);\n }\n return values;\n },\n\n store: {}\n };\n }", "function Map() {\n\t this.items = Object.create(null);\n\t this.length = 0;\n\t this.next = 0;\n\t }", "function Map() {\n\t\n}", "function Map() {\n\t\n}", "function LazyMap() {\n this.store = {};\n}", "function LazyMap() {\n this.store = {};\n}", "function LazyMap() {\n this.store = {};\n}", "function LazyMap() {\n this.store = {};\n}", "function LazyMap() {\n this.store = {};\n}", "function LazyMap() {\n this.store = {};\n}", "function MapCache() {\n this.__data__ = {};\n }", "function getInstanceBindingMap(content, delegate_) {\n var contentId = getContentUid(content);\n if (delegate_) {\n var map = delegate_.bindingMaps[contentId];\n if (!map) {\n map = delegate_.bindingMaps[contentId] =\n createInstanceBindingMap(content, delegate_.prepareBinding) || [];\n }\n return map;\n }\n\n var map = content.bindingMap_;\n if (!map) {\n map = content.bindingMap_ =\n createInstanceBindingMap(content, undefined) || [];\n }\n return map;\n }", "function getInstanceBindingMap(content, delegate_) {\n var contentId = getContentUid(content);\n if (delegate_) {\n var map = delegate_.bindingMaps[contentId];\n if (!map) {\n map = delegate_.bindingMaps[contentId] =\n createInstanceBindingMap(content, delegate_.prepareBinding) || [];\n }\n return map;\n }\n\n var map = content.bindingMap_;\n if (!map) {\n map = content.bindingMap_ =\n createInstanceBindingMap(content, undefined) || [];\n }\n return map;\n }", "constructor() {\n this._state = new WeakMap();\n }", "function MapCache() {\n\t this.__data__ = {};\n\t}", "function MapCache() {\n\t this.__data__ = {};\n\t}", "function ObjectWithMap(){\r\n\t\r\n\tthis.map = (func) => {\r\n\t\t\r\n\t\tfor (let i in this){\r\n\t\t\tif(i != 'map') this[i] = func(this[i]);\r\n\t\t}\r\n\t\t\r\n\t}\r\n}", "function MapCache() {\n\t this.__data__ = {};\n\t }", "function MapCache() {\n\t this.__data__ = {};\n\t }", "function MapCache() {\n\t this.__data__ = {};\n\t }", "function MapCache() {\n\t this.__data__ = {};\n\t }", "function MapCache() {\n\t this.__data__ = {};\n\t }", "function MapCache() {\n\t this.__data__ = {};\n\t }", "function MapCache() {\n\t this.__data__ = {};\n\t }", "function MapCache() {\n\t this.__data__ = {};\n\t }", "function MapCache() {\n\t this.__data__ = {};\n\t }", "function MapCache() {\n\t this.__data__ = {};\n\t }" ]
[ "0.55530405", "0.5547857", "0.55443573", "0.5531664", "0.5357758", "0.5312821", "0.5214135", "0.5200113", "0.51929325", "0.51665306", "0.51311094", "0.51135135", "0.511133", "0.5057867", "0.5051099", "0.5049122", "0.5036898", "0.50143623", "0.50143623", "0.50143623", "0.50143623", "0.49915144", "0.49915144", "0.49915144", "0.49915144", "0.49915144", "0.49915144", "0.49915144", "0.49915144", "0.49915144", "0.49915144", "0.49915144", "0.49903044", "0.49873105", "0.4970948", "0.4970948", "0.49708378", "0.49565196", "0.49565196", "0.49565196", "0.49565196", "0.49565196", "0.49565196", "0.49565196", "0.49565196", "0.49565196", "0.49565196", "0.49565196", "0.49565196", "0.49565196", "0.49565196", "0.49565196", "0.49565196", "0.49565196", "0.49565196", "0.49565196", "0.49565196", "0.49565196", "0.49565196", "0.49565196", "0.49565196", "0.49565196", "0.49565196", "0.49565196", "0.49565196", "0.49565196", "0.4916287", "0.4916287", "0.49109364", "0.4909349", "0.49047863", "0.48944074", "0.48933476", "0.48910776", "0.48900485", "0.48885408", "0.48650372", "0.48650372", "0.48528945", "0.48528945", "0.48528945", "0.48528945", "0.48528945", "0.48528945", "0.48425052", "0.4825549", "0.4825549", "0.48098415", "0.4808404", "0.4808404", "0.47997537", "0.4798016", "0.4798016", "0.4798016", "0.4798016", "0.4798016", "0.4798016", "0.4798016", "0.4798016", "0.4798016", "0.4798016" ]
0.0
-1
Find the deepest React component completely containing the root of the passedin instance (for use when entire React trees are nested within each other). If React trees are not nested, returns null.
function findRootContainerNode(inst) { if (inst.tag === HostRoot) { return inst.stateNode.containerInfo; } // TODO: It may be a good idea to cache this to prevent unnecessary DOM // traversal, but caching is difficult to do correctly without using a // mutation observer to listen for all DOM changes. while (inst.return) { inst = inst.return; } if (inst.tag !== HostRoot) { // This can happen if we're in a detached tree. return null; } return inst.stateNode.containerInfo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function getClosestInstanceFromNode(node){if(node[internalInstanceKey]){return node[internalInstanceKey];}while(!node[internalInstanceKey]){if(node.parentNode){node=node.parentNode;}else{// Top of the tree. This node must not be part of a React tree (or is\n// unmounted, potentially).\nreturn null;}}var inst=node[internalInstanceKey];if(inst.tag===HostComponent||inst.tag===HostText){// In Fiber, this will always be the deepest root.\nreturn inst;}return null;}", "function getClosestInstanceFromNode(node){if(node[internalInstanceKey]){return node[internalInstanceKey];}while(!node[internalInstanceKey]){if(node.parentNode){node=node.parentNode;}else{// Top of the tree. This node must not be part of a React tree (or is\n// unmounted, potentially).\nreturn null;}}var inst=node[internalInstanceKey];if(inst.tag===HostComponent||inst.tag===HostText){// In Fiber, this will always be the deepest root.\nreturn inst;}return null;}", "function getClosestInstanceFromNode(node){if(node[internalInstanceKey]){return node[internalInstanceKey];}while(!node[internalInstanceKey]){if(node.parentNode){node=node.parentNode;}else{// Top of the tree. This node must not be part of a React tree (or is\n// unmounted, potentially).\nreturn null;}}var inst=node[internalInstanceKey];if(inst.tag===HostComponent||inst.tag===HostText){// In Fiber, this will always be the deepest root.\nreturn inst;}return null;}", "function getClosestInstanceFromNode(node){if(node[internalInstanceKey]){return node[internalInstanceKey];}while(!node[internalInstanceKey]){if(node.parentNode){node=node.parentNode;}else{// Top of the tree. This node must not be part of a React tree (or is\n// unmounted, potentially).\nreturn null;}}var inst=node[internalInstanceKey];if(inst.tag===HostComponent||inst.tag===HostText){// In Fiber, this will always be the deepest root.\nreturn inst;}return null;}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n }", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n }", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n }", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n }", "function findFirstReactDOMImpl(node) {\n\t\t // This node might be from another React instance, so we make sure not to\n\t\t // examine the node cache here\n\t\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t\t if (node.nodeType !== 1) {\n\t\t // Not a DOMElement, therefore not a React component\n\t\t continue;\n\t\t }\n\t\t var nodeID = internalGetID(node);\n\t\t if (!nodeID) {\n\t\t continue;\n\t\t }\n\t\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\t\n\t\t // If containersByReactRootID contains the container we find by crawling up\n\t\t // the tree, we know that this instance of React rendered the node.\n\t\t // nb. isValid's strategy (with containsNode) does not work because render\n\t\t // trees may be nested and we don't want a false positive in that case.\n\t\t var current = node;\n\t\t var lastID;\n\t\t do {\n\t\t lastID = internalGetID(current);\n\t\t current = current.parentNode;\n\t\t if (current == null) {\n\t\t // The passed-in node has been detached from the container it was\n\t\t // originally rendered into.\n\t\t return null;\n\t\t }\n\t\t } while (lastID !== reactRootID);\n\t\t\n\t\t if (current === containersByReactRootID[reactRootID]) {\n\t\t return node;\n\t\t }\n\t\t }\n\t\t return null;\n\t\t}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n }\n else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n return null;\n }", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}", "function getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n while (!node[internalInstanceKey]) {\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n\n return null;\n}" ]
[ "0.68765056", "0.68765056", "0.68765056", "0.68765056", "0.68765056", "0.68765056", "0.68765056", "0.68765056", "0.68765056", "0.68765056", "0.68765056", "0.68765056", "0.68765056", "0.68765056", "0.67980665", "0.67980665", "0.67980665", "0.67980665", "0.67980665", "0.67980665", "0.67980665", "0.67980665", "0.67980665", "0.67980665", "0.67980665", "0.67980665", "0.67980665", "0.67980665", "0.67980665", "0.67980665", "0.6787595", "0.6787595", "0.6787595", "0.6787595", "0.6787595", "0.6787595", "0.6787595", "0.67810416", "0.67810416", "0.67810416", "0.67810416", "0.675943", "0.675943", "0.675943", "0.67529935", "0.67238194", "0.66996145", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523", "0.6668523" ]
0.0
-1
Hyphenates a camelcased CSS property name, for example: > hyphenateStyleName('backgroundColor') hyphenateStyleName('MozTransition') hyphenateStyleName('msTransition') < "mstransition" As Modernizr suggests ( an `ms` prefix is converted to `ms`.
function hyphenateStyleName(name) { return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hyphenateStyleName(name){return name.replace(uppercasePattern,'-$1').toLowerCase().replace(msPattern,'-ms-');}", "function hyphenateStyleName(name){return name.replace(uppercasePattern,'-$1').toLowerCase().replace(msPattern,'-ms-');}", "function hyphenateStyleName(name){return name.replace(uppercasePattern,'-$1').toLowerCase().replace(msPattern,'-ms-');}", "function hyphenateStyleName(name){return name.replace(uppercasePattern,'-$1').toLowerCase().replace(msPattern,'-ms-');}", "function hyphenateStyleName(name){return name.replace(uppercasePattern,'-$1').toLowerCase().replace(msPattern,'-ms-');}", "function hyphenateStyleName(name){return name.replace(uppercasePattern,'-$1').toLowerCase().replace(msPattern,'-ms-');}", "function hyphenateStyleName(name){return name.replace(uppercasePattern,'-$1').toLowerCase().replace(msPattern,'-ms-');}", "function hyphenateStyleName(name){return name.replace(uppercasePattern,'-$1').toLowerCase().replace(msPattern,'-ms-');}", "function hyphenateStyleName(name) {\n return name\n .replace(uppercasePattern, '-$1')\n .toLowerCase()\n .replace(msPattern, '-ms-');\n }" ]
[ "0.818741", "0.818741", "0.818741", "0.818741", "0.818741", "0.818741", "0.818741", "0.818741", "0.79492724" ]
0.7950082
97
Operations for dealing with CSS properties. This creates a string that is expected to be equivalent to the style attribute generated by serverside rendering. It bypasses warnings and security checks so it's not safe to use this value for anything other than comparison. It is only used in DEV for SSR validation.
function createDangerousStringForStyles(styles) { { var serialized = ''; var delimiter = ''; for (var styleName in styles) { if (!styles.hasOwnProperty(styleName)) { continue; } var styleValue = styles[styleName]; if (styleValue != null) { var isCustomProperty = styleName.indexOf('--') === 0; serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':'; serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty); delimiter = ';'; } } return serialized || null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static get styles () {\n return css`${unsafeCSS(style)}`\n }", "get cssText() {\n var properties = [];\n for (var i = 0, length = this.length; i < length; ++i) {\n var name = this[i];\n var value = this.getPropertyValue(name);\n var priority = this.getPropertyPriority(name);\n if (priority) {\n priority = \" !\" + priority;\n }\n properties[i] = name + \": \" + value + priority + \";\";\n }\n return properties.join(\" \");\n }", "get cssText(){\n var properties = [];\n for (var i=0, length=this.length; i < length; ++i) {\n var name = this[i];\n var value = this.getPropertyValue(name);\n var priority = this.getPropertyPriority(name);\n if (priority) {\n priority = \" !\" + priority;\n }\n properties[i] = name + \": \" + value + priority + \";\";\n }\n return properties.join(\" \")\n }", "get cssText(){\n\t\tvar properties = [];\n\t\tfor (var i=0, length=this.length; i < length; ++i) {\n\t\t\tvar name = this[i];\n\t\t\tvar value = this.getPropertyValue(name);\n\t\t\tvar priority = this.getPropertyPriority(name);\n\t\t\tif (priority) {\n\t\t\t\tpriority = \" !\" + priority;\n\t\t\t}\n\t\t\tproperties[i] = name + \": \" + value + priority + \";\";\n\t\t}\n\t\treturn properties.join(\" \");\n\t}", "get cssText(){\n\t\tvar properties = [];\n\t\tfor (var i=0, length=this.length; i < length; ++i) {\n\t\t\tvar name = this[i];\n\t\t\tvar value = this.getPropertyValue(name);\n\t\t\tvar priority = this.getPropertyPriority(name);\n\t\t\tif (priority) {\n\t\t\t\tpriority = \" !\" + priority;\n\t\t\t}\n\t\t\tproperties[i] = name + \": \" + value + priority + \";\";\n\t\t}\n\t\treturn properties.join(\" \");\n\t}", "function evaluateStyle(styleProperties_)\n{\n\tlet s = \"\";\n\tfor(let i = 0; i < styleProperties_.length; ++i)\n\t{\n\t\tif (i != 0)\n\t\t\ts += \";\";\n\t\ts += evaluateStyleRule(styleProperties_[i]);\n\t}\n\treturn s;\n}", "function evaluateStyleRule(styleProperty_)\n{\n\treturn styleProperty_.name + \": \" + styleProperty_.value;\n}", "function getCSSStyle(key, value) {\n if(value && value.value) {\n return key + \": \" + value.value +\";\";\n }\n else\n return \"\";\n }", "function cssToStr(cssProps){var statements=[];$.each(cssProps,function(name,val){if(val!=null){statements.push(name+':'+val);}});return statements.join(';');}", "getCSSVars(){\n var compStyle = getComputedStyle(this.DOM.scope, null)\n\n const getProp = name => compStyle.getPropertyValue('--'+name)\n\n function seprateUnitFromValue(a){\n if( !a ) return {}\n a = a.trim().split(' ')[0]\n var unit = a.split(/\\d+/g).filter(n=>n).pop().trim(),\n value = +a.split(unit).filter(n=>n)[0].trim()\n return {value, unit}\n }\n\n this.CSSVars = {\n tagHideTransition: (({value, unit}) => unit=='s' ? value * 1000 : value)(seprateUnitFromValue(getProp('tag-hide-transition')))\n }\n }", "function get_rendered_style(elm, css_rule_str){\n\tvar str_val = \"\";\n\tif(document.defaultView && document.defaultView.getComputedStyle){\n\t\tstr_val = document.defaultView.getComputedStyle(elm, \"\").getPropertyValue(css_rule_str);\n\t}\n\telse if(elm.currentStyle){\n // Catch errors for unsupported browsers (IE <= 5.0)\n try {\n css_rule_str = css_rule_str.replace(/\\-(\\w)/g,\n function (strMatch, p1) {\n return p1.toUpperCase();\n });\n str_val = elm.currentStyle[css_rule_str];\n }\n catch(e) { /* In this case, return \"\" */ }\n\t}\n\treturn str_val;\n}", "function styleToString(key, value) {\n if (typeof value === 'number' && value !== 0 && !CSS_NUMBER[key]) {\n return key + \":\" + value + \"px\";\n }\n return key + \":\" + value;\n}", "function styleToString(key, value) {\n if (typeof value === 'number' && value !== 0 && !CSS_NUMBER[key]) {\n return key + \":\" + value + \"px\";\n }\n return key + \":\" + value;\n}", "function createStyleProperty(el) {\n\tvar style = el.style;\n\tvar output = {};\n\tfor (var i = 0; i < style.length; ++i) {\n\t\tvar item = style.item(i);\n\t\toutput[item] = String(style[item]);\n\t\t// hack to workaround browser inconsistency with url()\n\t\tif (output[item].indexOf('url') > -1) {\n\t\t\toutput[item] = output[item].replace(/\\\"/g, '')\n\t\t}\n\t}\n\treturn { name: 'style', value: output };\n}", "function sanitizeStyle(value) {\n value = String(value).trim(); // Make sure it's actually a string.\n if (!value)\n return '';\n // Single url(...) values are supported, but only for URLs that sanitize cleanly. See above for\n // reasoning behind this.\n var urlMatch = value.match(URL_RE);\n if ((urlMatch && __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__url_sanitizer__[\"a\" /* sanitizeUrl */])(urlMatch[1]) === urlMatch[1]) ||\n value.match(SAFE_STYLE_VALUE) && hasBalancedQuotes(value)) {\n return value; // Safe style values.\n }\n if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__[\"isDevMode\"])()) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__dom_dom_adapter__[\"a\" /* getDOM */])().log(\"WARNING: sanitizing unsafe style value \" + value + \" (see http://g.co/ng/security#xss).\");\n }\n return 'unsafe';\n}", "function styleStringToString(name, value) {\n\t if (value == null) {\n\t return '';\n\t }\n\t if (typeof value === 'number' && value !== 0 && !CSS_NUMBER[name]) {\n\t value += 'px';\n\t }\n\t return name + \":\" + String(value).replace(/([\\{\\}\\[\\]])/g, '\\\\$1');\n\t}", "function styleToString(key, value) {\n if (value && typeof value === \"number\" && !CSS_NUMBER[key]) {\n return `${key}:${value}px`;\n }\n return `${key}:${value}`;\n}", "function styleToString(key, value) {\n if (value && typeof value === \"number\" && !CSS_NUMBER[key]) {\n return `${key}:${value}px`;\n }\n return `${key}:${value}`;\n}", "function cssToStr(cssProps) {\n var statements = [];\n $.each(cssProps, function (name, val) {\n if (val != null) {\n statements.push(name + ':' + val);\n }\n });\n return statements.join(';');\n}", "function cssToStr(cssProps) {\n var statements = [];\n $.each(cssProps, function (name, val) {\n if (val != null) {\n statements.push(name + ':' + val);\n }\n });\n return statements.join(';');\n}", "function cssToStr(cssProps) {\n var statements = [];\n $.each(cssProps, function (name, val) {\n if (val != null) {\n statements.push(name + ':' + val);\n }\n });\n return statements.join(';');\n}", "function cssToStr(cssProps) {\n var statements = [];\n $.each(cssProps, function (name, val) {\n if (val != null) {\n statements.push(name + ':' + val);\n }\n });\n return statements.join(';');\n}", "function GetStyleProperty(oElm, strCssProperty)\n{\n var strValue = \"\";\n if(document.defaultView && document.defaultView.getComputedStyle)\n {\n strValue = document.defaultView.getComputedStyle(oElm, \"\").getPropertyValue(strCssProperty);\n }\n else if(oElm.currentStyle)\n {\n strCssProperty = strCssProperty.replace(/\\-(\\w)/g, function (strMatch, p1){\n return p1.toUpperCase();\n });\n strValue = oElm.currentStyle[strCssProperty];\n }\n return strValue;\n}", "function get_computed_value(cs, property)\n{\n var info = gCSSProperties[property];\n if (info.type == CSS_TYPE_TRUE_SHORTHAND ||\n (info.type == CSS_TYPE_SHORTHAND_AND_LONGHAND &&\n (property == \"text-decoration\" || property == \"mask\"))) {\n var results = [];\n for (var idx in info.subproperties) {\n var subprop = info.subproperties[idx];\n results.push(get_computed_value(cs, subprop));\n }\n return results.join(\" ; \");\n }\n if (info.get_computed)\n return info.get_computed(cs, property);\n return cs.getPropertyValue(property);\n}", "function getStyleProps(injector) {\n return {\n id: STYLE_ELEMENT_ID,\n nonce: injector.nonce,\n textContent: injector.ruleTexts.join(\"\")\n };\n}", "function toStyleProp(prop) {\r\n\t\tif (prop == 'float') {\r\n\t\t\treturn glow.env.ie ? 'styleFloat' : 'cssFloat';\r\n\t\t}\r\n\t\treturn prop.replace(/-(\\w)/g, function(match, p1) {\r\n\t\t\treturn p1.toUpperCase();\r\n\t\t});\r\n\t}", "function _sanitizeStyle(value) {\n value = String(value).trim(); // Make sure it's actually a string.\n if (!value)\n return '';\n // Single url(...) values are supported, but only for URLs that sanitize cleanly. See above for\n // reasoning behind this.\n var urlMatch = value.match(URL_RE);\n if ((urlMatch && _sanitizeUrl(urlMatch[1]) === urlMatch[1]) ||\n value.match(SAFE_STYLE_VALUE) && hasBalancedQuotes(value)) {\n return value; // Safe style values.\n }\n if (isDevMode()) {\n console.warn(\"WARNING: sanitizing unsafe style value \" + value + \" (see http://g.co/ng/security#xss).\");\n }\n return 'unsafe';\n}", "function _sanitizeStyle(value) {\n value = String(value).trim(); // Make sure it's actually a string.\n if (!value)\n return '';\n // Single url(...) values are supported, but only for URLs that sanitize cleanly. See above for\n // reasoning behind this.\n var urlMatch = value.match(URL_RE);\n if ((urlMatch && _sanitizeUrl(urlMatch[1]) === urlMatch[1]) ||\n value.match(SAFE_STYLE_VALUE) && hasBalancedQuotes(value)) {\n return value; // Safe style values.\n }\n if (isDevMode()) {\n console.warn(\"WARNING: sanitizing unsafe style value \" + value + \" (see http://g.co/ng/security#xss).\");\n }\n return 'unsafe';\n}", "function _sanitizeStyle(value) {\n value = String(value).trim(); // Make sure it's actually a string.\n if (!value)\n return '';\n // Single url(...) values are supported, but only for URLs that sanitize cleanly. See above for\n // reasoning behind this.\n var urlMatch = value.match(URL_RE);\n if ((urlMatch && _sanitizeUrl(urlMatch[1]) === urlMatch[1]) ||\n value.match(SAFE_STYLE_VALUE) && hasBalancedQuotes(value)) {\n return value; // Safe style values.\n }\n if (isDevMode()) {\n console.warn(\"WARNING: sanitizing unsafe style value \" + value + \" (see http://g.co/ng/security#xss).\");\n }\n return 'unsafe';\n}", "function _sanitizeStyle(value) {\n value = String(value).trim(); // Make sure it's actually a string.\n if (!value)\n return '';\n // Single url(...) values are supported, but only for URLs that sanitize cleanly. See above for\n // reasoning behind this.\n var urlMatch = value.match(URL_RE);\n if ((urlMatch && _sanitizeUrl(urlMatch[1]) === urlMatch[1]) ||\n value.match(SAFE_STYLE_VALUE) && hasBalancedQuotes(value)) {\n return value; // Safe style values.\n }\n if (isDevMode()) {\n console.warn(\"WARNING: sanitizing unsafe style value \" + value + \" (see http://g.co/ng/security#xss).\");\n }\n return 'unsafe';\n}", "function getCss(propertyInfo, value) {\n var rules = void 0;\n\n // Protect against unexpected values\n var valueType = typeof value === 'undefined' ? 'undefined' : _typeof(value);\n if (valueType !== 'string' && valueType !== 'number') {\n if (true) {\n var name = propertyInfo.jsName;\n var encodedValue = JSON.stringify(value);\n console.error('\\uD83D\\uDCE6 ui-box: property \\u201C' + name + '\\u201D was passed invalid value \\u201C' + encodedValue + '\\u201D. Only numbers and strings are supported.');\n }\n return null;\n }\n\n var valueString = (0, _valueToString2.default)(value, propertyInfo.defaultUnit);\n\n var className = (0, _getClassName2.default)(propertyInfo, valueString);\n\n // Avoid running the prefixer when possible because it's slow\n if (propertyInfo.isPrefixed) {\n rules = (0, _prefixer2.default)(propertyInfo.jsName, valueString);\n } else {\n rules = [{ property: propertyInfo.cssName, value: valueString }];\n }\n\n var styles = void 0;\n if (false) { var rulesString; } else {\n var _rulesString = rules.map(function (rule) {\n return ' ' + rule.property + ': ' + rule.value + ';';\n }).join('\\n');\n styles = '\\n.' + className + ' {\\n' + _rulesString + '\\n}';\n }\n\n return { className: className, styles: styles };\n}", "function getCss(propertyInfo, value) {\n var rules = void 0;\n\n // Protect against unexpected values\n var valueType = typeof value === 'undefined' ? 'undefined' : _typeof(value);\n if (valueType !== 'string' && valueType !== 'number') {\n if (true) {\n var name = propertyInfo.jsName;\n var encodedValue = JSON.stringify(value);\n console.error('\\uD83D\\uDCE6 ui-box: property \\u201C' + name + '\\u201D was passed invalid value \\u201C' + encodedValue + '\\u201D. Only numbers and strings are supported.');\n }\n return null;\n }\n\n var valueString = (0, _valueToString2.default)(value, propertyInfo.defaultUnit);\n\n var className = (0, _getClassName2.default)(propertyInfo, valueString);\n\n // Avoid running the prefixer when possible because it's slow\n if (propertyInfo.isPrefixed) {\n rules = (0, _prefixer2.default)(propertyInfo.jsName, valueString);\n } else {\n rules = [{ property: propertyInfo.cssName, value: valueString }];\n }\n\n var styles = void 0;\n if (false) { var rulesString; } else {\n var _rulesString = rules.map(function (rule) {\n return ' ' + rule.property + ': ' + rule.value + ';';\n }).join('\\n');\n styles = '\\n.' + className + ' {\\n' + _rulesString + '\\n}';\n }\n\n return { className: className, styles: styles };\n}", "renderCssStyle() {\n this.cssStyle = [\n // `width: ${parseFloat(this.width) != this.width ? this.width : this.width + 'px'};`\n ].join(' ');\n }", "function css$get$0() {\n if ( !this.cssCached ) this.stringify();\n return this.cssCached;\n }", "get _style() {\n\n let direction = FlexBox._directions[this.state.direction];\n let justify = FlexBox._justifys[this.state.justify];\n let alignment = FlexBox._alignments[this.state.alignment];\n\n return `flex ${alignment} ${justify} ${direction}`.trim();\n }", "function stringifyProperties(properties) {\n\t return properties.map(function (p) { return styleToString(p[0], p[1]); }).join(';');\n\t}", "toString(): string {\n if (Array.isArray(this.style)) {\n let str = ''\n for (let index = 0; index < this.style.length; index++) {\n str += toCss(this.selector, this.style[index])\n if (this.style[index + 1]) str += '\\n'\n }\n return str\n }\n\n return toCss(this.selector, this.style)\n }", "get hostStyle() {\n const styles = `\n\t\t\tdisplay: flex;\n\t\t\theight: 140px;\n\t\t\tmin-height: 140px;\n\t\t\tmin-width: 180px;\n\t\t\tmax-width: 180px;\n\t\t\tjustify-content: center;\n\t\t\talign-items: center;\n\t\t\tpadding: 0 20px;\n\t\t\tmargin: 10px;\n\t\t\tborder-radius: 5px;\n\t\t\tposition: relative;\n\t\t`;\n return this.sanitizer.bypassSecurityTrustStyle(styles);\n }", "function getStyle(target, prop) {\n\t try {\n\t if (window.getComputedStyle) {\n\t // gecko and webkit\n\t prop = prop.replace(/([a-z])([A-Z])/, hyphenate); // requires hyphenated, not camel\n\t return window.getComputedStyle(target, null).getPropertyValue(prop);\n\t }\n\t if (target.currentStyle) {\n\t // ie\n\t return target.currentStyle[prop];\n\t }\n\t return target.style[prop];\n\t } catch (e) {}\n\t return \"\";\n\t }", "function cssProperty(p, rp) {\n var b = document.body || document.documentElement,\n s = b.style;\n if (typeof s == 'undefined') { return false; }\n if (typeof s[p] == 'string') { return rp ? p : true; }\n var v = ['Moz', 'Webkit', 'Khtml', 'O', 'ms', 'Icab'],\n p = p.charAt(0).toUpperCase() + p.substr(1);\n for (var i = 0; i < v.length; i++) {\n if (typeof s[v[i] + p] == 'string') { return rp ? (v[i] + p) : true; }\n }\n return false;\n }", "getStyle() {\n\t\tvar style = {\n\t\t\t\"color\": this.color || this.default_color,\n\t\t\t\"font-weight\": \"bold\",\n\t\t\t\"cursor\": \"pointer\",\n \"-webkit-text-stroke\": \"0.45px grey\"\n\t\t};\n\n\n\t\treturn _.map(style, (value, key) => `${key}:${value}`).join(';');\n\t}", "function cssToStr(cssProps) {\n var statements = [];\n\n $.each(cssProps, function (name, val) {\n if (val != null) {\n statements.push(name + ':' + val);\n }\n });\n\n return statements.join(';');\n }", "function getStyle (target, prop) {\n try {\n if ( window.getComputedStyle ) { // gecko and webkit\n prop = prop.replace(/([a-z])([A-Z])/, hyphenate); // requires hyphenated, not camel\n return window.getComputedStyle(target, null).getPropertyValue(prop);\n }\n if ( target.currentStyle ) { // ie\n return target.currentStyle[prop];\n }\n return target.style[prop];\n }\n catch (e) {\n }\n return \"\";\n }", "function getStyle(rule, prop) {\n\t try {\n\t return rule.style.getPropertyValue(prop);\n\t } catch (err) {\n\t // IE may throw if property is unknown.\n\t return '';\n\t }\n\t}", "function _sanitizeStyle(value){value=String(value).trim();// Make sure it's actually a string.\nif(!value)return'';// Single url(...) values are supported, but only for URLs that sanitize cleanly. See above for\n// reasoning behind this.\nvar urlMatch=value.match(URL_RE);if(urlMatch&&_sanitizeUrl(urlMatch[1])===urlMatch[1]||value.match(SAFE_STYLE_VALUE)&&hasBalancedQuotes(value)){return value;// Safe style values.\n}if(isDevMode()){console.warn(\"WARNING: sanitizing unsafe style value \"+value+\" (see http://g.co/ng/security#xss).\");}return'unsafe';}", "_renderStyle() {\n let render;\n switch (this.xstyle) {\n // no style\n case \"none\": render = \"\";\n break;\n // default styles defined by the DCC\n case \"in\" : if (this.hasAttribute(\"image\"))\n render = \"image-style\"\n else\n render = \"regular-style\"\n break;\n // styles defined by the theme\n case \"out-image\":\n case \"out\": render = this.elementTag() + \"-template\";\n break;\n // style defined directly in the attribute xstyle\n default: render = this.xstyle;\n }\n\n return render;\n }", "function validStyles(styleAttr){\n\tvar result = '';\n\tvar styleArray = styleAttr.split(';');\n\tangular.forEach(styleArray, function(value){\n\t\tvar v = value.split(':');\n\t\tif(v.length == 2){\n\t\t\tvar key = trim(angular.lowercase(v[0]));\n\t\t\tvar value = trim(angular.lowercase(v[1]));\n\t\t\tif(\n\t\t\t\t(key === 'color' || key === 'background-color') && (\n\t\t\t\t\tvalue.match(/^rgb\\([0-9%,\\. ]*\\)$/i)\n\t\t\t\t\t|| value.match(/^rgba\\([0-9%,\\. ]*\\)$/i)\n\t\t\t\t\t|| value.match(/^hsl\\([0-9%,\\. ]*\\)$/i)\n\t\t\t\t\t|| value.match(/^hsla\\([0-9%,\\. ]*\\)$/i)\n\t\t\t\t\t|| value.match(/^#[0-9a-f]{3,6}$/i)\n\t\t\t\t\t|| value.match(/^[a-z]*$/i)\n\t\t\t\t)\n\t\t\t||\n\t\t\t\tkey === 'text-align' && (\n\t\t\t\t\tvalue === 'left'\n\t\t\t\t\t|| value === 'right'\n\t\t\t\t\t|| value === 'center'\n\t\t\t\t\t|| value === 'justify'\n\t\t\t\t)\n\t\t\t||\n key === 'text-decoration' && (\n value === 'underline'\n || value === 'line-through'\n )\n || \n key === 'font-weight' && (\n value === 'bold'\n )\n ||\n key === 'font-style' && (\n value === 'italic'\n )\n ||\n key === 'float' && (\n value === 'left'\n || value === 'right'\n || value === 'none'\n )\n ||\n key === 'vertical-align' && (\n value === 'baseline'\n || value === 'sub'\n || value === 'super'\n || value === 'test-top'\n || value === 'text-bottom'\n || value === 'middle'\n || value === 'top'\n || value === 'bottom'\n || value.match(/[0-9]*(px|em)/)\n || value.match(/[0-9]+?%/)\n )\n ||\n key === 'font-size' && (\n value === 'xx-small'\n || value === 'x-small'\n || value === 'small'\n || value === 'medium'\n || value === 'large'\n || value === 'x-large'\n || value === 'xx-large'\n || value === 'larger'\n || value === 'smaller'\n || value.match(/[0-9]*\\.?[0-9]*(px|em|rem|mm|q|cm|in|pt|pc|%)/)\n )\n\t\t\t||\n\t\t\t\t(key === 'width' || key === 'height') && (\n\t\t\t\t\tvalue.match(/[0-9\\.]*(px|em|rem|%)/)\n\t\t\t\t)\n\t\t\t|| // Reference #520\n\t\t\t\t(key === 'direction' && value.match(/^ltr|rtl|initial|inherit$/))\n\t\t\t) result += key + ': ' + value + ';';\n\t\t}\n\t});\n\treturn result;\n}", "function setBrowserSpecificProperty(prop) {\n var style = document.body.style; // No reason for this particular tag, just want the style\n var prefixes = ['Webkit', 'Moz', 'O', 'ms', 'Khtml'];\n var ucProp = prop.charAt(0).toUpperCase() + prop.substr(1);\n var props = prefixes.map(function(prefix){return prefix + ucProp;}).concat(prop);\n\n for (var i in props) {\n if (style[props[i]] !== undefined) {\n return props[i];\n }\n }\n }", "function getStyle() {\n if (props.white) return styles.white;\n else if (props.red) return styles.red;\n else if (props.blue) return styles.blue;\n else if (props.green) return styles.green;\n else if (props.black) return styles.black;\n else {\n return styles.white;\n }\n }", "function computedStyle(el, prop, getComputedStyle, style) {\n getComputedStyle = window.getComputedStyle;\n style =\n // If we have getComputedStyle\n getComputedStyle ?\n // Query it\n // TODO: From CSS-Query notes, we might need (node, null) for FF\n getComputedStyle(el) :\n\n // Otherwise, we are in IE and use currentStyle\n el.currentStyle;\n if (style) {\n return style\n [\n // Switch to camelCase for CSSOM\n // DEV: Grabbed from jQuery\n // https://github.com/jquery/jquery/blob/1.9-stable/src/css.js#L191-L194\n // https://github.com/jquery/jquery/blob/1.9-stable/src/core.js#L593-L597\n prop.replace(/-(\\w)/gi, function (word, letter) {\n return letter.toUpperCase();\n })\n ];\n }\n}", "function getStyle(rule, prop) {\n try {\n return rule.style.getPropertyValue(prop);\n } catch (err) {\n // IE may throw if property is unknown.\n return '';\n }\n}", "function getStyle(rule, prop) {\n try {\n return rule.style.getPropertyValue(prop);\n } catch (err) {\n // IE may throw if property is unknown.\n return '';\n }\n}", "function createDangerousStringForStyles(styles){{var serialized='';var delimiter='';for(var styleName in styles){if(!styles.hasOwnProperty(styleName)){continue;}var styleValue=styles[styleName];if(styleValue!=null){var isCustomProperty=styleName.indexOf('--')===0;serialized+=delimiter+(isCustomProperty?styleName:hyphenateStyleName(styleName))+':';serialized+=dangerousStyleValue(styleName,styleValue,isCustomProperty);delimiter=';';}}return serialized||null;}}", "function createDangerousStringForStyles(styles){{var serialized='';var delimiter='';for(var styleName in styles){if(!styles.hasOwnProperty(styleName)){continue;}var styleValue=styles[styleName];if(styleValue!=null){var isCustomProperty=styleName.indexOf('--')===0;serialized+=delimiter+(isCustomProperty?styleName:hyphenateStyleName(styleName))+':';serialized+=dangerousStyleValue(styleName,styleValue,isCustomProperty);delimiter=';';}}return serialized||null;}}", "function createDangerousStringForStyles(styles){{var serialized='';var delimiter='';for(var styleName in styles){if(!styles.hasOwnProperty(styleName)){continue;}var styleValue=styles[styleName];if(styleValue!=null){var isCustomProperty=styleName.indexOf('--')===0;serialized+=delimiter+(isCustomProperty?styleName:hyphenateStyleName(styleName))+':';serialized+=dangerousStyleValue(styleName,styleValue,isCustomProperty);delimiter=';';}}return serialized||null;}}", "function createDangerousStringForStyles(styles){{var serialized='';var delimiter='';for(var styleName in styles){if(!styles.hasOwnProperty(styleName)){continue;}var styleValue=styles[styleName];if(styleValue!=null){var isCustomProperty=styleName.indexOf('--')===0;serialized+=delimiter+(isCustomProperty?styleName:hyphenateStyleName(styleName))+':';serialized+=dangerousStyleValue(styleName,styleValue,isCustomProperty);delimiter=';';}}return serialized||null;}}", "function createDangerousStringForStyles(styles){{var serialized='';var delimiter='';for(var styleName in styles){if(!styles.hasOwnProperty(styleName)){continue;}var styleValue=styles[styleName];if(styleValue!=null){var isCustomProperty=styleName.indexOf('--')===0;serialized+=delimiter+(isCustomProperty?styleName:hyphenateStyleName(styleName))+':';serialized+=dangerousStyleValue(styleName,styleValue,isCustomProperty);delimiter=';';}}return serialized||null;}}", "function createDangerousStringForStyles(styles){{var serialized='';var delimiter='';for(var styleName in styles){if(!styles.hasOwnProperty(styleName)){continue;}var styleValue=styles[styleName];if(styleValue!=null){var isCustomProperty=styleName.indexOf('--')===0;serialized+=delimiter+hyphenateStyleName(styleName)+':';serialized+=dangerousStyleValue(styleName,styleValue,isCustomProperty);delimiter=';';}}return serialized||null;}}", "function createDangerousStringForStyles(styles){{var serialized='';var delimiter='';for(var styleName in styles){if(!styles.hasOwnProperty(styleName)){continue;}var styleValue=styles[styleName];if(styleValue!=null){var isCustomProperty=styleName.indexOf('--')===0;serialized+=delimiter+hyphenateStyleName(styleName)+':';serialized+=dangerousStyleValue(styleName,styleValue,isCustomProperty);delimiter=';';}}return serialized||null;}}", "function createDangerousStringForStyles(styles){{var serialized='';var delimiter='';for(var styleName in styles){if(!styles.hasOwnProperty(styleName)){continue;}var styleValue=styles[styleName];if(styleValue!=null){var isCustomProperty=styleName.indexOf('--')===0;serialized+=delimiter+hyphenateStyleName(styleName)+':';serialized+=dangerousStyleValue(styleName,styleValue,isCustomProperty);delimiter=';';}}return serialized||null;}}", "function createDangerousStringForStyles(styles){{var serialized='';var delimiter='';for(var styleName in styles){if(!styles.hasOwnProperty(styleName)){continue;}var styleValue=styles[styleName];if(styleValue!=null){var isCustomProperty=styleName.indexOf('--')===0;serialized+=delimiter+hyphenateStyleName(styleName)+':';serialized+=dangerousStyleValue(styleName,styleValue,isCustomProperty);delimiter=';';}}return serialized||null;}}", "function createDangerousStringForStyles(styles){{var serialized='';var delimiter='';for(var styleName in styles){if(!styles.hasOwnProperty(styleName)){continue;}var styleValue=styles[styleName];if(styleValue!=null){var isCustomProperty=styleName.indexOf('--')===0;serialized+=delimiter+hyphenateStyleName(styleName)+':';serialized+=dangerousStyleValue(styleName,styleValue,isCustomProperty);delimiter=';';}}return serialized||null;}}", "function createDangerousStringForStyles(styles){{var serialized='';var delimiter='';for(var styleName in styles){if(!styles.hasOwnProperty(styleName)){continue;}var styleValue=styles[styleName];if(styleValue!=null){var isCustomProperty=styleName.indexOf('--')===0;serialized+=delimiter+hyphenateStyleName(styleName)+':';serialized+=dangerousStyleValue(styleName,styleValue,isCustomProperty);delimiter=';';}}return serialized||null;}}", "function createDangerousStringForStyles(styles){{var serialized='';var delimiter='';for(var styleName in styles){if(!styles.hasOwnProperty(styleName)){continue;}var styleValue=styles[styleName];if(styleValue!=null){var isCustomProperty=styleName.indexOf('--')===0;serialized+=delimiter+hyphenateStyleName(styleName)+':';serialized+=dangerousStyleValue(styleName,styleValue,isCustomProperty);delimiter=';';}}return serialized||null;}}", "getCssString() {\n const text = fs.readFileSync(\"./src/hero.css\", 'utf8');\n return (text.replace(/\\s+/g, ' '));\n }", "function cssToStr(cssProps) {\n\tvar statements = [];\n\n\t$.each(cssProps, function(name, val) {\n\t\tif (val != null) {\n\t\t\tstatements.push(name + ':' + val);\n\t\t}\n\t});\n\n\treturn statements.join(';');\n}", "function cssToStr(cssProps) {\n\tvar statements = [];\n\n\t$.each(cssProps, function(name, val) {\n\t\tif (val != null) {\n\t\t\tstatements.push(name + ':' + val);\n\t\t}\n\t});\n\n\treturn statements.join(';');\n}", "function cssToStr(cssProps) {\n\tvar statements = [];\n\n\t$.each(cssProps, function(name, val) {\n\t\tif (val != null) {\n\t\t\tstatements.push(name + ':' + val);\n\t\t}\n\t});\n\n\treturn statements.join(';');\n}", "function cssToStr(cssProps) {\n\tvar statements = [];\n\n\t$.each(cssProps, function(name, val) {\n\t\tif (val != null) {\n\t\t\tstatements.push(name + ':' + val);\n\t\t}\n\t});\n\n\treturn statements.join(';');\n}", "function cssToStr(cssProps) {\n\tvar statements = [];\n\n\t$.each(cssProps, function(name, val) {\n\t\tif (val != null) {\n\t\t\tstatements.push(name + ':' + val);\n\t\t}\n\t});\n\n\treturn statements.join(';');\n}", "function cssToStr(cssProps) {\n\tvar statements = [];\n\n\t$.each(cssProps, function(name, val) {\n\t\tif (val != null) {\n\t\t\tstatements.push(name + ':' + val);\n\t\t}\n\t});\n\n\treturn statements.join(';');\n}", "function cssToStr(cssProps) {\n\tvar statements = [];\n\n\t$.each(cssProps, function(name, val) {\n\t\tif (val != null) {\n\t\t\tstatements.push(name + ':' + val);\n\t\t}\n\t});\n\n\treturn statements.join(';');\n}", "function cssToStr(cssProps) {\n\tvar statements = [];\n\n\t$.each(cssProps, function(name, val) {\n\t\tif (val != null) {\n\t\t\tstatements.push(name + ':' + val);\n\t\t}\n\t});\n\n\treturn statements.join(';');\n}", "function validStyles(styleAttr){\n\tvar result = '';\n\tvar styleArray = styleAttr.split(';');\n\tangular.forEach(styleArray, function(value){\n\t\tvar v = value.split(':');\n\t\tif(v.length == 2){\n\t\t\tvar key = trim(angular.lowercase(v[0]));\n\t\t\tvar value = trim(angular.lowercase(v[1]));\n\t\t\tif(\n\t\t\t\t(key === 'color' || key === 'background-color') && (\n\t\t\t\t\tvalue.match(/^rgb\\([0-9%,\\. ]*\\)$/i)\n\t\t\t\t\t|| value.match(/^rgba\\([0-9%,\\. ]*\\)$/i)\n\t\t\t\t\t|| value.match(/^hsl\\([0-9%,\\. ]*\\)$/i)\n\t\t\t\t\t|| value.match(/^hsla\\([0-9%,\\. ]*\\)$/i)\n\t\t\t\t\t|| value.match(/^#[0-9a-f]{3,6}$/i)\n\t\t\t\t\t|| value.match(/^[a-z]*$/i)\n\t\t\t\t)\n\t\t\t||\n\t\t\t\tkey === 'text-align' && (\n\t\t\t\t\tvalue === 'left'\n\t\t\t\t\t|| value === 'right'\n\t\t\t\t\t|| value === 'center'\n\t\t\t\t\t|| value === 'justify'\n\t\t\t\t)\n\t\t\t||\n\t\t\t\tkey === 'float' && (\n\t\t\t\t\tvalue === 'left'\n\t\t\t\t\t|| value === 'right'\n\t\t\t\t\t|| value === 'none'\n\t\t\t\t)\n\t\t\t||\n\t\t\t\t(key === 'width' || key === 'height') && (\n\t\t\t\t\tvalue.match(/[0-9\\.]*(px|em|rem|%)/)\n\t\t\t\t)\n\t\t\t|| // Reference #520\n\t\t\t\t(key === 'direction' && value.match(/^ltr|rtl|initial|inherit$/))\n\t\t\t) result += key + ': ' + value + ';';\n\t\t}\n\t});\n\treturn result;\n}", "function getPropertyValue(cssRule, prop) {\n try {\n // Support CSSTOM.\n if (cssRule.attributeStyleMap) {\n return cssRule.attributeStyleMap.get(prop);\n }\n\n return cssRule.style.getPropertyValue(prop);\n } catch (err) {\n // IE may throw if property is unknown.\n return '';\n }\n }", "function IntObject_UpdateCSSStyleProperty()\n{\n\t//has fixed property?\n\tif (this.StyleProperties && this.StyleProperties.FixedPosition)\n\t{\n\t\t//unregister this as a fixed object\n\t\t__SIMULATOR.Interpreter.NotifyFixedObject(this.DataObject.Id, this, false);\n\t}\n\t//by default: no object is CSS Enabled\n\tthis.StyleProperties = false;\n\t//retrieve out css property\n\tvar strCSS = Get_String(this.Properties[__NEMESIS_PROPERTY_STYLE], null);\n\t//valid?\n\tif (strCSS != null)\n\t{\n\t\t//could have properties, convert into an object\n\t\tthis.StyleProperties = { cssText: \"\", Original: {}, Zoom: null };\n\t\t//split it\n\t\tstrCSS = strCSS.split(\";\");\n\t\t//now loop through all of them\n\t\tfor (var iCSS = 0, cCSS = strCSS.length; iCSS < cCSS; iCSS++)\n\t\t{\n\t\t\t//split this into key value pair\n\t\t\tvar pair = strCSS[iCSS].split(\":\");\n\t\t\t//valid?\n\t\t\tif (pair.length == 2)\n\t\t\t{\n\t\t\t\t//we want to make sure we trim the key\n\t\t\t\tpair[0] = pair[0].Trim();\n\t\t\t\t//store it\n\t\t\t\tthis.StyleProperties.Original[pair[0]] = pair[1];\n\t\t\t\t//switch on it\n\t\t\t\tswitch (pair[0].toLowerCase())\n\t\t\t\t{\n\t\t\t\t\tcase \"pointer-events\":\n\t\t\t\t\t\t//only process this if we arent in designer or if the value is not \"none\"\n\t\t\t\t\t\tif (!__DESIGNER_CONTROLLER || !/none/i.test(pair[1]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//add it to the css text\n\t\t\t\t\t\t\tthis.StyleProperties.cssText += pair[0] + \":\" + pair[1] + \";\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"zoom\":\n\t\t\t\t\t\t//add it to the css text\n\t\t\t\t\t\tthis.StyleProperties.cssText += pair[0] + \":\" + pair[1] + \";\";\n\t\t\t\t\t\t//but we also need to mark this as a valid zoom object\n\t\t\t\t\t\tthis.StyleProperties.Zoom = Zoom_Register(this, pair[1]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"content\":\n\t\t\t\t\t\t//replace all url(' with url(' plus host\n\t\t\t\t\t\tpair[1] = pair[1].replace(/url\\('(?!data:)/gi, \"url('\" + __HOST_LESSON_RESOURCES);\n\t\t\t\t\t\t//add it to the css text\n\t\t\t\t\t\tthis.StyleProperties.cssText += pair[0] + \":\" + pair[1] + \";\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t//add it to the css text\n\t\t\t\t\t\tthis.StyleProperties.cssText += pair[0] + \":\" + pair[1] + \";\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//has fixed?\n\t\tif (this.StyleProperties.Original[\"position\"] == \"fixed\")\n\t\t{\n\t\t\t//assume this is fixed\n\t\t\tvar bFixed = true;\n\t\t\t//loop through the parents\n\t\t\tfor (var parent = this.Parent; parent; parent = parent.Parent)\n\t\t\t{\n\t\t\t\t//this parent a real iframe?\n\t\t\t\tif (parent.IsRealIFrame)\n\t\t\t\t{\n\t\t\t\t\t//cannot be fixed\n\t\t\t\t\tbFixed = false;\n\t\t\t\t\t//end loop\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//still fixed?\n\t\t\tif (bFixed)\n\t\t\t{\n\t\t\t\t//create fixed position marker\n\t\t\t\tthis.StyleProperties.FixedPosition = true;\n\t\t\t\t//and register with the interpreter\n\t\t\t\t__SIMULATOR.Interpreter.NotifyFixedObject(this.DataObject.Id, this, true);\n\t\t\t}\n\t\t}\n\t\t//switch on its control type tag\n\t\tswitch (Get_String(this.Properties[__NEMESIS_PROPERTY_CONTROL_TYPE], \"\").toLowerCase())\n\t\t{\n\t\t\tcase \"iframe\":\n\t\t\tcase \"frame\":\n\t\t\tcase \"frameset\":\n\t\t\t\t//not the new iFrame?\n\t\t\t\tif (!Get_Bool(this.Properties[__NEMESIS_PROPERTY_CONTROL_TYPE_FORCED], false))\n\t\t\t\t{\n\t\t\t\t\t//no isolation?\n\t\t\t\t\tif (!this.StyleProperties.Original[\"isolation\"])\n\t\t\t\t\t{\n\t\t\t\t\t\t//force it\n\t\t\t\t\t\tthis.StyleProperties.cssText += \"isolation:isolate;\";\n\t\t\t\t\t}\n\t\t\t\t\t//this ie browser (Edge and IE)\n\t\t\t\t\tif (__BROWSER_TYPE == __BROWSER_IE)\n\t\t\t\t\t{\n\t\t\t\t\t\t//no opacity?\n\t\t\t\t\t\tif (!this.StyleProperties.Original[\"opacity\"])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//force it\n\t\t\t\t\t\t\tthis.StyleProperties.cssText += \"opacity:0.99;\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//indicate that this is a real iframe\n\t\t\t\t\tthis.IsRealIFrame = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"html\":\n\t\t\t\t//get its parent object and check its tag\n\t\t\t\tswitch (this.Parent ? Get_String(this.Parent.Properties[__NEMESIS_PROPERTY_CONTROL_TYPE], \"\").toLowerCase() : \"\")\n\t\t\t\t{\n\t\t\t\t\tcase \"iframe\":\n\t\t\t\t\tcase \"frame\":\n\t\t\t\t\tcase \"frameset\":\n\t\t\t\t\t\t//not the new iFrame?\n\t\t\t\t\t\tif (!Get_Bool(this.Properties[__NEMESIS_PROPERTY_CONTROL_TYPE_FORCED], false))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//check if the parent has scrolling = no\n\t\t\t\t\t\t\tvar attributeScrollingNo = false;\n\t\t\t\t\t\t\t//obtain the parent's\n\t\t\t\t\t\t\tvar attributes = this.Parent.StyleProperties ? Get_String(this.Parent.Properties[__NEMESIS_PROPERTY_HTML_ATTRIBUTES], null) : null;\n\t\t\t\t\t\t\t//valid?\n\t\t\t\t\t\t\tif (attributes != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//parse attributes (lowercase it just in case);\n\t\t\t\t\t\t\t\tattributes = JSON.parse(attributes.toLowerCase());\n\t\t\t\t\t\t\t\t//check for scrolling\n\t\t\t\t\t\t\t\tattributeScrollingNo = !Get_Bool(attributes[\"scrolling\"], true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//we need to copy some properties into our parent\n\t\t\t\t\t\t\tvar properties = [\"overflow\", \"overflow-y\", \"overflow-x\"];\n\t\t\t\t\t\t\t//loop through properties\n\t\t\t\t\t\t\tfor (var i = properties.length; i--;)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//get property\n\t\t\t\t\t\t\t\tvar property = properties[i];\n\t\t\t\t\t\t\t\t//get our value\n\t\t\t\t\t\t\t\tvar ourValue = attributeScrollingNo ? \"hidden\" : this.StyleProperties.Original[property];\n\t\t\t\t\t\t\t\t//valid?\n\t\t\t\t\t\t\t\tif (ourValue)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//force on parent\n\t\t\t\t\t\t\t\t\tthis.Parent.StyleProperties.Original[property] = ourValue;\n\t\t\t\t\t\t\t\t\tthis.Parent.StyleProperties.cssText += property + \":\" + ourValue + \";\";\n\t\t\t\t\t\t\t\t\t//parent already loaded?\n\t\t\t\t\t\t\t\t\tif (this.Parent.HTML)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t//switch on property\n\t\t\t\t\t\t\t\t\t\tswitch (property)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tcase \"overflow\":\n\t\t\t\t\t\t\t\t\t\t\t\t//apply directly\n\t\t\t\t\t\t\t\t\t\t\t\tthis.Parent.HTML.style.overflow = ourValue;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\tcase \"overflow-x\":\n\t\t\t\t\t\t\t\t\t\t\t\t//apply directly\n\t\t\t\t\t\t\t\t\t\t\t\tthis.Parent.HTML.style.overflowX = ourValue;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\tcase \"overflow-y\":\n\t\t\t\t\t\t\t\t\t\t\t\t//apply directly\n\t\t\t\t\t\t\t\t\t\t\t\tthis.Parent.HTML.style.overflowY = ourValue;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//regardless of whatever we do to the parent, the HTML always have a forced overflow\n\t\t\t\t\t\t\tthis.StyleProperties.Original[\"overflow\"] = \"visible\";\n\t\t\t\t\t\t\tthis.StyleProperties.Original[\"overflow-x\"] = \"visible\";\n\t\t\t\t\t\t\tthis.StyleProperties.Original[\"overflow-y\"] = \"visible\";\n\t\t\t\t\t\t\tthis.StyleProperties.cssText += \"overflow:visible;overflow-x:visible;overflow-y:visible;\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}\n}", "static get styles() {\n return \"\";\n }", "useCSS(_cssText) {\n // Common, standard <style> tag generation in <head>\n const _style = document.createElement('style');\n _style.type = 'text/css';\n _style.media = 'all';\n if (BROWSER_TYPE.safari || BROWSER_TYPE.chrome || BROWSER_TYPE.firefox || BROWSER_TYPE.opera) {\n // This is how to do it in KHTML browsers\n _style.appendChild(document.createTextNode(_cssText));\n }\n else {\n // This works for many others (add more checks, if problems with new browsers)\n _style.textContent = _cssText;\n }\n const _head = document.getElementsByTagName('head')[0];\n _head.appendChild(_style);\n return _style;\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized +=\n delimiter +\n (isCustomProperty\n ? styleName\n : hyphenateStyleName(styleName)) +\n ':';\n serialized += dangerousStyleValue(\n styleName,\n styleValue,\n isCustomProperty,\n );\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n }", "get styleStaticText() { return Object.assign({}, this.style.common); }", "function s(e){return getComputedStyle(e)}", "function normalizeStyle(styleStr) {\n var serialized = (0,stylis__WEBPACK_IMPORTED_MODULE_8__.serialize)((0,stylis__WEBPACK_IMPORTED_MODULE_9__.compile)(styleStr), stylis__WEBPACK_IMPORTED_MODULE_8__.stringify);\n return serialized.replace(/\\{%%%\\:[^;];}/g, ';');\n}", "function styleString(styleInfo){var o=[];for(var name in styleInfo){var v=styleInfo[name];if(v||v===0){o.push(\"\".concat(camelToDashCase(name),\": \").concat(v));}}return o.join('; ');}", "function validStyles(styleAttr){\n\tvar result = '';\n\tvar styleArray = styleAttr.split(';');\n\tangular.forEach(styleArray, function(value){\n\t\tvar v = value.split(':');\n\t\tif(v.length == 2){\n\t\t\tvar key = trim(angular.lowercase(v[0]));\n\t\t\tvar value = trim(angular.lowercase(v[1]));\n\t\t\tif(\n\t\t\t\t(key === 'color' || key === 'background-color') && (\n\t\t\t\t\tvalue.match(/^rgb\\([0-9%,\\. ]*\\)$/i)\n\t\t\t\t\t|| value.match(/^rgba\\([0-9%,\\. ]*\\)$/i)\n\t\t\t\t\t|| value.match(/^hsl\\([0-9%,\\. ]*\\)$/i)\n\t\t\t\t\t|| value.match(/^hsla\\([0-9%,\\. ]*\\)$/i)\n\t\t\t\t\t|| value.match(/^#[0-9a-f]{3,6}$/i)\n\t\t\t\t\t|| value.match(/^[a-z]*$/i)\n\t\t\t\t)\n\t\t\t||\n\t\t\t\tkey === 'text-align' && (\n\t\t\t\t\tvalue === 'left'\n\t\t\t\t\t|| value === 'right'\n\t\t\t\t\t|| value === 'center'\n\t\t\t\t\t|| value === 'justify'\n\t\t\t\t)\n\t\t\t||\n\t\t\t\tkey === 'float' && (\n\t\t\t\t\tvalue === 'left'\n\t\t\t\t\t|| value === 'right'\n\t\t\t\t\t|| value === 'none'\n\t\t\t\t)\n\t\t\t||\n\t\t\t\t(key === 'width' || key === 'height') && (\n\t\t\t\t\tvalue.match(/[0-9\\.]*(px|em|rem|%)/)\n\t\t\t\t)\n\t\t\t) result += key + ': ' + value + ';';\n\t\t}\n\t});\n\treturn result;\n}", "get styleMsg() { return Object.assign({}, this.style.msg); }", "function cssToStr(cssProps) {\n var statements = [];\n\n for (var name in cssProps) {\n var val = cssProps[name];\n\n if (val != null && val !== '') {\n statements.push(name + ':' + val);\n }\n }\n\n return statements.join(';');\n }", "function cssToStr(cssProps) {\n var statements = [];\n for (var name_1 in cssProps) {\n var val = cssProps[name_1];\n if (val != null && val !== '') {\n statements.push(name_1 + ':' + val);\n }\n }\n return statements.join(';');\n}", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n var styleValue = styles[styleName];\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n return serialized || null;\n }\n }", "function CLC_FetchCSSRawString(styleSheetObj){\r\n var styleSheetRawString;\r\n if (styleSheetObj.ownerNode.tagName.toLowerCase() == \"style\"){\r\n styleSheetRawString = styleSheetObj.ownerNode.innerHTML;\r\n }\r\n return styleSheetRawString;\r\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n }", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n }", "function utilFromCssProperty(cssName) {\n\t\tif (!cssName.includes('-')) {\n\t\t\tswitch (cssName) {\n\t\t\tcase 'bgcolor': return 'backgroundColor';\n\t\t\tcase 'float': return 'cssFloat';\n\t\t\tdefault: return cssName;\n\t\t\t}\n\t\t}\n\n\t\t// Strip the leading hyphen from the `-ms-` vendor prefix, so it stays lowercased.\n\t\tconst normalized = cssName.slice(0, 4) === '-ms-' ? cssName.slice(1) : cssName;\n\n\t\treturn normalized\n\t\t\t.split('-')\n\t\t\t.map((part, i) => i === 0 ? part : part.toUpperFirst())\n\t\t\t.join('');\n\t}", "function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n var styleValue = styles[styleName];\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + hyphenateStyleName(styleName) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n\n delimiter = ';';\n }\n }\n return serialized || null;\n }\n }" ]
[ "0.6745135", "0.661401", "0.6602852", "0.65247476", "0.65247476", "0.6436216", "0.64069366", "0.63674486", "0.6298139", "0.6198508", "0.618331", "0.6170014", "0.6170014", "0.6169674", "0.6165187", "0.6114536", "0.6075997", "0.6075997", "0.60752136", "0.60752136", "0.60752136", "0.60752136", "0.6072851", "0.60727507", "0.60725635", "0.6063083", "0.6060643", "0.6060643", "0.6060643", "0.6060643", "0.60403013", "0.60403013", "0.6035087", "0.5981886", "0.5981542", "0.5972649", "0.5969083", "0.5967573", "0.5946669", "0.5939046", "0.5938155", "0.5920076", "0.5915896", "0.59121495", "0.5902216", "0.5900742", "0.58946604", "0.5892692", "0.58659106", "0.5860171", "0.5847951", "0.5847951", "0.5844049", "0.5844049", "0.5844049", "0.5844049", "0.5844049", "0.5842327", "0.5842327", "0.5842327", "0.5842327", "0.5842327", "0.5842327", "0.5842327", "0.5829579", "0.58271575", "0.58271575", "0.58271575", "0.58271575", "0.58271575", "0.58271575", "0.58271575", "0.58271575", "0.58229756", "0.5816092", "0.5812019", "0.58031905", "0.5802936", "0.57989645", "0.5792385", "0.5787914", "0.5787434", "0.5780441", "0.5779419", "0.57366204", "0.57229364", "0.5719576", "0.57159424", "0.5715626", "0.5712928", "0.5712928", "0.5712928", "0.5712928", "0.5712928", "0.5712928", "0.5712928", "0.5712928", "0.5712928", "0.5712928", "0.57128674", "0.57125753" ]
0.0
-1
SuspenseInstance. I.e. if its previous sibling is a Comment with SUSPENSE_x_START_DATA. Otherwise, null.
function getParentSuspenseInstance(targetInstance) { var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary. // There might be nested nodes so we need to keep track of how // deep we are and only break out when we're back on top. var depth = 0; while (node) { if (node.nodeType === COMMENT_NODE) { var data = node.data; if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) { if (depth === 0) { return node; } else { depth--; } } else if (data === SUSPENSE_END_DATA) { depth++; } } node = node.previousSibling; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getParentSuspenseInstance(targetInstance) {\n var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary.\n // There might be nested nodes so we need to keep track of how\n // deep we are and only break out when we're back on top.\n\n var depth = 0;\n\n while (node) {\n if (node.nodeType === COMMENT_NODE) {\n var data = node.data;\n\n if (\n data === SUSPENSE_START_DATA ||\n data === SUSPENSE_FALLBACK_START_DATA ||\n data === SUSPENSE_PENDING_START_DATA\n ) {\n if (depth === 0) {\n return node;\n } else {\n depth--;\n }\n } else if (data === SUSPENSE_END_DATA) {\n depth++;\n }\n }\n\n node = node.previousSibling;\n }\n\n return null;\n }", "function getParentSuspenseInstance(targetInstance) {\n var node = targetInstance.previousSibling;\n // Skip past all nodes within this suspense boundary.\n // There might be nested nodes so we need to keep track of how\n // deep we are and only break out when we're back on top.\n var depth = 0;\n while (node) {\n if (node.nodeType === COMMENT_NODE) {\n var data = node.data;\n if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {\n if (depth === 0) {\n return node;\n } else {\n depth--;\n }\n } else if (data === SUSPENSE_END_DATA) {\n depth++;\n }\n }\n node = node.previousSibling;\n }\n return null;\n }", "function getParentSuspenseInstance(targetInstance) {\n var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary.\n // There might be nested nodes so we need to keep track of how\n // deep we are and only break out when we're back on top.\n\n var depth = 0;\n\n while (node) {\n if (node.nodeType === COMMENT_NODE) {\n var data = node.data;\n\n if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {\n if (depth === 0) {\n return node;\n } else {\n depth--;\n }\n } else if (data === SUSPENSE_END_DATA) {\n depth++;\n }\n }\n\n node = node.previousSibling;\n }\n\n return null;\n }", "function getParentSuspenseInstance(targetInstance) {\n var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary.\n // There might be nested nodes so we need to keep track of how\n // deep we are and only break out when we're back on top.\n\n var depth = 0;\n\n while (node) {\n if (node.nodeType === COMMENT_NODE) {\n var data = node.data;\n\n if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {\n if (depth === 0) {\n return node;\n } else {\n depth--;\n }\n } else if (data === SUSPENSE_END_DATA) {\n depth++;\n }\n }\n\n node = node.previousSibling;\n }\n\n return null;\n }", "function getParentSuspenseInstance(targetInstance) {\n var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary.\n // There might be nested nodes so we need to keep track of how\n // deep we are and only break out when we're back on top.\n\n var depth = 0;\n\n while (node) {\n if (node.nodeType === COMMENT_NODE) {\n var data = node.data;\n\n if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {\n if (depth === 0) {\n return node;\n } else {\n depth--;\n }\n } else if (data === SUSPENSE_END_DATA) {\n depth++;\n }\n }\n\n node = node.previousSibling;\n }\n\n return null;\n }", "function getParentSuspenseInstance(targetInstance) {\n var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary.\n // There might be nested nodes so we need to keep track of how\n // deep we are and only break out when we're back on top.\n\n var depth = 0;\n\n while (node) {\n if (node.nodeType === COMMENT_NODE) {\n var data = node.data;\n\n if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {\n if (depth === 0) {\n return node;\n } else {\n depth--;\n }\n } else if (data === SUSPENSE_END_DATA) {\n depth++;\n }\n }\n\n node = node.previousSibling;\n }\n\n return null;\n }", "function getParentSuspenseInstance(targetInstance) {\n var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary.\n // There might be nested nodes so we need to keep track of how\n // deep we are and only break out when we're back on top.\n\n var depth = 0;\n\n while (node) {\n if (node.nodeType === COMMENT_NODE) {\n var data = node.data;\n\n if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {\n if (depth === 0) {\n return node;\n } else {\n depth--;\n }\n } else if (data === SUSPENSE_END_DATA) {\n depth++;\n }\n }\n\n node = node.previousSibling;\n }\n\n return null;\n }", "function getParentSuspenseInstance(targetInstance) {\n var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary.\n // There might be nested nodes so we need to keep track of how\n // deep we are and only break out when we're back on top.\n\n var depth = 0;\n\n while (node) {\n if (node.nodeType === COMMENT_NODE) {\n var data = node.data;\n\n if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {\n if (depth === 0) {\n return node;\n } else {\n depth--;\n }\n } else if (data === SUSPENSE_END_DATA) {\n depth++;\n }\n }\n\n node = node.previousSibling;\n }\n\n return null;\n }", "function getParentSuspenseInstance(targetInstance) {\n var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary.\n // There might be nested nodes so we need to keep track of how\n // deep we are and only break out when we're back on top.\n\n var depth = 0;\n\n while (node) {\n if (node.nodeType === COMMENT_NODE) {\n var data = node.data;\n\n if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {\n if (depth === 0) {\n return node;\n } else {\n depth--;\n }\n } else if (data === SUSPENSE_END_DATA) {\n depth++;\n }\n }\n\n node = node.previousSibling;\n }\n\n return null;\n }", "function getParentSuspenseInstance(targetInstance) {\n var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary.\n // There might be nested nodes so we need to keep track of how\n // deep we are and only break out when we're back on top.\n\n var depth = 0;\n\n while (node) {\n if (node.nodeType === COMMENT_NODE) {\n var data = node.data;\n\n if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {\n if (depth === 0) {\n return node;\n } else {\n depth--;\n }\n } else if (data === SUSPENSE_END_DATA) {\n depth++;\n }\n }\n\n node = node.previousSibling;\n }\n\n return null;\n }", "function getParentSuspenseInstance(targetInstance) {\n var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary.\n // There might be nested nodes so we need to keep track of how\n // deep we are and only break out when we're back on top.\n\n var depth = 0;\n\n while (node) {\n if (node.nodeType === COMMENT_NODE) {\n var data = node.data;\n\n if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {\n if (depth === 0) {\n return node;\n } else {\n depth--;\n }\n } else if (data === SUSPENSE_END_DATA) {\n depth++;\n }\n }\n\n node = node.previousSibling;\n }\n\n return null;\n }", "function getParentSuspenseInstance(targetInstance) {\n var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary.\n // There might be nested nodes so we need to keep track of how\n // deep we are and only break out when we're back on top.\n\n var depth = 0;\n\n while (node) {\n if (node.nodeType === COMMENT_NODE) {\n var data = node.data;\n\n if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {\n if (depth === 0) {\n return node;\n } else {\n depth--;\n }\n } else if (data === SUSPENSE_END_DATA) {\n depth++;\n }\n }\n\n node = node.previousSibling;\n }\n\n return null;\n }", "function getParentSuspenseInstance(targetInstance) {\n var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary.\n // There might be nested nodes so we need to keep track of how\n // deep we are and only break out when we're back on top.\n var depth = 0;\n while(node){\n if (node.nodeType === COMMENT_NODE) {\n var data = node.data;\n if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {\n if (depth === 0) return node;\n else depth--;\n } else if (data === SUSPENSE_END_DATA) depth++;\n }\n node = node.previousSibling;\n }\n return null;\n }", "function getParentSuspenseInstance(targetInstance){var node=targetInstance.previousSibling;// Skip past all nodes within this suspense boundary.\n// There might be nested nodes so we need to keep track of how\n// deep we are and only break out when we're back on top.\nvar depth=0;while(node){if(node.nodeType===COMMENT_NODE){var data=node.data;if(data===SUSPENSE_START_DATA||data===SUSPENSE_FALLBACK_START_DATA||data===SUSPENSE_PENDING_START_DATA){if(depth===0){return node;}else{depth--;}}else if(data===SUSPENSE_END_DATA){depth++;}}node=node.previousSibling;}return null;}", "function getParentSuspenseInstance(targetInstance){var node=targetInstance.previousSibling;// Skip past all nodes within this suspense boundary.\n// There might be nested nodes so we need to keep track of how\n// deep we are and only break out when we're back on top.\nvar depth=0;while(node){if(node.nodeType===COMMENT_NODE){var data=node.data;if(data===SUSPENSE_START_DATA||data===SUSPENSE_FALLBACK_START_DATA||data===SUSPENSE_PENDING_START_DATA){if(depth===0){return node;}else{depth--;}}else if(data===SUSPENSE_END_DATA){depth++;}}node=node.previousSibling;}return null;}", "function getParentSuspenseInstance(targetInstance){var node=targetInstance.previousSibling;// Skip past all nodes within this suspense boundary.\n// There might be nested nodes so we need to keep track of how\n// deep we are and only break out when we're back on top.\nvar depth=0;while(node){if(node.nodeType===COMMENT_NODE){var data=node.data;if(data===SUSPENSE_START_DATA||data===SUSPENSE_FALLBACK_START_DATA||data===SUSPENSE_PENDING_START_DATA){if(depth===0){return node;}else{depth--;}}else if(data===SUSPENSE_END_DATA){depth++;}}node=node.previousSibling;}return null;}", "function getParentSuspenseInstance(targetInstance){var node=targetInstance.previousSibling;// Skip past all nodes within this suspense boundary.\n// There might be nested nodes so we need to keep track of how\n// deep we are and only break out when we're back on top.\nvar depth=0;while(node){if(node.nodeType===COMMENT_NODE){var data=node.data;if(data===SUSPENSE_START_DATA||data===SUSPENSE_FALLBACK_START_DATA||data===SUSPENSE_PENDING_START_DATA){if(depth===0){return node;}else{depth--;}}else if(data===SUSPENSE_END_DATA){depth++;}}node=node.previousSibling;}return null;}", "function getParentSuspenseInstance(targetInstance){var node=targetInstance.previousSibling;// Skip past all nodes within this suspense boundary.\n// There might be nested nodes so we need to keep track of how\n// deep we are and only break out when we're back on top.\nvar depth=0;while(node){if(node.nodeType===COMMENT_NODE){var data=node.data;if(data===SUSPENSE_START_DATA||data===SUSPENSE_FALLBACK_START_DATA||data===SUSPENSE_PENDING_START_DATA){if(depth===0){return node;}else {depth--;}}else if(data===SUSPENSE_END_DATA){depth++;}}node=node.previousSibling;}return null;}", "peek() {\n if (this.head) {\n return this.head.data\n } else {\n return null\n }\n }", "function SuspenseSync(props) {\n\treturn props.children || null;\n}", "removeNextSibling() {\n var siblings = this._containers.top();\n\n if (siblings && Array.isArray(siblings)) {\n // top index is a number because top container is an array\n var index = this._indexes.top();\n\n if (siblings.length > index + 1) {\n return siblings.splice(index + 1, 1)[0];\n }\n }\n\n return null;\n }", "peek() {\n if (this.isEmpty()) {\n return null;\n }\n\n return this.list.head.value;\n }", "peekFirst(){\n if(this.isEmpty()){ return null}\n return this.head.data;\n }", "peek() {\r\n if(this.data.isEmpty()) {\r\n console.log(\"This stack is empty\");\r\n return null;\r\n }\r\n return this.data.head;\r\n }", "hasPreviousSibling() {\n return Array.isArray(this._containers.top()) && this._indexes.top() > 0;\n }", "peek() {\n return this.head ? this.head.data : null;\n }", "peek() {\n if (this.size() > 0) {\n return this.get(0)\n } else {\n return null\n }\n }", "peekFirst() {\n return null;\n }", "peek() {\n\t\treturn this.head ? this.head.value : null;\n\t}", "resolve(doc) {\n let found = undefined;\n visit.visit(doc, {\n Node: (_key, node) => {\n if (node === this)\n return visit.visit.BREAK;\n if (node.anchor === this.source)\n found = node;\n }\n });\n return found;\n }", "peekFirst() {\n\t\tif (this.isEmpty()) {\n\t\t\tthrow new Error(\"Empty Linked List.\");\n\t\t}\n\t\treturn this.head.value;\n\t}", "resolve(doc) {\n let found = undefined;\n visit(doc, {\n Node: (_key, node) => {\n if (node === this)\n return visit.BREAK;\n if (node.anchor === this.source)\n found = node;\n }\n });\n return found;\n }", "function firstVisibleChild() {\n for (var i = 0; i < openMenuNode.children.length; ++i) {\n if ($window.getComputedStyle(openMenuNode.children[i]).display != 'none') {\n return openMenuNode.children[i];\n }\n }\n }", "function firstVisibleChild() {\n for (var i = 0; i < openMenuNode.children.length; ++i) {\n if ($window.getComputedStyle(openMenuNode.children[i]).display != 'none') {\n return openMenuNode.children[i];\n }\n }\n }", "function firstVisibleChild() {\n for (var i = 0; i < openMenuNode.children.length; ++i) {\n if ($window.getComputedStyle(openMenuNode.children[i]).display != 'none') {\n return openMenuNode.children[i];\n }\n }\n }", "function firstVisibleChild() {\n for (var i = 0; i < openMenuNode.children.length; ++i) {\n if ($window.getComputedStyle(openMenuNode.children[i]).display != 'none') {\n return openMenuNode.children[i];\n }\n }\n }", "function firstVisibleChild() {\n for (var i = 0; i < openMenuNode.children.length; ++i) {\n if ($window.getComputedStyle(openMenuNode.children[i]).display != 'none') {\n return openMenuNode.children[i];\n }\n }\n }", "previousSibling() {\n var siblings = this._containers.top(); // If we're at the root of the tree or if the parent is an\n // object instead of an array, then there are no siblings.\n\n\n if (!siblings || !Array.isArray(siblings)) {\n return null;\n } // The top index is a number because the top container is an array\n\n\n var index = this._indexes.top();\n\n if (index > 0) {\n return siblings[index - 1];\n } else {\n return null; // There is no previous sibling\n }\n }", "function isSuspenseBoundaryBeingHidden(current,finishedWork){if(current!==null){var oldState=current.memoizedState;if(oldState===null||oldState.dehydrated!==null){var newState=finishedWork.memoizedState;return newState!==null&&newState.dehydrated===null;}}return false;}", "function isSuspenseBoundaryBeingHidden(current,finishedWork){if(current!==null){var oldState=current.memoizedState;if(oldState===null||oldState.dehydrated!==null){var newState=finishedWork.memoizedState;return newState!==null&&newState.dehydrated===null;}}return false;}", "peek() {\n return this._data[0];\n }", "get suspectEntity () {\n\t\treturn this._suspectEntity;\n\t}", "function firstVisibleChild() {\n for (var i = 0; i < openMenuNode.children.length; ++i) {\n if (window.getComputedStyle(openMenuNode.children[i]).display !== 'none') {\n return openMenuNode.children[i];\n }\n }\n }", "peek() {\n if (this.isEmpty())\n return null;\n return __classPrivateFieldGet(this, _storage)[this.count() - 1];\n }", "function firstNode(source) {\n var node = null;\n if (source.firstChild.nodeName != \"#text\") {\n return source.firstChild;\n } else {\n source = source.firstChild;\n do {\n source = source.nextSibling;\n } while (source && source.nodeName == '#text');\n\n return source || null;\n }\n}", "peek(){\n if(!this.linkedList.head){\n return null;\n }\n return this.linkedList.head.value;\n }", "peek(){\n var topElement = this.start;\n return topElement;\n }", "function getMetadataNodeForDisplayedCommentVE()/*:ValueExpression*/ {var this$=this;\n if (!this.metadataNodeForDisplayedCommentVE$Im7w) {\n this.metadataNodeForDisplayedCommentVE$Im7w = com.coremedia.ui.data.ValueExpressionFactory.createFromFunction(function ()/*:MetadataTreeNode*/ {\n var comment/*:Comment*/ =AS3.as( this$.displayedContributionVE$Im7w.getValue(), com.coremedia.elastic.social.studio.model.Comment);\n if (comment) {\n\n var metadataTreeRoot/*:MetadataTreeNode*/ = this$.getMetadataService().getMetadataTree().getRoot();\n\n if (metadataTreeRoot) {\n return metadataTreeRoot.findChildrenBy(function (node/*:MetadataTreeNode*/)/*:Boolean*/ {\n return node.getProperty(com.coremedia.cms.editor.sdk.preview.MetadataHelper.METADATA_DEFAULT_PROPERTY) === comment;\n })[0];\n }\n }\n\n return undefined;\n });\n }\n\n return this.metadataNodeForDisplayedCommentVE$Im7w;\n }", "get isFirstChild() {\t\t\n\t\tvar parent = this.__atom.parent;\n\t\tif (!parent) {\n\t\t\tthrow new Error('There is no parent atom');\n\t\t}\n\t\tvar firstChild = parent.children[0];\n\t\treturn firstChild === this.atom;\t\t\n\t}", "get firstChild() {\n return this.content.length ? this.content[0] : null;\n }", "function TitumSuspense(props) {\n\treturn <React.Suspense fallback={<TitumLandingOverlay {...props.loadingProps} />}>{props.children}</React.Suspense>;\n}", "peek() {\n return (this.heap.length) ? this.heap[0] : null;\n }", "get _first () {\n let n = this._start;\n while (n !== null && n.deleted) {\n n = n.right;\n }\n return n\n }", "get _first () {\n let n = this._start;\n while (n !== null && n.deleted) {\n n = n.right;\n }\n return n\n }", "get firstChild() {\n return this.childNodes[0] || null;\n }", "peek(){\n // if(this.isEmpty()){\n // return null;\n // }\n return this.top;\n }", "isParagraphFirstLine(widget) {\n if (isNullOrUndefined(widget.paragraph.previousSplitWidget) &&\n widget === widget.paragraph.firstChild) {\n return true;\n }\n return false;\n }" ]
[ "0.75222766", "0.74048257", "0.7396234", "0.7396234", "0.7396234", "0.7396234", "0.7396234", "0.7396234", "0.7396234", "0.7396234", "0.7396234", "0.7396234", "0.73667777", "0.7022139", "0.7022139", "0.7022139", "0.7022139", "0.7020779", "0.4663236", "0.4649656", "0.45708218", "0.45501938", "0.4522158", "0.45101312", "0.44347557", "0.44280326", "0.4401422", "0.4393597", "0.4386978", "0.43753707", "0.43348232", "0.43114707", "0.4286828", "0.4286828", "0.4286828", "0.4286828", "0.4286828", "0.42652568", "0.42606673", "0.42606673", "0.42561468", "0.4255564", "0.4250801", "0.42456397", "0.4244775", "0.4238191", "0.42377934", "0.4227352", "0.4218761", "0.42150047", "0.42048258", "0.4199485", "0.4196091", "0.4196091", "0.41852105", "0.4176211", "0.41715854" ]
0.7283626
50
If the target node is part of a hydrated or not yet rendered subtree, then this may also return a SuspenseComponent or HostRoot to indicate that. Conceptually the HostRoot fiber is a child of the Container node. So if you pass the Container node as the targetNode, you will not actually get the HostRoot back. To get to the HostRoot, you need to pass a child of it. The same thing applies to Suspense boundaries.
function getClosestInstanceFromNode(targetNode) { var targetInst = targetNode[internalInstanceKey]; if (targetInst) { // Don't return HostRoot or SuspenseComponent here. return targetInst; } // If the direct event target isn't a React owned DOM node, we need to look // to see if one of its parents is a React owned DOM node. var parentNode = targetNode.parentNode; while (parentNode) { // We'll check if this is a container root that could include // React nodes in the future. We need to check this first because // if we're a child of a dehydrated container, we need to first // find that inner container before moving on to finding the parent // instance. Note that we don't check this field on the targetNode // itself because the fibers are conceptually between the container // node and the first child. It isn't surrounding the container node. // If it's not a container, we check if it's an instance. targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey]; if (targetInst) { // Since this wasn't the direct target of the event, we might have // stepped past dehydrated DOM nodes to get here. However they could // also have been non-React nodes. We need to answer which one. // If we the instance doesn't have any children, then there can't be // a nested suspense boundary within it. So we can use this as a fast // bailout. Most of the time, when people add non-React children to // the tree, it is using a ref to a child-less DOM node. // Normally we'd only need to check one of the fibers because if it // has ever gone from having children to deleting them or vice versa // it would have deleted the dehydrated boundary nested inside already. // However, since the HostRoot starts out with an alternate it might // have one on the alternate so we need to check in case this was a // root. var alternate = targetInst.alternate; if (targetInst.child !== null || alternate !== null && alternate.child !== null) { // Next we need to figure out if the node that skipped past is // nested within a dehydrated boundary and if so, which one. var suspenseInstance = getParentSuspenseInstance(targetNode); while (suspenseInstance !== null) { // We found a suspense instance. That means that we haven't // hydrated it yet. Even though we leave the comments in the // DOM after hydrating, and there are boundaries in the DOM // that could already be hydrated, we wouldn't have found them // through this pass since if the target is hydrated it would // have had an internalInstanceKey on it. // Let's get the fiber associated with the SuspenseComponent // as the deepest instance. var targetSuspenseInst = suspenseInstance[internalInstanceKey]; if (targetSuspenseInst) { return targetSuspenseInst; } // If we don't find a Fiber on the comment, it might be because // we haven't gotten to hydrate it yet. There might still be a // parent boundary that hasn't above this one so we need to find // the outer most that is known. suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent // host component also hasn't hydrated yet. We can return it // below since it will bail out on the isMounted check later. } } return targetInst; } targetNode = parentNode; parentNode = targetNode.parentNode; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getClosestInstanceFromNode(targetNode) {\n var targetInst = targetNode[internalInstanceKey];\n\n if (targetInst) {\n // Don't return HostRoot or SuspenseComponent here.\n return targetInst;\n } // If the direct event target isn't a React owned DOM node, we need to look\n // to see if one of its parents is a React owned DOM node.\n\n var parentNode = targetNode.parentNode;\n\n while (parentNode) {\n // We'll check if this is a container root that could include\n // React nodes in the future. We need to check this first because\n // if we're a child of a dehydrated container, we need to first\n // find that inner container before moving on to finding the parent\n // instance. Note that we don't check this field on the targetNode\n // itself because the fibers are conceptually between the container\n // node and the first child. It isn't surrounding the container node.\n // If it's not a container, we check if it's an instance.\n targetInst =\n parentNode[internalContainerInstanceKey] ||\n parentNode[internalInstanceKey];\n\n if (targetInst) {\n // Since this wasn't the direct target of the event, we might have\n // stepped past dehydrated DOM nodes to get here. However they could\n // also have been non-React nodes. We need to answer which one.\n // If we the instance doesn't have any children, then there can't be\n // a nested suspense boundary within it. So we can use this as a fast\n // bailout. Most of the time, when people add non-React children to\n // the tree, it is using a ref to a child-less DOM node.\n // Normally we'd only need to check one of the fibers because if it\n // has ever gone from having children to deleting them or vice versa\n // it would have deleted the dehydrated boundary nested inside already.\n // However, since the HostRoot starts out with an alternate it might\n // have one on the alternate so we need to check in case this was a\n // root.\n var alternate = targetInst.alternate;\n\n if (\n targetInst.child !== null ||\n (alternate !== null && alternate.child !== null)\n ) {\n // Next we need to figure out if the node that skipped past is\n // nested within a dehydrated boundary and if so, which one.\n var suspenseInstance = getParentSuspenseInstance(\n targetNode,\n );\n\n while (suspenseInstance !== null) {\n // We found a suspense instance. That means that we haven't\n // hydrated it yet. Even though we leave the comments in the\n // DOM after hydrating, and there are boundaries in the DOM\n // that could already be hydrated, we wouldn't have found them\n // through this pass since if the target is hydrated it would\n // have had an internalInstanceKey on it.\n // Let's get the fiber associated with the SuspenseComponent\n // as the deepest instance.\n var targetSuspenseInst =\n suspenseInstance[internalInstanceKey];\n\n if (targetSuspenseInst) {\n return targetSuspenseInst;\n } // If we don't find a Fiber on the comment, it might be because\n // we haven't gotten to hydrate it yet. There might still be a\n // parent boundary that hasn't above this one so we need to find\n // the outer most that is known.\n\n suspenseInstance = getParentSuspenseInstance(\n suspenseInstance,\n ); // If we don't find one, then that should mean that the parent\n // host component also hasn't hydrated yet. We can return it\n // below since it will bail out on the isMounted check later.\n }\n }\n\n return targetInst;\n }\n\n targetNode = parentNode;\n parentNode = targetNode.parentNode;\n }\n\n return null;\n }", "function getClosestInstanceFromNode(targetNode) {\n var targetInst = targetNode[internalInstanceKey];\n\n if (targetInst) {\n // Don't return HostRoot or SuspenseComponent here.\n return targetInst;\n } // If the direct event target isn't a React owned DOM node, we need to look\n // to see if one of its parents is a React owned DOM node.\n\n\n var parentNode = targetNode.parentNode;\n\n while (parentNode) {\n // We'll check if this is a container root that could include\n // React nodes in the future. We need to check this first because\n // if we're a child of a dehydrated container, we need to first\n // find that inner container before moving on to finding the parent\n // instance. Note that we don't check this field on the targetNode\n // itself because the fibers are conceptually between the container\n // node and the first child. It isn't surrounding the container node.\n // If it's not a container, we check if it's an instance.\n targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey];\n\n if (targetInst) {\n // Since this wasn't the direct target of the event, we might have\n // stepped past dehydrated DOM nodes to get here. However they could\n // also have been non-React nodes. We need to answer which one.\n // If we the instance doesn't have any children, then there can't be\n // a nested suspense boundary within it. So we can use this as a fast\n // bailout. Most of the time, when people add non-React children to\n // the tree, it is using a ref to a child-less DOM node.\n // Normally we'd only need to check one of the fibers because if it\n // has ever gone from having children to deleting them or vice versa\n // it would have deleted the dehydrated boundary nested inside already.\n // However, since the HostRoot starts out with an alternate it might\n // have one on the alternate so we need to check in case this was a\n // root.\n var alternate = targetInst.alternate;\n\n if (targetInst.child !== null || alternate !== null && alternate.child !== null) {\n // Next we need to figure out if the node that skipped past is\n // nested within a dehydrated boundary and if so, which one.\n var suspenseInstance = getParentSuspenseInstance(targetNode);\n\n while (suspenseInstance !== null) {\n // We found a suspense instance. That means that we haven't\n // hydrated it yet. Even though we leave the comments in the\n // DOM after hydrating, and there are boundaries in the DOM\n // that could already be hydrated, we wouldn't have found them\n // through this pass since if the target is hydrated it would\n // have had an internalInstanceKey on it.\n // Let's get the fiber associated with the SuspenseComponent\n // as the deepest instance.\n var targetSuspenseInst = suspenseInstance[internalInstanceKey];\n\n if (targetSuspenseInst) {\n return targetSuspenseInst;\n } // If we don't find a Fiber on the comment, it might be because\n // we haven't gotten to hydrate it yet. There might still be a\n // parent boundary that hasn't above this one so we need to find\n // the outer most that is known.\n\n\n suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent\n // host component also hasn't hydrated yet. We can return it\n // below since it will bail out on the isMounted check later.\n }\n }\n\n return targetInst;\n }\n\n targetNode = parentNode;\n parentNode = targetNode.parentNode;\n }\n\n return null;\n }", "function getClosestInstanceFromNode(targetNode) {\n var targetInst = targetNode[internalInstanceKey];\n\n if (targetInst) {\n // Don't return HostRoot or SuspenseComponent here.\n return targetInst;\n } // If the direct event target isn't a React owned DOM node, we need to look\n // to see if one of its parents is a React owned DOM node.\n\n\n var parentNode = targetNode.parentNode;\n\n while (parentNode) {\n // We'll check if this is a container root that could include\n // React nodes in the future. We need to check this first because\n // if we're a child of a dehydrated container, we need to first\n // find that inner container before moving on to finding the parent\n // instance. Note that we don't check this field on the targetNode\n // itself because the fibers are conceptually between the container\n // node and the first child. It isn't surrounding the container node.\n // If it's not a container, we check if it's an instance.\n targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey];\n\n if (targetInst) {\n // Since this wasn't the direct target of the event, we might have\n // stepped past dehydrated DOM nodes to get here. However they could\n // also have been non-React nodes. We need to answer which one.\n // If we the instance doesn't have any children, then there can't be\n // a nested suspense boundary within it. So we can use this as a fast\n // bailout. Most of the time, when people add non-React children to\n // the tree, it is using a ref to a child-less DOM node.\n // Normally we'd only need to check one of the fibers because if it\n // has ever gone from having children to deleting them or vice versa\n // it would have deleted the dehydrated boundary nested inside already.\n // However, since the HostRoot starts out with an alternate it might\n // have one on the alternate so we need to check in case this was a\n // root.\n var alternate = targetInst.alternate;\n\n if (targetInst.child !== null || alternate !== null && alternate.child !== null) {\n // Next we need to figure out if the node that skipped past is\n // nested within a dehydrated boundary and if so, which one.\n var suspenseInstance = getParentSuspenseInstance(targetNode);\n\n while (suspenseInstance !== null) {\n // We found a suspense instance. That means that we haven't\n // hydrated it yet. Even though we leave the comments in the\n // DOM after hydrating, and there are boundaries in the DOM\n // that could already be hydrated, we wouldn't have found them\n // through this pass since if the target is hydrated it would\n // have had an internalInstanceKey on it.\n // Let's get the fiber associated with the SuspenseComponent\n // as the deepest instance.\n var targetSuspenseInst = suspenseInstance[internalInstanceKey];\n\n if (targetSuspenseInst) {\n return targetSuspenseInst;\n } // If we don't find a Fiber on the comment, it might be because\n // we haven't gotten to hydrate it yet. There might still be a\n // parent boundary that hasn't above this one so we need to find\n // the outer most that is known.\n\n\n suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent\n // host component also hasn't hydrated yet. We can return it\n // below since it will bail out on the isMounted check later.\n }\n }\n\n return targetInst;\n }\n\n targetNode = parentNode;\n parentNode = targetNode.parentNode;\n }\n\n return null;\n }", "function getClosestInstanceFromNode(targetNode) {\n var targetInst = targetNode[internalInstanceKey];\n\n if (targetInst) {\n // Don't return HostRoot or SuspenseComponent here.\n return targetInst;\n } // If the direct event target isn't a React owned DOM node, we need to look\n // to see if one of its parents is a React owned DOM node.\n\n\n var parentNode = targetNode.parentNode;\n\n while (parentNode) {\n // We'll check if this is a container root that could include\n // React nodes in the future. We need to check this first because\n // if we're a child of a dehydrated container, we need to first\n // find that inner container before moving on to finding the parent\n // instance. Note that we don't check this field on the targetNode\n // itself because the fibers are conceptually between the container\n // node and the first child. It isn't surrounding the container node.\n // If it's not a container, we check if it's an instance.\n targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey];\n\n if (targetInst) {\n // Since this wasn't the direct target of the event, we might have\n // stepped past dehydrated DOM nodes to get here. However they could\n // also have been non-React nodes. We need to answer which one.\n // If we the instance doesn't have any children, then there can't be\n // a nested suspense boundary within it. So we can use this as a fast\n // bailout. Most of the time, when people add non-React children to\n // the tree, it is using a ref to a child-less DOM node.\n // Normally we'd only need to check one of the fibers because if it\n // has ever gone from having children to deleting them or vice versa\n // it would have deleted the dehydrated boundary nested inside already.\n // However, since the HostRoot starts out with an alternate it might\n // have one on the alternate so we need to check in case this was a\n // root.\n var alternate = targetInst.alternate;\n\n if (targetInst.child !== null || alternate !== null && alternate.child !== null) {\n // Next we need to figure out if the node that skipped past is\n // nested within a dehydrated boundary and if so, which one.\n var suspenseInstance = getParentSuspenseInstance(targetNode);\n\n while (suspenseInstance !== null) {\n // We found a suspense instance. That means that we haven't\n // hydrated it yet. Even though we leave the comments in the\n // DOM after hydrating, and there are boundaries in the DOM\n // that could already be hydrated, we wouldn't have found them\n // through this pass since if the target is hydrated it would\n // have had an internalInstanceKey on it.\n // Let's get the fiber associated with the SuspenseComponent\n // as the deepest instance.\n var targetSuspenseInst = suspenseInstance[internalInstanceKey];\n\n if (targetSuspenseInst) {\n return targetSuspenseInst;\n } // If we don't find a Fiber on the comment, it might be because\n // we haven't gotten to hydrate it yet. There might still be a\n // parent boundary that hasn't above this one so we need to find\n // the outer most that is known.\n\n\n suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent\n // host component also hasn't hydrated yet. We can return it\n // below since it will bail out on the isMounted check later.\n }\n }\n\n return targetInst;\n }\n\n targetNode = parentNode;\n parentNode = targetNode.parentNode;\n }\n\n return null;\n }", "function getClosestInstanceFromNode(targetNode) {\n var targetInst = targetNode[internalInstanceKey];\n\n if (targetInst) {\n // Don't return HostRoot or SuspenseComponent here.\n return targetInst;\n } // If the direct event target isn't a React owned DOM node, we need to look\n // to see if one of its parents is a React owned DOM node.\n\n\n var parentNode = targetNode.parentNode;\n\n while (parentNode) {\n // We'll check if this is a container root that could include\n // React nodes in the future. We need to check this first because\n // if we're a child of a dehydrated container, we need to first\n // find that inner container before moving on to finding the parent\n // instance. Note that we don't check this field on the targetNode\n // itself because the fibers are conceptually between the container\n // node and the first child. It isn't surrounding the container node.\n // If it's not a container, we check if it's an instance.\n targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey];\n\n if (targetInst) {\n // Since this wasn't the direct target of the event, we might have\n // stepped past dehydrated DOM nodes to get here. However they could\n // also have been non-React nodes. We need to answer which one.\n // If we the instance doesn't have any children, then there can't be\n // a nested suspense boundary within it. So we can use this as a fast\n // bailout. Most of the time, when people add non-React children to\n // the tree, it is using a ref to a child-less DOM node.\n // Normally we'd only need to check one of the fibers because if it\n // has ever gone from having children to deleting them or vice versa\n // it would have deleted the dehydrated boundary nested inside already.\n // However, since the HostRoot starts out with an alternate it might\n // have one on the alternate so we need to check in case this was a\n // root.\n var alternate = targetInst.alternate;\n\n if (targetInst.child !== null || alternate !== null && alternate.child !== null) {\n // Next we need to figure out if the node that skipped past is\n // nested within a dehydrated boundary and if so, which one.\n var suspenseInstance = getParentSuspenseInstance(targetNode);\n\n while (suspenseInstance !== null) {\n // We found a suspense instance. That means that we haven't\n // hydrated it yet. Even though we leave the comments in the\n // DOM after hydrating, and there are boundaries in the DOM\n // that could already be hydrated, we wouldn't have found them\n // through this pass since if the target is hydrated it would\n // have had an internalInstanceKey on it.\n // Let's get the fiber associated with the SuspenseComponent\n // as the deepest instance.\n var targetSuspenseInst = suspenseInstance[internalInstanceKey];\n\n if (targetSuspenseInst) {\n return targetSuspenseInst;\n } // If we don't find a Fiber on the comment, it might be because\n // we haven't gotten to hydrate it yet. There might still be a\n // parent boundary that hasn't above this one so we need to find\n // the outer most that is known.\n\n\n suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent\n // host component also hasn't hydrated yet. We can return it\n // below since it will bail out on the isMounted check later.\n }\n }\n\n return targetInst;\n }\n\n targetNode = parentNode;\n parentNode = targetNode.parentNode;\n }\n\n return null;\n }", "function getClosestInstanceFromNode(targetNode) {\n var targetInst = targetNode[internalInstanceKey];\n\n if (targetInst) {\n // Don't return HostRoot or SuspenseComponent here.\n return targetInst;\n } // If the direct event target isn't a React owned DOM node, we need to look\n // to see if one of its parents is a React owned DOM node.\n\n\n var parentNode = targetNode.parentNode;\n\n while (parentNode) {\n // We'll check if this is a container root that could include\n // React nodes in the future. We need to check this first because\n // if we're a child of a dehydrated container, we need to first\n // find that inner container before moving on to finding the parent\n // instance. Note that we don't check this field on the targetNode\n // itself because the fibers are conceptually between the container\n // node and the first child. It isn't surrounding the container node.\n // If it's not a container, we check if it's an instance.\n targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey];\n\n if (targetInst) {\n // Since this wasn't the direct target of the event, we might have\n // stepped past dehydrated DOM nodes to get here. However they could\n // also have been non-React nodes. We need to answer which one.\n // If we the instance doesn't have any children, then there can't be\n // a nested suspense boundary within it. So we can use this as a fast\n // bailout. Most of the time, when people add non-React children to\n // the tree, it is using a ref to a child-less DOM node.\n // Normally we'd only need to check one of the fibers because if it\n // has ever gone from having children to deleting them or vice versa\n // it would have deleted the dehydrated boundary nested inside already.\n // However, since the HostRoot starts out with an alternate it might\n // have one on the alternate so we need to check in case this was a\n // root.\n var alternate = targetInst.alternate;\n\n if (targetInst.child !== null || alternate !== null && alternate.child !== null) {\n // Next we need to figure out if the node that skipped past is\n // nested within a dehydrated boundary and if so, which one.\n var suspenseInstance = getParentSuspenseInstance(targetNode);\n\n while (suspenseInstance !== null) {\n // We found a suspense instance. That means that we haven't\n // hydrated it yet. Even though we leave the comments in the\n // DOM after hydrating, and there are boundaries in the DOM\n // that could already be hydrated, we wouldn't have found them\n // through this pass since if the target is hydrated it would\n // have had an internalInstanceKey on it.\n // Let's get the fiber associated with the SuspenseComponent\n // as the deepest instance.\n var targetSuspenseInst = suspenseInstance[internalInstanceKey];\n\n if (targetSuspenseInst) {\n return targetSuspenseInst;\n } // If we don't find a Fiber on the comment, it might be because\n // we haven't gotten to hydrate it yet. There might still be a\n // parent boundary that hasn't above this one so we need to find\n // the outer most that is known.\n\n\n suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent\n // host component also hasn't hydrated yet. We can return it\n // below since it will bail out on the isMounted check later.\n }\n }\n\n return targetInst;\n }\n\n targetNode = parentNode;\n parentNode = targetNode.parentNode;\n }\n\n return null;\n }", "function getClosestInstanceFromNode(targetNode) {\n var targetInst = targetNode[internalInstanceKey];\n\n if (targetInst) {\n // Don't return HostRoot or SuspenseComponent here.\n return targetInst;\n } // If the direct event target isn't a React owned DOM node, we need to look\n // to see if one of its parents is a React owned DOM node.\n\n\n var parentNode = targetNode.parentNode;\n\n while (parentNode) {\n // We'll check if this is a container root that could include\n // React nodes in the future. We need to check this first because\n // if we're a child of a dehydrated container, we need to first\n // find that inner container before moving on to finding the parent\n // instance. Note that we don't check this field on the targetNode\n // itself because the fibers are conceptually between the container\n // node and the first child. It isn't surrounding the container node.\n // If it's not a container, we check if it's an instance.\n targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey];\n\n if (targetInst) {\n // Since this wasn't the direct target of the event, we might have\n // stepped past dehydrated DOM nodes to get here. However they could\n // also have been non-React nodes. We need to answer which one.\n // If we the instance doesn't have any children, then there can't be\n // a nested suspense boundary within it. So we can use this as a fast\n // bailout. Most of the time, when people add non-React children to\n // the tree, it is using a ref to a child-less DOM node.\n // Normally we'd only need to check one of the fibers because if it\n // has ever gone from having children to deleting them or vice versa\n // it would have deleted the dehydrated boundary nested inside already.\n // However, since the HostRoot starts out with an alternate it might\n // have one on the alternate so we need to check in case this was a\n // root.\n var alternate = targetInst.alternate;\n\n if (targetInst.child !== null || alternate !== null && alternate.child !== null) {\n // Next we need to figure out if the node that skipped past is\n // nested within a dehydrated boundary and if so, which one.\n var suspenseInstance = getParentSuspenseInstance(targetNode);\n\n while (suspenseInstance !== null) {\n // We found a suspense instance. That means that we haven't\n // hydrated it yet. Even though we leave the comments in the\n // DOM after hydrating, and there are boundaries in the DOM\n // that could already be hydrated, we wouldn't have found them\n // through this pass since if the target is hydrated it would\n // have had an internalInstanceKey on it.\n // Let's get the fiber associated with the SuspenseComponent\n // as the deepest instance.\n var targetSuspenseInst = suspenseInstance[internalInstanceKey];\n\n if (targetSuspenseInst) {\n return targetSuspenseInst;\n } // If we don't find a Fiber on the comment, it might be because\n // we haven't gotten to hydrate it yet. There might still be a\n // parent boundary that hasn't above this one so we need to find\n // the outer most that is known.\n\n\n suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent\n // host component also hasn't hydrated yet. We can return it\n // below since it will bail out on the isMounted check later.\n }\n }\n\n return targetInst;\n }\n\n targetNode = parentNode;\n parentNode = targetNode.parentNode;\n }\n\n return null;\n }", "function getClosestInstanceFromNode(targetNode) {\n var targetInst = targetNode[internalInstanceKey];\n\n if (targetInst) {\n // Don't return HostRoot or SuspenseComponent here.\n return targetInst;\n } // If the direct event target isn't a React owned DOM node, we need to look\n // to see if one of its parents is a React owned DOM node.\n\n\n var parentNode = targetNode.parentNode;\n\n while (parentNode) {\n // We'll check if this is a container root that could include\n // React nodes in the future. We need to check this first because\n // if we're a child of a dehydrated container, we need to first\n // find that inner container before moving on to finding the parent\n // instance. Note that we don't check this field on the targetNode\n // itself because the fibers are conceptually between the container\n // node and the first child. It isn't surrounding the container node.\n // If it's not a container, we check if it's an instance.\n targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey];\n\n if (targetInst) {\n // Since this wasn't the direct target of the event, we might have\n // stepped past dehydrated DOM nodes to get here. However they could\n // also have been non-React nodes. We need to answer which one.\n // If we the instance doesn't have any children, then there can't be\n // a nested suspense boundary within it. So we can use this as a fast\n // bailout. Most of the time, when people add non-React children to\n // the tree, it is using a ref to a child-less DOM node.\n // Normally we'd only need to check one of the fibers because if it\n // has ever gone from having children to deleting them or vice versa\n // it would have deleted the dehydrated boundary nested inside already.\n // However, since the HostRoot starts out with an alternate it might\n // have one on the alternate so we need to check in case this was a\n // root.\n var alternate = targetInst.alternate;\n\n if (targetInst.child !== null || alternate !== null && alternate.child !== null) {\n // Next we need to figure out if the node that skipped past is\n // nested within a dehydrated boundary and if so, which one.\n var suspenseInstance = getParentSuspenseInstance(targetNode);\n\n while (suspenseInstance !== null) {\n // We found a suspense instance. That means that we haven't\n // hydrated it yet. Even though we leave the comments in the\n // DOM after hydrating, and there are boundaries in the DOM\n // that could already be hydrated, we wouldn't have found them\n // through this pass since if the target is hydrated it would\n // have had an internalInstanceKey on it.\n // Let's get the fiber associated with the SuspenseComponent\n // as the deepest instance.\n var targetSuspenseInst = suspenseInstance[internalInstanceKey];\n\n if (targetSuspenseInst) {\n return targetSuspenseInst;\n } // If we don't find a Fiber on the comment, it might be because\n // we haven't gotten to hydrate it yet. There might still be a\n // parent boundary that hasn't above this one so we need to find\n // the outer most that is known.\n\n\n suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent\n // host component also hasn't hydrated yet. We can return it\n // below since it will bail out on the isMounted check later.\n }\n }\n\n return targetInst;\n }\n\n targetNode = parentNode;\n parentNode = targetNode.parentNode;\n }\n\n return null;\n }", "function getClosestInstanceFromNode(targetNode) {\n var targetInst = targetNode[internalInstanceKey];\n\n if (targetInst) {\n // Don't return HostRoot or SuspenseComponent here.\n return targetInst;\n } // If the direct event target isn't a React owned DOM node, we need to look\n // to see if one of its parents is a React owned DOM node.\n\n\n var parentNode = targetNode.parentNode;\n\n while (parentNode) {\n // We'll check if this is a container root that could include\n // React nodes in the future. We need to check this first because\n // if we're a child of a dehydrated container, we need to first\n // find that inner container before moving on to finding the parent\n // instance. Note that we don't check this field on the targetNode\n // itself because the fibers are conceptually between the container\n // node and the first child. It isn't surrounding the container node.\n // If it's not a container, we check if it's an instance.\n targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey];\n\n if (targetInst) {\n // Since this wasn't the direct target of the event, we might have\n // stepped past dehydrated DOM nodes to get here. However they could\n // also have been non-React nodes. We need to answer which one.\n // If we the instance doesn't have any children, then there can't be\n // a nested suspense boundary within it. So we can use this as a fast\n // bailout. Most of the time, when people add non-React children to\n // the tree, it is using a ref to a child-less DOM node.\n // Normally we'd only need to check one of the fibers because if it\n // has ever gone from having children to deleting them or vice versa\n // it would have deleted the dehydrated boundary nested inside already.\n // However, since the HostRoot starts out with an alternate it might\n // have one on the alternate so we need to check in case this was a\n // root.\n var alternate = targetInst.alternate;\n\n if (targetInst.child !== null || alternate !== null && alternate.child !== null) {\n // Next we need to figure out if the node that skipped past is\n // nested within a dehydrated boundary and if so, which one.\n var suspenseInstance = getParentSuspenseInstance(targetNode);\n\n while (suspenseInstance !== null) {\n // We found a suspense instance. That means that we haven't\n // hydrated it yet. Even though we leave the comments in the\n // DOM after hydrating, and there are boundaries in the DOM\n // that could already be hydrated, we wouldn't have found them\n // through this pass since if the target is hydrated it would\n // have had an internalInstanceKey on it.\n // Let's get the fiber associated with the SuspenseComponent\n // as the deepest instance.\n var targetSuspenseInst = suspenseInstance[internalInstanceKey];\n\n if (targetSuspenseInst) {\n return targetSuspenseInst;\n } // If we don't find a Fiber on the comment, it might be because\n // we haven't gotten to hydrate it yet. There might still be a\n // parent boundary that hasn't above this one so we need to find\n // the outer most that is known.\n\n\n suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent\n // host component also hasn't hydrated yet. We can return it\n // below since it will bail out on the isMounted check later.\n }\n }\n\n return targetInst;\n }\n\n targetNode = parentNode;\n parentNode = targetNode.parentNode;\n }\n\n return null;\n }", "function getClosestInstanceFromNode(targetNode) {\n var targetInst = targetNode[internalInstanceKey];\n\n if (targetInst) {\n // Don't return HostRoot or SuspenseComponent here.\n return targetInst;\n } // If the direct event target isn't a React owned DOM node, we need to look\n // to see if one of its parents is a React owned DOM node.\n\n\n var parentNode = targetNode.parentNode;\n\n while (parentNode) {\n // We'll check if this is a container root that could include\n // React nodes in the future. We need to check this first because\n // if we're a child of a dehydrated container, we need to first\n // find that inner container before moving on to finding the parent\n // instance. Note that we don't check this field on the targetNode\n // itself because the fibers are conceptually between the container\n // node and the first child. It isn't surrounding the container node.\n // If it's not a container, we check if it's an instance.\n targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey];\n\n if (targetInst) {\n // Since this wasn't the direct target of the event, we might have\n // stepped past dehydrated DOM nodes to get here. However they could\n // also have been non-React nodes. We need to answer which one.\n // If we the instance doesn't have any children, then there can't be\n // a nested suspense boundary within it. So we can use this as a fast\n // bailout. Most of the time, when people add non-React children to\n // the tree, it is using a ref to a child-less DOM node.\n // Normally we'd only need to check one of the fibers because if it\n // has ever gone from having children to deleting them or vice versa\n // it would have deleted the dehydrated boundary nested inside already.\n // However, since the HostRoot starts out with an alternate it might\n // have one on the alternate so we need to check in case this was a\n // root.\n var alternate = targetInst.alternate;\n\n if (targetInst.child !== null || alternate !== null && alternate.child !== null) {\n // Next we need to figure out if the node that skipped past is\n // nested within a dehydrated boundary and if so, which one.\n var suspenseInstance = getParentSuspenseInstance(targetNode);\n\n while (suspenseInstance !== null) {\n // We found a suspense instance. That means that we haven't\n // hydrated it yet. Even though we leave the comments in the\n // DOM after hydrating, and there are boundaries in the DOM\n // that could already be hydrated, we wouldn't have found them\n // through this pass since if the target is hydrated it would\n // have had an internalInstanceKey on it.\n // Let's get the fiber associated with the SuspenseComponent\n // as the deepest instance.\n var targetSuspenseInst = suspenseInstance[internalInstanceKey];\n\n if (targetSuspenseInst) {\n return targetSuspenseInst;\n } // If we don't find a Fiber on the comment, it might be because\n // we haven't gotten to hydrate it yet. There might still be a\n // parent boundary that hasn't above this one so we need to find\n // the outer most that is known.\n\n\n suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent\n // host component also hasn't hydrated yet. We can return it\n // below since it will bail out on the isMounted check later.\n }\n }\n\n return targetInst;\n }\n\n targetNode = parentNode;\n parentNode = targetNode.parentNode;\n }\n\n return null;\n }", "function getClosestInstanceFromNode(targetNode) {\n var targetInst = targetNode[internalInstanceKey];\n\n if (targetInst) {\n // Don't return HostRoot or SuspenseComponent here.\n return targetInst;\n } // If the direct event target isn't a React owned DOM node, we need to look\n // to see if one of its parents is a React owned DOM node.\n\n\n var parentNode = targetNode.parentNode;\n\n while (parentNode) {\n // We'll check if this is a container root that could include\n // React nodes in the future. We need to check this first because\n // if we're a child of a dehydrated container, we need to first\n // find that inner container before moving on to finding the parent\n // instance. Note that we don't check this field on the targetNode\n // itself because the fibers are conceptually between the container\n // node and the first child. It isn't surrounding the container node.\n // If it's not a container, we check if it's an instance.\n targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey];\n\n if (targetInst) {\n // Since this wasn't the direct target of the event, we might have\n // stepped past dehydrated DOM nodes to get here. However they could\n // also have been non-React nodes. We need to answer which one.\n // If we the instance doesn't have any children, then there can't be\n // a nested suspense boundary within it. So we can use this as a fast\n // bailout. Most of the time, when people add non-React children to\n // the tree, it is using a ref to a child-less DOM node.\n // Normally we'd only need to check one of the fibers because if it\n // has ever gone from having children to deleting them or vice versa\n // it would have deleted the dehydrated boundary nested inside already.\n // However, since the HostRoot starts out with an alternate it might\n // have one on the alternate so we need to check in case this was a\n // root.\n var alternate = targetInst.alternate;\n\n if (targetInst.child !== null || alternate !== null && alternate.child !== null) {\n // Next we need to figure out if the node that skipped past is\n // nested within a dehydrated boundary and if so, which one.\n var suspenseInstance = getParentSuspenseInstance(targetNode);\n\n while (suspenseInstance !== null) {\n // We found a suspense instance. That means that we haven't\n // hydrated it yet. Even though we leave the comments in the\n // DOM after hydrating, and there are boundaries in the DOM\n // that could already be hydrated, we wouldn't have found them\n // through this pass since if the target is hydrated it would\n // have had an internalInstanceKey on it.\n // Let's get the fiber associated with the SuspenseComponent\n // as the deepest instance.\n var targetSuspenseInst = suspenseInstance[internalInstanceKey];\n\n if (targetSuspenseInst) {\n return targetSuspenseInst;\n } // If we don't find a Fiber on the comment, it might be because\n // we haven't gotten to hydrate it yet. There might still be a\n // parent boundary that hasn't above this one so we need to find\n // the outer most that is known.\n\n\n suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent\n // host component also hasn't hydrated yet. We can return it\n // below since it will bail out on the isMounted check later.\n }\n }\n\n return targetInst;\n }\n\n targetNode = parentNode;\n parentNode = targetNode.parentNode;\n }\n\n return null;\n }", "function getClosestInstanceFromNode(targetNode) {\n var targetInst = targetNode[internalInstanceKey];\n if (targetInst) // Don't return HostRoot or SuspenseComponent here.\n return targetInst;\n // If the direct event target isn't a React owned DOM node, we need to look\n // to see if one of its parents is a React owned DOM node.\n var parentNode = targetNode.parentNode;\n while(parentNode){\n // We'll check if this is a container root that could include\n // React nodes in the future. We need to check this first because\n // if we're a child of a dehydrated container, we need to first\n // find that inner container before moving on to finding the parent\n // instance. Note that we don't check this field on the targetNode\n // itself because the fibers are conceptually between the container\n // node and the first child. It isn't surrounding the container node.\n // If it's not a container, we check if it's an instance.\n targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey];\n if (targetInst) {\n // Since this wasn't the direct target of the event, we might have\n // stepped past dehydrated DOM nodes to get here. However they could\n // also have been non-React nodes. We need to answer which one.\n // If we the instance doesn't have any children, then there can't be\n // a nested suspense boundary within it. So we can use this as a fast\n // bailout. Most of the time, when people add non-React children to\n // the tree, it is using a ref to a child-less DOM node.\n // Normally we'd only need to check one of the fibers because if it\n // has ever gone from having children to deleting them or vice versa\n // it would have deleted the dehydrated boundary nested inside already.\n // However, since the HostRoot starts out with an alternate it might\n // have one on the alternate so we need to check in case this was a\n // root.\n var alternate = targetInst.alternate;\n if (targetInst.child !== null || alternate !== null && alternate.child !== null) {\n // Next we need to figure out if the node that skipped past is\n // nested within a dehydrated boundary and if so, which one.\n var suspenseInstance = getParentSuspenseInstance(targetNode);\n while(suspenseInstance !== null){\n // We found a suspense instance. That means that we haven't\n // hydrated it yet. Even though we leave the comments in the\n // DOM after hydrating, and there are boundaries in the DOM\n // that could already be hydrated, we wouldn't have found them\n // through this pass since if the target is hydrated it would\n // have had an internalInstanceKey on it.\n // Let's get the fiber associated with the SuspenseComponent\n // as the deepest instance.\n var targetSuspenseInst = suspenseInstance[internalInstanceKey];\n if (targetSuspenseInst) return targetSuspenseInst;\n // If we don't find a Fiber on the comment, it might be because\n // we haven't gotten to hydrate it yet. There might still be a\n // parent boundary that hasn't above this one so we need to find\n // the outer most that is known.\n suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent\n // host component also hasn't hydrated yet. We can return it\n // below since it will bail out on the isMounted check later.\n }\n }\n return targetInst;\n }\n targetNode = parentNode;\n parentNode = targetNode.parentNode;\n }\n return null;\n }", "function getClosestInstanceFromNode(targetNode) {\n var targetInst = targetNode[internalInstanceKey];\n if (targetInst) {\n // Don't return HostRoot or SuspenseComponent here.\n return targetInst;\n }\n // If the direct event target isn't a React owned DOM node, we need to look\n // to see if one of its parents is a React owned DOM node.\n var parentNode = targetNode.parentNode;\n while (parentNode) {\n // We'll check if this is a container root that could include\n // React nodes in the future. We need to check this first because\n // if we're a child of a dehydrated container, we need to first\n // find that inner container before moving on to finding the parent\n // instance. Note that we don't check this field on the targetNode\n // itself because the fibers are conceptually between the container\n // node and the first child. It isn't surrounding the container node.\n // If it's not a container, we check if it's an instance.\n targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey];\n if (targetInst) {\n // Since this wasn't the direct target of the event, we might have\n // stepped past dehydrated DOM nodes to get here. However they could\n // also have been non-React nodes. We need to answer which one.\n // If we the instance doesn't have any children, then there can't be\n // a nested suspense boundary within it. So we can use this as a fast\n // bailout. Most of the time, when people add non-React children to\n // the tree, it is using a ref to a child-less DOM node.\n // Normally we'd only need to check one of the fibers because if it\n // has ever gone from having children to deleting them or vice versa\n // it would have deleted the dehydrated boundary nested inside already.\n // However, since the HostRoot starts out with an alternate it might\n // have one on the alternate so we need to check in case this was a\n // root.\n var alternate = targetInst.alternate;\n if (targetInst.child !== null || alternate !== null && alternate.child !== null) {\n // Next we need to figure out if the node that skipped past is\n // nested within a dehydrated boundary and if so, which one.\n var suspenseInstance = getParentSuspenseInstance(targetNode);\n while (suspenseInstance !== null) {\n // We found a suspense instance. That means that we haven't\n // hydrated it yet. Even though we leave the comments in the\n // DOM after hydrating, and there are boundaries in the DOM\n // that could already be hydrated, we wouldn't have found them\n // through this pass since if the target is hydrated it would\n // have had an internalInstanceKey on it.\n // Let's get the fiber associated with the SuspenseComponent\n // as the deepest instance.\n var targetSuspenseInst = suspenseInstance[internalInstanceKey];\n if (targetSuspenseInst) {\n return targetSuspenseInst;\n }\n // If we don't find a Fiber on the comment, it might be because\n // we haven't gotten to hydrate it yet. There might still be a\n // parent boundary that hasn't above this one so we need to find\n // the outer most that is known.\n suspenseInstance = getParentSuspenseInstance(suspenseInstance);\n }\n }\n return targetInst;\n }\n targetNode = parentNode;\n parentNode = targetNode.parentNode;\n }\n return null;\n }", "function getClosestInstanceFromNode(targetNode){var targetInst=targetNode[internalInstanceKey];if(targetInst){// Don't return HostRoot or SuspenseComponent here.\nreturn targetInst;}// If the direct event target isn't a React owned DOM node, we need to look\n// to see if one of its parents is a React owned DOM node.\nvar parentNode=targetNode.parentNode;while(parentNode){// We'll check if this is a container root that could include\n// React nodes in the future. We need to check this first because\n// if we're a child of a dehydrated container, we need to first\n// find that inner container before moving on to finding the parent\n// instance. Note that we don't check this field on the targetNode\n// itself because the fibers are conceptually between the container\n// node and the first child. It isn't surrounding the container node.\n// If it's not a container, we check if it's an instance.\ntargetInst=parentNode[internalContainerInstanceKey]||parentNode[internalInstanceKey];if(targetInst){// Since this wasn't the direct target of the event, we might have\n// stepped past dehydrated DOM nodes to get here. However they could\n// also have been non-React nodes. We need to answer which one.\n// If we the instance doesn't have any children, then there can't be\n// a nested suspense boundary within it. So we can use this as a fast\n// bailout. Most of the time, when people add non-React children to\n// the tree, it is using a ref to a child-less DOM node.\n// Normally we'd only need to check one of the fibers because if it\n// has ever gone from having children to deleting them or vice versa\n// it would have deleted the dehydrated boundary nested inside already.\n// However, since the HostRoot starts out with an alternate it might\n// have one on the alternate so we need to check in case this was a\n// root.\nvar alternate=targetInst.alternate;if(targetInst.child!==null||alternate!==null&&alternate.child!==null){// Next we need to figure out if the node that skipped past is\n// nested within a dehydrated boundary and if so, which one.\nvar suspenseInstance=getParentSuspenseInstance(targetNode);while(suspenseInstance!==null){// We found a suspense instance. That means that we haven't\n// hydrated it yet. Even though we leave the comments in the\n// DOM after hydrating, and there are boundaries in the DOM\n// that could already be hydrated, we wouldn't have found them\n// through this pass since if the target is hydrated it would\n// have had an internalInstanceKey on it.\n// Let's get the fiber associated with the SuspenseComponent\n// as the deepest instance.\nvar targetSuspenseInst=suspenseInstance[internalInstanceKey];if(targetSuspenseInst){return targetSuspenseInst;}// If we don't find a Fiber on the comment, it might be because\n// we haven't gotten to hydrate it yet. There might still be a\n// parent boundary that hasn't above this one so we need to find\n// the outer most that is known.\nsuspenseInstance=getParentSuspenseInstance(suspenseInstance);// If we don't find one, then that should mean that the parent\n// host component also hasn't hydrated yet. We can return it\n// below since it will bail out on the isMounted check later.\n}}return targetInst;}targetNode=parentNode;parentNode=targetNode.parentNode;}return null;}", "function getClosestInstanceFromNode(targetNode){var targetInst=targetNode[internalInstanceKey];if(targetInst){// Don't return HostRoot or SuspenseComponent here.\nreturn targetInst;}// If the direct event target isn't a React owned DOM node, we need to look\n// to see if one of its parents is a React owned DOM node.\nvar parentNode=targetNode.parentNode;while(parentNode){// We'll check if this is a container root that could include\n// React nodes in the future. We need to check this first because\n// if we're a child of a dehydrated container, we need to first\n// find that inner container before moving on to finding the parent\n// instance. Note that we don't check this field on the targetNode\n// itself because the fibers are conceptually between the container\n// node and the first child. It isn't surrounding the container node.\n// If it's not a container, we check if it's an instance.\ntargetInst=parentNode[internalContainerInstanceKey]||parentNode[internalInstanceKey];if(targetInst){// Since this wasn't the direct target of the event, we might have\n// stepped past dehydrated DOM nodes to get here. However they could\n// also have been non-React nodes. We need to answer which one.\n// If we the instance doesn't have any children, then there can't be\n// a nested suspense boundary within it. So we can use this as a fast\n// bailout. Most of the time, when people add non-React children to\n// the tree, it is using a ref to a child-less DOM node.\n// Normally we'd only need to check one of the fibers because if it\n// has ever gone from having children to deleting them or vice versa\n// it would have deleted the dehydrated boundary nested inside already.\n// However, since the HostRoot starts out with an alternate it might\n// have one on the alternate so we need to check in case this was a\n// root.\nvar alternate=targetInst.alternate;if(targetInst.child!==null||alternate!==null&&alternate.child!==null){// Next we need to figure out if the node that skipped past is\n// nested within a dehydrated boundary and if so, which one.\nvar suspenseInstance=getParentSuspenseInstance(targetNode);while(suspenseInstance!==null){// We found a suspense instance. That means that we haven't\n// hydrated it yet. Even though we leave the comments in the\n// DOM after hydrating, and there are boundaries in the DOM\n// that could already be hydrated, we wouldn't have found them\n// through this pass since if the target is hydrated it would\n// have had an internalInstanceKey on it.\n// Let's get the fiber associated with the SuspenseComponent\n// as the deepest instance.\nvar targetSuspenseInst=suspenseInstance[internalInstanceKey];if(targetSuspenseInst){return targetSuspenseInst;}// If we don't find a Fiber on the comment, it might be because\n// we haven't gotten to hydrate it yet. There might still be a\n// parent boundary that hasn't above this one so we need to find\n// the outer most that is known.\nsuspenseInstance=getParentSuspenseInstance(suspenseInstance);// If we don't find one, then that should mean that the parent\n// host component also hasn't hydrated yet. We can return it\n// below since it will bail out on the isMounted check later.\n}}return targetInst;}targetNode=parentNode;parentNode=targetNode.parentNode;}return null;}", "function getClosestInstanceFromNode(targetNode){var targetInst=targetNode[internalInstanceKey];if(targetInst){// Don't return HostRoot or SuspenseComponent here.\nreturn targetInst;}// If the direct event target isn't a React owned DOM node, we need to look\n// to see if one of its parents is a React owned DOM node.\nvar parentNode=targetNode.parentNode;while(parentNode){// We'll check if this is a container root that could include\n// React nodes in the future. We need to check this first because\n// if we're a child of a dehydrated container, we need to first\n// find that inner container before moving on to finding the parent\n// instance. Note that we don't check this field on the targetNode\n// itself because the fibers are conceptually between the container\n// node and the first child. It isn't surrounding the container node.\n// If it's not a container, we check if it's an instance.\ntargetInst=parentNode[internalContainerInstanceKey]||parentNode[internalInstanceKey];if(targetInst){// Since this wasn't the direct target of the event, we might have\n// stepped past dehydrated DOM nodes to get here. However they could\n// also have been non-React nodes. We need to answer which one.\n// If we the instance doesn't have any children, then there can't be\n// a nested suspense boundary within it. So we can use this as a fast\n// bailout. Most of the time, when people add non-React children to\n// the tree, it is using a ref to a child-less DOM node.\n// Normally we'd only need to check one of the fibers because if it\n// has ever gone from having children to deleting them or vice versa\n// it would have deleted the dehydrated boundary nested inside already.\n// However, since the HostRoot starts out with an alternate it might\n// have one on the alternate so we need to check in case this was a\n// root.\nvar alternate=targetInst.alternate;if(targetInst.child!==null||alternate!==null&&alternate.child!==null){// Next we need to figure out if the node that skipped past is\n// nested within a dehydrated boundary and if so, which one.\nvar suspenseInstance=getParentSuspenseInstance(targetNode);while(suspenseInstance!==null){// We found a suspense instance. That means that we haven't\n// hydrated it yet. Even though we leave the comments in the\n// DOM after hydrating, and there are boundaries in the DOM\n// that could already be hydrated, we wouldn't have found them\n// through this pass since if the target is hydrated it would\n// have had an internalInstanceKey on it.\n// Let's get the fiber associated with the SuspenseComponent\n// as the deepest instance.\nvar targetSuspenseInst=suspenseInstance[internalInstanceKey];if(targetSuspenseInst){return targetSuspenseInst;}// If we don't find a Fiber on the comment, it might be because\n// we haven't gotten to hydrate it yet. There might still be a\n// parent boundary that hasn't above this one so we need to find\n// the outer most that is known.\nsuspenseInstance=getParentSuspenseInstance(suspenseInstance);// If we don't find one, then that should mean that the parent\n// host component also hasn't hydrated yet. We can return it\n// below since it will bail out on the isMounted check later.\n}}return targetInst;}targetNode=parentNode;parentNode=targetNode.parentNode;}return null;}", "function getClosestInstanceFromNode(targetNode){var targetInst=targetNode[internalInstanceKey];if(targetInst){// Don't return HostRoot or SuspenseComponent here.\nreturn targetInst;}// If the direct event target isn't a React owned DOM node, we need to look\n// to see if one of its parents is a React owned DOM node.\nvar parentNode=targetNode.parentNode;while(parentNode){// We'll check if this is a container root that could include\n// React nodes in the future. We need to check this first because\n// if we're a child of a dehydrated container, we need to first\n// find that inner container before moving on to finding the parent\n// instance. Note that we don't check this field on the targetNode\n// itself because the fibers are conceptually between the container\n// node and the first child. It isn't surrounding the container node.\n// If it's not a container, we check if it's an instance.\ntargetInst=parentNode[internalContainerInstanceKey]||parentNode[internalInstanceKey];if(targetInst){// Since this wasn't the direct target of the event, we might have\n// stepped past dehydrated DOM nodes to get here. However they could\n// also have been non-React nodes. We need to answer which one.\n// If we the instance doesn't have any children, then there can't be\n// a nested suspense boundary within it. So we can use this as a fast\n// bailout. Most of the time, when people add non-React children to\n// the tree, it is using a ref to a child-less DOM node.\n// Normally we'd only need to check one of the fibers because if it\n// has ever gone from having children to deleting them or vice versa\n// it would have deleted the dehydrated boundary nested inside already.\n// However, since the HostRoot starts out with an alternate it might\n// have one on the alternate so we need to check in case this was a\n// root.\nvar alternate=targetInst.alternate;if(targetInst.child!==null||alternate!==null&&alternate.child!==null){// Next we need to figure out if the node that skipped past is\n// nested within a dehydrated boundary and if so, which one.\nvar suspenseInstance=getParentSuspenseInstance(targetNode);while(suspenseInstance!==null){// We found a suspense instance. That means that we haven't\n// hydrated it yet. Even though we leave the comments in the\n// DOM after hydrating, and there are boundaries in the DOM\n// that could already be hydrated, we wouldn't have found them\n// through this pass since if the target is hydrated it would\n// have had an internalInstanceKey on it.\n// Let's get the fiber associated with the SuspenseComponent\n// as the deepest instance.\nvar targetSuspenseInst=suspenseInstance[internalInstanceKey];if(targetSuspenseInst){return targetSuspenseInst;}// If we don't find a Fiber on the comment, it might be because\n// we haven't gotten to hydrate it yet. There might still be a\n// parent boundary that hasn't above this one so we need to find\n// the outer most that is known.\nsuspenseInstance=getParentSuspenseInstance(suspenseInstance);// If we don't find one, then that should mean that the parent\n// host component also hasn't hydrated yet. We can return it\n// below since it will bail out on the isMounted check later.\n}}return targetInst;}targetNode=parentNode;parentNode=targetNode.parentNode;}return null;}", "function getClosestInstanceFromNode(targetNode){var targetInst=targetNode[internalInstanceKey];if(targetInst){// Don't return HostRoot or SuspenseComponent here.\nreturn targetInst;}// If the direct event target isn't a React owned DOM node, we need to look\n// to see if one of its parents is a React owned DOM node.\nvar parentNode=targetNode.parentNode;while(parentNode){// We'll check if this is a container root that could include\n// React nodes in the future. We need to check this first because\n// if we're a child of a dehydrated container, we need to first\n// find that inner container before moving on to finding the parent\n// instance. Note that we don't check this field on the targetNode\n// itself because the fibers are conceptually between the container\n// node and the first child. It isn't surrounding the container node.\n// If it's not a container, we check if it's an instance.\ntargetInst=parentNode[internalContainerInstanceKey]||parentNode[internalInstanceKey];if(targetInst){// Since this wasn't the direct target of the event, we might have\n// stepped past dehydrated DOM nodes to get here. However they could\n// also have been non-React nodes. We need to answer which one.\n// If we the instance doesn't have any children, then there can't be\n// a nested suspense boundary within it. So we can use this as a fast\n// bailout. Most of the time, when people add non-React children to\n// the tree, it is using a ref to a child-less DOM node.\n// Normally we'd only need to check one of the fibers because if it\n// has ever gone from having children to deleting them or vice versa\n// it would have deleted the dehydrated boundary nested inside already.\n// However, since the HostRoot starts out with an alternate it might\n// have one on the alternate so we need to check in case this was a\n// root.\nvar alternate=targetInst.alternate;if(targetInst.child!==null||alternate!==null&&alternate.child!==null){// Next we need to figure out if the node that skipped past is\n// nested within a dehydrated boundary and if so, which one.\nvar suspenseInstance=getParentSuspenseInstance(targetNode);while(suspenseInstance!==null){// We found a suspense instance. That means that we haven't\n// hydrated it yet. Even though we leave the comments in the\n// DOM after hydrating, and there are boundaries in the DOM\n// that could already be hydrated, we wouldn't have found them\n// through this pass since if the target is hydrated it would\n// have had an internalInstanceKey on it.\n// Let's get the fiber associated with the SuspenseComponent\n// as the deepest instance.\nvar targetSuspenseInst=suspenseInstance[internalInstanceKey];if(targetSuspenseInst){return targetSuspenseInst;}// If we don't find a Fiber on the comment, it might be because\n// we haven't gotten to hydrate it yet. There might still be a\n// parent boundary that hasn't above this one so we need to find\n// the outer most that is known.\nsuspenseInstance=getParentSuspenseInstance(suspenseInstance);// If we don't find one, then that should mean that the parent\n// host component also hasn't hydrated yet. We can return it\n// below since it will bail out on the isMounted check later.\n}}return targetInst;}targetNode=parentNode;parentNode=targetNode.parentNode;}return null;}", "function getRootNode(target) {\n\t\t\t\t\twhile (target.nodeType !== 1) {\n\t\t\t\t\t\ttarget = target.parentNode;\n\t\t\t\t\t}\n\t\t\t\t\treturn target;\n\t\t\t\t}", "function c(e) {\n if (// Without this first invariant, passing a non-DOM-component triggers the next\n // invariant for a missing parent, which is super confusing.\n void 0 === e._hostNode && f(!1, \"getNodeFromInstance: Invalid argument.\"), e._hostNode) return e._hostNode;\n for (// Walk up the tree until we find an ancestor whose DOM node we have cached.\n var t = []; !e._hostNode; ) t.push(e), e._hostParent || f(!1, \"React DOM tree root should always have a node reference.\"), \n e = e._hostParent;\n // Now parents contains each ancestor that does *not* have a cached native\n // node, and `inst` is the deepest ancestor that does.\n for (;t.length; e = t.pop()) s(e, e._hostNode);\n return e._hostNode;\n }", "function getRootNode(target) {\n var roots = getRootNodes(target);\n if (roots.length) {\n return roots[0];\n } else {\n return null;\n }\n }", "function getClosestInstanceFromNode(node){if(node[internalInstanceKey]){return node[internalInstanceKey];}while(!node[internalInstanceKey]){if(node.parentNode){node=node.parentNode;}else{// Top of the tree. This node must not be part of a React tree (or is\n// unmounted, potentially).\nreturn null;}}var inst=node[internalInstanceKey];if(inst.tag===HostComponent||inst.tag===HostText){// In Fiber, this will always be the deepest root.\nreturn inst;}return null;}", "function getClosestInstanceFromNode(node){if(node[internalInstanceKey]){return node[internalInstanceKey];}while(!node[internalInstanceKey]){if(node.parentNode){node=node.parentNode;}else{// Top of the tree. This node must not be part of a React tree (or is\n// unmounted, potentially).\nreturn null;}}var inst=node[internalInstanceKey];if(inst.tag===HostComponent||inst.tag===HostText){// In Fiber, this will always be the deepest root.\nreturn inst;}return null;}", "function getClosestInstanceFromNode(node){if(node[internalInstanceKey]){return node[internalInstanceKey];}while(!node[internalInstanceKey]){if(node.parentNode){node=node.parentNode;}else{// Top of the tree. This node must not be part of a React tree (or is\n// unmounted, potentially).\nreturn null;}}var inst=node[internalInstanceKey];if(inst.tag===HostComponent||inst.tag===HostText){// In Fiber, this will always be the deepest root.\nreturn inst;}return null;}", "function getClosestInstanceFromNode(node){if(node[internalInstanceKey]){return node[internalInstanceKey];}while(!node[internalInstanceKey]){if(node.parentNode){node=node.parentNode;}else{// Top of the tree. This node must not be part of a React tree (or is\n// unmounted, potentially).\nreturn null;}}var inst=node[internalInstanceKey];if(inst.tag===HostComponent||inst.tag===HostText){// In Fiber, this will always be the deepest root.\nreturn inst;}return null;}", "_getComponentRootNode(componentRef) {\n return componentRef.hostView.rootNodes[0];\n }", "function findRootContainerNode(inst){if(inst.tag===HostRoot){return inst.stateNode.containerInfo;}// TODO: It may be a good idea to cache this to prevent unnecessary DOM\n// traversal, but caching is difficult to do correctly without using a\n// mutation observer to listen for all DOM changes.\nwhile(inst[\"return\"]){inst=inst[\"return\"];}if(inst.tag!==HostRoot){// This can happen if we're in a detached tree.\nreturn null;}return inst.stateNode.containerInfo;}", "function findRootContainerNode(inst){if(inst.tag===HostRoot){return inst.stateNode.containerInfo;}// TODO: It may be a good idea to cache this to prevent unnecessary DOM\n// traversal, but caching is difficult to do correctly without using a\n// mutation observer to listen for all DOM changes.\nwhile(inst.return){inst=inst.return;}if(inst.tag!==HostRoot){// This can happen if we're in a detached tree.\nreturn null;}return inst.stateNode.containerInfo;}", "function findRootContainerNode(inst){if(inst.tag===HostRoot){return inst.stateNode.containerInfo;}// TODO: It may be a good idea to cache this to prevent unnecessary DOM\n// traversal, but caching is difficult to do correctly without using a\n// mutation observer to listen for all DOM changes.\nwhile(inst.return){inst=inst.return;}if(inst.tag!==HostRoot){// This can happen if we're in a detached tree.\nreturn null;}return inst.stateNode.containerInfo;}", "function findRootContainerNode(inst) {\n if (inst.tag === HostRoot) {\n return inst.stateNode.containerInfo;\n } // TODO: It may be a good idea to cache this to prevent unnecessary DOM\n // traversal, but caching is difficult to do correctly without using a\n // mutation observer to listen for all DOM changes.\n\n\n while (inst.return) {\n inst = inst.return;\n }\n\n if (inst.tag !== HostRoot) {\n // This can happen if we're in a detached tree.\n return null;\n }\n\n return inst.stateNode.containerInfo;\n }", "function findRootContainerNode(inst) {\n if (inst.tag === HostRoot) {\n return inst.stateNode.containerInfo;\n } // TODO: It may be a good idea to cache this to prevent unnecessary DOM\n // traversal, but caching is difficult to do correctly without using a\n // mutation observer to listen for all DOM changes.\n\n\n while (inst.return) {\n inst = inst.return;\n }\n\n if (inst.tag !== HostRoot) {\n // This can happen if we're in a detached tree.\n return null;\n }\n\n return inst.stateNode.containerInfo;\n }", "function findRootContainerNode(inst) {\n if (inst.tag === HostRoot) {\n return inst.stateNode.containerInfo;\n } // TODO: It may be a good idea to cache this to prevent unnecessary DOM\n // traversal, but caching is difficult to do correctly without using a\n // mutation observer to listen for all DOM changes.\n\n\n while (inst.return) {\n inst = inst.return;\n }\n\n if (inst.tag !== HostRoot) {\n // This can happen if we're in a detached tree.\n return null;\n }\n\n return inst.stateNode.containerInfo;\n }", "function findRootContainerNode(inst) {\n if (inst.tag === HostRoot) {\n return inst.stateNode.containerInfo;\n } // TODO: It may be a good idea to cache this to prevent unnecessary DOM\n // traversal, but caching is difficult to do correctly without using a\n // mutation observer to listen for all DOM changes.\n\n\n while (inst.return) {\n inst = inst.return;\n }\n\n if (inst.tag !== HostRoot) {\n // This can happen if we're in a detached tree.\n return null;\n }\n\n return inst.stateNode.containerInfo;\n }", "function findRootContainerNode(inst) {\n if (inst.tag === HostRoot) {\n return inst.stateNode.containerInfo;\n } // TODO: It may be a good idea to cache this to prevent unnecessary DOM\n // traversal, but caching is difficult to do correctly without using a\n // mutation observer to listen for all DOM changes.\n\n\n while (inst.return) {\n inst = inst.return;\n }\n\n if (inst.tag !== HostRoot) {\n // This can happen if we're in a detached tree.\n return null;\n }\n\n return inst.stateNode.containerInfo;\n }", "function findRootContainerNode(inst) {\n if (inst.tag === HostRoot) {\n return inst.stateNode.containerInfo;\n } // TODO: It may be a good idea to cache this to prevent unnecessary DOM\n // traversal, but caching is difficult to do correctly without using a\n // mutation observer to listen for all DOM changes.\n\n while (inst.return) {\n inst = inst.return;\n }\n\n if (inst.tag !== HostRoot) {\n // This can happen if we're in a detached tree.\n return null;\n }\n\n return inst.stateNode.containerInfo;\n }", "function findRootContainerNode(inst) {\n if (inst.tag === HostRoot) {\n return inst.stateNode.containerInfo;\n } // TODO: It may be a good idea to cache this to prevent unnecessary DOM\n // traversal, but caching is difficult to do correctly without using a\n // mutation observer to listen for all DOM changes.\n\n\n while (inst.return) {\n inst = inst.return;\n }\n\n if (inst.tag !== HostRoot) {\n // This can happen if we're in a detached tree.\n return null;\n }\n\n return inst.stateNode.containerInfo;\n } // Used to store ancestor hierarchy in top level callback", "hasDOMNode(editor, target) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var {\n editable = false\n } = options;\n var editorEl = ReactEditor.toDOMNode(editor, editor);\n var targetEl; // COMPAT: In Firefox, reading `target.nodeType` will throw an error if\n // target is originating from an internal \"restricted\" element (e.g. a\n // stepper arrow on a number input). (2018/05/04)\n // https://github.com/ianstormtaylor/slate/issues/1819\n\n try {\n targetEl = isDOMElement(target) ? target : target.parentElement;\n } catch (err) {\n if (!err.message.includes('Permission denied to access property \"nodeType\"')) {\n throw err;\n }\n }\n\n if (!targetEl) {\n return false;\n }\n\n return targetEl.closest(\"[data-slate-editor]\") === editorEl && (!editable || targetEl.isContentEditable || !!targetEl.getAttribute('data-slate-zero-width'));\n }", "hasDOMNode(editor, target) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var {\n editable = false\n } = options;\n var editorEl = ReactEditor.toDOMNode(editor, editor);\n var targetEl; // COMPAT: In Firefox, reading `target.nodeType` will throw an error if\n // target is originating from an internal \"restricted\" element (e.g. a\n // stepper arrow on a number input). (2018/05/04)\n // https://github.com/ianstormtaylor/slate/issues/1819\n\n try {\n targetEl = isDOMElement(target) ? target : target.parentElement;\n } catch (err) {\n if (!err.message.includes('Permission denied to access property \"nodeType\"')) {\n throw err;\n }\n }\n\n if (!targetEl) {\n return false;\n }\n\n return targetEl.closest(\"[data-slate-editor]\") === editorEl && (!editable || targetEl.isContentEditable || !!targetEl.getAttribute('data-slate-zero-width'));\n }", "function findRootContainerNode(inst) {\n // TODO: It may be a good idea to cache this to prevent unnecessary DOM\n // traversal, but caching is difficult to do correctly without using a\n // mutation observer to listen for all DOM changes.\n while (inst['return']) {\n inst = inst['return'];\n }\n if (inst.tag !== HostRoot) {\n // This can happen if we're in a detached tree.\n return null;\n }\n return inst.stateNode.containerInfo;\n }", "function findRootContainerNode(inst) {\n // TODO: It may be a good idea to cache this to prevent unnecessary DOM\n // traversal, but caching is difficult to do correctly without using a\n // mutation observer to listen for all DOM changes.\n while (inst['return']) {\n inst = inst['return'];\n }\n if (inst.tag !== HostRoot) {\n // This can happen if we're in a detached tree.\n return null;\n }\n return inst.stateNode.containerInfo;\n }", "function findRootContainerNode(inst) {\n // TODO: It may be a good idea to cache this to prevent unnecessary DOM\n // traversal, but caching is difficult to do correctly without using a\n // mutation observer to listen for all DOM changes.\n while (inst.return) {\n inst = inst.return;\n }\n if (inst.tag !== HostRoot) {\n // This can happen if we're in a detached tree.\n return null;\n }\n return inst.stateNode.containerInfo;\n }", "getContainerNode() {\n return this._appContainerNode || this._viewContainerNode;\n }", "function findRootContainerNode(inst) {\n // TODO: It may be a good idea to cache this to prevent unnecessary DOM\n // traversal, but caching is difficult to do correctly without using a\n // mutation observer to listen for all DOM changes.\n while (inst.return) {\n inst = inst.return;\n }\n\n if (inst.tag !== HostRoot) {\n // This can happen if we're in a detached tree.\n return null;\n }\n\n return inst.stateNode.containerInfo;\n } // Used to store ancestor hierarchy in top level callback", "function findRootContainerNode(inst) {\n // TODO: It may be a good idea to cache this to prevent unnecessary DOM\n // traversal, but caching is difficult to do correctly without using a\n // mutation observer to listen for all DOM changes.\n while (inst.return) {\n inst = inst.return;\n }\n\n if (inst.tag !== HostRoot) {\n // This can happen if we're in a detached tree.\n return null;\n }\n\n return inst.stateNode.containerInfo;\n } // Used to store ancestor hierarchy in top level callback", "function findRootContainerNode(inst) {\n // TODO: It may be a good idea to cache this to prevent unnecessary DOM\n // traversal, but caching is difficult to do correctly without using a\n // mutation observer to listen for all DOM changes.\n while (inst.return) {\n inst = inst.return;\n }\n\n if (inst.tag !== HostRoot) {\n // This can happen if we're in a detached tree.\n return null;\n }\n\n return inst.stateNode.containerInfo;\n } // Used to store ancestor hierarchy in top level callback", "function findRootContainerNode(inst){// TODO: It may be a good idea to cache this to prevent unnecessary DOM\n// traversal, but caching is difficult to do correctly without using a\n// mutation observer to listen for all DOM changes.\nwhile(inst['return']){inst=inst['return'];}if(inst.tag!==HostRoot){// This can happen if we're in a detached tree.\nreturn null;}return inst.stateNode.containerInfo;}// Used to store ancestor hierarchy in top level callback", "function findRootContainerNode(inst){// TODO: It may be a good idea to cache this to prevent unnecessary DOM\n// traversal, but caching is difficult to do correctly without using a\n// mutation observer to listen for all DOM changes.\nwhile(inst['return']){inst=inst['return'];}if(inst.tag!==HostRoot){// This can happen if we're in a detached tree.\nreturn null;}return inst.stateNode.containerInfo;}// Used to store ancestor hierarchy in top level callback", "function findRootContainerNode(inst){// TODO: It may be a good idea to cache this to prevent unnecessary DOM\n// traversal, but caching is difficult to do correctly without using a\n// mutation observer to listen for all DOM changes.\nwhile(inst['return']){inst=inst['return'];}if(inst.tag!==HostRoot){// This can happen if we're in a detached tree.\nreturn null;}return inst.stateNode.containerInfo;}// Used to store ancestor hierarchy in top level callback", "function getInstanceFromNode$1(node) {\n var inst =\n node[internalInstanceKey] || node[internalContainerInstanceKey];\n\n if (inst) {\n if (\n inst.tag === HostComponent ||\n inst.tag === HostText ||\n inst.tag === SuspenseComponent ||\n inst.tag === HostRoot\n ) {\n return inst;\n } else {\n return null;\n }\n }\n\n return null;\n }", "function findRootContainerNode(inst) {\n\t // TODO: It may be a good idea to cache this to prevent unnecessary DOM\n\t // traversal, but caching is difficult to do correctly without using a\n\t // mutation observer to listen for all DOM changes.\n\t while (inst['return']) {\n\t inst = inst['return'];\n\t }\n\t if (inst.tag !== HostRoot) {\n\t // This can happen if we're in a detached tree.\n\t return null;\n\t }\n\t return inst.stateNode.containerInfo;\n\t}", "function findRootContainerNode(inst) {\n // TODO: It may be a good idea to cache this to prevent unnecessary DOM\n // traversal, but caching is difficult to do correctly without using a\n // mutation observer to listen for all DOM changes.\n for (;inst.return; ) inst = inst.return;\n return inst.tag !== HostRoot$9 ? null : inst.stateNode.containerInfo;\n}", "hasDOMNode(editor, target) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var {\n editable = false\n } = options;\n var editorEl = ReactEditor.toDOMNode(editor, editor);\n var targetEl; // COMPAT: In Firefox, reading `target.nodeType` will throw an error if\n // target is originating from an internal \"restricted\" element (e.g. a\n // stepper arrow on a number input). (2018/05/04)\n // https://github.com/ianstormtaylor/slate/issues/1819\n\n try {\n targetEl = isDOMElement(target) ? target : target.parentElement;\n } catch (err) {\n if (!err.message.includes('Permission denied to access property \"nodeType\"')) {\n throw err;\n }\n }\n\n if (!targetEl) {\n return false;\n }\n\n return targetEl.closest(\"[data-slate-editor]\") === editorEl && (!editable || targetEl.isContentEditable ? true : typeof targetEl.isContentEditable === 'boolean' && // isContentEditable exists only on HTMLElement, and on other nodes it will be undefined\n // this is the core logic that lets you know you got the right editor.selection instead of null when editor is contenteditable=\"false\"(readOnly)\n targetEl.closest('[contenteditable=\"false\"]') === editorEl || !!targetEl.getAttribute('data-slate-zero-width'));\n }", "function findRootContainerNode(inst) {\n // TODO: It may be a good idea to cache this to prevent unnecessary DOM\n // traversal, but caching is difficult to do correctly without using a\n // mutation observer to listen for all DOM changes.\n while (inst['return']) {\n inst = inst['return'];\n }\n if (inst.tag !== HostRoot) {\n // This can happen if we're in a detached tree.\n return null;\n }\n return inst.stateNode.containerInfo;\n }", "function findRootContainerNode(inst) {\n if (inst.tag === HostRoot) {\n return inst.stateNode.containerInfo;\n } // TODO: It may be a good idea to cache this to prevent unnecessary DOM\n // traversal, but caching is difficult to do correctly without using a\n // mutation observer to listen for all DOM changes.\n\n\n while (inst.return) {\n inst = inst.return;\n }\n\n if (inst.tag !== HostRoot) {\n // This can happen if we're in a detached tree.\n return null;\n }\n\n return inst.stateNode.containerInfo;\n} // Used to store ancestor hierarchy in top level callback", "function findRootContainerNode(inst) {\n if (inst.tag === HostRoot) {\n return inst.stateNode.containerInfo;\n } // TODO: It may be a good idea to cache this to prevent unnecessary DOM\n // traversal, but caching is difficult to do correctly without using a\n // mutation observer to listen for all DOM changes.\n\n\n while (inst.return) {\n inst = inst.return;\n }\n\n if (inst.tag !== HostRoot) {\n // This can happen if we're in a detached tree.\n return null;\n }\n\n return inst.stateNode.containerInfo;\n} // Used to store ancestor hierarchy in top level callback", "function findRootContainerNode(inst) {\n if (inst.tag === HostRoot) {\n return inst.stateNode.containerInfo;\n } // TODO: It may be a good idea to cache this to prevent unnecessary DOM\n // traversal, but caching is difficult to do correctly without using a\n // mutation observer to listen for all DOM changes.\n\n\n while (inst.return) {\n inst = inst.return;\n }\n\n if (inst.tag !== HostRoot) {\n // This can happen if we're in a detached tree.\n return null;\n }\n\n return inst.stateNode.containerInfo;\n} // Used to store ancestor hierarchy in top level callback", "function findRootContainerNode(inst) {\n if (inst.tag === HostRoot) {\n return inst.stateNode.containerInfo;\n } // TODO: It may be a good idea to cache this to prevent unnecessary DOM\n // traversal, but caching is difficult to do correctly without using a\n // mutation observer to listen for all DOM changes.\n\n\n while (inst.return) {\n inst = inst.return;\n }\n\n if (inst.tag !== HostRoot) {\n // This can happen if we're in a detached tree.\n return null;\n }\n\n return inst.stateNode.containerInfo;\n} // Used to store ancestor hierarchy in top level callback" ]
[ "0.7508332", "0.74758923", "0.74758923", "0.74758923", "0.74758923", "0.74758923", "0.74758923", "0.74758923", "0.74758923", "0.74758923", "0.74758923", "0.74234617", "0.7420322", "0.7116136", "0.7116136", "0.7116136", "0.7116136", "0.7116136", "0.6096912", "0.6053429", "0.59543246", "0.59319276", "0.59319276", "0.59319276", "0.59319276", "0.59105194", "0.5908888", "0.586574", "0.586574", "0.575831", "0.575831", "0.575831", "0.575831", "0.575831", "0.57509464", "0.571596", "0.5701975", "0.5701975", "0.5694314", "0.5694314", "0.5691058", "0.56868607", "0.564329", "0.564329", "0.564329", "0.56310946", "0.56310946", "0.56310946", "0.5630036", "0.5625259", "0.56231546", "0.5618673", "0.56156033", "0.5615356", "0.5615356", "0.5615356", "0.5615356" ]
0.73581517
48
Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent instance, or null if the node was not rendered by this React.
function getInstanceFromNode$1(node) { var inst = node[internalInstanceKey] || node[internalContainerInstanceKey]; if (inst) { if (inst.tag === HostComponent || inst.tag === HostText || inst.tag === SuspenseComponent || inst.tag === HostRoot) { return inst; } else { return null; } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n if (node instanceof react__WEBPACK_IMPORTED_MODULE_0__.Component) {\n return react_dom__WEBPACK_IMPORTED_MODULE_1__.findDOMNode(node);\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n\t\t // This node might be from another React instance, so we make sure not to\n\t\t // examine the node cache here\n\t\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t\t if (node.nodeType !== 1) {\n\t\t // Not a DOMElement, therefore not a React component\n\t\t continue;\n\t\t }\n\t\t var nodeID = internalGetID(node);\n\t\t if (!nodeID) {\n\t\t continue;\n\t\t }\n\t\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\t\n\t\t // If containersByReactRootID contains the container we find by crawling up\n\t\t // the tree, we know that this instance of React rendered the node.\n\t\t // nb. isValid's strategy (with containsNode) does not work because render\n\t\t // trees may be nested and we don't want a false positive in that case.\n\t\t var current = node;\n\t\t var lastID;\n\t\t do {\n\t\t lastID = internalGetID(current);\n\t\t current = current.parentNode;\n\t\t if (current == null) {\n\t\t // The passed-in node has been detached from the container it was\n\t\t // originally rendered into.\n\t\t return null;\n\t\t }\n\t\t } while (lastID !== reactRootID);\n\t\t\n\t\t if (current === containersByReactRootID[reactRootID]) {\n\t\t return node;\n\t\t }\n\t\t }\n\t\t return null;\n\t\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return react_dom__WEBPACK_IMPORTED_MODULE_0__.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return react_dom__WEBPACK_IMPORTED_MODULE_0___default.a.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return react_dom__WEBPACK_IMPORTED_MODULE_0___default.a.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return _reactDom.default.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return _reactDom.default.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return _reactDom.default.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return _reactDom.default.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return _reactDom.default.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return _reactDom.default.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return react_dom__WEBPACK_IMPORTED_MODULE_0___default().findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return __WEBPACK_IMPORTED_MODULE_0_react_dom___default.a.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return __WEBPACK_IMPORTED_MODULE_0_react_dom___default.a.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return react_dom__WEBPACK_IMPORTED_MODULE_0___default.a.findDOMNode(\n node,\n );\n }", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return ReactDOM.default.findDOMNode(node);\n}", "function findDOMNode$2(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return ReactDOM.default.findDOMNode(node);\n}", "function findDOMNode$1(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return ReactDOM.default.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return external_ReactDOM_default.a.findDOMNode(node);\n}", "toDOMNode(editor, node) {\n var domNode = Editor.isEditor(node) ? EDITOR_TO_ELEMENT.get(editor) : KEY_TO_ELEMENT.get(ReactEditor.findKey(editor, node));\n\n if (!domNode) {\n throw new Error(\"Cannot resolve a DOM node from Slate node: \".concat(JSON.stringify(node)));\n }\n\n return domNode;\n }", "function ReactDOMComponent(element) {\r\n\t var tag = element.type;\r\n\t validateDangerousTag(tag);\r\n\t this._currentElement = element;\r\n\t this._tag = tag.toLowerCase();\r\n\t this._namespaceURI = null;\r\n\t this._renderedChildren = null;\r\n\t this._previousStyle = null;\r\n\t this._previousStyleCopy = null;\r\n\t this._hostNode = null;\r\n\t this._hostParent = null;\r\n\t this._rootNodeID = 0;\r\n\t this._domID = 0;\r\n\t this._hostContainerInfo = null;\r\n\t this._wrapperState = null;\r\n\t this._topLevelWrapper = null;\r\n\t this._flags = 0;\r\n\t if (process.env.NODE_ENV !== 'production') {\r\n\t this._ancestorInfo = null;\r\n\t setAndValidateContentChildDev.call(this, null);\r\n\t }\r\n\t}", "toDOMNode(editor, node) {\n var domNode = __WEBPACK_IMPORTED_MODULE_1_slate__[\"Editor\"].isEditor(node) ? EDITOR_TO_ELEMENT.get(editor) : KEY_TO_ELEMENT.get(ReactEditor.findKey(editor, node));\n\n if (!domNode) {\n throw new Error(\"Cannot resolve a DOM node from Slate node: \".concat(JSON.stringify(node)));\n }\n\n return domNode;\n }", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}" ]
[ "0.75970024", "0.7380755", "0.7350377", "0.7350377", "0.7350377", "0.7350377", "0.7350377", "0.7350377", "0.7350377", "0.7350377", "0.7350377", "0.7350377", "0.7350377", "0.7350377", "0.7350377", "0.7350377", "0.7350377", "0.7350377", "0.7330323", "0.7330323", "0.7330323", "0.7330323", "0.7330323", "0.7330323", "0.7330323", "0.729151", "0.729151", "0.729151", "0.729151", "0.729151", "0.729151", "0.729151", "0.729151", "0.729151", "0.729151", "0.729151", "0.729151", "0.729151", "0.729151", "0.7209193", "0.71653974", "0.71653974", "0.71559304", "0.71559304", "0.71559304", "0.71559304", "0.71559304", "0.71559304", "0.71510506", "0.7108017", "0.7108017", "0.70607907", "0.70475644", "0.6898752", "0.6805931", "0.67946726", "0.6381335", "0.6311777", "0.63003784", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184", "0.6292184" ]
0.0
-1
Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding DOM node.
function getNodeFromInstance$1(inst) { if (inst.tag === HostComponent || inst.tag === HostText) { // In Fiber this, is just the state node right now. We assume it will be // a host component or host text. return inst.stateNode; } // Without this first invariant, passing a non-DOM-component triggers the next // invariant for a missing parent, which is super confusing. { { throw Error( "getNodeFromInstance: Invalid argument." ); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findFirstReactDOMImpl(node) {\n\t\t // This node might be from another React instance, so we make sure not to\n\t\t // examine the node cache here\n\t\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t\t if (node.nodeType !== 1) {\n\t\t // Not a DOMElement, therefore not a React component\n\t\t continue;\n\t\t }\n\t\t var nodeID = internalGetID(node);\n\t\t if (!nodeID) {\n\t\t continue;\n\t\t }\n\t\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\t\n\t\t // If containersByReactRootID contains the container we find by crawling up\n\t\t // the tree, we know that this instance of React rendered the node.\n\t\t // nb. isValid's strategy (with containsNode) does not work because render\n\t\t // trees may be nested and we don't want a false positive in that case.\n\t\t var current = node;\n\t\t var lastID;\n\t\t do {\n\t\t lastID = internalGetID(current);\n\t\t current = current.parentNode;\n\t\t if (current == null) {\n\t\t // The passed-in node has been detached from the container it was\n\t\t // originally rendered into.\n\t\t return null;\n\t\t }\n\t\t } while (lastID !== reactRootID);\n\t\t\n\t\t if (current === containersByReactRootID[reactRootID]) {\n\t\t return node;\n\t\t }\n\t\t }\n\t\t return null;\n\t\t}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return react_dom__WEBPACK_IMPORTED_MODULE_0__.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return ReactDOM.default.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return react_dom__WEBPACK_IMPORTED_MODULE_0___default.a.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return react_dom__WEBPACK_IMPORTED_MODULE_0___default.a.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return react_dom__WEBPACK_IMPORTED_MODULE_0___default().findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n if (node instanceof react__WEBPACK_IMPORTED_MODULE_0__.Component) {\n return react_dom__WEBPACK_IMPORTED_MODULE_1__.findDOMNode(node);\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\t\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\t\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return _reactDom.default.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return _reactDom.default.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return _reactDom.default.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return _reactDom.default.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return _reactDom.default.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return _reactDom.default.findDOMNode(node);\n}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n\t // This node might be from another React instance, so we make sure not to\n\t // examine the node cache here\n\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t if (node.nodeType !== 1) {\n\t // Not a DOMElement, therefore not a React component\n\t continue;\n\t }\n\t var nodeID = internalGetID(node);\n\t if (!nodeID) {\n\t continue;\n\t }\n\t var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n\t // If containersByReactRootID contains the container we find by crawling up\n\t // the tree, we know that this instance of React rendered the node.\n\t // nb. isValid's strategy (with containsNode) does not work because render\n\t // trees may be nested and we don't want a false positive in that case.\n\t var current = node;\n\t var lastID;\n\t do {\n\t lastID = internalGetID(current);\n\t current = current.parentNode;\n\t if (current == null) {\n\t // The passed-in node has been detached from the container it was\n\t // originally rendered into.\n\t return null;\n\t }\n\t } while (lastID !== reactRootID);\n\n\t if (current === containersByReactRootID[reactRootID]) {\n\t return node;\n\t }\n\t }\n\t return null;\n\t}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n continue;\n }\n var nodeID = internalGetID(node);\n if (!nodeID) {\n continue;\n }\n var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);\n\n // If containersByReactRootID contains the container we find by crawling up\n // the tree, we know that this instance of React rendered the node.\n // nb. isValid's strategy (with containsNode) does not work because render\n // trees may be nested and we don't want a false positive in that case.\n var current = node;\n var lastID;\n do {\n lastID = internalGetID(current);\n current = current.parentNode;\n if (current == null) {\n // The passed-in node has been detached from the container it was\n // originally rendered into.\n return null;\n }\n } while (lastID !== reactRootID);\n\n if (current === containersByReactRootID[reactRootID]) {\n return node;\n }\n }\n return null;\n}", "function findDOMNode$2(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return ReactDOM.default.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return __WEBPACK_IMPORTED_MODULE_0_react_dom___default.a.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return __WEBPACK_IMPORTED_MODULE_0_react_dom___default.a.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return react_dom__WEBPACK_IMPORTED_MODULE_0___default.a.findDOMNode(\n node,\n );\n }", "function findDOMNode$1(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return ReactDOM.default.findDOMNode(node);\n}", "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return external_ReactDOM_default.a.findDOMNode(node);\n}", "toDOMNode(editor, node) {\n var domNode = Editor.isEditor(node) ? EDITOR_TO_ELEMENT.get(editor) : KEY_TO_ELEMENT.get(ReactEditor.findKey(editor, node));\n\n if (!domNode) {\n throw new Error(\"Cannot resolve a DOM node from Slate node: \".concat(JSON.stringify(node)));\n }\n\n return domNode;\n }", "function getRenderedNativeOrTextFromComponent(component){var rendered;while(rendered=component._renderedComponent){component=rendered;}return component;}", "function getRenderedNativeOrTextFromComponent(component){var rendered;while(rendered=component._renderedComponent){component=rendered;}return component;}", "toDOMNode(editor, node) {\n var domNode = __WEBPACK_IMPORTED_MODULE_1_slate__[\"Editor\"].isEditor(node) ? EDITOR_TO_ELEMENT.get(editor) : KEY_TO_ELEMENT.get(ReactEditor.findKey(editor, node));\n\n if (!domNode) {\n throw new Error(\"Cannot resolve a DOM node from Slate node: \".concat(JSON.stringify(node)));\n }\n\n return domNode;\n }", "function getRenderedHostOrTextFromComponent(component){var rendered;while(rendered=component._renderedComponent){component=rendered;}return component;}", "toDOMNode(editor, node) {\n var KEY_TO_ELEMENT = EDITOR_TO_KEY_TO_ELEMENT.get(editor);\n var domNode = index_es/* Editor.isEditor */.ML.isEditor(node) ? EDITOR_TO_ELEMENT.get(editor) : KEY_TO_ELEMENT === null || KEY_TO_ELEMENT === void 0 ? void 0 : KEY_TO_ELEMENT.get(ReactEditor.findKey(editor, node));\n\n if (!domNode) {\n throw new Error(\"Cannot resolve a DOM node from Slate node: \".concat(JSON.stringify(node)));\n }\n\n return domNode;\n }", "function getRenderedNativeOrTextFromComponent(component) {\n var rendered;\n while (rendered = component._renderedComponent) {\n component = rendered;\n }\n return component;\n}", "function render(node) {\n switch (nodeType(node)) {\n case \"text\":\n return document.createTextNode(node);\n case \"element\":\n return renderElement(node);\n case \"component\":\n return renderComponent(node);\n }\n}", "function getRenderedNativeOrTextFromComponent(component) {\n\t var rendered;\n\t while (rendered = component._renderedComponent) {\n\t component = rendered;\n\t }\n\t return component;\n\t}", "function getRenderedNativeOrTextFromComponent(component) {\n\t var rendered;\n\t while (rendered = component._renderedComponent) {\n\t component = rendered;\n\t }\n\t return component;\n\t}", "function getRenderedNativeOrTextFromComponent(component) {\n\t var rendered;\n\t while (rendered = component._renderedComponent) {\n\t component = rendered;\n\t }\n\t return component;\n\t}", "function getRenderedNativeOrTextFromComponent(component) {\n\t var rendered;\n\t while (rendered = component._renderedComponent) {\n\t component = rendered;\n\t }\n\t return component;\n\t}", "function getRenderedNativeOrTextFromComponent(component) {\n\t var rendered;\n\t while (rendered = component._renderedComponent) {\n\t component = rendered;\n\t }\n\t return component;\n\t}", "function getRenderedNativeOrTextFromComponent(component) {\n\t var rendered;\n\t while (rendered = component._renderedComponent) {\n\t component = rendered;\n\t }\n\t return component;\n\t}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (true) {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (true) {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (true) {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (true) {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (true) {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (true) {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (true) {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (true) {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\r\n\t var tag = element.type;\r\n\t validateDangerousTag(tag);\r\n\t this._currentElement = element;\r\n\t this._tag = tag.toLowerCase();\r\n\t this._namespaceURI = null;\r\n\t this._renderedChildren = null;\r\n\t this._previousStyle = null;\r\n\t this._previousStyleCopy = null;\r\n\t this._hostNode = null;\r\n\t this._hostParent = null;\r\n\t this._rootNodeID = 0;\r\n\t this._domID = 0;\r\n\t this._hostContainerInfo = null;\r\n\t this._wrapperState = null;\r\n\t this._topLevelWrapper = null;\r\n\t this._flags = 0;\r\n\t if (process.env.NODE_ENV !== 'production') {\r\n\t this._ancestorInfo = null;\r\n\t setAndValidateContentChildDev.call(this, null);\r\n\t }\r\n\t}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (false) {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (false) {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (false) {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (false) {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (false) {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (false) {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (false) {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (false) {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}", "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n this._previousStyle = null;\n this._previousStyleCopy = null;\n this._hostNode = null;\n this._hostParent = null;\n this._rootNodeID = 0;\n this._domID = 0;\n this._hostContainerInfo = null;\n this._wrapperState = null;\n this._topLevelWrapper = null;\n this._flags = 0;\n if (process.env.NODE_ENV !== 'production') {\n this._ancestorInfo = null;\n setAndValidateContentChildDev.call(this, null);\n }\n}" ]
[ "0.6785746", "0.67787415", "0.67723036", "0.67672795", "0.67672795", "0.6752765", "0.6743338", "0.6741935", "0.6741935", "0.6741935", "0.6741935", "0.6741935", "0.6741935", "0.6741935", "0.6741386", "0.6741386", "0.6741386", "0.6741386", "0.6741386", "0.6741386", "0.6732813", "0.6732813", "0.6732813", "0.6732813", "0.6732813", "0.6732813", "0.6732813", "0.6732813", "0.6732813", "0.6732813", "0.6732813", "0.6732813", "0.6732813", "0.6732813", "0.6732813", "0.6732813", "0.67174214", "0.67174214", "0.67174214", "0.67174214", "0.67174214", "0.67174214", "0.67174214", "0.67174214", "0.67174214", "0.67174214", "0.67174214", "0.67174214", "0.67174214", "0.67174214", "0.67135394", "0.669853", "0.669853", "0.6639224", "0.66331315", "0.6569316", "0.64917344", "0.64081275", "0.64081275", "0.6312364", "0.6273523", "0.6208381", "0.6157094", "0.61481464", "0.6105619", "0.6105619", "0.6105619", "0.6105619", "0.6105619", "0.6105619", "0.6095029", "0.6095029", "0.6095029", "0.6095029", "0.6095029", "0.6095029", "0.6095029", "0.6095029", "0.6089277", "0.60880226", "0.60880226", "0.60880226", "0.60880226", "0.60880226", "0.60880226", "0.60880226", "0.60880226", "0.6076021", "0.6076021", "0.6076021", "0.6076021", "0.6076021", "0.6076021", "0.6076021", "0.6076021", "0.6076021", "0.6076021", "0.6076021", "0.6076021", "0.6076021", "0.6076021" ]
0.0
-1
Return the lowest common ancestor of A and B, or null if they are in different trees.
function getLowestCommonAncestor(instA, instB) { var depthA = 0; for (var tempA = instA; tempA; tempA = getParent(tempA)) { depthA++; } var depthB = 0; for (var tempB = instB; tempB; tempB = getParent(tempB)) { depthB++; } // If A is deeper, crawl up. while (depthA - depthB > 0) { instA = getParent(instA); depthA--; } // If B is deeper, crawl up. while (depthB - depthA > 0) { instB = getParent(instB); depthB--; } // Walk in lockstep until we find a match. var depth = depthA; while (depth--) { if (instA === instB || instA === instB.alternate) { return instA; } instA = getParent(instA); instB = getParent(instB); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLowestCommonAncestor(instA, instB) {\n\t !('_nativeNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : invariant(false) : void 0;\n\t !('_nativeNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : invariant(false) : void 0;\n\n\t var depthA = 0;\n\t for (var tempA = instA; tempA; tempA = tempA._nativeParent) {\n\t depthA++;\n\t }\n\t var depthB = 0;\n\t for (var tempB = instB; tempB; tempB = tempB._nativeParent) {\n\t depthB++;\n\t }\n\n\t // If A is deeper, crawl up.\n\t while (depthA - depthB > 0) {\n\t instA = instA._nativeParent;\n\t depthA--;\n\t }\n\n\t // If B is deeper, crawl up.\n\t while (depthB - depthA > 0) {\n\t instB = instB._nativeParent;\n\t depthB--;\n\t }\n\n\t // Walk in lockstep until we find a match.\n\t var depth = depthA;\n\t while (depth--) {\n\t if (instA === instB) {\n\t return instA;\n\t }\n\t instA = instA._nativeParent;\n\t instB = instB._nativeParent;\n\t }\n\t return null;\n\t}", "function getLowestCommonAncestor(instA, instB) {\n\t !('_nativeNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : invariant(false) : void 0;\n\t !('_nativeNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : invariant(false) : void 0;\n\n\t var depthA = 0;\n\t for (var tempA = instA; tempA; tempA = tempA._nativeParent) {\n\t depthA++;\n\t }\n\t var depthB = 0;\n\t for (var tempB = instB; tempB; tempB = tempB._nativeParent) {\n\t depthB++;\n\t }\n\n\t // If A is deeper, crawl up.\n\t while (depthA - depthB > 0) {\n\t instA = instA._nativeParent;\n\t depthA--;\n\t }\n\n\t // If B is deeper, crawl up.\n\t while (depthB - depthA > 0) {\n\t instB = instB._nativeParent;\n\t depthB--;\n\t }\n\n\t // Walk in lockstep until we find a match.\n\t var depth = depthA;\n\t while (depth--) {\n\t if (instA === instB) {\n\t return instA;\n\t }\n\t instA = instA._nativeParent;\n\t instB = instB._nativeParent;\n\t }\n\t return null;\n\t}", "function getLowestCommonAncestor(instA, instB) {\n\t !('_nativeNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : invariant(false) : void 0;\n\t !('_nativeNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : invariant(false) : void 0;\n\n\t var depthA = 0;\n\t for (var tempA = instA; tempA; tempA = tempA._nativeParent) {\n\t depthA++;\n\t }\n\t var depthB = 0;\n\t for (var tempB = instB; tempB; tempB = tempB._nativeParent) {\n\t depthB++;\n\t }\n\n\t // If A is deeper, crawl up.\n\t while (depthA - depthB > 0) {\n\t instA = instA._nativeParent;\n\t depthA--;\n\t }\n\n\t // If B is deeper, crawl up.\n\t while (depthB - depthA > 0) {\n\t instB = instB._nativeParent;\n\t depthB--;\n\t }\n\n\t // Walk in lockstep until we find a match.\n\t var depth = depthA;\n\t while (depth--) {\n\t if (instA === instB) {\n\t return instA;\n\t }\n\t instA = instA._nativeParent;\n\t instB = instB._nativeParent;\n\t }\n\t return null;\n\t}", "function getLowestCommonAncestor(instA, instB) {\n\t !('_nativeNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : invariant(false) : void 0;\n\t !('_nativeNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : invariant(false) : void 0;\n\t\n\t var depthA = 0;\n\t for (var tempA = instA; tempA; tempA = tempA._nativeParent) {\n\t depthA++;\n\t }\n\t var depthB = 0;\n\t for (var tempB = instB; tempB; tempB = tempB._nativeParent) {\n\t depthB++;\n\t }\n\t\n\t // If A is deeper, crawl up.\n\t while (depthA - depthB > 0) {\n\t instA = instA._nativeParent;\n\t depthA--;\n\t }\n\t\n\t // If B is deeper, crawl up.\n\t while (depthB - depthA > 0) {\n\t instB = instB._nativeParent;\n\t depthB--;\n\t }\n\t\n\t // Walk in lockstep until we find a match.\n\t var depth = depthA;\n\t while (depth--) {\n\t if (instA === instB) {\n\t return instA;\n\t }\n\t instA = instA._nativeParent;\n\t instB = instB._nativeParent;\n\t }\n\t return null;\n\t}", "function getLowestCommonAncestor(instA, instB) {\n\t !('_nativeNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : invariant(false) : void 0;\n\t !('_nativeNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : invariant(false) : void 0;\n\t\n\t var depthA = 0;\n\t for (var tempA = instA; tempA; tempA = tempA._nativeParent) {\n\t depthA++;\n\t }\n\t var depthB = 0;\n\t for (var tempB = instB; tempB; tempB = tempB._nativeParent) {\n\t depthB++;\n\t }\n\t\n\t // If A is deeper, crawl up.\n\t while (depthA - depthB > 0) {\n\t instA = instA._nativeParent;\n\t depthA--;\n\t }\n\t\n\t // If B is deeper, crawl up.\n\t while (depthB - depthA > 0) {\n\t instB = instB._nativeParent;\n\t depthB--;\n\t }\n\t\n\t // Walk in lockstep until we find a match.\n\t var depth = depthA;\n\t while (depth--) {\n\t if (instA === instB) {\n\t return instA;\n\t }\n\t instA = instA._nativeParent;\n\t instB = instB._nativeParent;\n\t }\n\t return null;\n\t}", "function getLowestCommonAncestor(instA, instB) {\n\t !('_nativeNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : invariant(false) : void 0;\n\t !('_nativeNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : invariant(false) : void 0;\n\t\n\t var depthA = 0;\n\t for (var tempA = instA; tempA; tempA = tempA._nativeParent) {\n\t depthA++;\n\t }\n\t var depthB = 0;\n\t for (var tempB = instB; tempB; tempB = tempB._nativeParent) {\n\t depthB++;\n\t }\n\t\n\t // If A is deeper, crawl up.\n\t while (depthA - depthB > 0) {\n\t instA = instA._nativeParent;\n\t depthA--;\n\t }\n\t\n\t // If B is deeper, crawl up.\n\t while (depthB - depthA > 0) {\n\t instB = instB._nativeParent;\n\t depthB--;\n\t }\n\t\n\t // Walk in lockstep until we find a match.\n\t var depth = depthA;\n\t while (depth--) {\n\t if (instA === instB) {\n\t return instA;\n\t }\n\t instA = instA._nativeParent;\n\t instB = instB._nativeParent;\n\t }\n\t return null;\n\t}", "function getLowestCommonAncestor(instA, instB) {\n !('_nativeNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : invariant(false) : void 0;\n !('_nativeNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : invariant(false) : void 0;\n\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = tempA._nativeParent) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = tempB._nativeParent) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = instA._nativeParent;\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = instB._nativeParent;\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB) {\n return instA;\n }\n instA = instA._nativeParent;\n instB = instB._nativeParent;\n }\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n }\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n }\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n for(var tempA = nodeA; tempA; tempA = getParent(tempA))depthA++;\n var depthB = 0;\n for(var tempB = nodeB; tempB; tempB = getParent(tempB))depthB++;\n // If A is deeper, crawl up.\n while(depthA - depthB > 0){\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n while(depthB - depthA > 0){\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n var depth = depthA;\n while(depth--){\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) return nodeA;\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n }", "function getLowestCommonAncestor(instA,instB){var depthA=0;for(var tempA=instA;tempA;tempA=getParent(tempA)){depthA++;}var depthB=0;for(var tempB=instB;tempB;tempB=getParent(tempB)){depthB++;}// If A is deeper, crawl up.\n\twhile(depthA-depthB>0){instA=getParent(instA);depthA--;}// If B is deeper, crawl up.\n\twhile(depthB-depthA>0){instB=getParent(instB);depthB--;}// Walk in lockstep until we find a match.\n\tvar depth=depthA;while(depth--){if(instA===instB||instA===instB.alternate){return instA;}instA=getParent(instA);instB=getParent(instB);}return null;}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n }", "function getLowestCommonAncestor(instA, instB) {\n\t var depthA = 0;\n\t for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n\t depthA++;\n\t }\n\t var depthB = 0;\n\t for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n\t depthB++;\n\t }\n\t\n\t // If A is deeper, crawl up.\n\t while (depthA - depthB > 0) {\n\t instA = getParent(instA);\n\t depthA--;\n\t }\n\t\n\t // If B is deeper, crawl up.\n\t while (depthB - depthA > 0) {\n\t instB = getParent(instB);\n\t depthB--;\n\t }\n\t\n\t // Walk in lockstep until we find a match.\n\t var depth = depthA;\n\t while (depth--) {\n\t if (instA === instB || instA === instB.alternate) {\n\t return instA;\n\t }\n\t instA = getParent(instA);\n\t instB = getParent(instB);\n\t }\n\t return null;\n\t}", "function getLowestCommonAncestor(instA,instB){var depthA=0;for(var tempA=instA;tempA;tempA=getParent(tempA)){depthA++;}var depthB=0;for(var tempB=instB;tempB;tempB=getParent(tempB)){depthB++;}// If A is deeper, crawl up.\nwhile(depthA-depthB>0){instA=getParent(instA);depthA--;}// If B is deeper, crawl up.\nwhile(depthB-depthA>0){instB=getParent(instB);depthB--;}// Walk in lockstep until we find a match.\nvar depth=depthA;while(depth--){if(instA===instB||instA===instB.alternate){return instA;}instA=getParent(instA);instB=getParent(instB);}return null;}", "function getLowestCommonAncestor(instA,instB){var depthA=0;for(var tempA=instA;tempA;tempA=getParent(tempA)){depthA++;}var depthB=0;for(var tempB=instB;tempB;tempB=getParent(tempB)){depthB++;}// If A is deeper, crawl up.\nwhile(depthA-depthB>0){instA=getParent(instA);depthA--;}// If B is deeper, crawl up.\nwhile(depthB-depthA>0){instB=getParent(instB);depthB--;}// Walk in lockstep until we find a match.\nvar depth=depthA;while(depth--){if(instA===instB||instA===instB.alternate){return instA;}instA=getParent(instA);instB=getParent(instB);}return null;}", "function getLowestCommonAncestor(instA,instB){var depthA=0;for(var tempA=instA;tempA;tempA=getParent(tempA)){depthA++;}var depthB=0;for(var tempB=instB;tempB;tempB=getParent(tempB)){depthB++;}// If A is deeper, crawl up.\nwhile(depthA-depthB>0){instA=getParent(instA);depthA--;}// If B is deeper, crawl up.\nwhile(depthB-depthA>0){instB=getParent(instB);depthB--;}// Walk in lockstep until we find a match.\nvar depth=depthA;while(depth--){if(instA===instB||instA===instB.alternate){return instA;}instA=getParent(instA);instB=getParent(instB);}return null;}", "function getLowestCommonAncestor(instA,instB){var depthA=0;for(var tempA=instA;tempA;tempA=getParent(tempA)){depthA++;}var depthB=0;for(var tempB=instB;tempB;tempB=getParent(tempB)){depthB++;}// If A is deeper, crawl up.\nwhile(depthA-depthB>0){instA=getParent(instA);depthA--;}// If B is deeper, crawl up.\nwhile(depthB-depthA>0){instB=getParent(instB);depthB--;}// Walk in lockstep until we find a match.\nvar depth=depthA;while(depth--){if(instA===instB||instA===instB.alternate){return instA;}instA=getParent(instA);instB=getParent(instB);}return null;}", "function getLowestCommonAncestor(instA,instB){var depthA=0;for(var tempA=instA;tempA;tempA=getParent(tempA)){depthA++;}var depthB=0;for(var tempB=instB;tempB;tempB=getParent(tempB)){depthB++;}// If A is deeper, crawl up.\nwhile(depthA-depthB>0){instA=getParent(instA);depthA--;}// If B is deeper, crawl up.\nwhile(depthB-depthA>0){instB=getParent(instB);depthB--;}// Walk in lockstep until we find a match.\nvar depth=depthA;while(depth--){if(instA===instB||instA===instB.alternate){return instA;}instA=getParent(instA);instB=getParent(instB);}return null;}", "function getLowestCommonAncestor(instA,instB){var depthA=0;for(var tempA=instA;tempA;tempA=getParent(tempA)){depthA++;}var depthB=0;for(var tempB=instB;tempB;tempB=getParent(tempB)){depthB++;}// If A is deeper, crawl up.\nwhile(depthA-depthB>0){instA=getParent(instA);depthA--;}// If B is deeper, crawl up.\nwhile(depthB-depthA>0){instB=getParent(instB);depthB--;}// Walk in lockstep until we find a match.\nvar depth=depthA;while(depth--){if(instA===instB||instA===instB.alternate){return instA;}instA=getParent(instA);instB=getParent(instB);}return null;}", "function getLowestCommonAncestor(instA,instB){var depthA=0;for(var tempA=instA;tempA;tempA=getParent(tempA)){depthA++;}var depthB=0;for(var tempB=instB;tempB;tempB=getParent(tempB)){depthB++;}// If A is deeper, crawl up.\nwhile(depthA-depthB>0){instA=getParent(instA);depthA--;}// If B is deeper, crawl up.\nwhile(depthB-depthA>0){instB=getParent(instB);depthB--;}// Walk in lockstep until we find a match.\nvar depth=depthA;while(depth--){if(instA===instB||instA===instB.alternate){return instA;}instA=getParent(instA);instB=getParent(instB);}return null;}", "function getLowestCommonAncestor(instA,instB){var depthA=0;for(var tempA=instA;tempA;tempA=getParent(tempA)){depthA++;}var depthB=0;for(var tempB=instB;tempB;tempB=getParent(tempB)){depthB++;}// If A is deeper, crawl up.\nwhile(depthA-depthB>0){instA=getParent(instA);depthA--;}// If B is deeper, crawl up.\nwhile(depthB-depthA>0){instB=getParent(instB);depthB--;}// Walk in lockstep until we find a match.\nvar depth=depthA;while(depth--){if(instA===instB||instA===instB.alternate){return instA;}instA=getParent(instA);instB=getParent(instB);}return null;}", "function getLowestCommonAncestor(instA,instB){var depthA=0;for(var tempA=instA;tempA;tempA=getParent(tempA)){depthA++;}var depthB=0;for(var tempB=instB;tempB;tempB=getParent(tempB)){depthB++;}// If A is deeper, crawl up.\nwhile(depthA-depthB>0){instA=getParent(instA);depthA--;}// If B is deeper, crawl up.\nwhile(depthB-depthA>0){instB=getParent(instB);depthB--;}// Walk in lockstep until we find a match.\nvar depth=depthA;while(depth--){if(instA===instB||instA===instB.alternate){return instA;}instA=getParent(instA);instB=getParent(instB);}return null;}", "function getLowestCommonAncestor(instA,instB){!('_nativeNode' in instA)?process.env.NODE_ENV!=='production'?invariant(false,'getNodeFromInstance: Invalid argument.'):invariant(false):void 0;!('_nativeNode' in instB)?process.env.NODE_ENV!=='production'?invariant(false,'getNodeFromInstance: Invalid argument.'):invariant(false):void 0;var depthA=0;for(var tempA=instA;tempA;tempA=tempA._nativeParent){depthA++;}var depthB=0;for(var tempB=instB;tempB;tempB=tempB._nativeParent){depthB++;} // If A is deeper, crawl up.\n\twhile(depthA-depthB>0){instA=instA._nativeParent;depthA--;} // If B is deeper, crawl up.\n\twhile(depthB-depthA>0){instB=instB._nativeParent;depthB--;} // Walk in lockstep until we find a match.\n\tvar depth=depthA;while(depth--){if(instA===instB){return instA;}instA=instA._nativeParent;instB=instB._nativeParent;}return null;}", "function getLowestCommonAncestor(instA,instB){!('_nativeNode' in instA)?process.env.NODE_ENV!=='production'?invariant(false,'getNodeFromInstance: Invalid argument.'):invariant(false):void 0;!('_nativeNode' in instB)?process.env.NODE_ENV!=='production'?invariant(false,'getNodeFromInstance: Invalid argument.'):invariant(false):void 0;var depthA=0;for(var tempA=instA;tempA;tempA=tempA._nativeParent){depthA++;}var depthB=0;for(var tempB=instB;tempB;tempB=tempB._nativeParent){depthB++;} // If A is deeper, crawl up.\n\twhile(depthA-depthB>0){instA=instA._nativeParent;depthA--;} // If B is deeper, crawl up.\n\twhile(depthB-depthA>0){instB=instB._nativeParent;depthB--;} // Walk in lockstep until we find a match.\n\tvar depth=depthA;while(depth--){if(instA===instB){return instA;}instA=instA._nativeParent;instB=instB._nativeParent;}return null;}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n}", "function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n}" ]
[ "0.82776135", "0.82776135", "0.82776135", "0.8273172", "0.8273172", "0.8273172", "0.82548386", "0.82297623", "0.82297623", "0.82297623", "0.82297623", "0.82005364", "0.82000446", "0.8185067", "0.8185067", "0.8185067", "0.8185067", "0.8185067", "0.8185067", "0.8185067", "0.8185067", "0.8185067", "0.8185067", "0.8185067", "0.8185067", "0.8185067", "0.8185067", "0.8185067", "0.8179247", "0.8179247", "0.8179247", "0.8179247", "0.8179247", "0.8179247", "0.8179247", "0.8179247", "0.8179247", "0.8168894", "0.8166341", "0.8166341", "0.8166341", "0.8150042", "0.8147668", "0.8115199", "0.81078625", "0.81078625", "0.81078625", "0.81078625", "0.81078625", "0.81078625", "0.81078625", "0.81078625", "0.81078625", "0.8096577", "0.8096577", "0.8088758", "0.8088758", "0.8088758", "0.8088758", "0.8088758", "0.8088758", "0.8088758", "0.8088758", "0.8088758", "0.8088758", "0.8088758", "0.8088758", "0.8088758", "0.8088758", "0.8088758", "0.8088758", "0.8088758" ]
0.81400025
66
Simulates the traversal of a twophase, capture/bubble event dispatch.
function traverseTwoPhase(inst, fn, arg) { var path = []; while (inst) { path.push(inst); inst = getParent(inst); } var i; for (i = path.length; i-- > 0;) { fn(path[i], 'captured', arg); } for (i = 0; i < path.length; i++) { fn(path[i], 'bubbled', arg); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function traverseTwoPhase(inst,fn,arg){var path=[];while(inst){path.push(inst);inst=getParent(inst);}var i;for(i=path.length;i-->0;){fn(path[i],'captured',arg);}for(i=0;i<path.length;i++){fn(path[i],'bubbled',arg);}}", "function traverseTwoPhase(inst,fn,arg){var path=[];while(inst){path.push(inst);inst=getParent(inst);}var i;for(i=path.length;i-->0;){fn(path[i],'captured',arg);}for(i=0;i<path.length;i++){fn(path[i],'bubbled',arg);}}", "function traverseTwoPhase(inst,fn,arg){var path=[];while(inst){path.push(inst);inst=getParent(inst);}var i;for(i=path.length;i-->0;){fn(path[i],'captured',arg);}for(i=0;i<path.length;i++){fn(path[i],'bubbled',arg);}}", "function traverseTwoPhase(inst,fn,arg){var path=[];while(inst){path.push(inst);inst=getParent(inst);}var i;for(i=path.length;i-->0;){fn(path[i],'captured',arg);}for(i=0;i<path.length;i++){fn(path[i],'bubbled',arg);}}", "function traverseTwoPhase(inst,fn,arg){var path=[];while(inst){path.push(inst);inst=getParent(inst);}var i;for(i=path.length;i-->0;){fn(path[i],'captured',arg);}for(i=0;i<path.length;i++){fn(path[i],'bubbled',arg);}}", "function traverseTwoPhase(inst,fn,arg){var path=[];while(inst){path.push(inst);inst=getParent(inst);}var i;for(i=path.length;i-->0;){fn(path[i],'captured',arg);}for(i=0;i<path.length;i++){fn(path[i],'bubbled',arg);}}", "function traverseTwoPhase(inst,fn,arg){var path=[];while(inst){path.push(inst);inst=inst._hostParent;}var i;for(i=path.length;i-->0;){fn(path[i],'captured',arg);}for(i=0;i<path.length;i++){fn(path[i],'bubbled',arg);}}", "function traverseTwoPhase(inst,fn,arg){var path=[];while(inst){path.push(inst);inst=getParent(inst);}var i=void 0;for(i=path.length;i-->0;){fn(path[i],'captured',arg);}for(i=0;i<path.length;i++){fn(path[i],'bubbled',arg);}}", "function traverseTwoPhase(inst,fn,arg){var path=[];while(inst){path.push(inst);inst=getParent(inst);}var i=void 0;for(i=path.length;i-->0;){fn(path[i],'captured',arg);}for(i=0;i<path.length;i++){fn(path[i],'bubbled',arg);}}", "function traverseTwoPhase(inst,fn,arg){var path=[];while(inst){path.push(inst);inst=getParent(inst);}var i=void 0;for(i=path.length;i-->0;){fn(path[i],'captured',arg);}for(i=0;i<path.length;i++){fn(path[i],'bubbled',arg);}}", "function traverseTwoPhase(inst,fn,arg){var path=[];while(inst){path.push(inst);inst=getParent(inst);}var i=void 0;for(i=path.length;i-->0;){fn(path[i],'captured',arg);}for(i=0;i<path.length;i++){fn(path[i],'bubbled',arg);}}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n\n var i;\n\n for (i = path.length; i-- > 0; ) {\n fn(path[i], 'captured', arg);\n }\n\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n }", "traverse() {\n this.root.visit(this.root);\n }", "function traverseTwoPhase(inst, fn, arg) {\n for (var path = []; inst; ) path.push(inst), inst = getParent(inst);\n var i;\n for (i = path.length; i-- > 0; ) fn(path[i], \"captured\", arg);\n for (i = 0; i < path.length; i++) fn(path[i], \"bubbled\", arg);\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n }", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n }", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i = void 0;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n }", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n\n var i;\n\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n }", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n\n var i;\n\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n }", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n\n var i;\n\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n }", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n\n var i;\n\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n }", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n\n var i;\n\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n }", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n\n var i;\n\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n }", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i = void 0;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n }", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\r\n\t var path = [];\r\n\t while (inst) {\r\n\t path.push(inst);\r\n\t inst = inst._hostParent;\r\n\t }\r\n\t var i;\r\n\t for (i = path.length; i-- > 0;) {\r\n\t fn(path[i], 'captured', arg);\r\n\t }\r\n\t for (i = 0; i < path.length; i++) {\r\n\t fn(path[i], 'bubbled', arg);\r\n\t }\r\n\t}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n\n var i = void 0;\n\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n }", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n\n var i = void 0;\n\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n }", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n\n var i = void 0;\n\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n }", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i = void 0;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i = void 0;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i = void 0;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i = void 0;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i = void 0;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i = void 0;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i = void 0;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i = void 0;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i = void 0;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i = void 0;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}", "function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i = void 0;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}" ]
[ "0.58791095", "0.58791095", "0.58791095", "0.58791095", "0.58791095", "0.58791095", "0.5860188", "0.58587825", "0.58587825", "0.58587825", "0.58587825", "0.5663513", "0.5630192", "0.5587722", "0.5569497", "0.5569497", "0.5562592", "0.5548963", "0.5548963", "0.5548963", "0.5548963", "0.5548963", "0.5548963", "0.5541341", "0.5537696", "0.5537696", "0.5537696", "0.5537696", "0.5537696", "0.5537696", "0.5537696", "0.5537696", "0.5537696", "0.5537696", "0.5537696", "0.5537696", "0.5537696", "0.5537696", "0.5537696", "0.5537696", "0.5537696", "0.5537696", "0.5537696", "0.5537696", "0.5537696", "0.5537696", "0.5537696", "0.5537696", "0.5537696", "0.5537696", "0.5537696", "0.5537696", "0.5537696", "0.5537696", "0.5537696", "0.5537696", "0.5537696", "0.5533395", "0.5525063", "0.5525063", "0.5525063", "0.5501111", "0.5501111", "0.5501111", "0.5501111", "0.5501111", "0.5501111", "0.5501111", "0.5501111", "0.5501111", "0.5501111", "0.5501111" ]
0.5547185
49
Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that should would receive a `mouseEnter` or `mouseLeave` event. Does not invoke the callback on the nearest common ancestor because nothing "entered" or "left" that element.
function traverseEnterLeave(from, to, fn, argFrom, argTo) { var common = from && to ? getLowestCommonAncestor(from, to) : null; var pathFrom = []; while (true) { if (!from) { break; } if (from === common) { break; } var alternate = from.alternate; if (alternate !== null && alternate === common) { break; } pathFrom.push(from); from = getParent(from); } var pathTo = []; while (true) { if (!to) { break; } if (to === common) { break; } var _alternate = to.alternate; if (_alternate !== null && _alternate === common) { break; } pathTo.push(to); to = getParent(to); } for (var i = 0; i < pathFrom.length; i++) { fn(pathFrom[i], 'bubbled', argFrom); } for (var _i = pathTo.length; _i-- > 0;) { fn(pathTo[_i], 'captured', argTo); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_handleMouseEnter() {\n this._hovered.next(this);\n }", "_elementMouseEnterHandler() {\n const that = this;\n\n if (that.clickMode === 'hover' && !that.disabled && !that.readonly) {\n that._handleMouseInteraction();\n }\n }", "_elementMouseEnterHandler() {\n const that = this;\n\n if (that.clickMode === 'hover' && !that.disabled && !that.readonly) {\n that._handleMouseInteraction();\n }\n }", "function hover(parentSelector, childSelector, mouseEnter, mouseLeave) {\n $(parentSelector).on({\n mouseenter: function() {\n if(mouseEnter != null) {\n mouseEnter(this);\n }\n },\n mouseleave: function() {\n if(mouseLeave != null) {\n mouseLeave(this);\n }\n }\n }, childSelector);\n}", "function traverseEnterLeave(from,to,fn,argFrom,argTo){var common=from&&to?getLowestCommonAncestor(from,to):null;var pathFrom=[];while(from&&from!==common){pathFrom.push(from);from=from._nativeParent;}var pathTo=[];while(to&&to!==common){pathTo.push(to);to=to._nativeParent;}var i;for(i=0;i<pathFrom.length;i++){fn(pathFrom[i],true,argFrom);}for(i=pathTo.length;i-->0;){fn(pathTo[i],false,argTo);}}", "function traverseEnterLeave(from,to,fn,argFrom,argTo){var common=from&&to?getLowestCommonAncestor(from,to):null;var pathFrom=[];while(from&&from!==common){pathFrom.push(from);from=from._nativeParent;}var pathTo=[];while(to&&to!==common){pathTo.push(to);to=to._nativeParent;}var i;for(i=0;i<pathFrom.length;i++){fn(pathFrom[i],true,argFrom);}for(i=pathTo.length;i-->0;){fn(pathTo[i],false,argTo);}}", "function traverseEnterLeave(from,to,fn,argFrom,argTo){var common=from&&to?getLowestCommonAncestor(from,to):null;var pathFrom=[];while(from&&from!==common){pathFrom.push(from);from=from._hostParent;}var pathTo=[];while(to&&to!==common){pathTo.push(to);to=to._hostParent;}var i;for(i=0;i<pathFrom.length;i++){fn(pathFrom[i],'bubbled',argFrom);}for(i=pathTo.length;i-->0;){fn(pathTo[i],'captured',argTo);}}", "function itoolPreviewMouseOver(className, callback) {\n var iframeJQuery = window.frames[0].jQuery;\n var iframeContents = _iframe.contents();\n var selElems = iframeJQuery(\".perc-itool-selected-elem\");\n //As this function gets fired on mouse over which can happen more than once as user moves the mouse on the menu\n //The following code is put in to detect whether we already handled the mouse over if yes then returns\n //If the selected elements length is zero return from here or\n //if selected element is only one and if it is div and if it has perc-itools-wrapper return from here\n //if the selected element's parent has a perc-itools-wrapper return from here.\n if(selElems.length === 0 ||\n (selElems.length === 1 && selElems.is(\"div\") && iframeJQuery(selElems).hasClass(\"perc-itools-wrapper\")) ||\n (iframeJQuery(selElems[0]).parent().hasClass(\"perc-itools-wrapper\")))\n return;\n\n selElems.siblings(\":not('.perc-itool-selected-elem')\").each(function(){\n if(iframeJQuery(this).is(\"div\"))\n {\n iframeJQuery(this).addClass('perc-itools-wrapper perc-make-me-region').addClass(className);\n }\n else\n {\n iframeJQuery(this).wrap(\"<div class='perc-widget perc-itool-nov-div-wrapper perc-itools-wrapper perc-itool-region-puff'></div>\");\n }\n });\n\n iframeContents.find('.perc-sibling-div').remove();\n if(selElems.length === 1 && selElems.is(\"div\"))\n {\n selElems.addClass('perc-itool-region-puff-self perc-make-me-region perc-self-wrapper perc-itools-wrapper').addClass(className);\n highlightSiblings(selElems);\n }\n else\n {\n selElems.wrapAll(\"<div class='perc-widget perc-itool-multi-wrapper perc-itool-nov-div-wrapper perc-itool-region-puff-self perc-self-wrapper perc-itools-wrapper \" + className + \"'></div>\");\n highlightSiblings(iframeJQuery(selElems[0]).parent());\n }\n //Change border color of all siblings to blue from grey.\n iframeContents.find('.perc-sibling-div').css({'border-color':'#00afea'});\n iframeJQuery('.perc-itool-selected-green-border').remove();\n iframeJQuery(selElems).each(function()\n {\n highlightSelectedElements(iframeJQuery(this), false);\n });\n\n // If user performs 'Side by Side' action - add the overflow:auto and height 100% to its parent so that below content don't overlap on columns\n if(className === 'perc-col') {\n if(selElems.length === 1) {\n\n selElems.parent().addClass('perc-clear');\n }\n\n else {\n\n selElems.parent().parent().addClass('perc-clear');\n }\n\n }\n\n // If there is only one selected element,turn its border into blue. If there are mulitple selected element keep their border green but turn its wrapper div border to blue\n if(selElems.length === 1) {\n iframeJQuery('.perc-itool-selected-green-border').css('border-color', '#00afea');\n }\n else {\n highlightSelectedElements(iframeJQuery('.perc-itool-multi-wrapper'), true);\n iframeJQuery('.perc-itool-selected-green-border').parent('.perc-itool-selected-green-border').css('border-color', '#00afea');\n }\n\n if (callback) {\n callback();\n }\n }", "function isMouseLeaveOrEnter(e, handler) {\r\n\t if (e.type != 'mouseout' && e.type != 'mouseover')\r\n\t\t return false;\r\n\t var reltg = e.relatedTarget ? e.relatedTarget : e.type == 'mouseout' ? e.toElement : e.fromElement;\r\n\t while (reltg && reltg != handler)\r\n\t\t reltg = reltg.parentNode;\r\n\t return (reltg != handler);\r\n}", "function handlerFn(ev) {\n if (ev.animationName !== 'muiNodeInserted') return;\n processLabel(ev.target);\n }", "function traverseEnterLeave(from,to,fn,argFrom,argTo){var common=from&&to?getLowestCommonAncestor(from,to):null;var pathFrom=[];while(true){if(!from){break;}if(from===common){break;}var alternate=from.alternate;if(alternate!==null&&alternate===common){break;}pathFrom.push(from);from=getParent(from);}var pathTo=[];while(true){if(!to){break;}if(to===common){break;}var _alternate=to.alternate;if(_alternate!==null&&_alternate===common){break;}pathTo.push(to);to=getParent(to);}for(var i=0;i<pathFrom.length;i++){fn(pathFrom[i],'bubbled',argFrom);}for(var _i=pathTo.length;_i-->0;){fn(pathTo[_i],'captured',argTo);}}", "function traverseEnterLeave(from,to,fn,argFrom,argTo){var common=from&&to?getLowestCommonAncestor(from,to):null;var pathFrom=[];while(true){if(!from){break;}if(from===common){break;}var alternate=from.alternate;if(alternate!==null&&alternate===common){break;}pathFrom.push(from);from=getParent(from);}var pathTo=[];while(true){if(!to){break;}if(to===common){break;}var _alternate=to.alternate;if(_alternate!==null&&_alternate===common){break;}pathTo.push(to);to=getParent(to);}for(var i=0;i<pathFrom.length;i++){fn(pathFrom[i],'bubbled',argFrom);}for(var _i=pathTo.length;_i-->0;){fn(pathTo[_i],'captured',argTo);}}", "function traverseEnterLeave(from,to,fn,argFrom,argTo){var common=from&&to?getLowestCommonAncestor(from,to):null;var pathFrom=[];while(true){if(!from){break;}if(from===common){break;}var alternate=from.alternate;if(alternate!==null&&alternate===common){break;}pathFrom.push(from);from=getParent(from);}var pathTo=[];while(true){if(!to){break;}if(to===common){break;}var _alternate=to.alternate;if(_alternate!==null&&_alternate===common){break;}pathTo.push(to);to=getParent(to);}for(var i=0;i<pathFrom.length;i++){fn(pathFrom[i],'bubbled',argFrom);}for(var _i=pathTo.length;_i-->0;){fn(pathTo[_i],'captured',argTo);}}", "function traverseEnterLeave(from,to,fn,argFrom,argTo){var common=from&&to?getLowestCommonAncestor(from,to):null;var pathFrom=[];while(true){if(!from){break;}if(from===common){break;}var alternate=from.alternate;if(alternate!==null&&alternate===common){break;}pathFrom.push(from);from=getParent(from);}var pathTo=[];while(true){if(!to){break;}if(to===common){break;}var _alternate=to.alternate;if(_alternate!==null&&_alternate===common){break;}pathTo.push(to);to=getParent(to);}for(var i=0;i<pathFrom.length;i++){fn(pathFrom[i],'bubbled',argFrom);}for(var _i=pathTo.length;_i-->0;){fn(pathTo[_i],'captured',argTo);}}", "function traverseEnterLeave(from,to,fn,argFrom,argTo){var common=from&&to?getLowestCommonAncestor(from,to):null;var pathFrom=[];while(true){if(!from){break;}if(from===common){break;}var alternate=from.alternate;if(alternate!==null&&alternate===common){break;}pathFrom.push(from);from=getParent(from);}var pathTo=[];while(true){if(!to){break;}if(to===common){break;}var _alternate=to.alternate;if(_alternate!==null&&_alternate===common){break;}pathTo.push(to);to=getParent(to);}for(var i=0;i<pathFrom.length;i++){fn(pathFrom[i],'bubbled',argFrom);}for(var _i=pathTo.length;_i-->0;){fn(pathTo[_i],'captured',argTo);}}", "function traverseEnterLeave(from,to,fn,argFrom,argTo){var common=from&&to?getLowestCommonAncestor(from,to):null;var pathFrom=[];while(true){if(!from){break;}if(from===common){break;}var alternate=from.alternate;if(alternate!==null&&alternate===common){break;}pathFrom.push(from);from=getParent(from);}var pathTo=[];while(true){if(!to){break;}if(to===common){break;}var _alternate=to.alternate;if(_alternate!==null&&_alternate===common){break;}pathTo.push(to);to=getParent(to);}for(var i=0;i<pathFrom.length;i++){fn(pathFrom[i],'bubbled',argFrom);}for(var _i=pathTo.length;_i-->0;){fn(pathTo[_i],'captured',argTo);}}", "function traverseEnterLeave(from,to,fn,argFrom,argTo){var common=from&&to?getLowestCommonAncestor(from,to):null;var pathFrom=[];while(true){if(!from){break;}if(from===common){break;}var alternate=from.alternate;if(alternate!==null&&alternate===common){break;}pathFrom.push(from);from=getParent(from);}var pathTo=[];while(true){if(!to){break;}if(to===common){break;}var _alternate=to.alternate;if(_alternate!==null&&_alternate===common){break;}pathTo.push(to);to=getParent(to);}for(var i=0;i<pathFrom.length;i++){fn(pathFrom[i],'bubbled',argFrom);}for(var _i=pathTo.length;_i-->0;){fn(pathTo[_i],'captured',argTo);}}", "function traverseEnterLeave(from,to,fn,argFrom,argTo){var common=from&&to?getLowestCommonAncestor(from,to):null;var pathFrom=[];while(true){if(!from){break;}if(from===common){break;}var alternate=from.alternate;if(alternate!==null&&alternate===common){break;}pathFrom.push(from);from=getParent(from);}var pathTo=[];while(true){if(!to){break;}if(to===common){break;}var _alternate=to.alternate;if(_alternate!==null&&_alternate===common){break;}pathTo.push(to);to=getParent(to);}for(var i=0;i<pathFrom.length;i++){fn(pathFrom[i],'bubbled',argFrom);}for(var _i=pathTo.length;_i-->0;){fn(pathTo[_i],'captured',argTo);}}", "function traverseEnterLeave(from,to,fn,argFrom,argTo){var common=from&&to?getLowestCommonAncestor(from,to):null;var pathFrom=[];while(true){if(!from){break;}if(from===common){break;}var alternate=from.alternate;if(alternate!==null&&alternate===common){break;}pathFrom.push(from);from=getParent(from);}var pathTo=[];while(true){if(!to){break;}if(to===common){break;}var _alternate=to.alternate;if(_alternate!==null&&_alternate===common){break;}pathTo.push(to);to=getParent(to);}for(var i=0;i<pathFrom.length;i++){fn(pathFrom[i],'bubbled',argFrom);}for(var _i=pathTo.length;_i-->0;){fn(pathTo[_i],'captured',argTo);}}", "function traverseEnterLeave(from,to,fn,argFrom,argTo){var common=from&&to?getLowestCommonAncestor(from,to):null;var pathFrom=[];while(true){if(!from){break;}if(from===common){break;}var alternate=from.alternate;if(alternate!==null&&alternate===common){break;}pathFrom.push(from);from=getParent(from);}var pathTo=[];while(true){if(!to){break;}if(to===common){break;}var _alternate=to.alternate;if(_alternate!==null&&_alternate===common){break;}pathTo.push(to);to=getParent(to);}for(var i=0;i<pathFrom.length;i++){fn(pathFrom[i],'bubbled',argFrom);}for(var _i=pathTo.length;_i-->0;){fn(pathTo[_i],'captured',argTo);}}", "function setCallBacks(){\n var children = parentDIV.childNodes;\n for(var i = 0; i < children.length; i++){\n children[i].onclick = params.callBack || \n function(){alert(\"Default callback\");};\n } \n }", "function mouseEnterAnchor(obj, idVal, event) {\n\tvar position = obj.position();\n\n\tvar p = obj.position();\n\t$(\"span[id='taxesAndFeesPopUp-\" + idVal + \"']\").css('position', \"absolute\");\n\t$(\"span[id='taxesAndFeesPopUp-\" + idVal + \"']\").css('display', \"\");\n\t$(\"span[id='taxesAndFeesPopUp-\" + idVal + \"']\").css('left', ( p.left - 160 +'px'));\n\t$(\"span[id='taxesAndFeesPopUp-\" + idVal + \"']\").css('z-index', \"99999\");\n\n//\tvar topVal = obj.offset().top+32;\n//\tvar leftVal = obj.offset().left - 190;\n//\tshowOverlay($(\"span[id='taxesAndFeesPopUp-\" + idVal + \"']\"), leftVal, topVal,9000);\n}", "function highlighter() {\n\n\tvar areas = $(\".highlight_area\");\n\n\t// in case of ajax reloading and other dynamics\n\t// remove the old mouseover/mouseout events and attach them new\n\tareas.off(\"mouseover\");\n\tareas.off(\"mouseout\");\n\tareas.mouseover(function() {\n\t\tvar itemId = parseId(jQuery(this).attr('class'));\n\t\tvar prntId = parseId(jQuery(this).attr('class'), 'parent_');\n\t\thighlight(itemId); // highlight the current element\n\t\tcheckForChilds(itemId);// highlight the child elements - recursive\n\t\t// - of the current item, if it's given\n\t\tif (prntId) { // check if the current item is a child of another\n\t\t\thighlight(prntId, 'id_'); // hightlight the next parent item,\n\t\t\t// if the current item is a child\n\t\t}\n\t}).mouseout(function() {\n\t\treset_highlight();\n\t});\n\n}", "function mouseMovedOnListItem(hashId) {\n\t return function (dispatch, getState) {\n\t if (getState().Search.Map.BalloonState.MouseIsOnListItem)\n\t return;\n\t mouseEnteredListItem(hashId)(dispatch, getState);\n\t };\n\t}", "function mouseoverIDs(str){\n svg.selectAll(\".node\")\n .attr(\"fill-opacity\", function(d2){ return (str.indexOf(d2.id) >=0) ? 1 : 0.02; })\n .attr(\"stroke-opacity\", function(d2){ return (str.indexOf(d2.id) >=0) ? 1 : 0.02; });\n svg.selectAll(\".nodeText\") \n .attr(\"fill-opacity\", function(d2){ return (str.indexOf(d2.id) >=0) ? 1 : 0.05; });\n svg.selectAll(\".lineNodes\")\n .attr(\"stroke-opacity\", function(d2){ return (str.indexOf(d2.id) >=0) ? 1 : 0; });\n checkVisibility();\n}", "function handleHover(e) {\r\n\t\t\t// Check if mouse(over|out) are still within the same parent element\r\n\t\t\tvar p = (e.type == \"mouseover\" ? e.fromElement : e.toElement) || e.relatedTarget;\r\n\t\r\n\t\t\t// Traverse up the tree\r\n\t\t\twhile ( p && p != this ) p = p.parentNode;\r\n\t\t\t\r\n\t\t\t// If we actually just moused on to a sub-element, ignore it\r\n\t\t\tif ( p == this ) return false;\r\n\t\t\t\r\n\t\t\t// Execute the right function\r\n\t\t\treturn (e.type == \"mouseover\" ? f : g).apply(this, [e]);\r\n\t\t}", "_mouseEnterHandler() {\n const that = this;\n\n that._isElementHovered = true;\n\n if (that.dropDownOpenMode === 'auto' && !that.disabled && !that.readonly) {\n that.open();\n }\n }", "_mouseEnterHandler() {\n const that = this;\n\n that._isElementHovered = true;\n\n if (that.tagName.indexOf('JQX-DROP-DOWN-') > -1 && that.dropDownOpenMode === 'auto' && !that.disabled && !that.readonly) {\n that.open();\n }\n }", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t\t var pathFrom = [];\n\t\t while (from && from !== common) {\n\t\t pathFrom.push(from);\n\t\t from = from._hostParent;\n\t\t }\n\t\t var pathTo = [];\n\t\t while (to && to !== common) {\n\t\t pathTo.push(to);\n\t\t to = to._hostParent;\n\t\t }\n\t\t var i;\n\t\t for (i = 0; i < pathFrom.length; i++) {\n\t\t fn(pathFrom[i], true, argFrom);\n\t\t }\n\t\t for (i = pathTo.length; i-- > 0;) {\n\t\t fn(pathTo[i], false, argTo);\n\t\t }\n\t\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t\t var pathFrom = [];\n\t\t while (from && from !== common) {\n\t\t pathFrom.push(from);\n\t\t from = from._hostParent;\n\t\t }\n\t\t var pathTo = [];\n\t\t while (to && to !== common) {\n\t\t pathTo.push(to);\n\t\t to = to._hostParent;\n\t\t }\n\t\t var i;\n\t\t for (i = 0; i < pathFrom.length; i++) {\n\t\t fn(pathFrom[i], true, argFrom);\n\t\t }\n\t\t for (i = pathTo.length; i-- > 0;) {\n\t\t fn(pathTo[i], false, argTo);\n\t\t }\n\t\t}", "function mouseOver(elem) {\n let place = (elem.id);\n console.log(place);\n addColor(place);\n return place;\n}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._nativeParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._nativeParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], true, argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], false, argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._nativeParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._nativeParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], true, argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], false, argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._nativeParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._nativeParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], true, argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], false, argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._nativeParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._nativeParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], true, argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], false, argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._nativeParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._nativeParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], true, argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], false, argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._nativeParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._nativeParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], true, argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], false, argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], true, argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], false, argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], true, argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], false, argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], true, argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], false, argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], true, argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], false, argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], true, argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], false, argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], true, argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], false, argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], true, argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], false, argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], true, argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], false, argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], true, argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], false, argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], true, argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], false, argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], true, argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], false, argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], true, argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], false, argTo);\n\t }\n\t}", "function handleMouseEnterFix() {\n !mouseEntered.current && handleMouseEnter();\n }", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\r\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\r\n\t var pathFrom = [];\r\n\t while (from && from !== common) {\r\n\t pathFrom.push(from);\r\n\t from = from._hostParent;\r\n\t }\r\n\t var pathTo = [];\r\n\t while (to && to !== common) {\r\n\t pathTo.push(to);\r\n\t to = to._hostParent;\r\n\t }\r\n\t var i;\r\n\t for (i = 0; i < pathFrom.length; i++) {\r\n\t fn(pathFrom[i], 'bubbled', argFrom);\r\n\t }\r\n\t for (i = pathTo.length; i-- > 0;) {\r\n\t fn(pathTo[i], 'captured', argTo);\r\n\t }\r\n\t}", "function mouseEntered(e) {\r\n DoHover(this, true, e);\r\n e.stopPropagation();\r\n }", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n\t var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\t var pathFrom = [];\n\t while (from && from !== common) {\n\t pathFrom.push(from);\n\t from = from._hostParent;\n\t }\n\t var pathTo = [];\n\t while (to && to !== common) {\n\t pathTo.push(to);\n\t to = to._hostParent;\n\t }\n\t var i;\n\t for (i = 0; i < pathFrom.length; i++) {\n\t fn(pathFrom[i], 'bubbled', argFrom);\n\t }\n\t for (i = pathTo.length; i-- > 0;) {\n\t fn(pathTo[i], 'captured', argTo);\n\t }\n\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._nativeParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._nativeParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], true, argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], false, argTo);\n }\n}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._hostParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._hostParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], true, argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], false, argTo);\n }\n}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._hostParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._hostParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], true, argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], false, argTo);\n }\n}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._hostParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._hostParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], true, argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], false, argTo);\n }\n}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._hostParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._hostParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], true, argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], false, argTo);\n }\n}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._hostParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._hostParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], true, argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], false, argTo);\n }\n}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._hostParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._hostParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], true, argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], false, argTo);\n }\n}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._hostParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._hostParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], true, argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], false, argTo);\n }\n}", "function the_click_callback(){\n\t\t\t\tif(typeof click_callback == 'function'){\n\t\t\t\t\tvar id = $container.attr('id');\n\t\t\t\t\tif(id==undefined || !id){\n\t\t\t\t\t\tid = '[no id]';\n\t\t\t\t\t}\n\t\t\t\t\tclick_callback(id, activenode);\n\t\t\t\t}\n\t\t\t}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._hostParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._hostParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], 'bubbled', argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], 'captured', argTo);\n }\n}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._hostParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._hostParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], 'bubbled', argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], 'captured', argTo);\n }\n}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._hostParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._hostParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], 'bubbled', argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], 'captured', argTo);\n }\n}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._hostParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._hostParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], 'bubbled', argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], 'captured', argTo);\n }\n}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._hostParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._hostParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], 'bubbled', argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], 'captured', argTo);\n }\n}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._hostParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._hostParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], 'bubbled', argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], 'captured', argTo);\n }\n}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._hostParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._hostParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], 'bubbled', argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], 'captured', argTo);\n }\n}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._hostParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._hostParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], 'bubbled', argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], 'captured', argTo);\n }\n}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._hostParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._hostParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], 'bubbled', argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], 'captured', argTo);\n }\n}", "function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (from && from !== common) {\n pathFrom.push(from);\n from = from._hostParent;\n }\n var pathTo = [];\n while (to && to !== common) {\n pathTo.push(to);\n to = to._hostParent;\n }\n var i;\n for (i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], 'bubbled', argFrom);\n }\n for (i = pathTo.length; i-- > 0;) {\n fn(pathTo[i], 'captured', argTo);\n }\n}" ]
[ "0.50959915", "0.49235275", "0.49235275", "0.48829064", "0.48785248", "0.48785248", "0.48690268", "0.48657742", "0.47983202", "0.47769547", "0.47343478", "0.47343478", "0.47343478", "0.47343478", "0.47343478", "0.47343478", "0.47343478", "0.47343478", "0.47343478", "0.47343478", "0.47296852", "0.472469", "0.47159994", "0.4710407", "0.4701894", "0.4661556", "0.46478167", "0.4636971", "0.46336582", "0.46336582", "0.45947042", "0.45869786", "0.45869786", "0.45869786", "0.45869786", "0.45869786", "0.45869786", "0.45722073", "0.45722073", "0.45722073", "0.45722073", "0.45722073", "0.45722073", "0.45722073", "0.45722073", "0.45722073", "0.45722073", "0.45722073", "0.45722073", "0.45567855", "0.45548186", "0.45353308", "0.45303825", "0.45303825", "0.45303825", "0.45303825", "0.45303825", "0.45303825", "0.45303825", "0.45303825", "0.45303825", "0.45303825", "0.45303825", "0.45303825", "0.45303825", "0.45303825", "0.45303825", "0.45303825", "0.45303825", "0.45303825", "0.45303825", "0.45303825", "0.45303825", "0.45303825", "0.45303825", "0.45303825", "0.45303825", "0.45303825", "0.45303825", "0.45303825", "0.45303825", "0.45303825", "0.45270327", "0.4521811", "0.4521811", "0.4521811", "0.4521811", "0.4521811", "0.4521811", "0.4521811", "0.45190528", "0.45059603", "0.45059603", "0.45059603", "0.45059603", "0.45059603", "0.45059603", "0.45059603", "0.45059603", "0.45059603", "0.45059603" ]
0.0
-1
Some event types have a notion of different registration names for different "phases" of propagation. This finds listeners by a given phase.
function listenerAtPhase(inst, event, propagationPhase) { var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase]; return getListener(inst, registrationName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listenerAtPhase(inst, event, propagationPhase) {\n\t\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t\t return getListener(inst, registrationName);\n\t\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t\t return getListener(inst, registrationName);\n\t\t}", "function listenerAtPhase(inst,event,propagationPhase){var registrationName=event.dispatchConfig.phasedRegistrationNames[propagationPhase];return getListener(inst,registrationName);}", "function listenerAtPhase(inst,event,propagationPhase){var registrationName=event.dispatchConfig.phasedRegistrationNames[propagationPhase];return getListener(inst,registrationName);}", "function listenerAtPhase(inst,event,propagationPhase){var registrationName=event.dispatchConfig.phasedRegistrationNames[propagationPhase];return getListener(inst,registrationName);}", "function listenerAtPhase(inst,event,propagationPhase){var registrationName=event.dispatchConfig.phasedRegistrationNames[propagationPhase];return getListener(inst,registrationName);}", "function listenerAtPhase(inst,event,propagationPhase){var registrationName=event.dispatchConfig.phasedRegistrationNames[propagationPhase];return getListener(inst,registrationName);}", "function listenerAtPhase(inst,event,propagationPhase){var registrationName=event.dispatchConfig.phasedRegistrationNames[propagationPhase];return getListener(inst,registrationName);}", "function listenerAtPhase(inst,event,propagationPhase){var registrationName=event.dispatchConfig.phasedRegistrationNames[propagationPhase];return getListener(inst,registrationName);}", "function listenerAtPhase(inst,event,propagationPhase){var registrationName=event.dispatchConfig.phasedRegistrationNames[propagationPhase];return getListener(inst,registrationName);}", "function listenerAtPhase(inst,event,propagationPhase){var registrationName=event.dispatchConfig.phasedRegistrationNames[propagationPhase];return getListener(inst,registrationName);}", "function listenerAtPhase(inst,event,propagationPhase){var registrationName=event.dispatchConfig.phasedRegistrationNames[propagationPhase];return getListener(inst,registrationName);}", "function listenerAtPhase(inst,event,propagationPhase){var registrationName=event.dispatchConfig.phasedRegistrationNames[propagationPhase];return getListener(inst,registrationName);}", "function listenerAtPhase(inst,event,propagationPhase){var registrationName=event.dispatchConfig.phasedRegistrationNames[propagationPhase];return getListener(inst,registrationName);}", "function listenerAtPhase(inst,event,propagationPhase){var registrationName=event.dispatchConfig.phasedRegistrationNames[propagationPhase];return getListener(inst,registrationName);}", "function listenerAtPhase(id,event,propagationPhase){var registrationName=event.dispatchConfig.phasedRegistrationNames[propagationPhase];return getListener(id,registrationName);}", "function listenerAtPhase(id,event,propagationPhase){var registrationName=event.dispatchConfig.phasedRegistrationNames[propagationPhase];return getListener(id,registrationName);}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t return getListener(inst, registrationName);\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\r\n\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\r\n\t return getListener(inst, registrationName);\r\n\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n }", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n }", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n }", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n }", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n }", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n }", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n }", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n }", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n }", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n }", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n }", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n }", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n }", "function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n}", "function listenerAtPhase(inst, event, propagationPhase: PropagationPhases) {\n const registrationName =\n event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n}" ]
[ "0.6932278", "0.6932278", "0.6931419", "0.6931419", "0.6931419", "0.6931419", "0.6931419", "0.6931419", "0.6931419", "0.6931419", "0.6931419", "0.6931419", "0.6931419", "0.6931419", "0.6931419", "0.6924929", "0.6924929", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.69005185", "0.6892431", "0.6820939", "0.6820939", "0.6820939", "0.6820939", "0.6820939", "0.6820939", "0.6820939", "0.6820939", "0.6820939", "0.6820939", "0.6820939", "0.6820939", "0.67535", "0.6729288", "0.6725031" ]
0.0
-1
A small set of propagation patterns, each of which will accept a small amount of information, and generate a set of "dispatch ready event objects" which are sets of events that have already been annotated with a set of dispatched listener functions/ids. The API is designed this way to discourage these propagation strategies from actually executing the dispatches, since we always want to collect the entire set of dispatches before executing even a single one. Tags a `SyntheticEvent` with dispatched listeners. Creating this function here, allows us to not have to bind or create functions for each event. Mutating the event's members allows us to not have to create a wrapping "dispatch" object that pairs the event with the listener.
function accumulateDirectionalDispatches(inst, phase, event) { { if (!inst) { error('Dispatching inst must not be null'); } } var listener = listenerAtPhase(inst, event, phase); if (listener) { event._dispatchListeners = accumulateInto(event._dispatchListeners, listener); event._dispatchInstances = accumulateInto(event._dispatchInstances, inst); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function accumulateDirectionalDispatches(inst,upwards,event){if(process.env.NODE_ENV!=='production'){process.env.NODE_ENV!=='production'?warning(inst,'Dispatching inst must not be null'):void 0;}var phase=upwards?PropagationPhases.bubbled:PropagationPhases.captured;var listener=listenerAtPhase(inst,event,phase);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}", "function accumulateDirectionalDispatches(inst,upwards,event){if(process.env.NODE_ENV!=='production'){process.env.NODE_ENV!=='production'?warning(inst,'Dispatching inst must not be null'):void 0;}var phase=upwards?PropagationPhases.bubbled:PropagationPhases.captured;var listener=listenerAtPhase(inst,event,phase);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}", "function accumulateDirectionalDispatches(domID,upwards,event){if(true){if(!domID){throw new Error('Dispatching id must not be null');}}var phase=upwards?PropagationPhases.bubbled:PropagationPhases.captured;var listener=listenerAtPhase(domID,event,phase);if(listener){event._dispatchListeners = accumulateInto(event._dispatchListeners,listener);event._dispatchIDs = accumulateInto(event._dispatchIDs,domID);}}", "function accumulateDirectionalDispatches(domID,upwards,event){if(\"production\"!==process.env.NODE_ENV){if(!domID){throw new Error('Dispatching id must not be null');}}var phase=upwards?PropagationPhases.bubbled:PropagationPhases.captured;var listener=listenerAtPhase(domID,event,phase);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchIDs=accumulateInto(event._dispatchIDs,domID);}}", "function executeDispatchesInOrder(event){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;{validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;}// Listeners and Instances are two parallel arrays that are always in sync.\nexecuteDispatch(event,dispatchListeners[i],dispatchInstances[i]);}}else if(dispatchListeners){executeDispatch(event,dispatchListeners,dispatchInstances);}event._dispatchListeners=null;event._dispatchInstances=null;}", "function executeDispatchesInOrder(event){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;{validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;}// Listeners and Instances are two parallel arrays that are always in sync.\nexecuteDispatch(event,dispatchListeners[i],dispatchInstances[i]);}}else if(dispatchListeners){executeDispatch(event,dispatchListeners,dispatchInstances);}event._dispatchListeners=null;event._dispatchInstances=null;}", "function executeDispatchesInOrder(event){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;{validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;}// Listeners and Instances are two parallel arrays that are always in sync.\nexecuteDispatch(event,dispatchListeners[i],dispatchInstances[i]);}}else if(dispatchListeners){executeDispatch(event,dispatchListeners,dispatchInstances);}event._dispatchListeners=null;event._dispatchInstances=null;}", "function executeDispatchesInOrder(event){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;{validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;}// Listeners and Instances are two parallel arrays that are always in sync.\nexecuteDispatch(event,dispatchListeners[i],dispatchInstances[i]);}}else if(dispatchListeners){executeDispatch(event,dispatchListeners,dispatchInstances);}event._dispatchListeners=null;event._dispatchInstances=null;}", "function executeDispatchesInOrder(event){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;{validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;}// Listeners and Instances are two parallel arrays that are always in sync.\nexecuteDispatch(event,dispatchListeners[i],dispatchInstances[i]);}}else if(dispatchListeners){executeDispatch(event,dispatchListeners,dispatchInstances);}event._dispatchListeners=null;event._dispatchInstances=null;}", "function accumulateDirectionalDispatches(inst,phase,event){{!inst?warning(false,'Dispatching inst must not be null'):void 0;}var listener=listenerAtPhase(inst,event,phase);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}", "function accumulateDirectionalDispatches(inst,phase,event){{!inst?warning(false,'Dispatching inst must not be null'):void 0;}var listener=listenerAtPhase(inst,event,phase);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}", "function accumulateDispatches(id,ignoredDirection,event){if(event && event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(id,registrationName);if(listener){event._dispatchListeners = accumulateInto(event._dispatchListeners,listener);event._dispatchIDs = accumulateInto(event._dispatchIDs,id);}}}", "function accumulateDirectionalDispatches(inst,phase,event){{!inst?warningWithoutStack$1(false,'Dispatching inst must not be null'):void 0;}var listener=listenerAtPhase(inst,event,phase);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}", "function accumulateDirectionalDispatches(inst,phase,event){{!inst?warningWithoutStack$1(false,'Dispatching inst must not be null'):void 0;}var listener=listenerAtPhase(inst,event,phase);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t\t if (false) {\n\t\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t\t }\n\t\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t\t var listener = listenerAtPhase(inst, event, phase);\n\t\t if (listener) {\n\t\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t\t }\n\t\t}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t\t if (false) {\n\t\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t\t }\n\t\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t\t var listener = listenerAtPhase(inst, event, phase);\n\t\t if (listener) {\n\t\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t\t }\n\t\t}", "function accumulateDispatches(inst,ignoredDirection,event){if(inst&&event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDispatches(inst,ignoredDirection,event){if(inst&&event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDispatches(inst,ignoredDirection,event){if(inst&&event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDispatches(inst,ignoredDirection,event){if(inst&&event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDispatches(inst,ignoredDirection,event){if(inst&&event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDispatches(inst,ignoredDirection,event){if(inst&&event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDispatches(inst,ignoredDirection,event){if(inst&&event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDispatches(inst,ignoredDirection,event){if(inst&&event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDispatches(inst,ignoredDirection,event){if(inst&&event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDispatches(inst,ignoredDirection,event){if(inst&&event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(inst, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(inst, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(inst, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(inst, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(inst, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(inst, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(inst, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(inst, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(inst, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(inst, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(inst, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(inst, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(inst, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(inst, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(inst, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t\t if (process.env.NODE_ENV !== 'production') {\n\t\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t\t }\n\t\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t\t var listener = listenerAtPhase(domID, event, phase);\n\t\t if (listener) {\n\t\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t\t }\n\t\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (\"production\" !== process.env.NODE_ENV) {\n\t if (!domID) {\n\t throw new Error('Dispatching id must not be null');\n\t }\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners =\n\t accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (\"production\" !== process.env.NODE_ENV) {\n\t if (!domID) {\n\t throw new Error('Dispatching id must not be null');\n\t }\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners =\n\t accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (\"production\" !== process.env.NODE_ENV) {\n\t if (!domID) {\n\t throw new Error('Dispatching id must not be null');\n\t }\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners =\n\t accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (\"production\" !== process.env.NODE_ENV) {\n\t if (!domID) {\n\t throw new Error('Dispatching id must not be null');\n\t }\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners =\n\t accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (\"production\" !== process.env.NODE_ENV) {\n\t if (!domID) {\n\t throw new Error('Dispatching id must not be null');\n\t }\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners =\n\t accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (\"production\" !== process.env.NODE_ENV) {\n\t if (!domID) {\n\t throw new Error('Dispatching id must not be null');\n\t }\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners =\n\t accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(domID, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n\t }\n\t}", "function accumulateDirectionalDispatches(inst,phase,event){{if(!inst){error('Dispatching inst must not be null');}}var listener=listenerAtPhase(inst,event,phase);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}", "function accumulateDirectionalDispatches(inst,phase,event){{if(!inst){error('Dispatching inst must not be null');}}var listener=listenerAtPhase(inst,event,phase);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}", "function accumulateDirectionalDispatches(inst,phase,event){{if(!inst){error('Dispatching inst must not be null');}}var listener=listenerAtPhase(inst,event,phase);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (\"development\" !== 'production') {\n \"development\" !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n }\n}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(inst, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n }\n}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(inst, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n }\n}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(inst, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n }\n}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(inst, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n }\n}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(inst, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n }\n}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(inst, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n }\n}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(inst, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n }\n}", "function accumulateDispatches(inst,ignoredDirection,event){if(event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDispatches(inst,ignoredDirection,event){if(event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDispatches(inst,ignoredDirection,event){if(event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n if (\"development\" !== 'production') {\n \"development\" !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(inst, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n }\n}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t if (false) {\n\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(inst, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t}", "function accumulateDirectionalDispatches(inst, upwards, event) {\n\t if (false) {\n\t process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;\n\t }\n\t var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n\t var listener = listenerAtPhase(inst, event, phase);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n }\n}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n }\n}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n }\n}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n }\n}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n }\n}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n }\n}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n }\n}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n }\n}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n }\n}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n }\n}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n }\n}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);\n }\n}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (\"production\" !== process.env.NODE_ENV) {\n if (!domID) {\n throw new Error('Dispatching id must not be null');\n }\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulate(event._dispatchListeners, listener);\n event._dispatchIDs = accumulate(event._dispatchIDs, domID);\n }\n}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (\"production\" !== process.env.NODE_ENV) {\n if (!domID) {\n throw new Error('Dispatching id must not be null');\n }\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulate(event._dispatchListeners, listener);\n event._dispatchIDs = accumulate(event._dispatchIDs, domID);\n }\n}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (\"production\" !== process.env.NODE_ENV) {\n if (!domID) {\n throw new Error('Dispatching id must not be null');\n }\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulate(event._dispatchListeners, listener);\n event._dispatchIDs = accumulate(event._dispatchIDs, domID);\n }\n}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (\"production\" !== process.env.NODE_ENV) {\n if (!domID) {\n throw new Error('Dispatching id must not be null');\n }\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulate(event._dispatchListeners, listener);\n event._dispatchIDs = accumulate(event._dispatchIDs, domID);\n }\n}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (\"production\" !== process.env.NODE_ENV) {\n if (!domID) {\n throw new Error('Dispatching id must not be null');\n }\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulate(event._dispatchListeners, listener);\n event._dispatchIDs = accumulate(event._dispatchIDs, domID);\n }\n}", "function accumulateDirectionalDispatches(domID, upwards, event) {\n if (\"production\" !== process.env.NODE_ENV) {\n if (!domID) {\n throw new Error('Dispatching id must not be null');\n }\n }\n var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;\n var listener = listenerAtPhase(domID, event, phase);\n if (listener) {\n event._dispatchListeners = accumulate(event._dispatchListeners, listener);\n event._dispatchIDs = accumulate(event._dispatchIDs, domID);\n }\n}" ]
[ "0.6350786", "0.6350786", "0.6247749", "0.62328684", "0.60861367", "0.60861367", "0.60861367", "0.60861367", "0.60861367", "0.5958953", "0.5958953", "0.5952106", "0.5944571", "0.5944571", "0.5927643", "0.5927643", "0.59275264", "0.59275264", "0.59275264", "0.59275264", "0.59275264", "0.59275264", "0.59275264", "0.59275264", "0.59275264", "0.59275264", "0.5919303", "0.5919303", "0.5919303", "0.5919303", "0.5919303", "0.5919303", "0.5919303", "0.5919303", "0.5919303", "0.5919303", "0.5919303", "0.5919303", "0.5919303", "0.5919303", "0.5919303", "0.59129936", "0.590826", "0.590826", "0.590826", "0.590826", "0.590826", "0.590826", "0.59038055", "0.59038055", "0.59038055", "0.59038055", "0.59038055", "0.59038055", "0.59038055", "0.59038055", "0.59038055", "0.59038055", "0.59038055", "0.59038055", "0.59038055", "0.59038055", "0.59038055", "0.59038055", "0.59038055", "0.59038055", "0.5900558", "0.5900558", "0.5900558", "0.5890637", "0.5884771", "0.5884771", "0.5884771", "0.5884771", "0.5884771", "0.5884771", "0.5884771", "0.5884557", "0.5884557", "0.5884557", "0.58836865", "0.5882393", "0.5882393", "0.58813524", "0.58813524", "0.58813524", "0.58813524", "0.58813524", "0.58813524", "0.58813524", "0.58813524", "0.58813524", "0.58813524", "0.58813524", "0.58813524", "0.5875384", "0.5875384", "0.5875384", "0.5875384", "0.5875384", "0.5875384" ]
0.0
-1
Collect dispatches (must be entirely collected before dispatching see unit tests). Lazily allocate the array to conserve memory. We must loop through each event and perform the traversal for each one. We cannot perform a single traversal for the entire collection of events because each event may have a different target.
function accumulateTwoPhaseDispatchesSingle(event) { if (event && event.dispatchConfig.phasedRegistrationNames) { traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function executeDispatchesInOrder(event){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;{validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;}// Listeners and Instances are two parallel arrays that are always in sync.\nexecuteDispatch(event,dispatchListeners[i],dispatchInstances[i]);}}else if(dispatchListeners){executeDispatch(event,dispatchListeners,dispatchInstances);}event._dispatchListeners=null;event._dispatchInstances=null;}", "function executeDispatchesInOrder(event){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;{validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;}// Listeners and Instances are two parallel arrays that are always in sync.\nexecuteDispatch(event,dispatchListeners[i],dispatchInstances[i]);}}else if(dispatchListeners){executeDispatch(event,dispatchListeners,dispatchInstances);}event._dispatchListeners=null;event._dispatchInstances=null;}", "function executeDispatchesInOrder(event){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;{validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;}// Listeners and Instances are two parallel arrays that are always in sync.\nexecuteDispatch(event,dispatchListeners[i],dispatchInstances[i]);}}else if(dispatchListeners){executeDispatch(event,dispatchListeners,dispatchInstances);}event._dispatchListeners=null;event._dispatchInstances=null;}", "function executeDispatchesInOrder(event){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;{validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;}// Listeners and Instances are two parallel arrays that are always in sync.\nexecuteDispatch(event,dispatchListeners[i],dispatchInstances[i]);}}else if(dispatchListeners){executeDispatch(event,dispatchListeners,dispatchInstances);}event._dispatchListeners=null;event._dispatchInstances=null;}", "function executeDispatchesInOrder(event){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;{validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;}// Listeners and Instances are two parallel arrays that are always in sync.\nexecuteDispatch(event,dispatchListeners[i],dispatchInstances[i]);}}else if(dispatchListeners){executeDispatch(event,dispatchListeners,dispatchInstances);}event._dispatchListeners=null;event._dispatchInstances=null;}", "function executeDispatchesInOrder(event,cb){forEachEventDispatch(event,cb);event._dispatchListeners = null;event._dispatchIDs = null;}", "function executeDispatchesInOrder(event,simulated){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;{validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;}// Listeners and Instances are two parallel arrays that are always in sync.\nexecuteDispatch(event,simulated,dispatchListeners[i],dispatchInstances[i]);}}else if(dispatchListeners){executeDispatch(event,simulated,dispatchListeners,dispatchInstances);}event._dispatchListeners=null;event._dispatchInstances=null;}", "function executeDispatchesInOrder(event,simulated){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;{validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;}// Listeners and Instances are two parallel arrays that are always in sync.\nexecuteDispatch(event,simulated,dispatchListeners[i],dispatchInstances[i]);}}else if(dispatchListeners){executeDispatch(event,simulated,dispatchListeners,dispatchInstances);}event._dispatchListeners=null;event._dispatchInstances=null;}", "function executeDispatchesInOrder(event,simulated){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;{validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;}// Listeners and Instances are two parallel arrays that are always in sync.\nexecuteDispatch(event,simulated,dispatchListeners[i],dispatchInstances[i]);}}else if(dispatchListeners){executeDispatch(event,simulated,dispatchListeners,dispatchInstances);}event._dispatchListeners=null;event._dispatchInstances=null;}", "function executeDispatchesInOrder(event,simulated){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;{validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;}// Listeners and Instances are two parallel arrays that are always in sync.\nexecuteDispatch(event,simulated,dispatchListeners[i],dispatchInstances[i]);}}else if(dispatchListeners){executeDispatch(event,simulated,dispatchListeners,dispatchInstances);}event._dispatchListeners=null;event._dispatchInstances=null;}", "function executeDispatchesInOrder(event,cb){forEachEventDispatch(event,cb);event._dispatchListeners=null;event._dispatchIDs=null;}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n }", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n }", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n }", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n }", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n }", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n }", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n }", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n }", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n }", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (inst && event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function executeDispatchesInOrder(event,simulated){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;{validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;}// Listeners and Instances are two parallel arrays that are always in sync.\n\texecuteDispatch(event,simulated,dispatchListeners[i],dispatchInstances[i]);}}else if(dispatchListeners){executeDispatch(event,simulated,dispatchListeners,dispatchInstances);}event._dispatchListeners=null;event._dispatchInstances=null;}", "function executeDispatchesInOrder(event,simulated){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;if(process.env.NODE_ENV!=='production'){validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;}// Listeners and Instances are two parallel arrays that are always in sync.\nexecuteDispatch(event,simulated,dispatchListeners[i],dispatchInstances[i]);}}else if(dispatchListeners){executeDispatch(event,simulated,dispatchListeners,dispatchInstances);}event._dispatchListeners=null;event._dispatchInstances=null;}", "function accumulateDispatches(inst, ignoredDirection, event) {\n if (inst && event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(inst, registrationName);\n\n if (listener) {\n event._dispatchListeners = accumulateInto(\n event._dispatchListeners,\n listener,\n );\n event._dispatchInstances = accumulateInto(\n event._dispatchInstances,\n inst,\n );\n }\n }\n }", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t\t if (event && event.dispatchConfig.registrationName) {\n\t\t var registrationName = event.dispatchConfig.registrationName;\n\t\t var listener = getListener(inst, registrationName);\n\t\t if (listener) {\n\t\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t\t }\n\t\t }\n\t\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t\t if (event && event.dispatchConfig.registrationName) {\n\t\t var registrationName = event.dispatchConfig.registrationName;\n\t\t var listener = getListener(inst, registrationName);\n\t\t if (listener) {\n\t\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t\t }\n\t\t }\n\t\t}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}", "function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}" ]
[ "0.60375905", "0.60375905", "0.60375905", "0.60375905", "0.60375905", "0.59032416", "0.58940375", "0.58940375", "0.58940375", "0.58940375", "0.5876829", "0.5833313", "0.5833313", "0.5833313", "0.5833313", "0.5833313", "0.5833313", "0.5833313", "0.5833313", "0.5833313", "0.5791305", "0.5790863", "0.57835335", "0.5777487", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5774508", "0.5771981", "0.5771981", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648", "0.5767648" ]
0.0
-1
Accumulates without regard to direction, does not look for phased registration names. Same as `accumulateDirectDispatchesSingle` but without requiring that the `dispatchMarker` be the same as the dispatched ID.
function accumulateDispatches(inst, ignoredDirection, event) { if (inst && event && event.dispatchConfig.registrationName) { var registrationName = event.dispatchConfig.registrationName; var listener = getListener(inst, registrationName); if (listener) { event._dispatchListeners = accumulateInto(event._dispatchListeners, listener); event._dispatchInstances = accumulateInto(event._dispatchInstances, inst); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners =\n\t accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners =\n\t accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners =\n\t accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners =\n\t accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners =\n\t accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners =\n\t accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners =\n\t accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t }\n\t }\n\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n\t\t if (event && event.dispatchConfig.registrationName) {\n\t\t var registrationName = event.dispatchConfig.registrationName;\n\t\t var listener = getListener(id, registrationName);\n\t\t if (listener) {\n\t\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t\t event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n\t\t }\n\t\t }\n\t\t}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulate(event._dispatchListeners, listener);\n event._dispatchIDs = accumulate(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulate(event._dispatchListeners, listener);\n event._dispatchIDs = accumulate(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulate(event._dispatchListeners, listener);\n event._dispatchIDs = accumulate(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulate(event._dispatchListeners, listener);\n event._dispatchIDs = accumulate(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulate(event._dispatchListeners, listener);\n event._dispatchIDs = accumulate(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulate(event._dispatchListeners, listener);\n event._dispatchIDs = accumulate(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulate(event._dispatchListeners, listener);\n event._dispatchIDs = accumulate(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulate(event._dispatchListeners, listener);\n event._dispatchIDs = accumulate(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners =\n accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(id, ignoredDirection, event) {\n if (event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(id, registrationName);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchIDs = accumulateInto(event._dispatchIDs, id);\n }\n }\n}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}", "function accumulateDispatches(inst, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(inst, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n\t event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n\t }\n\t }\n\t}" ]
[ "0.7465256", "0.7465256", "0.7465256", "0.7465256", "0.7465256", "0.7465256", "0.7465256", "0.7465256", "0.7465256", "0.7465256", "0.7465256", "0.7465256", "0.7465256", "0.7465256", "0.7465256", "0.7465256", "0.7465256", "0.7465256", "0.7465256", "0.7465256", "0.7465256", "0.7465256", "0.7465256", "0.74647886", "0.74647886", "0.74647886", "0.74647886", "0.74647886", "0.74647886", "0.74647886", "0.74561787", "0.7419611", "0.7419611", "0.7419611", "0.7419611", "0.7419611", "0.7419611", "0.7419611", "0.7419611", "0.73995876", "0.73995876", "0.73995876", "0.73995876", "0.73995876", "0.73995876", "0.73995876", "0.73995876", "0.73995876", "0.73995876", "0.73995876", "0.73995876", "0.73995876", "0.73995876", "0.73995876", "0.73995876", "0.73995876", "0.73995876", "0.73995876", "0.73995876", "0.7395458", "0.7395458", "0.7395458", "0.7395458", "0.7395458", "0.7395458", "0.7395458", "0.7395458", "0.7395458", "0.7395458", "0.7395458", "0.7395458", "0.7395458", "0.737486", "0.737486", "0.737486", "0.737486", "0.737486", "0.737486", "0.737486", "0.737486", "0.737486", "0.737486", "0.737486", "0.737486", "0.737486", "0.737486", "0.737486", "0.737486", "0.737486", "0.737486", "0.737486", "0.737486", "0.737486", "0.737486", "0.737486", "0.737486", "0.737486", "0.737486", "0.737486", "0.737486", "0.737486" ]
0.0
-1
Return whether a native keypress event is assumed to be a command. This is required because Firefox fires `keypress` events for key commands (cut, copy, selectall, etc.) even though no character is inserted.
function isKeypressCommand(nativeEvent) { return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && // ctrlKey && altKey is equivalent to AltGr, and is not a command. !(nativeEvent.ctrlKey && nativeEvent.altKey); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isKeypressCommand(nativeEvent) {\n\t return (\n\t (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey)\n\t );\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (\n\t (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey)\n\t );\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (\n\t (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey)\n\t );\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (\n\t (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey)\n\t );\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (\n\t (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey)\n\t );\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (\n\t (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey)\n\t );\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (\n\t (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey)\n\t );\n\t}", "function isKeypressCommand(nativeEvent) {\r\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\r\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\r\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\r\n\t}", "function isKeypressCommand(nativeEvent) {\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && !(nativeEvent.ctrlKey && nativeEvent.altKey);\n}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n\t return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey);\n\t}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}", "function isKeypressCommand(nativeEvent) {\n return (\n (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey)\n );\n}" ]
[ "0.8017686", "0.8017686", "0.8017686", "0.8017686", "0.8017686", "0.8017686", "0.8017686", "0.8009321", "0.80005544", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.79784334", "0.79784334", "0.79784334", "0.79784334", "0.79784334", "0.79784334", "0.79784334", "0.79784334", "0.79784334", "0.79784334", "0.79784334", "0.79784334", "0.79784334", "0.79784334", "0.79784334", "0.79784334", "0.79784334", "0.79784334", "0.79784334", "0.79784334", "0.79784334" ]
0.0
-1
SECTION: handle `change` event
function shouldUseChangeEvent(elem) { var nodeName = elem.nodeName && elem.nodeName.toLowerCase(); return nodeName === 'select' || nodeName === 'input' && elem.type === 'file'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "change(/*event*/) {\n this._super(...arguments);\n this._parse();\n }", "handleChange(event) {\n this.dispatchEvent(new CustomEvent('change', {detail: event.target.value}));\n }", "onchange() {}", "function onChange() {\n\t\t__debug_452( 'Received a change event.' );\n\t\tself.render();\n\t}", "change() { }", "function onChange() {\n\t\t__debug_330( 'Received a change event.' );\n\t\tself.render();\n\t}", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_730( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_259( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_596( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "handleChange(event) {\n\n }", "handleEventChange() {\n }", "function onChange() {\n\t\t__debug_587( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_520( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_488( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_475( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_412( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_429( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_457( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_332( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_577( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_395( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "handleChange (event) {\n }", "onChanged(e){}", "function onChangeHandler(e) {\n\n }", "function onChangeHandler(e) {\n\n }", "function changeFunction() {\n\tconsole.log(\"onchange\");\n}", "function handleChange(ev) {\n\n switch (ev.name) {\n case \"duration\":\n handleDurationChange(ev);\n break;\n case \"type\":\n handleTypeChange(ev);\n break;\n case \"unit\":\n handleUnitChange(ev);\n break;\n case \"display\":\n handleDisplayChange(ev);\n break;\n }\n}", "handleChange(event){\n changeHandler(event,this);\n }", "function onChange() {\n console.log(\"something changed...\");\n \n }", "changeFn(event) {\n var fileList = event.__files_ || (event.target && event.target.files);\n if (!fileList)\n return;\n this.stopEvent(event);\n this.handleFiles(fileList);\n }", "handleChange(event) {\n let elemName = event.target.name;\n let value = event.target.value;\n //reason picklist is selected\n if (elemName === \"reasonCombo\"){\n this.objInputFields.sReason = value;\n this.reasonSelected = true;\n }\n //comment text area is selected\n else if (elemName === \"commentField\"){\n this.objInputFields.sComment = value;\n } \n \n //this.sReason = event.target.value;\n //this.reasonSelected = true;\n this.bFormEdited = true;\n }", "function changeEvent() {\n var value_sub = properties.value;\n trigger_param_list.push(value_sub);\n // 'seek' event is like a forced-change event\n $pebble_slider_object.triggerHandler('seek', trigger_param_list);\n if (prev_change_value !== value_sub) {\n $pebble_slider_object.triggerHandler('change', trigger_param_list);\n prev_change_value = value_sub;\n }\n trigger_param_list.length = 0;\n }", "handleChange() {\r\n var e = document.getElementById(\"selection\")\r\n // call passed in function to spawn any necessary actions on the parent component.\r\n this.props.sendChange(e.value)\r\n }", "function changeEvent(event){\n setTipo(event.target.value);\n x = unidades.transformar_lista_longitud(x, old_unit.ds_Longitud, usr_unit.ds_Longitud);\n old_unit.ds_Longitud = usr_unit.ds_Longitud;\n usr_unit.ds_Longitud = event.target.value;\n setValor(unidades.transformar_unidad_longitud(total,old_unit.ds_Longitud, usr_unit.ds_Longitud));\n setTotal(unidades.transformar_unidad_longitud(total,old_unit.ds_Longitud, usr_unit.ds_Longitud));\n setValor4(unidades.transformar_unidad_longitud(valor4,old_unit.ds_Longitud, usr_unit.ds_Longitud));\n usr_unit.saveConfig(\"1\");\n }", "function handleChange(event) {\n switch (event.target.name) {\n case \"degree\":\n setDegree(event.target.value);\n break;\n case \"major\":\n setMajor(event.target.value);\n break;\n case \"organization\":\n setOrganization(event.target.value);\n break;\n default:\n break;\n }\n }", "function handleChanged(event) {\n console.log(event.target.value);\n setName(event.target.value);\n }", "function handleChange(editor, data, value) {\n onChange(value);\n }", "function handleChange(editor, data, value) {\n onChange(value);\n }", "onChange () {}", "onChange () {}", "function handleChange(event, newValue) {\n setValue(newValue);\n }", "handleChange(e) {\n e.stopPropagation();\n const value = this.getInputEl().value;\n this.model.set({ value }, { fromInput: 1 });\n this.elementUpdated();\n }", "on_change(event)\n\t{\n\t\t// Extract `value` from the argument\n\t\t// of this `onChange` listener\n\t\t// (for convenience)\n\n\t\tlet value = event\n\n\t\tif (event.target !== undefined)\n\t\t{\n\t\t\tvalue = event.target.value\n\t\t}\n\n\t\t// Call the parent `onChange` handler\n\t\t// with the `value` as an argument\n\t\t// (for convenience)\n\n\t\tconst { onChange } = this.props\n\n\t\tonChange(value)\n\t}", "handleChange(e) {\n switch(e.target.name){\n case \"numLines\":\n this.props.updateDefinitionsNumLines(e.target.value);\n break;\n case \"extraspace\":\n this.props.updateDefinitionsExtraSpace(e.target.checked);\n break;\n case \"addHowToSolve\":\n this.props.updateAddHowToSolve(e.target.checked);\n break;\n case \"listType\":\n this.props.updateListType(e.target.value);\n break;\n default:\n break;\n }\n }", "function handleChange(e) {\n const value = e.target.value;\n const name = e.target.name;\n dispatch({ value: value, update: name });\n }", "onChange(callback) {\n this.events.change.push({ callback });\n }", "onChange() {\n triggerEvent(this.input, 'input');\n triggerEvent(this.input, 'change');\n }", "function optionChanged(){\n init();\n}", "function handleFieldChange(name, value) {\n console.log('handle field change', name, value);\n}", "function changeHandler(e){ //tuntuu redundantilta, vois poistaa myöhemmin emt.\n //console.log(e.target)\n //e.preventDefault();\n if(e.target.type === \"file\"){\n setFormObjects({\n ...FormObjects,\n [e.target.name]: [(e.target.value).match(/[^\\\\/]*$/)[0]]\n })\n }\n else{\n setFormObjects({\n ...FormObjects,\n [e.target.name]: [e.target.value]\n })\n }\n setChanges(true)\n }", "change(fn, options) {\n\t\treturn this.on({ change: fn }, options);\n\t}", "change(fn, options) {\n\t\treturn this.on({ change: fn }, options);\n\t}", "handleTechChange(e) {\n console.log(\"tech name change:\" + e.target.value);\n }", "handleChange() {\n this.$emit(\"change\");\n }", "handleChange() {\n this.$emit(\"change\");\n }", "change() {\n\n const divs = this.parent.querySelectorAll('[class^=\"toggle-select-\"],[class*=\" toggle-select-\"]');\n const selectOption = this.select.options[this.select.selectedIndex];\n let value;\n\n if(this.options.field == 'group')\n {\n value = selectOption.parentNode.label ? selectOption.parentNode.label.toLowerCase() : null;\n } else {\n value = selectOption.value;\n }\n\n // Toggle each div\n divs.forEach(div => {\n const isVisible = div.classList.contains('toggle-select-'+value);\n const inputs = div.querySelectorAll('select,textarea,input:not([type=\"hidden\"],[type=\"checkbox\"],[type=\"radio\"])');\n\n // Toggle the visible div\n isVisible ? div.classList.remove('d-none') : div.classList.add('d-none');\n\n // Toggle the inputs\n if(inputs)\n {\n this.toggleForm(inputs,isVisible);\n }\n\n });\n\n // Run the custom callback\n this.options.onChanged(value);\n\n }", "function optionChanged(id) {\n\n getData(id);\n}", "function handleChange(event, value) {\n setValue(value);\n }", "function optionChanged(id) {\n getData(id);\n}", "_setOnChanges(){\n\t\tthis.inputs.forEach(i => i.addEventListener('change', this._onChange.bind(this)));\t\n\t}", "onChange(item) {}", "handleChange(e) {\n\t\tif (e.target.type === 'checkbox') {\n\t\t\tthis.props.updateSetting(e.target.name, e.target.checked)\n\t\t} else {\n\t\t\te.preventDefault()\n\t\t\tthis.props.updateSetting(e.target.name, e.target.value)\n\t\t}\n\t}", "handleChange () {\n this.props.onStatusChange(\n this.props.item.id,\n this.refs.checkbox.checked ? 'RESERVED' : 'NEW'\n );\n }", "handleChange (changeEvent){\n\t\tthis.setState({\n\t\t\tselectedOption : changeEvent.target.value\n\t\t});\n\t}", "function optionChanged(changed){\n charts(changed);\n metadata(changed);\n}", "function handleChange(event) {\n //event.preventDefault()\n \n if(!event.target.value){\n console.log('Input limpio');\n setValue('limpio');\n }\n setValue(event.target.value);\n \n \n\n }", "function shouldUseChangeEvent(elem){return elem.nodeName==='SELECT'||elem.nodeName==='INPUT'&&elem.type==='file';}", "function onChange(event)\n\t{\n\t\tconst val = event.target.value\n\t\tsetValue(val)\n\t}", "dispatchChange() {\n this.toggleAttribute(\"empty\", !this.value);\n this.dispatchEvent(new CustomEvent(\"change\", { bubbles: true }));\n }", "function handleDomEvent () {\n\t \tthis._ractive.binding.handleChange();\n\t }", "function onChange(e) {\n setValue(e.target.value);\n }", "function onChange(change) {\r\n\t\t//split up the path to get the file name\r\n\t\tvar splitUpPath = change.path.split('/');\r\n\r\n\t\t//log the file detected\r\n\t\tconsole.log('\"' + splitUpPath[splitUpPath.length - 1] + '\" was ' + change.type);\r\n\t}", "function handleEventFieldChange(event) {\n console.log('handle field change', event);\n}", "function onChange() {\n\n // hide and show input elements for which this is necessary\n setVisibility();\n\n // update preview considering the changed input value\n updatePreview();\n\n // perform change actions\n self.onchange && self.onchange( self );\n\n }", "function onChange() {\n\n // hide and show input elements for which this is necessary\n setVisibility();\n\n // update preview considering the changed input value\n updatePreview();\n\n // perform change actions\n self.onchange && self.onchange( self );\n\n }", "function changeHandler(){\n\n // shortcut\n const $this = $(this);\n\n // set value in slider\n if( $this.data('type') == 'min' ) {\n $els.sliderCont.slider( 'values', 0, $this.val() );\n } else {\n $els.sliderCont.slider( 'values', 1, $this.val() );\n }\n\n }", "function handleChange(e) {\n\t\tsetNewData({\n\t\t\t...newData,\n\t\t\t[e.target.name]: e.target.value,\n\t\t})\n\t}", "function shouldUseChangeEvent(elem){return elem.nodeName === 'SELECT' || elem.nodeName === 'INPUT' && elem.type === 'file';}", "function handleChangeType(event){\n const {name, value} = event.currentTarget\n changeFilde(name, value);\n}", "function changed() {\n\t\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t\t}", "_evtChange(event) { }", "handleChangeInLookup(event){\n //Show spinner : wire will hide the spinner at the end\n this.isLoading = true;\n var value = event.detail.value.length>0?event.detail.value[0]:BLANK_STRING;\n //set the value based on the lookup changed\n switch (event.detail.source) {\n case MANAGER_LOOKUP:\n this.selectedManager = value;\n break;\n case USER_LOOKUP:\n this.selectedUser = value;\n break;\n case PROJECT_LOOKUP:\n this.selectedProject = value;\n break;\n default:\n console.log('Invalid Field');\n break;\n }\n }", "function handleChange(){\n\t\t\t// Error handles\n\t\t\tif(xhr.readyState === this.DONE && xhr.status !== 200){\n\t\t\t\tconsole.log('check yoself');\n\t\t\t}\n\t\t\t// success handles\n\t\t\tif(xhr.readyState === this.DONE && xhr.status === 200){\n\t\t\t\tcallback(xhr.response);\n\t\t\t}\n\n\t\t}", "onChange(event){\n this.props.onchange({target:{name:this.props.hNode.propertyName, value: event.target.checked}});\n }", "function onChange() {\n if (input.get.call(element, valueField) !== observer.oldValue && !element.readOnly) {\n observer.set(input.get.call(element, valueField));\n }\n }", "function optionChanged(id) {\n charting(id);\n meta(id);\n}// change(id)", "change(e){\n this.props.onChange(e);\n }", "onChange(callback) {\n\t\tthis.changeCallback = callback;\n\t}", "variantChange(event) {\n this.variant = event.target.value;\n this.sname = event.target.name;\n\n // Publish Lightning Message via channel ListSelectorMessageChannel__c\n let message = {variantValue: this.variant};\n publish(this.messageContext, LISTMC, message);\n }", "function handleChange(e, func) {\n const {value} = e.target;\n console.log(e.target.id,\":\",value);\n func(value);\n }", "function handleChange(event) {\n // console.log(event.target.value)\n switch (event.target.name) {\n case \"name\":\n setName(event.target.value);\n break;\n case \"location\":\n setLocation(event.target.value);\n break;\n case \"phone\":\n setPhone(event.target.value);\n break;\n default:\n break;\n }\n }", "_triggerChange (e) {\n var args = [this.getValue(), this.getFormElement(), this.getUIElement()];\n if (e) {\n args.push(e);\n }\n if (this.options.onChange) {\n this.options.onChange.apply(this, args);\n }\n }", "addChangeListener(callback) {\n this.on('change', callback);\n }", "handleChange(e) {\n const elem = e.target;\n // Check that the event was triggered by the right <select> button.\n if ((\" \" + elem.className + \" \" ).indexOf( \" \" + this.props.seqLenClass + \" \" ) > -1) {\n // Call render and override the charsPerLine setting with whatever the user specified.\n this.callRender({charsPerLine: elem.value});\n }\n }", "handleChange(e) {\r\n // Prevent legacy form post\r\n e.preventDefault();\r\n\r\n // Get field name and value from event\r\n const target = e.target;\r\n let value = target.type === 'checkbox' ? target.checked : target.value;\r\n const name = target.name;\r\n\r\n this.validateAndSaveChange(name, value);\r\n }", "changeSetting(event){\n\t\tlet type = event.target.type;\n\t\tlet val = event.target.value;\n\t\tswitch(type){\n\t\t\tcase 'checkbox':\n\t\t\t\tval = event.target.checked;\n\t\t\t\tbreak;\n\t\t\tcase 'number':\n\t\t\t\tval = parseInt(val);\n\t\t\t\tbreak;\n\t\t}\n\t\tconsole.log('Changed: ', event.target.id, val);\n\t\tthis.changes[event.target.id] = val;\n\t\tthis.setState({changes: clone(this.changes)});\n\t}", "function handleChange(value) {\n console.log(`selected ${value}`);\n }", "function handleChange(e) {\n setName(e.target.value);\n }", "function changed(change) {\n if (change.changeType === \"property\" && change.property === property) {\n fn(change);\n }\n }", "_triggerChangeEvent() {\n\t\tif ( this.$control.rendered && ! this.changeEventDisabled ) {\n\t\t\tthis._updateSettings();\n\t\t\tthis.events.emit( 'change', this.settings );\n\t\t}\n\t}", "formChanged() {}" ]
[ "0.7854437", "0.77068484", "0.7598262", "0.7521723", "0.7511005", "0.7504069", "0.7448793", "0.7420877", "0.7401912", "0.7386296", "0.73666596", "0.73555636", "0.73510677", "0.73496395", "0.73438835", "0.7339759", "0.73381084", "0.73354316", "0.73326874", "0.7328343", "0.73218906", "0.7272271", "0.7213144", "0.7172082", "0.7172082", "0.7135516", "0.70593154", "0.7057752", "0.7047312", "0.70369786", "0.7017632", "0.70171803", "0.6953554", "0.6949268", "0.69473183", "0.6925149", "0.69247746", "0.69247746", "0.6921572", "0.6921572", "0.6887625", "0.6873889", "0.6868702", "0.6816885", "0.6800813", "0.6784801", "0.6770731", "0.67362815", "0.67204165", "0.67096955", "0.67090863", "0.67090863", "0.67080957", "0.6702231", "0.6702231", "0.6699963", "0.6680338", "0.66771644", "0.6664612", "0.66323525", "0.66266215", "0.662305", "0.66136885", "0.6604868", "0.66048104", "0.6604488", "0.65987414", "0.6592236", "0.65880716", "0.6582374", "0.6572207", "0.65722036", "0.6569591", "0.65623695", "0.65623695", "0.6558127", "0.65553373", "0.6545838", "0.65361977", "0.6535871", "0.652795", "0.6522288", "0.6516211", "0.6514555", "0.6513177", "0.65122265", "0.65082526", "0.64982486", "0.6486231", "0.64862174", "0.6480262", "0.6476834", "0.6467417", "0.6465933", "0.6464175", "0.646153", "0.6461519", "0.6456544", "0.64546096", "0.64537436", "0.6452145" ]
0.0
-1
(For IE <=9) Starts tracking propertychange events on the passedin element and override the value property so that we can distinguish user events from value changes in JS.
function startWatchingForValueChange(target, targetInst) { activeElement = target; activeElementInst = targetInst; activeElement.attachEvent('onpropertychange', handlePropertyChange); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElementValue=target.value;activeElementValueProp=Object.getOwnPropertyDescriptor(target.constructor.prototype,'value');// Not guarded in a canDefineProperty check: IE8 supports defineProperty only\n// on DOM elements\nObject.defineProperty(activeElement,'value',newValueProp);if(activeElement.attachEvent){activeElement.attachEvent('onpropertychange',handlePropertyChange);}else{activeElement.addEventListener('propertychange',handlePropertyChange,false);}}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElementValue=target.value;activeElementValueProp=Object.getOwnPropertyDescriptor(target.constructor.prototype,'value'); // Not guarded in a canDefineProperty check: IE8 supports defineProperty only\n\t// on DOM elements\n\tObject.defineProperty(activeElement,'value',newValueProp);if(activeElement.attachEvent){activeElement.attachEvent('onpropertychange',handlePropertyChange);}else {activeElement.addEventListener('propertychange',handlePropertyChange,false);}}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElementValue=target.value;activeElementValueProp=Object.getOwnPropertyDescriptor(target.constructor.prototype,'value'); // Not guarded in a canDefineProperty check: IE8 supports defineProperty only\n\t// on DOM elements\n\tObject.defineProperty(activeElement,'value',newValueProp);if(activeElement.attachEvent){activeElement.attachEvent('onpropertychange',handlePropertyChange);}else {activeElement.addEventListener('propertychange',handlePropertyChange,false);}}", "function startWatchingForValueChange(target,targetID){activeElement=target;activeElementID=targetID;activeElementValue=target.value;activeElementValueProp=Object.getOwnPropertyDescriptor(target.constructor.prototype,'value');Object.defineProperty(activeElement,'value',newValueProp);activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetID){activeElement = target;activeElementID = targetID;activeElementValue = target.value;activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype,'value');Object.defineProperty(activeElement,'value',newValueProp);activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target, activeElementInst = targetInst, activeElement.attachEvent(\"onpropertychange\", handlePropertyChange);\n}", "function startWatchingForValueChange(target, targetInst) {\n\t activeElement = target;\n\t activeElementInst = targetInst;\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetInst) {\n\t activeElement = target;\n\t activeElementInst = targetInst;\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetInst) {\n\t activeElement = target;\n\t activeElementInst = targetInst;\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetInst) {\n\t activeElement = target;\n\t activeElementInst = targetInst;\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetInst) {\n\t activeElement = target;\n\t activeElementInst = targetInst;\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetInst) {\n\t activeElement = target;\n\t activeElementInst = targetInst;\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetInst) {\n\t activeElement = target;\n\t activeElementInst = targetInst;\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetInst) {\n\t activeElement = target;\n\t activeElementInst = targetInst;\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetInst) {\n\t activeElement = target;\n\t activeElementInst = targetInst;\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetInst) {\n\t activeElement = target;\n\t activeElementInst = targetInst;\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetInst) {\n\t activeElement = target;\n\t activeElementInst = targetInst;\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetInst) {\n\t activeElement = target;\n\t activeElementInst = targetInst;\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetID) {\n\t\t activeElement = target;\n\t\t activeElementID = targetID;\n\t\t activeElementValue = target.value;\n\t\t activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value');\n\t\t\n\t\t // Not guarded in a canDefineProperty check: IE8 supports defineProperty only\n\t\t // on DOM elements\n\t\t Object.defineProperty(activeElement, 'value', newValueProp);\n\t\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t\t}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }", "function startWatchingForValueChange(target, targetID) {\n\t activeElement = target;\n\t activeElementID = targetID;\n\t activeElementValue = target.value;\n\t activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value');\n\t\n\t // Not guarded in a canDefineProperty check: IE8 supports defineProperty only\n\t // on DOM elements\n\t Object.defineProperty(activeElement, 'value', newValueProp);\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetID) {\n\t activeElement = target;\n\t activeElementID = targetID;\n\t activeElementValue = target.value;\n\t activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value');\n\t\n\t // Not guarded in a canDefineProperty check: IE8 supports defineProperty only\n\t // on DOM elements\n\t Object.defineProperty(activeElement, 'value', newValueProp);\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetID) {\n\t activeElement = target;\n\t activeElementID = targetID;\n\t activeElementValue = target.value;\n\t activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value');\n\t\n\t // Not guarded in a canDefineProperty check: IE8 supports defineProperty only\n\t // on DOM elements\n\t Object.defineProperty(activeElement, 'value', newValueProp);\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetID) {\n\t activeElement = target;\n\t activeElementID = targetID;\n\t activeElementValue = target.value;\n\t activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value');\n\t\n\t // Not guarded in a canDefineProperty check: IE8 supports defineProperty only\n\t // on DOM elements\n\t Object.defineProperty(activeElement, 'value', newValueProp);\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetID) {\n\t activeElement = target;\n\t activeElementID = targetID;\n\t activeElementValue = target.value;\n\t activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value');\n\t\n\t // Not guarded in a canDefineProperty check: IE8 supports defineProperty only\n\t // on DOM elements\n\t Object.defineProperty(activeElement, 'value', newValueProp);\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetID) {\n\t activeElement = target;\n\t activeElementID = targetID;\n\t activeElementValue = target.value;\n\t activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value');\n\t\n\t // Not guarded in a canDefineProperty check: IE8 supports defineProperty only\n\t // on DOM elements\n\t Object.defineProperty(activeElement, 'value', newValueProp);\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetID) {\n\t activeElement = target;\n\t activeElementID = targetID;\n\t activeElementValue = target.value;\n\t activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value');\n\t\n\t // Not guarded in a canDefineProperty check: IE8 supports defineProperty only\n\t // on DOM elements\n\t Object.defineProperty(activeElement, 'value', newValueProp);\n\t activeElement.attachEvent('onpropertychange', handlePropertyChange);\n\t}", "function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent(\n 'onpropertychange',\n handlePropertyChange,\n );\n }" ]
[ "0.74983156", "0.74983156", "0.74983156", "0.74983156", "0.74983156", "0.74983156", "0.74983156", "0.74983156", "0.74983156", "0.74983156", "0.74983156", "0.74983156", "0.7280744", "0.7193553", "0.7193553", "0.7044979", "0.7032104", "0.70234615", "0.69343716", "0.69343716", "0.69343716", "0.69343716", "0.69343716", "0.69343716", "0.69343716", "0.69343716", "0.69343716", "0.69343716", "0.69343716", "0.69343716", "0.6851741", "0.6851012", "0.6851012", "0.6851012", "0.6851012", "0.6851012", "0.6851012", "0.6851012", "0.6851012", "0.6851012", "0.6851012", "0.6851012", "0.6851012", "0.6851012", "0.6851012", "0.6851012", "0.6851012", "0.6851012", "0.6809366", "0.68000865", "0.68000865", "0.68000865", "0.68000865", "0.68000865", "0.68000865", "0.68000865", "0.6793597" ]
0.0
-1
(For IE <=9) Removes the event listeners from the currentlytracked element, if any exists.
function stopWatchingForValueChange() { if (!activeElement) { return; } activeElement.detachEvent('onpropertychange', handlePropertyChange); activeElement = null; activeElementInst = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_removeEventListeners() {\n this.currentEventListeners.forEach(listener => {\n this.domElement.removeEventListener(listener.event, listener.callBack);\n });\n this.currentEventListeners = null;\n }", "function removeListeners(useCapturing) {\r\r\n // get all div in list\r\r\n var divList = document.getElementsByTagName('div');\r\r\n // set event to each div\r\r\n for(var i = 0, len = divList.length; i < len; i++) {\r\r\n var element = divList[i];\r\r\n eventUtility.removeEvent(element, \"click\", markDiv, useCapturing);\r\r\n }\r\r\n}", "function removeEventListeners(){\n _.forEach(unlistenCallbacks, function(unlisten){\n unlisten();\n });\n unlistenCallbacks = [];\n }", "function removeListeners() {\n\t\t\t$element.unbind(START_EV, touchStart);\n\t\t\t$element.unbind(CANCEL_EV, touchCancel);\n\t\t\t$element.unbind(MOVE_EV, touchMove);\n\t\t\t$element.unbind(END_EV, touchEnd);\n\t\t\t\n\t\t\t//we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n\t\t\tif(LEAVE_EV) { \n\t\t\t\t$element.unbind(LEAVE_EV, touchLeave);\n\t\t\t}\n\t\t\t\n\t\t\tsetTouchInProgress(false);\n\t\t}", "function removeListeners() {\n\t\t\t$element.unbind(START_EV, touchStart);\n\t\t\t$element.unbind(CANCEL_EV, touchCancel);\n\t\t\t$element.unbind(MOVE_EV, touchMove);\n\t\t\t$element.unbind(END_EV, touchEnd);\n\t\t\t\n\t\t\t//we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n\t\t\tif(LEAVE_EV) { \n\t\t\t\t$element.unbind(LEAVE_EV, touchLeave);\n\t\t\t}\n\t\t\t\n\t\t\tsetTouchInProgress(false);\n\t\t}", "function removeListeners() {\n\t\t\t$element.unbind(START_EV, touchStart);\n\t\t\t$element.unbind(CANCEL_EV, touchCancel);\n\t\t\t$element.unbind(MOVE_EV, touchMove);\n\t\t\t$element.unbind(END_EV, touchEnd);\n\n\t\t\t//we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n\t\t\tif(LEAVE_EV) {\n\t\t\t\t$element.unbind(LEAVE_EV, touchLeave);\n\t\t\t}\n\n\t\t\tsetTouchInProgress(false);\n\t\t}", "function removeListeners() {\n $element.unbind(START_EV, touchStart);\n $element.unbind(CANCEL_EV, touchCancel);\n $element.unbind(MOVE_EV, touchMove);\n $element.unbind(END_EV, touchEnd);\n \n //we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n if(LEAVE_EV) { \n $element.unbind(LEAVE_EV, touchLeave);\n }\n \n setTouchInProgress(false);\n }", "removeAllEventListeners() {\n this.eventListeners.forEach(({ target, type, boundListener }) => {\n this.log(`Removing \"${type}\" eventlistener`, target);\n target.removeEventListener(type, boundListener);\n });\n this.eventListeners.length = 0;\n }", "removeAllEventListeners() {\n this.eventListeners.forEach(({target, type, boundListener}) => {\n this.log(`Removing \"${type}\" eventlistener`, target);\n target.removeEventListener(type, boundListener);\n });\n this.eventListeners.length = 0;\n }", "function removeListeners() {\n $element.unbind(START_EV, touchStart);\n $element.unbind(CANCEL_EV, touchCancel);\n $element.unbind(MOVE_EV, touchMove);\n $element.unbind(END_EV, touchEnd);\n\n //we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n if (LEAVE_EV) {\n $element.unbind(LEAVE_EV, touchLeave);\n }\n\n setTouchInProgress(false);\n }", "function detachEvents() {\n if (browser.addEventListener) {\n // remove current event listeners\n element.removeEventListener('touchstart', events, browser.passiveEvents ? { passive: true } : false);\n element.removeEventListener('mousedown', events, false);\n element.removeEventListener('webkitTransitionEnd', events, false);\n element.removeEventListener('msTransitionEnd', events, false);\n element.removeEventListener('oTransitionEnd', events, false);\n element.removeEventListener('otransitionend', events, false);\n element.removeEventListener('transitionend', events, false);\n root.removeEventListener('resize', events, false);\n } else {\n root.onresize = null;\n }\n }", "removeEventListeners(){\n\t\tif(!this.document) {\n\t\t\treturn;\n\t\t}\n\t\tDOM_EVENTS.forEach(function(eventName){\n\t\t\tthis.document.removeEventListener(eventName, this._triggerEvent, { passive: true });\n\t\t}, this);\n\t\tthis._triggerEvent = undefined;\n\t}", "function removeAddedEvents() {\n // remove added native events\n nativeEvents.forEach(function (_ref) {\n var key = _ref.key,\n listener = _ref.listener;\n element.removeEventListener(key, listener);\n });\n nativeEvents = [];\n }", "removeEventListeners() {\n\t\twindow.removeEventListener('resize', this.bindResize);\n\t\tthis.domElement.removeEventListener('click', this.bindClick);\n\t\tTweenMax.ticker.removeEventListener('tick', this.bindRender);\n\t\tEmitter.off('LOADING_COMPLETE', this.bindEnter);\n\t\twindow.removeEventListener('mousemove', this.boundMouseMove);\n\t}", "detachFromDOM() {\n\t\tthis.trackNode.removeEventListener('click', this.onTrackClick);\n\t\tthis.noValueNode.removeEventListener('click', this.onNoValueNodeClick);\n\n\t\tthis.handleNode.removeEventListener('mousedown', this.onHandleMouseDown);\n\t\tdocument.removeEventListener('mousemove', this.onDocumentMouseMove);\n\t\tdocument.removeEventListener('mouseup', this.onDocumentMouseUp);\n\n\t\tthis.handleNode.removeEventListener('touchstart', this.onHandleTouchStart);\n\t\tdocument.removeEventListener('touchmove', this.onDocumentTouchMove);\n\t\tdocument.removeEventListener('touchend', this.onDocumentTouchEnd);\n\n\t\tthis.handleNode.removeEventListener('keydown', this.onHandleKeyPress);\n\t}", "_removeListeners() {\n try {\n WINDOW$1.document.removeEventListener('visibilitychange', this._handleVisibilityChange);\n\n WINDOW$1.removeEventListener('blur', this._handleWindowBlur);\n WINDOW$1.removeEventListener('focus', this._handleWindowFocus);\n\n restoreRecordDroppedEvent();\n\n if (this._performanceObserver) {\n this._performanceObserver.disconnect();\n this._performanceObserver = null;\n }\n } catch (err) {\n this._handleException(err);\n }\n }", "_removeListeners() {\n document.removeEventListener('click', this._handleWindowClick);\n window.removeEventListener('resize', this._handleResize);\n this.el.removeEventListener('keydown', this._handleKeyDown);\n document.removeEventListener('blur', this._handleBlur, true);\n document.removeEventListener('focus', this._handleFocus, true);\n document.removeEventListener('spark.visible-children', this._handleVisibleChildren, true);\n }", "_removeEventListeners() {\n this.el.removeEventListener('click', this._onClickBound);\n this.el.removeEventListener('keydown', this._onKeydownBound);\n }", "function removeListeners() {\n $(\"#controls\").off(\"click\");\n $(\"#sequence\").off(\"click\");\n}", "removeEventListeners() {\n this.elementListener.removeEventListener(\"mouseenter\", this.onMouseEnterBind);\n this.elementListener.removeEventListener(\"mouseleave\", this.onMouseLeaveBind);\n this.elementListener.removeEventListener(\"mousemove\", this.onMouseMoveBind);\n\n if (this.gyroscope) {\n window.removeEventListener(\"deviceorientation\", this.onDeviceOrientationBind);\n }\n\n if (this.glare || this.fullPageListening) {\n window.removeEventListener(\"resize\", this.onWindowResizeBind);\n }\n }", "function xRemoveEventListener(e,eT,eL,cap)\r\n{\r\n if(!(e=xGetElementById(e)))return;\r\n eT=eT.toLowerCase();\r\n if(e.removeEventListener)e.removeEventListener(eT,eL,cap||false);\r\n else if(e.detachEvent)e.detachEvent('on'+eT,eL);\r\n else e['on'+eT]=null;\r\n}", "_removeTriggerEvents() {\n if (this._triggerElement) {\n pointerDownEvents.forEach((type) => {\n this._triggerElement.removeEventListener(type, this, passiveEventOptions);\n });\n if (this._pointerUpEventsRegistered) {\n pointerUpEvents.forEach((type) => {\n this._triggerElement.removeEventListener(type, this, passiveEventOptions);\n });\n }\n }\n }", "_removeTriggerEvents() {\n if (this._triggerElement) {\n pointerDownEvents.forEach((type) => {\n this._triggerElement.removeEventListener(type, this, passiveEventOptions);\n });\n if (this._pointerUpEventsRegistered) {\n pointerUpEvents.forEach((type) => {\n this._triggerElement.removeEventListener(type, this, passiveEventOptions);\n });\n }\n }\n }", "_removeTriggerEvents() {\n if (this._triggerElement) {\n pointerDownEvents.forEach((type) => {\n this._triggerElement.removeEventListener(type, this, passiveEventOptions);\n });\n if (this._pointerUpEventsRegistered) {\n pointerUpEvents.forEach((type) => {\n this._triggerElement.removeEventListener(type, this, passiveEventOptions);\n });\n }\n }\n }", "_removeEventListeners() {\n\n this.el.removeEventListener('click', this._onClickBound);\n window.removeEventListener('scroll', this._onScrollBound);\n window.removeEventListener('orientationchange', this._onScrollBound);\n document.removeEventListener('spark.visible-children', this._onVisibleBound, true);\n\n if (canObserve)\n this._removeMutationObserver();\n else\n window.removeEventListener('resize', this._onResizeBound);\n }", "detachListeners () {\n if (this.listenersAttached) {\n window.removeEventListener('resize', this.handleWindowResize)\n window.removeEventListener('mouseup', this.handleMouseUp)\n window.removeEventListener('touchend', this.handleTouchEnd)\n window.removeEventListener('touchcancel', this.handleTouchEnd)\n window.removeEventListener('pointerdown', this.handlePointerEvent)\n window.removeEventListener('pointermove', this.handlePointerEvent)\n window.removeEventListener('pointerup', this.handlePointerEvent)\n window.removeEventListener('pointercancel', this.handlePointerEvent)\n this.listenersAttached = false\n }\n }", "removeEvents()\n {\n if (!this.interactionDOMElement)\n {\n return;\n }\n\n ticker.shared.remove(this.update);\n\n if (window.navigator.msPointerEnabled)\n {\n this.interactionDOMElement.style['-ms-content-zooming'] = '';\n this.interactionDOMElement.style['-ms-touch-action'] = '';\n }\n else if (this.supportsPointerEvents)\n {\n this.interactionDOMElement.style['touch-action'] = '';\n }\n\n window.document.removeEventListener('mousemove', this.onMouseMove, true);\n this.interactionDOMElement.removeEventListener('mousedown', this.onMouseDown, true);\n this.interactionDOMElement.removeEventListener('mouseout', this.onMouseOut, true);\n this.interactionDOMElement.removeEventListener('mouseover', this.onMouseOver, true);\n window.removeEventListener('mouseup', this.onMouseUp, true);\n\n if (this.supportsTouchEvents)\n {\n this.interactionDOMElement.removeEventListener('touchstart', this.onTouchStart, true);\n this.interactionDOMElement.removeEventListener('touchend', this.onTouchEnd, true);\n this.interactionDOMElement.removeEventListener('touchmove', this.onTouchMove, true);\n }\n\n if (this.supportsPointerEvents)\n {\n window.document.removeEventListener('pointermove', this.onPointerMove, true);\n this.interactionDOMElement.removeEventListener('pointerdown', this.onPointerDown, true);\n this.interactionDOMElement.removeEventListener('pointerout', this.onPointerOut, true);\n this.interactionDOMElement.removeEventListener('pointerover', this.onPointerOver, true);\n window.removeEventListener('pointerup', this.onPointerUp, true);\n }\n else\n {\n /**\n * If pointer events aren't available on a device, this will turn either the touch or\n * mouse events into pointer events. This allows a developer to just listen for emitted\n * pointer events on interactive sprites\n */\n if (this.normalizeTouchEvents)\n {\n this.interactionDOMElement.removeEventListener('touchstart', this.onPointerDown, true);\n this.interactionDOMElement.removeEventListener('touchend', this.onPointerUp, true);\n this.interactionDOMElement.removeEventListener('touchmove', this.onPointerMove, true);\n }\n\n if (this.normalizeMouseEvents)\n {\n window.document.removeEventListener('mousemove', this.onPointerMove, true);\n this.interactionDOMElement.removeEventListener('mousedown', this.onPointerDown, true);\n this.interactionDOMElement.removeEventListener('mouseout', this.onPointerOut, true);\n window.removeEventListener('mouseup', this.onPointerUp, true);\n }\n }\n\n this.interactionDOMElement = null;\n\n this.eventsAdded = false;\n }", "_removeEventListeners() {\n\n if (this._isNative) {\n this.selectEl.removeEventListener('change', this._onInputBound);\n }\n else {\n this.el.removeEventListener('change', this._onInputBound, true);\n }\n }", "function xRemoveEventListener(e,eT,eL,cap)\n{\n if(!(e=xGetElementById(e)))return;\n eT=eT.toLowerCase();\n if(e.removeEventListener)e.removeEventListener(eT,eL,cap||false);\n else if(e.detachEvent)e.detachEvent('on'+eT,eL);\n else e['on'+eT]=null;\n}", "removeEventListeners() {\r\n this.elementListener.removeEventListener(\"mouseenter\", this.onMouseEnterBind);\r\n this.elementListener.removeEventListener(\"mouseleave\", this.onMouseLeaveBind);\r\n this.elementListener.removeEventListener(\"mousemove\", this.onMouseMoveBind);\r\n \r\n if (this.gyroscope) {\r\n window.removeEventListener(\"deviceorientation\", this.onDeviceOrientationBind);\r\n }\r\n \r\n if (this.glare || this.fullPageListening) {\r\n window.removeEventListener(\"resize\", this.onWindowResizeBind);\r\n }\r\n }", "function xRemoveEventListener2(e,eT,eL,cap)\r\n{\r\n if(!(e=xGetElementById(e))) return;\r\n eT=eT.toLowerCase();\r\n if(e==window) {\r\n if(eT=='resize' && e.xREL) {e.xREL=null; return;}\r\n if(eT=='scroll' && e.xSEL) {e.xSEL=null; return;}\r\n }\r\n if(e.removeEventListener) e.removeEventListener(eT,eL,cap||false);\r\n else if(e.detachEvent) e.detachEvent('on'+eT,eL);\r\n else e['on'+eT]=null;\r\n}", "function removeEventListeners() {\n\n eventsAreBound = false;\n\n document.removeEventListener('keydown', onDocumentKeyDown, false);\n window.removeEventListener('hashchange', onWindowHashChange, false);\n window.removeEventListener('resize', onWindowResize, false);\n\n dom.wrapper.removeEventListener('touchstart', onTouchStart, false);\n dom.wrapper.removeEventListener('touchmove', onTouchMove, false);\n dom.wrapper.removeEventListener('touchend', onTouchEnd, false);\n\n if (window.navigator.msPointerEnabled) {\n dom.wrapper.removeEventListener('MSPointerDown', onPointerDown, false);\n dom.wrapper.removeEventListener('MSPointerMove', onPointerMove, false);\n dom.wrapper.removeEventListener('MSPointerUp', onPointerUp, false);\n }\n\n if (config.progress && dom.progress) {\n dom.progress.removeEventListener('click', onProgressClicked, false);\n }\n\n if (config.controls && dom.controls) {\n ['touchstart', 'click'].forEach(function (eventName) {\n dom.controlsLeft.forEach(function (el) {\n el.removeEventListener(eventName, onNavigateLeftClicked, false);\n });\n dom.controlsRight.forEach(function (el) {\n el.removeEventListener(eventName, onNavigateRightClicked, false);\n });\n dom.controlsUp.forEach(function (el) {\n el.removeEventListener(eventName, onNavigateUpClicked, false);\n });\n dom.controlsDown.forEach(function (el) {\n el.removeEventListener(eventName, onNavigateDownClicked, false);\n });\n dom.controlsPrev.forEach(function (el) {\n el.removeEventListener(eventName, onNavigatePrevClicked, false);\n });\n dom.controlsNext.forEach(function (el) {\n el.removeEventListener(eventName, onNavigateNextClicked, false);\n });\n });\n }\n\n }", "removeListeners() {}", "removeListeners() {}", "removeListeners() {}", "function detatchElementEvents() {\n var element = this.element;\n\n if (element.nodeName === 'FORM') {\n element.removeEventListener('submit', this.submitAjaxHandler);\n }\n\n switch (element.getAttribute('data-ajaxable-trigger-type')) {\n case 'timeout':\n clearTimeout(this.requestTimerId);\n break;\n\n case 'interval':\n clearTimeout(this.requestIntervalId);\n break;\n\n case 'click':\n element.removeEventListener('click', this.clickAjaxHandler);\n break;\n\n case 'hover':\n element.removeEventListener('click', this.hoverAjaxHandler);\n break;\n\n default:\n break;\n }\n}", "removeAllListeners() {\n const listeners = this.eventListeners;\n let i, thisObj;\n\n for (const event in listeners) {\n const bucket = listeners[event]; // We iterate backwards since we call removeListener which will splice out of\n // this array as we go...\n\n for (i = bucket.length; i-- > 0;)\n /* empty */\n {\n const cfg = bucket[i];\n this.removeListener(event, cfg);\n thisObj = cfg.thisObj;\n\n if (thisObj && thisObj.untrackDetachers) {\n thisObj.untrackDetachers(this);\n }\n }\n }\n }", "removeAllListeners() {\n\t\tfor (let i = 0; i < this.eventHandles_.length; i++) {\n\t\t\tthis.eventHandles_[i].removeListener();\n\t\t}\n\n\t\tthis.eventHandles_ = [];\n\t}", "undelegateEvents() {\n this.delegatedEventListeners.forEach(({ type, listener }) => {\n this.el.removeEventListener(type, listener);\n });\n\n this.delegatedEventListeners = [];\n }", "unWireEvent() {\n this.viewerContainer.removeEventListener('scroll', this.scrollHandler);\n this.viewerContainer.removeEventListener('mousedown', this.onMouseDownInternal);\n this.viewerContainer.removeEventListener('mousemove', this.onMouseMoveInternal);\n if (!Browser.isDevice) {\n this.editableDiv.removeEventListener('keypress', this.onKeyPressInternal);\n if (Browser.info.name === 'chrome') {\n this.editableDiv.removeEventListener('textInput', this.onTextInput);\n }\n }\n else {\n this.editableDiv.removeEventListener('input', this.onTextInputInternal);\n }\n this.editableDiv.removeEventListener('paste', this.onPaste);\n this.viewerContainer.removeEventListener('contextmenu', this.onContextMenu);\n this.editableDiv.removeEventListener('blur', this.onFocusOut);\n this.editableDiv.removeEventListener('keydown', this.onKeyDownInternal);\n this.editableDiv.removeEventListener('compositionstart', this.compositionStart);\n this.editableDiv.removeEventListener('compositionupdate', this.compositionUpdated);\n this.editableDiv.removeEventListener('compositionend', this.compositionEnd);\n this.viewerContainer.removeEventListener('mouseup', this.onMouseUpInternal);\n if (!isNullOrUndefined(this.iframe)) {\n this.iframe.removeEventListener('load', this.onIframeLoad);\n }\n this.viewerContainer.removeEventListener('dblclick', this.onDoubleTap);\n window.removeEventListener('resize', this.onWindowResize);\n window.removeEventListener('keyup', this.onKeyUpInternal);\n window.removeEventListener('mouseup', this.onImageResizer);\n window.removeEventListener('touchend', this.onImageResizer);\n }", "function removeListeners() {\n\t\t$(document).off(EVENT_NAME_KEYPRESS);\n\t\t$(document).off(EVENT_NAME_KEYUP);\n\t}", "removeAllEventListeners () {\n this.eventListeners = [];\n }", "detach() {\n for (const container of this.containers) {\n container.removeEventListener('webkitmouseforcewillbegin', this[onMouseForceWillBegin], false);\n container.removeEventListener('webkitmouseforcedown', this[onMouseForceDown], false);\n container.removeEventListener('mousedown', this[onMouseDown], true);\n container.removeEventListener('webkitmouseforcechanged', this[onMouseForceChange], false);\n }\n\n document.removeEventListener('mousemove', this[onMouseMove]);\n document.removeEventListener('mouseup', this[onMouseUp]);\n }", "function dettachEvents() {\n // Remove custom events from the window\n window.removeEventListener(\"touch\", handleInteruption, false);\n window.removeEventListener(\"mousewheel\", handleInteruption, false);\n window.removeEventListener(\"mousedown\", handleInteruption, false);\n}", "function clearListener(elementId) {\n\t\tvar element = document.getElementById(elementId);\n\t\tif (element) {\n\t\t\telement.replaceWith(element.cloneNode(true));\n\t\t}\n\t}", "removeEventListeners() {\n // Empty in base class.\n }", "function clearEvents() {\n\t\t\tvar ident;\n\t\t\tfor (ident in listenersByEventId) {\n\t\t\t\tr.removeListener(ident);\n\t\t\t}\n\t\t}", "_removeEventListeners() {\n\n window.removeEventListener('resize', this._onResizeBound);\n window.removeEventListener('orientationchange', this._onResizeBound);\n\n this.tabListEl.removeEventListener('click', this._onTabListClickBound);\n\n this.tabListEl.removeEventListener('touchstart', this._onTouchStartBound);\n this.tabListEl.removeEventListener('mousedown', this._onMouseDownBound);\n this.tabListEl.removeEventListener('mousewheel', this._onScrollBound);\n this.tabListEl.removeEventListener('DOMMouseScroll', this._onScrollBound);\n\n this.tabListEl.removeEventListener('focus', this._onFocusBound);\n this.tabListEl.removeEventListener('blur', this._onBlurBound);\n\n if (this.leftEl) {\n this.leftEl.removeEventListener('click', this._onLeftClickBound);\n }\n\n if (this.rightEl) {\n this.rightEl.removeEventListener('click', this._onRightClickBound);\n }\n }", "_removeTrackListeners() {\n var interactionRects = Px.d3.selectAll(Polymer.dom(this.$$('#sliderSVG')).querySelectorAll('.sliderTrack'));\n\n interactionRects.on('click', null);\n }", "_clearListeners() {\n for (const listener of this._listeners) {\n listener.remove();\n }\n this._listeners = [];\n }", "_clearListeners() {\n for (let listener of this._listeners) {\n listener.remove();\n }\n this._listeners = [];\n }", "detach() {\n this.attached.removeEventListener('mousedown', this.event);\n this.attached.removeEventListener('mouseup', this.event);\n this.attached.removeEventListener('click', this.event);\n this.attached.removeEventListener('dblclick', this.event);\n \n this.attached = null;\n }", "function removeListeners() {\r\n gameOverModal.btn.removeEventListener(\"click\", backToMenu);\r\n }", "__detatchListeners() {\n if (qx.bom.History.SUPPORTS_HASH_CHANGE_EVENT) {\n qx.bom.Event.removeNativeListener(\n window,\n \"hashchange\",\n this.__checkOnHashChange\n );\n } else {\n qx.event.Idle.getInstance().removeListener(\n \"interval\",\n this.__onHashChange,\n this\n );\n }\n }", "_stopObserver() {\n for (var i = 0; i < this.__eventNames.length; i++) {\n qx.bom.Event.removeNativeListener(\n this.__defaultTarget,\n this.__eventNames[i],\n this.__wrappedListener\n );\n }\n }", "function remove_eventhandlers(curr) {\n\t\n\t\t curr.off('mousemove', function (ev) {\n\t\t\t handle_mousemove_on_content(ev);\n\t\t });\n\n\t\t curr.off('click', function (ev) {\n\t\t handle_mouseclick_on_content(ev);\n\t\t });\t\n\t\n\t\t curr.off('mouseleave', function (ev) {\n\t\t handle_mouseleave_from_content(ev);\n\t\t });\n\t\t\n\t\t curr.off('mouseenter', function (ev) {\n\t\t \thandle_mouseenter_on_content (ev);\n\t\t });\n\t}", "removeListeners() {\n var descriptor = this.getDescriptor();\n if (descriptor) {\n descriptor.unlisten(DescriptorEventType.ACTIVATED, this.onActivated, false, this);\n descriptor.unlisten(DescriptorEventType.DEACTIVATED, this.onDeactivated, false, this);\n descriptor.unlisten(DescriptorEventType.DEACTIVATED, this.onActivationError, false, this);\n }\n }", "function removeAllListeners(container,opt) {\n\t\t\tcontainer.children().each(function() {\n\t\t\t try{ jQuery(this).die('click'); } catch(e) {}\n\t\t\t try{ jQuery(this).die('mouseenter');} catch(e) {}\n\t\t\t try{ jQuery(this).die('mouseleave');} catch(e) {}\n\t\t\t try{ jQuery(this).unbind('hover');} catch(e) {}\n\t\t\t})\n\t\t\ttry{ container.die('click','mouseenter','mouseleave');} catch(e) {}\n\t\t\tclearInterval(opt.cdint);\n\t\t\tcontainer=null;\n\n\n\n\t\t}", "function removeAllListeners(container,opt) {\n\t\t\tcontainer.children().each(function() {\n\t\t\t try{ jQuery(this).die('click'); } catch(e) {}\n\t\t\t try{ jQuery(this).die('mouseenter');} catch(e) {}\n\t\t\t try{ jQuery(this).die('mouseleave');} catch(e) {}\n\t\t\t try{ jQuery(this).unbind('hover');} catch(e) {}\n\t\t\t})\n\t\t\ttry{ container.die('click','mouseenter','mouseleave');} catch(e) {}\n\t\t\tclearInterval(opt.cdint);\n\t\t\tcontainer=null;\n\n\n\n\t\t}", "function removeAllListeners(container,opt) {\n\t\t\tcontainer.children().each(function() {\n\t\t\t try{ jQuery(this).die('click'); } catch(e) {}\n\t\t\t try{ jQuery(this).die('mouseenter');} catch(e) {}\n\t\t\t try{ jQuery(this).die('mouseleave');} catch(e) {}\n\t\t\t try{ jQuery(this).unbind('hover');} catch(e) {}\n\t\t\t})\n\t\t\ttry{ container.die('click','mouseenter','mouseleave');} catch(e) {}\n\t\t\tclearInterval(opt.cdint);\n\t\t\tcontainer=null;\n\n\n\n\t\t}", "function removeAllListeners(container,opt) {\n\t\t\tcontainer.children().each(function() {\n\t\t\t try{ jQuery(this).die('click'); } catch(e) {}\n\t\t\t try{ jQuery(this).die('mouseenter');} catch(e) {}\n\t\t\t try{ jQuery(this).die('mouseleave');} catch(e) {}\n\t\t\t try{ jQuery(this).unbind('hover');} catch(e) {}\n\t\t\t})\n\t\t\ttry{ container.die('click','mouseenter','mouseleave');} catch(e) {}\n\t\t\tclearInterval(opt.cdint);\n\t\t\tcontainer=null;\n\n\n\n\t\t}", "function removeListeners() {\r\n modal.yes.removeEventListener(\"click\", backToMenu);\r\n modal.no.removeEventListener(\"click\", backToGame);\r\n }", "function removeAllListeners(container, opt) {\n container.children().each(function() {\n try {\n jQuery(this).die('click');\n } catch (e) {\n }\n try {\n jQuery(this).die('mouseenter');\n } catch (e) {\n }\n try {\n jQuery(this).die('mouseleave');\n } catch (e) {\n }\n try {\n jQuery(this).unbind('hover');\n } catch (e) {\n }\n })\n try {\n container.die('click', 'mouseenter', 'mouseleave');\n } catch (e) {\n }\n clearInterval(opt.cdint);\n container = null;\n\n\n\n }", "function cleanupInteractiveMouseListeners() {\n document.body.removeEventListener('mouseleave', scheduleHide);\n document.removeEventListener('mousemove', debouncedOnMouseMove);\n mouseMoveListeners = mouseMoveListeners.filter(function (listener) {\n return listener !== debouncedOnMouseMove;\n });\n }", "_removeMouseDownListeners() {\n if (this._screenElement.ownerDocument) {\n this._screenElement.ownerDocument.removeEventListener('mousemove', this._mouseMoveListener);\n this._screenElement.ownerDocument.removeEventListener('mouseup', this._mouseUpListener);\n }\n clearInterval(this._dragScrollIntervalTimer);\n this._dragScrollIntervalTimer = undefined;\n }", "removeListener() {\n document.getElementById('banner-picture').removeEventListener('mousedown', this.mouseDownHandler);\n document.removeEventListener('mouseup', this.mouseUpHandler);\n document.getElementById('banner-picture').removeEventListener('mouseenter', this.mouseEnterHandler);\n document.getElementById('banner-picture').removeEventListener('mousemove', this.mouseMoveHandler);\n }", "function cleanupInteractiveMouseListeners() {\n document.body.removeEventListener('mouseleave', scheduleHide);\n document.removeEventListener('mousemove', debouncedOnMouseMove);\n mouseMoveListeners = mouseMoveListeners.filter(function (listener) {\n return listener !== debouncedOnMouseMove;\n });\n }", "_removeEvents () {\n this.container.classList.remove(\"tooltiped\");\n\n this.container.removeEventListener(\"mouseenter\", this._mouseOver);\n this.container.removeEventListener(\"mousemove\", this._mouseMove);\n this.container.removeEventListener(\"mouseleave\", this._mouseOut);\n }", "removeAllListeners() {\n this.listeners = {};\n }", "removeEventListeners() {\n this.leafletMap.removeEventListener('click', (event) => {\n this.clickLeafletMap(event);\n })\n this.leafletMap.removeEventListener('mousemove', (event) => {\n this.onMouseMove(event);\n });\n this.leafletMap.removeEventListener('keydown', (event) => {\n this.onKeyPress(event.originalEvent);\n });\n this.leafletMap.removeEventListener('mouseover', (event) => {\n this.onMouseOverLeaflet(event)\n });\n this.leafletMap.removeEventListener('mouseout', (event) => {\n this.onMouseOutLeaflet(event)\n });\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n window.cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "detachFromDOM() {\n this._trackNode.off('click', this._onTrackClick);\n this._noValueNode.off('click', this._onNoValueNodeClick);\n\n this._handleNode.off('mousedown', this._onHandleMouseDown);\n $(document).off('mousemove', this._onDocumentMouseMove);\n $(document).off('mouseup', this._onDocumentMouseUp);\n\n this._handleNode.off('touchstart', this._onHandleTouchStart);\n $(document).off('touchmove', this._onDocumentTouchMove);\n $(document).off('touchend', this._onDocumentTouchEnd);\n\n this._handleNode.off('keydown', this._onHandleKeyPress);\n }", "function disableEventListeners() {\n\t if (this.state.eventsEnabled) {\n\t cancelAnimationFrame(this.scheduleUpdate);\n\t this.state = removeEventListeners(this.reference, this.state);\n\t }\n\t}", "function disableEventListeners() {\n\t if (this.state.eventsEnabled) {\n\t cancelAnimationFrame(this.scheduleUpdate);\n\t this.state = removeEventListeners(this.reference, this.state);\n\t }\n\t}", "function disableEventListeners() {\n\t if (this.state.eventsEnabled) {\n\t cancelAnimationFrame(this.scheduleUpdate);\n\t this.state = removeEventListeners(this.reference, this.state);\n\t }\n\t}", "_removeEventListeners() {\n window.removeEventListener('deviceorientation', this._onOrientationFound);\n\n this._map\n .off('locationfound', this._onLocationFound, this)\n .off('locationerror', this._onLocationError, this)\n .off('dragstart', this._onDragStart, this)\n .off('moveend', this._onMoveEnd, this);\n }", "disconnectedCallback() {\n this.removeEventListener(\"mousedown\", this.tapEventOn);\n this.removeEventListener(\"mouseover\", this.tapEventOn);\n this.removeEventListener(\"mouseout\", this.tapEventOff);\n this.$.button.removeEventListener(\"focused-changed\", this.focusToggle);\n super.disconnectedCallback();\n }", "function removeRedandYellowListeners(){\n\t\tfor (var i = $boxes.length -1; i>=0;i--){\n\t\t\tvar $box = $($boxes[i]);\n\t\t\t$box.off('click', addRedorYellow);\n\t\t}\n\t}", "_onMouseUp () {\n document.removeEventListener(\"mousemove\", this._onMouseMove);\n document.removeEventListener(\"touchmove\", this._onMouseMove);\n\n document.removeEventListener(\"mouseup\", this._onMouseUp);\n document.removeEventListener(\"touchend\", this._onMouseUp);\n }", "removeAllListeners() {\n const me = this,\n listeners = me.eventListeners || (me.eventListeners = {});\n\n for (let event in listeners) {\n listeners[event].forEach((cfg) => me.removeListener(event, cfg));\n }\n }", "function removeButtonListeners() {\n if (buttons.fw) {\n buttons.fw.removeEventListener('click', handleForwardButtonClick);\n }\n if (buttons.bk) {\n buttons.bk.removeEventListener('click', handleBackwardButtonClick);\n }\n }", "function removeEventListener(handle) {\n GEvent.removeListener(handle);\n }", "function off(event_name) { \n $.forEach(this.elements, function(element){\n element.removeEventListener(event_name);\n })\n }", "function _removeEventListeners(target) {\n\t for (var i in this._eventOutput.listeners) {\n\t target.removeEventListener(i, this.eventForwarder);\n\t }\n\t }", "removeSelectionListeners(){\n\t\tif(!this.document) {\n\t\t\treturn;\n\t\t}\n\t\tthis.document.removeEventListener(\"selectionchange\", this._onSelectionChange, { passive: true });\n\t\tthis._onSelectionChange = undefined;\n\t}", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }", "function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n }" ]
[ "0.75090146", "0.71331996", "0.71023005", "0.70842665", "0.70842665", "0.70741224", "0.70538986", "0.7043368", "0.703842", "0.701261", "0.70032084", "0.69829243", "0.6975078", "0.6940694", "0.6921042", "0.69165057", "0.69119114", "0.6898251", "0.68628937", "0.6861496", "0.6860644", "0.67963654", "0.67963654", "0.67963654", "0.67951226", "0.67941624", "0.6784645", "0.6771774", "0.6750359", "0.67422265", "0.6731512", "0.672283", "0.6714791", "0.6714791", "0.6714791", "0.67046285", "0.66871923", "0.6672961", "0.6672323", "0.6658945", "0.664173", "0.6619935", "0.65946877", "0.6577943", "0.6575904", "0.65741783", "0.6548623", "0.65375733", "0.6536071", "0.65354997", "0.6515443", "0.64813495", "0.6478453", "0.64585984", "0.64422286", "0.6440932", "0.64138526", "0.6401503", "0.6401503", "0.6401503", "0.6401503", "0.639734", "0.63910896", "0.6389437", "0.63828546", "0.6378586", "0.63688564", "0.63447946", "0.6334739", "0.6333092", "0.6331311", "0.6323916", "0.63141584", "0.63141584", "0.63141584", "0.63012016", "0.6297008", "0.6291391", "0.6288768", "0.62772423", "0.6269172", "0.6267154", "0.6265737", "0.62532705", "0.6246953", "0.6243821", "0.6243821", "0.6243821", "0.6243821", "0.6243821", "0.6243821", "0.6243821", "0.6243821", "0.6243821", "0.6243821", "0.6243821", "0.6243821", "0.6243821", "0.6243821", "0.6243821", "0.6243821" ]
0.0
-1
(For IE <=9) Handles a propertychange event, sending a `change` event if the value of the active element has changed.
function handlePropertyChange(nativeEvent) { if (nativeEvent.propertyName !== 'value') { return; } if (getInstIfValueChanged(activeElementInst)) { manualDispatchChangeEvent(nativeEvent); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function changeEvent() {\n var value_sub = properties.value;\n trigger_param_list.push(value_sub);\n // 'seek' event is like a forced-change event\n $pebble_slider_object.triggerHandler('seek', trigger_param_list);\n if (prev_change_value !== value_sub) {\n $pebble_slider_object.triggerHandler('change', trigger_param_list);\n prev_change_value = value_sub;\n }\n trigger_param_list.length = 0;\n }", "function startWatchingForValueChange(target,targetID){activeElement=target;activeElementID=targetID;activeElementValue=target.value;activeElementValueProp=Object.getOwnPropertyDescriptor(target.constructor.prototype,'value');Object.defineProperty(activeElement,'value',newValueProp);activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetID){activeElement = target;activeElementID = targetID;activeElementValue = target.value;activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype,'value');Object.defineProperty(activeElement,'value',newValueProp);activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElementValue=target.value;activeElementValueProp=Object.getOwnPropertyDescriptor(target.constructor.prototype,'value');// Not guarded in a canDefineProperty check: IE8 supports defineProperty only\n// on DOM elements\nObject.defineProperty(activeElement,'value',newValueProp);if(activeElement.attachEvent){activeElement.attachEvent('onpropertychange',handlePropertyChange);}else{activeElement.addEventListener('propertychange',handlePropertyChange,false);}}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}", "function changed(change) {\n if (change.changeType === \"property\" && change.property === property) {\n fn(change);\n }\n }", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElementValue=target.value;activeElementValueProp=Object.getOwnPropertyDescriptor(target.constructor.prototype,'value'); // Not guarded in a canDefineProperty check: IE8 supports defineProperty only\n\t// on DOM elements\n\tObject.defineProperty(activeElement,'value',newValueProp);if(activeElement.attachEvent){activeElement.attachEvent('onpropertychange',handlePropertyChange);}else {activeElement.addEventListener('propertychange',handlePropertyChange,false);}}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElementValue=target.value;activeElementValueProp=Object.getOwnPropertyDescriptor(target.constructor.prototype,'value'); // Not guarded in a canDefineProperty check: IE8 supports defineProperty only\n\t// on DOM elements\n\tObject.defineProperty(activeElement,'value',newValueProp);if(activeElement.attachEvent){activeElement.attachEvent('onpropertychange',handlePropertyChange);}else {activeElement.addEventListener('propertychange',handlePropertyChange,false);}}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName !== 'value'){return;}var value=nativeEvent.srcElement.value;if(value === activeElementValue){return;}activeElementValue = value;manualDispatchChangeEvent(nativeEvent);}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}var value=nativeEvent.srcElement.value;if(value===activeElementValue){return;}activeElementValue=value;manualDispatchChangeEvent(nativeEvent);}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}var value=nativeEvent.srcElement.value;if(value===activeElementValue){return;}activeElementValue=value;manualDispatchChangeEvent(nativeEvent);}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}var value=nativeEvent.srcElement.value;if(value===activeElementValue){return;}activeElementValue=value;manualDispatchChangeEvent(nativeEvent);}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}var value=nativeEvent.srcElement.value;if(value===activeElementValue){return;}activeElementValue=value;manualDispatchChangeEvent(nativeEvent);}", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}", "function handlePropertyChange(nativeEvent) {\n \"value\" === nativeEvent.propertyName && getInstIfValueChanged(activeElementInst) && manualDispatchChangeEvent(nativeEvent);\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst, nativeEvent)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst, nativeEvent)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst, nativeEvent)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst, nativeEvent)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst, nativeEvent)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst, nativeEvent)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst, nativeEvent)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst, nativeEvent)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst, nativeEvent)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst, nativeEvent)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst, nativeEvent)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}" ]
[ "0.7169761", "0.7169761", "0.7169761", "0.7169761", "0.7169761", "0.7169761", "0.7169761", "0.7169761", "0.7169761", "0.7169761", "0.7169761", "0.7169761", "0.6944031", "0.6840544", "0.6831867", "0.6744023", "0.6694922", "0.6694922", "0.6694922", "0.6694922", "0.6694922", "0.6694922", "0.6694922", "0.6694922", "0.6694922", "0.6694922", "0.6694922", "0.6694922", "0.6671871", "0.6662713", "0.6662713", "0.6652954", "0.66486347", "0.66486347", "0.66486347", "0.66486347", "0.6630541", "0.6627649", "0.66149527", "0.66149527", "0.66149527", "0.66149527", "0.65955096", "0.65955096", "0.65955096", "0.65955096", "0.65955096", "0.65955096", "0.65955096", "0.65955096", "0.65955096", "0.65955096", "0.65955096", "0.6581506", "0.6581506", "0.6581506", "0.6581506", "0.6581506", "0.6581506", "0.6581506", "0.6581506", "0.6581506", "0.6581506", "0.6581506", "0.6581506", "0.6581506", "0.6578844", "0.6564544", "0.65410984", "0.65410984", "0.65410984", "0.65410984", "0.65410984", "0.65410984", "0.65410984", "0.65410984", "0.65410984", "0.65410984", "0.65410984", "0.65410984", "0.65410984", "0.65410984", "0.65410984", "0.65410984", "0.65410984", "0.65410984", "0.65410984", "0.65410984", "0.65410984", "0.65410984", "0.65410984", "0.65410984", "0.65410984", "0.65410984", "0.65410984", "0.65410984", "0.65410984", "0.65410984", "0.65410984", "0.65410984", "0.65410984" ]
0.0
-1
SECTION: handle `click` event
function shouldUseClickEvent(elem) { // Use the `click` event to detect changes to checkbox and radio inputs. // This approach works across all browsers, whereas `change` does not fire // until `blur` in IE8. var nodeName = elem.nodeName; return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleClick( event ){ }", "handleClick() {}", "function handleClick(){\n console.log(\"clicked\");\n}", "function handleClick(event)\n{\n}", "click() { }", "function clickHandler(){\n console.log('I am clicked');\n}", "function clickHandler(event) {\n\tindexChangeSections(event);\n\ttabChangeSections(event);\n}", "function handleClick() {\n\t\t window.ctaClick();\n\t\t}", "function handleClick() {\n\t\t window.ctaClick();\n\t\t}", "function _click(d){\n \n }", "function click_on() {\n console.log('called click function');\n}", "function clickHandler(e) {\n // Nur bei Linksklick\n if (e.button !== 0) return;\n clickAt(e.offsetX, e.offsetY);\n }", "clickHandler(event) {\n declarativeClickHandler(this);\n }", "function clickHandler(event) {\n \tconsole.log('event');\n \ttau.openPopup(popup);\n }", "function click(el){\n \n \n}", "function handleClick (e) {\n e.preventDefault();\n console.log('clicked');\n }", "_evtClick(event) { }", "_handleClick(event) {\n this.interaction.next(event);\n event.stopPropagation();\n }", "metodoClick(){\n console.log(\"diste click\")\n }", "handleClick(){\n alert(\"hey!!\");\n }", "handleJDotterClick() {}", "click(event) {\n if (event.target === this.get('element')) {\n this.sendAction();\n }\n }", "function doClick(e) {\n options.onClick(e);\n }", "click_extra() {\r\n }", "function click() {\n\tconsole.log('click')\n}", "click() { // add click event\n app.quit();\n }", "onClick() {\n // Verifica se existe a função para processar o click e a invoca\n if(this.handleClick) {\n this.handleClick(this);\n }\n }", "function onClick(e) {\n }", "click(e) {\n\n // type==custom a hack for version_select type\n if (this.type == 'button' || this.type == 'custom') {\n var url = '/api/parameters/' + this.props.p.id + '/event';\n var eventData = {'type': 'click'};\n fetch(url, {\n method: 'post',\n credentials: 'include',\n headers: {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json',\n 'X-CSRFToken': csrfToken\n },\n body: JSON.stringify(eventData)\n }).then(response => {\n if (!response.ok) {\n store.dispatch(wfModuleStatusAction(this.props.wf_module_id, 'error', response.statusText))\n } \n });\n }\n\n if (this.type == 'checkbox') {\n this.paramChanged(e.target.checked)\n }\n }", "function handleClick(el,e) {\n\tloadURL(el.attributes.target,el.text);\n}", "clickHandler (event) {\n this.onClick ({\n node: this.node,\n target: this,\n event: event\n })\n }", "clickHandler() {\n // Activate if not active\n if (this.active === false) {\n // Button view press effect\n this.changeToActive();\n // No click 'action' for input - text is removed in visualEffectOnActivation\n }\n }", "_handleClick(e) {\n this.dispatchEvent(\n new CustomEvent(\"hax-tray-button-click\", {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: {\n eventName: this.eventName,\n index: this.index,\n value: this.eventData,\n },\n })\n );\n }", "_click(e) {\n const type = this.cel.getAttribute('data-type');\n\n this[type](e);\n }", "function __clickhandler() {\n buttonfunc(elemnode); return false;\n }", "function clickHandler() {\n console.log(\"Button 2 Pressed\");\n }", "handleClick(event, url) {\n event.preventDefault();\n this.postRequestOnClick(url);\n }", "onClick(element) {\n\t\taction(`You have clicked on element ${element.name}`).call();\n\t}", "clickHandler(evt) {\n if (evt.target.classList.contains('fa-check')) {\n gameApp.eventHandler(evt);\n }\n\n if (evt.target.classList.contains('assignment') || evt.target.parentElement.classList.contains('assignment')) {\n gameApp.activateContract(evt);\n }\n\n if (evt.target.classList.contains('loc')) {\n gameApp.addLoc();\n }\n\n if (evt.target.classList.contains('nav-button')) {\n let elem = evt.target;\n gameApp.gameView.changeMenue(elem);\n }\n }", "function clickHandler(){ // declare a function that updates the state\n elementIsClicked = true;\n isElementClicked();\n }", "function clickHandler(event){\n\t\t\tif(ignoreClick){\n\t\t\t\tignoreClick = false;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar offset = overlay.cumulativeOffset();\t\t\t\n\t\t\ttarget.fire('flotr:click', [{\n\t\t\t\tx: xaxis.min + (event.pageX - offset.left - plotOffset.left) / hozScale,\n\t\t\t\ty: yaxis.max - (event.pageY - offset.top - plotOffset.top) / vertScale\n\t\t\t}]);\n\t\t}", "function _clickHandler(ev) {\n\tvar $this = $(ev.target).closest(\".hm-container\").parent();\n\tvar $cfg = $this.data('heatmap').config;\n\n\tif ($cfg.onReady.state != loadStates.READY) return true;\n\n\t// If there's an event handler registered for clicks, invoke it,\n\t// passing an object containing all the relevant info for the event.\n\tif (typeof $cfg.onClick.val == 'function') {\n\t var $$ctx = $this.data('ctx');\n\t var mouse_pos = _mouseAbs(ev, $$ctx);\n\t var ndxs = _getIndexes(mouse_pos, $$ctx);\n\n\t return $cfg.onClick.val ( { \"profile\": (ndxs.profile == null ? 'undefined' : $$ctx.profile_metadata[ndxs.profile]), \n\t\t\t\t\t\"sample\": (ndxs.sample == null ? 'undefined' : $$ctx.sample_metadata[ndxs.sample]), \n\t\t\t\t\t\"indexes\": ndxs, \n\t\t\t\t\t\"context\": $$ctx, \n\t\t\t\t\t\"event\": ev } );\n\t}\n\treturn true;\n }", "function links_click_event(event) {\n console.log(\"works link\");\n}", "function listenForClick() {\n loopThroughGrid();\n clickTurnBtn();\n }", "function clickAssess() {\n\t$.trigger(\"clickAssess\");\n}", "onClick() {\n }", "function clicked() {\r\n // consists of animations and transitions\r\n resetClickLinks();\r\n // Click node Action and Info\r\n // only if it is defined\r\n click_node = drag_node; // defining here\r\n nodePop(click_node);\r\n loadInfo();\r\n}", "@action\n click() {\n this.args['on-click']?.();\n }", "function on_click(e) {\n cloud.on_click(e.clientX, e.clientY);\n}", "clickHandler(e) {\n // Only activate if there is a buttonHandler\n if (this.buttonHandler !== false) {\n // Activate if not active\n if (this.active === false) {\n // Button view press effect\n this.changeToActive();\n // Click action\n this.clickAction();\n }\n }\n }", "_click(event) {\n if (this.disabled) {\n event.preventDefault();\n }\n else {\n this._handleInteraction(event);\n event.stopPropagation();\n }\n }", "function handleClick(event) {\n // Get the clicked chart element:\n let activeElement = chart.getElementAtEvent(event);\n // Do nothing if the click is not on a point on the chart:\n if (!activeElement[0]) {\n return;\n }\n // Get the index number of the clicked element:\n let elementID = activeElement[0]._index;\n // Get the post ID from the taskData.xLabels object array:\n let postID = taskData.xLabels[activeElement[0]._index];\n // Go to the selected task:\n window.location.href = \"/single.html?task=\" + postID;\n }", "addHandlerClick(handler) {\n // NOTE Event delegation. Figure out which button was clicked, based on the event\n this._parentElement.addEventListener('click', function (e) {\n // Select the closest button-element to the clicked element.\n const btn = e.target.closest('.btn--inline');\n\n if (!btn) return;\n // The Controller is made and marked in the controller.js\n\n const goToPage = +btn.dataset.goto;\n\n handler(goToPage);\n });\n }", "handleClick(event) {\n const { location, isSelectable, onClick } = this.props;\n\n if (!isSelectable || event.target.closest('.c-finder-tree-leaf__btn--toggle-selection')) {\n return;\n }\n\n onClick(location);\n }", "function deal_click(){\n console.log(\"click!\");\n}", "function onClickEvent() {\n 'use strict';\n var sender = this.id;\n\n switch (sender) {\n case \"btnCreateCourse\":\n onCreateCourse();\n break;\n case \"btnModifyCourse\":\n onModifyCourse();\n break;\n case \"btnDeleteCourse\":\n onDeleteCourse();\n break;\n case \"btnRefreshCourses\":\n onRefreshCourse();\n break;\n }\n }", "clickHandler() {\n // Activate if not active\n if (this.active === 'safety') {\n // Button view press effect\n this.removeSafety();\n } else if (this.active === false) {\n // Button view press effect\n this.changeToActive();\n // Click action\n this.clickAction();\n }\n }", "function click() {\n d3_eventCancel();\n w.on(\"click.drag\", null);\n }", "onClick(e){\n console.log(\"onclick\")\n }", "function handleBtnClick(event) {\n handleEvent(event);\n}", "on_desklet_clicked(event) {\n this.retrieveEvents();\n }", "function onClick(event) {\n\t\t//console.log(event);\t\t\n\t\tvar target = event.target;\n\t\tif (target.classList.contains(\"ui-selector-indicator\")) {\n\t\t\t//console.log(\"Indicator clicked\");\n\t\t\tvar ItemClicked = event.srcElement.textContent;\n\t\t\tconsole.log(\"Item Clicked on home page was: \" + ItemClicked);\n\n\t\t\t//Handel home page click events\n\t\t\tif(ItemClicked == \"Switches\"){\n\t\t\t\ttau.changePage(\"switchesPage\");\n\t\t\t}else if(ItemClicked == \"Clear Database\"){\n\t\t\t\t//------------------------------------------Clear Database\n\t\t\t\t//This should be moved to it's own function.\n\t\t\t\tconsole.log(\"Clearing Database\");\n\t\t\t\tlocalStorage.clear();\n\t\t\t\tAccess_Token = null;\n\t\t\t\tAccess_Url = null;\n\t\t\t\tswitches_DB = null;\n\t\t\t\talert(\"Database Cleared\");\n\t\t\t\t//Maybe we should exit here?\n\t\t\t\t//------------------------------------------Clear Database\n\t\t\t}else if(ItemClicked == \"Routines\"){\n\t\t\t\ttau.changePage(\"routinesPage\");\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t}", "function handleClick() {\n $('button').click(function(event){\n emptyAbilities();\n renderAbilities(event.currentTarget.innerHTML);\n showAbilities();\n });\n }", "HAXCMSButtonClick(e) {\n // stub, the classes implementing this will actually do something\n // you always will call super.HAXCMS\n }", "function click(e) {\r\n\t\tif(!e && typeof e=='string') e=document.getElementById(e);\r\n\t\tif(!e) return;\r\n\t\tvar evObj = e.ownerDocument.createEvent('MouseEvents');\r\n\t\tevObj.initMouseEvent(\"click\",true,true,e.ownerDocument.defaultView,0,0,0,0,0,false,false,false,false,0,null);\r\n\t\te.dispatchEvent(evObj);\r\n\t}", "function click(e) {\r\n\t\tif(!e && typeof e=='string') e=document.getElementById(e);\r\n\t\tif(!e) return;\r\n\t\tvar evObj = e.ownerDocument.createEvent('MouseEvents');\r\n\t\tevObj.initMouseEvent(\"click\",true,true,e.ownerDocument.defaultView,0,0,0,0,0,false,false,false,false,0,null);\r\n\t\te.dispatchEvent(evObj);\r\n\t}", "onInternalClick(event) {\n const me = this,\n bEvent = {\n event\n };\n\n if (me.toggleable) {\n // Clicking the pressed button in a toggle group should do nothing\n if (me.toggleGroup && me.pressed) {\n return;\n }\n\n me.toggle(!me.pressed);\n }\n /**\n * User clicked button\n * @event click\n * @property {Core.widget.Button} button - Clicked button\n * @property {Event} event - DOM event\n */\n\n me.trigger('click', bEvent);\n /**\n * User performed the default action (clicked the button)\n * @event action\n * @property {Core.widget.Button} button - Clicked button\n * @property {Event} event - DOM event\n */\n // A handler may have resulted in destruction.\n\n if (!me.isDestroyed) {\n me.trigger('action', bEvent);\n } // since Widget has Events mixed in configured with 'callOnFunctions' this will also call onClick and onAction\n\n if (!this.href) {\n // stop the event since it has been handled\n event.preventDefault();\n event.stopPropagation();\n }\n }", "click(e){\r\n if ( this.url ){\r\n bbn.fn.link(this.url);\r\n }\r\n else{\r\n this.$emit('click', e);\r\n }\r\n }", "function Click() {\n}", "_addClickFunctionality(button, option){\n\t\tvar config = this;\n\t\tbutton.click(function(){\n\t\t\tconfig.clicked_button = event.target;\n\t\t\tconfig._updatePrice(config.clicked_button)\n\t\t\tconfig._sortButtonColoring(config.clicked_button);\n\t\t\tconfig._updateMagento(config.clicked_button);\n\t\t\tconfig._eraseCategories(config.clicked_button);\n\t\t\tconfig._hideCategories(config.clicked_button);\n\t\t\tconfig._decideNext(config.clicked_button, option);\n\t\t});\n\t}", "function handleClick(e) {\n sendRequest()\n }", "clicked(x, y) {}", "function do_click() {\n alert('you clicked');\n}", "function testclick(e) {\n\talert('Clicked ' + '\\'' + e.source.id + '\\'');\n}", "function cb_beforeClick(cb, pos) { }", "click(callback, bubbles=false) {\n this.self.addEventListener('click', callback, bubbles);\n }", "function handleClick (event){\n\tconsole.log(event);\n\tvar elementText = event.target.innerHTML; // the target html to var\n\tsayWhat.innerHTML = \"You clicked on the \" + elementText + \" section\"; // assign to output this\n}", "function onClick(e) {\n \t\t// console.log(this);\n\t\t}", "onParcelClick() {\n console.log('u clicked the lil parcel')\n }", "function clickEvents(){\n alert('i am clicked');\n}", "addClickHandler() {\n this.$el.find(this.settings.menuGroupTitleSelector).on('click', (e) => {\n e.preventDefault();\n e.stopPropagation();\n window.open(this.menu.find(this.settings.firstItemSelector).first().attr('href'), e.metaKey ? '_blank' : '_self');\n });\n this.toggler.on('click', (e) => {\n e.preventDefault();\n e.stopPropagation();\n this.menu.toggleClass(this.settings.visibleCssClass);\n this.setTogglerIcon(this.settings.icon.selector);\n });\n }", "_onTap(e) {}", "function clickHandler(e) {\r\n if (that.currentGameState.onClick) {\r\n that.currentGameState.onClick.call(this, that.currentGameState, e);\r\n }\r\n }", "handleClick() {\n\t\tthis.setState( { clicked: true } );\n\t\tthis.props.addProductCallback( this.props.product.id );\n\t}", "function click(e, type) {\r\nif(!e) {return;}\r\nif(typeof e=='string') e=document.getElementById(e);\r\nvar evObj = document.createEvent('MouseEvents');\r\nevObj.initMouseEvent((type||'click'),true,true,window,0,0,0,0,0,false,false,false,false,0,null);\r\ne.dispatchEvent(evObj);\r\n}", "function click(e, type) {\r\nif(!e) {return;}\r\nif(typeof e=='string') e=document.getElementById(e);\r\nvar evObj = document.createEvent('MouseEvents');\r\nevObj.initMouseEvent((type||'click'),true,true,window,0,0,0,0,0,false,false,false,false,0,null);\r\ne.dispatchEvent(evObj);\r\n}", "function click(e, type) {\r\nif(!e) {return;}\r\nif(typeof e=='string') e=document.getElementById(e);\r\nvar evObj = document.createEvent('MouseEvents');\r\nevObj.initMouseEvent((type||'click'),true,true,window,0,0,0,0,0,false,false,false,false,0,null);\r\ne.dispatchEvent(evObj);\r\n}", "function click(e, type) {\r\nif(!e) {return;}\r\nif(typeof e=='string') e=document.getElementById(e);\r\nvar evObj = document.createEvent('MouseEvents');\r\nevObj.initMouseEvent((type||'click'),true,true,window,0,0,0,0,0,false,false,false,false,0,null);\r\ne.dispatchEvent(evObj);\r\n}", "function click(e, type) {\r\nif(!e) {return;}\r\nif(typeof e=='string') e=document.getElementById(e);\r\nvar evObj = document.createEvent('MouseEvents');\r\nevObj.initMouseEvent((type||'click'),true,true,window,0,0,0,0,0,false,false,false,false,0,null);\r\ne.dispatchEvent(evObj);\r\n}", "function click(e, type) {\r\nif(!e) {return;}\r\nif(typeof e=='string') e=document.getElementById(e);\r\nvar evObj = document.createEvent('MouseEvents');\r\nevObj.initMouseEvent((type||'click'),true,true,window,0,0,0,0,0,false,false,false,false,0,null);\r\ne.dispatchEvent(evObj);\r\n}", "function handleClick(e){\n switch (e.target.classList[0]){\n // For like and delete, I've loaded up the id in two different ways for funsies.\n case \"btn-success\": \n // In this case (like), I know the API is going to return the relevant quote object on a success, which has a quoteId. \n // When I pass through the callback function (quoteObject) => addLikeById(quote.quoteId)) and call it in the second .then, the response from the fetch is passed to it as an argument.\n adapter.likeQuote(parseInt(e.target.dataset.likeId), (quoteObject) => addLikeById(quoteObject.quoteId));\n break;\n case \"btn-danger\":\n // In this case (delete), the API doesn't send back anything, so I pulled the id from the dataset from the target of the event.\n adapter.deleteQuote(e.target.dataset.deleteId, () => removeQuoteById(e.target.dataset.deleteId))\n break;\n default:\n break;\n }\n }", "function handleClick() {\n if (props.type == 'todo') {\n return finishTask(props.task, props.index)\n }\n\n else if (props.type == 'done') {\n return undoTask(props.task, props.index)\n }\n }", "onItemClick(name, elem, evt){\r\n this.emit('click', name, elem, evt);\r\n }", "clicked() {\n this.get('onOpen')();\n }", "handleClick(articleToPlay) {\r\n // Asserting if an utterance is being played it gets canceled\r\n this.playing = 'LIST_PLAY';\r\n // Sending data to PlayerPage component changing state\r\n this.clickHandler(this.playing, true, articleToPlay.headline, articleToPlay.author, articleToPlay.content);\r\n }", "elementClick(e) {\n if (e.detail) {\n e.detail.target.dispatchEvent(\n new MouseEvent(\"click\", {\n bubbles: true,\n cancelable: true,\n view: window,\n })\n );\n }\n }", "onclick(){}", "function setClickBehaviour(){\n\t\t\tbutton.on(\"click\", changeButtonLabelAndSendEvent);\n\t\t}", "buttonClick(ev) {\n\n\t\t// Get the button using the index\n\t\tvar btn = this.props.buttons[ev.currentTarget.dataset.index];\n\n\t\t// If there's a callback\n\t\tif(typeof btn.callback == 'function') {\n\t\t\tbtn.callback(btn);\n\t\t} else {\n\t\t\tthis.props.close();\n\t\t}\n\t}", "handleClick () {\n super.handleClick();\n if (this.casting) {\n return this.stopCasting();\n } else {\n return this.doLaunch();\n }\n }", "_onLabelClick(ev) {\n const $target = $(ev.currentTarget);\n this.trigger('revisionSelected', [0, $target.data('revision')]);\n }" ]
[ "0.8123866", "0.7879277", "0.7531671", "0.7500634", "0.7475805", "0.7402668", "0.73915786", "0.7379595", "0.7379595", "0.7331232", "0.7330436", "0.7245654", "0.72390676", "0.72122186", "0.7116352", "0.7082111", "0.7062615", "0.7056091", "0.7017624", "0.7006748", "0.6982211", "0.69725585", "0.6969008", "0.6940908", "0.6886495", "0.6866536", "0.6859694", "0.68442965", "0.68236756", "0.6817138", "0.68103236", "0.68081677", "0.6805614", "0.680148", "0.6785153", "0.6783431", "0.6759283", "0.6754726", "0.6740714", "0.67305374", "0.6720963", "0.6707124", "0.6705986", "0.6694178", "0.66818166", "0.6671246", "0.6657273", "0.6655512", "0.66379064", "0.6624547", "0.66195226", "0.6616446", "0.6603907", "0.6601692", "0.65978515", "0.65958583", "0.65890324", "0.65886736", "0.65840906", "0.6581051", "0.65719074", "0.65687764", "0.655458", "0.6552917", "0.6552641", "0.6552641", "0.6528553", "0.65236956", "0.6521108", "0.6520102", "0.6519221", "0.6515924", "0.65125406", "0.6512157", "0.6505019", "0.6500281", "0.64877325", "0.64848256", "0.6479867", "0.64731705", "0.6470219", "0.64697886", "0.6464425", "0.6460205", "0.64523137", "0.64523137", "0.64523137", "0.64523137", "0.64523137", "0.64523137", "0.64493674", "0.6448905", "0.6448193", "0.64468056", "0.64439505", "0.6439658", "0.64387053", "0.64304215", "0.64304113", "0.6428534", "0.6425676" ]
0.0
-1
Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support getModifierState. If getModifierState is not supported, we map it to a set of modifier keys exposed by the event. In this case, Lockkeys are not supported.
function modifierStateGetter(keyArg) { var syntheticEvent = this; var nativeEvent = syntheticEvent.nativeEvent; if (nativeEvent.getModifierState) { return nativeEvent.getModifierState(keyArg); } var keyProp = modifierKeyToProp[keyArg]; return keyProp ? !!nativeEvent[keyProp] : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getModifierState(event, mod) {\n return typeof event.getModifierState === \"function\"\n ? event.getModifierState(mod)\n : false;\n}", "function modifierStateGetter(keyArg){var syntheticEvent=this;var nativeEvent=syntheticEvent.nativeEvent;if(nativeEvent.getModifierState){return nativeEvent.getModifierState(keyArg);}var keyProp=modifierKeyToProp[keyArg];return keyProp?!!nativeEvent[keyProp]:false;}", "function modifierStateGetter(keyArg){var syntheticEvent=this;var nativeEvent=syntheticEvent.nativeEvent;if(nativeEvent.getModifierState){return nativeEvent.getModifierState(keyArg);}var keyProp=modifierKeyToProp[keyArg];return keyProp?!!nativeEvent[keyProp]:false;}", "function modifierStateGetter(keyArg){var syntheticEvent=this;var nativeEvent=syntheticEvent.nativeEvent;if(nativeEvent.getModifierState){return nativeEvent.getModifierState(keyArg);}var keyProp=modifierKeyToProp[keyArg];return keyProp?!!nativeEvent[keyProp]:false;}", "function modifierStateGetter(keyArg){var syntheticEvent=this;var nativeEvent=syntheticEvent.nativeEvent;if(nativeEvent.getModifierState){return nativeEvent.getModifierState(keyArg);}var keyProp=modifierKeyToProp[keyArg];return keyProp?!!nativeEvent[keyProp]:false;}", "function modifierStateGetter(keyArg){var syntheticEvent=this;var nativeEvent=syntheticEvent.nativeEvent;if(nativeEvent.getModifierState){return nativeEvent.getModifierState(keyArg);}var keyProp=modifierKeyToProp[keyArg];return keyProp?!!nativeEvent[keyProp]:false;}", "function modifierStateGetter(keyArg){var syntheticEvent=this;var nativeEvent=syntheticEvent.nativeEvent;if(nativeEvent.getModifierState){return nativeEvent.getModifierState(keyArg);}var keyProp=modifierKeyToProp[keyArg];return keyProp?!!nativeEvent[keyProp]:false;}", "function modifierStateGetter(keyArg){var syntheticEvent=this;var nativeEvent=syntheticEvent.nativeEvent;if(nativeEvent.getModifierState){return nativeEvent.getModifierState(keyArg);}var keyProp=modifierKeyToProp[keyArg];return keyProp?!!nativeEvent[keyProp]:false;}", "function modifierStateGetter(keyArg){var syntheticEvent=this;var nativeEvent=syntheticEvent.nativeEvent;if(nativeEvent.getModifierState){return nativeEvent.getModifierState(keyArg);}var keyProp=modifierKeyToProp[keyArg];return keyProp?!!nativeEvent[keyProp]:false;}", "function modifierStateGetter(keyArg){var syntheticEvent=this;var nativeEvent=syntheticEvent.nativeEvent;if(nativeEvent.getModifierState){return nativeEvent.getModifierState(keyArg);}var keyProp=modifierKeyToProp[keyArg];return keyProp?!!nativeEvent[keyProp]:false;}", "function modifierStateGetter(keyArg){var syntheticEvent=this;var nativeEvent=syntheticEvent.nativeEvent;if(nativeEvent.getModifierState){return nativeEvent.getModifierState(keyArg);}var keyProp=modifierKeyToProp[keyArg];return keyProp?!!nativeEvent[keyProp]:false;}", "function modifierStateGetter(keyArg){var syntheticEvent=this;var nativeEvent=syntheticEvent.nativeEvent;if(nativeEvent.getModifierState){return nativeEvent.getModifierState(keyArg);}var keyProp=modifierKeyToProp[keyArg];return keyProp?!!nativeEvent[keyProp]:false;}", "function modifierStateGetter(keyArg){var syntheticEvent=this;var nativeEvent=syntheticEvent.nativeEvent;if(nativeEvent.getModifierState){return nativeEvent.getModifierState(keyArg);}var keyProp=modifierKeyToProp[keyArg];return keyProp?!!nativeEvent[keyProp]:false;}", "function modifierStateGetter(keyArg){var syntheticEvent=this;var nativeEvent=syntheticEvent.nativeEvent;if(nativeEvent.getModifierState){return nativeEvent.getModifierState(keyArg);}var keyProp=modifierKeyToProp[keyArg];return keyProp?!!nativeEvent[keyProp]:false;}", "function modifierStateGetter(keyArg){var syntheticEvent=this;var nativeEvent=syntheticEvent.nativeEvent;if(nativeEvent.getModifierState){return nativeEvent.getModifierState(keyArg);}var keyProp=modifierKeyToProp[keyArg];return keyProp?!!nativeEvent[keyProp]:false;}", "function modifierStateGetter(keyArg){var syntheticEvent=this;var nativeEvent=syntheticEvent.nativeEvent;if(nativeEvent.getModifierState){return nativeEvent.getModifierState(keyArg);}var keyProp=modifierKeyToProp[keyArg];return keyProp?!!nativeEvent[keyProp]:false;}", "function modifierStateGetter(keyArg){ /*jshint validthis:true */var syntheticEvent=this;var nativeEvent=syntheticEvent.nativeEvent;if(nativeEvent.getModifierState){return nativeEvent.getModifierState(keyArg);}var keyProp=modifierKeyToProp[keyArg];return keyProp?!!nativeEvent[keyProp]:false;}", "function modifierStateGetter(keyArg){ /*jshint validthis:true */var syntheticEvent=this;var nativeEvent=syntheticEvent.nativeEvent;if(nativeEvent.getModifierState){return nativeEvent.getModifierState(keyArg);}var keyProp=modifierKeyToProp[keyArg];return keyProp?!!nativeEvent[keyProp]:false;}", "function modifierStateGetter(keyArg) {\r\n\t var syntheticEvent = this;\r\n\t var nativeEvent = syntheticEvent.nativeEvent;\r\n\t if (nativeEvent.getModifierState) {\r\n\t return nativeEvent.getModifierState(keyArg);\r\n\t }\r\n\t var keyProp = modifierKeyToProp[keyArg];\r\n\t return keyProp ? !!nativeEvent[keyProp] : false;\r\n\t}", "function modifierStateGetter(keyArg) {\n\t\t var syntheticEvent = this;\n\t\t var nativeEvent = syntheticEvent.nativeEvent;\n\t\t if (nativeEvent.getModifierState) {\n\t\t return nativeEvent.getModifierState(keyArg);\n\t\t }\n\t\t var keyProp = modifierKeyToProp[keyArg];\n\t\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t\t}", "function modifierStateGetter(keyArg) {\n\t\t var syntheticEvent = this;\n\t\t var nativeEvent = syntheticEvent.nativeEvent;\n\t\t if (nativeEvent.getModifierState) {\n\t\t return nativeEvent.getModifierState(keyArg);\n\t\t }\n\t\t var keyProp = modifierKeyToProp[keyArg];\n\t\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t\t}", "function modifierStateGetter(keyArg) {\n\t\t var syntheticEvent = this;\n\t\t var nativeEvent = syntheticEvent.nativeEvent;\n\t\t if (nativeEvent.getModifierState) {\n\t\t return nativeEvent.getModifierState(keyArg);\n\t\t }\n\t\t var keyProp = modifierKeyToProp[keyArg];\n\t\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t\t}", "function modifierStateGetter(keyArg) {\n var syntheticEvent = this, nativeEvent = syntheticEvent.nativeEvent;\n if (nativeEvent.getModifierState) return nativeEvent.getModifierState(keyArg);\n var keyProp = modifierKeyToProp[keyArg];\n return !!keyProp && !!nativeEvent[keyProp];\n}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n\t var syntheticEvent = this;\n\t var nativeEvent = syntheticEvent.nativeEvent;\n\t if (nativeEvent.getModifierState) {\n\t return nativeEvent.getModifierState(keyArg);\n\t }\n\t var keyProp = modifierKeyToProp[keyArg];\n\t return keyProp ? !!nativeEvent[keyProp] : false;\n\t}", "function modifierStateGetter(keyArg) {\n var syntheticEvent = this;\n var nativeEvent = syntheticEvent.nativeEvent;\n if (nativeEvent.getModifierState) {\n return nativeEvent.getModifierState(keyArg);\n }\n var keyProp = modifierKeyToProp[keyArg];\n return keyProp ? !!nativeEvent[keyProp] : false;\n }", "function modifierStateGetter(keyArg) {\n var syntheticEvent = this;\n var nativeEvent = syntheticEvent.nativeEvent;\n if (nativeEvent.getModifierState) {\n return nativeEvent.getModifierState(keyArg);\n }\n var keyProp = modifierKeyToProp[keyArg];\n return keyProp ? !!nativeEvent[keyProp] : false;\n}", "function modifierStateGetter(keyArg) {\n var syntheticEvent = this;\n var nativeEvent = syntheticEvent.nativeEvent;\n if (nativeEvent.getModifierState) {\n return nativeEvent.getModifierState(keyArg);\n }\n var keyProp = modifierKeyToProp[keyArg];\n return keyProp ? !!nativeEvent[keyProp] : false;\n}", "function modifierStateGetter(keyArg) {\n var syntheticEvent = this;\n var nativeEvent = syntheticEvent.nativeEvent;\n if (nativeEvent.getModifierState) {\n return nativeEvent.getModifierState(keyArg);\n }\n var keyProp = modifierKeyToProp[keyArg];\n return keyProp ? !!nativeEvent[keyProp] : false;\n}", "function modifierStateGetter(keyArg) {\n var syntheticEvent = this;\n var nativeEvent = syntheticEvent.nativeEvent;\n if (nativeEvent.getModifierState) {\n return nativeEvent.getModifierState(keyArg);\n }\n var keyProp = modifierKeyToProp[keyArg];\n return keyProp ? !!nativeEvent[keyProp] : false;\n}", "function modifierStateGetter(keyArg) {\n var syntheticEvent = this;\n var nativeEvent = syntheticEvent.nativeEvent;\n if (nativeEvent.getModifierState) {\n return nativeEvent.getModifierState(keyArg);\n }\n var keyProp = modifierKeyToProp[keyArg];\n return keyProp ? !!nativeEvent[keyProp] : false;\n}", "function modifierStateGetter(keyArg) {\n var syntheticEvent = this;\n var nativeEvent = syntheticEvent.nativeEvent;\n if (nativeEvent.getModifierState) {\n return nativeEvent.getModifierState(keyArg);\n }\n var keyProp = modifierKeyToProp[keyArg];\n return keyProp ? !!nativeEvent[keyProp] : false;\n}" ]
[ "0.7935699", "0.7853291", "0.7853291", "0.7853291", "0.7853291", "0.7853291", "0.7853291", "0.7853291", "0.7853291", "0.7853291", "0.7853291", "0.7853291", "0.7853291", "0.7853291", "0.7853291", "0.7853291", "0.775467", "0.775467", "0.73879474", "0.7353126", "0.7353126", "0.7353126", "0.7306939", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7275557", "0.7239527", "0.7225683", "0.7225683", "0.7225683", "0.7225683", "0.7225683", "0.7225683" ]
0.0
-1
inlined Object.is polyfill to avoid requiring consumers ship their own
function is(x, y) { return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function i(e){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction(e){return null!=e&&\"object\"==typeof e&&!1===Array.isArray(e)}(e)&&\"[object Object]\"===Object.prototype.toString.call(e)}", "function u(e){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction(e){return null!=e&&\"object\"==typeof e&&!1===Array.isArray(e)}(e)&&\"[object Object]\"===Object.prototype.toString.call(e)}", "__is_object(value) {\n return value && typeof value === 'object' && value.constructor === Object;\n }", "static hasObjectify(object) {\n return isObjectAssigned(object) && isFunction(object.objectify);\n }", "function isObject$1(obj) {\n // incase of arrow function and array\n return Object(obj) === obj && String(obj) === '[object Object]' && !isFunction(obj) && !isArray(obj);\n }", "isPlainObject(obj) {\n return _toString.call(obj) === '[object Object]'\n }", "function is(obj) {\n return obj instanceof __WEBPACK_IMPORTED_MODULE_3__Range__[\"c\" /* default */];\n}", "function isObject$1(obj) {\n // incase of arrow function and array\n return Object(obj) === obj && String(obj) === '[object Object]' && !isFunction(obj) && !isArray(obj);\n }", "function _isPlainObject(obj) {\n return (obj && obj.constructor.prototype === Object.prototype);\n}", "isObject(obj) {\n return obj !== null && typeof obj === 'object'\n }", "function isObject(o) { return typeof o === 'object'; }", "function isObject(o) { return typeof o === 'object'; }", "function isObject(o) { return typeof o === 'object'; }", "function isObjectLike(value) {\n return value != null && (typeof value === \"function\" || typeof value === \"object\");\n}", "function isObject$1(obj) {\n return kindOf(obj) === 'object' || kindOf(obj) === 'function';\n}", "function isObject$1(obj) {\n return kindOf(obj) === 'object' || kindOf(obj) === 'function';\n}", "function isObject$1(obj) {\n return kindOf(obj) === 'object' || kindOf(obj) === 'function';\n}", "function isObject$1(obj) {\n return kindOf(obj) === 'object' || kindOf(obj) === 'function';\n}", "function isObject$1(obj) {\n // incase of arrow function and array\n return Object(obj) === obj && String(obj) === '[object Object]' && !isFunction(obj) && !isArray$1(obj);\n}", "function isObjectObject(o){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction isObject(val){return null!=val&&\"object\"==typeof val&&!1===Array.isArray(val)}(o)&&\"[object Object]\"===Object.prototype.toString.call(o)}", "function isObjectObject(o){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction isObject(val){return null!=val&&\"object\"==typeof val&&!1===Array.isArray(val)}(o)&&\"[object Object]\"===Object.prototype.toString.call(o)}", "function isObjectObject(o){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction isObject(val){return null!=val&&\"object\"==typeof val&&!1===Array.isArray(val)}(o)&&\"[object Object]\"===Object.prototype.toString.call(o)}", "function isObjectObject(o){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction isObject(val){return null!=val&&\"object\"==typeof val&&!1===Array.isArray(val)}(o)&&\"[object Object]\"===Object.prototype.toString.call(o)}", "function isObjectObject(o){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction isObject(val){return null!=val&&\"object\"==typeof val&&!1===Array.isArray(val)}(o)&&\"[object Object]\"===Object.prototype.toString.call(o)}", "function isObjectObject(o){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction isObject(val){return null!=val&&\"object\"==typeof val&&!1===Array.isArray(val)}(o)&&\"[object Object]\"===Object.prototype.toString.call(o)}", "function isObjectObject(o){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction isObject(val){return null!=val&&\"object\"==typeof val&&!1===Array.isArray(val)}(o)&&\"[object Object]\"===Object.prototype.toString.call(o)}", "function isObject(obj) {\n // incase of arrow function and array\n return Object(obj) === obj && String(obj) === '[object Object]' && !isFunction(obj) && !isArray(obj);\n }", "function isObject(obj) { // 71\n\t\treturn toString.call(obj) === '[object Object]'; // 72\n\t} // 73", "function isObject (o) { return o && typeof o === 'object' }", "function isObject (o) { return o && typeof o === 'object' }", "function isObject$1(obj){\nreturn kindOf(obj)==='object'||kindOf(obj)==='function';\n}", "function isObject(entry) {\n return entry.constructor === Object;\n}", "function isObj$1(something) {\n return typeDetect(something) === 'Object';\n}", "function isObject$1(e){return\"[object Object]\"===Object.prototype.toString.call(e)}", "function isObject(obj){return obj!==null&&(typeof obj===\"undefined\"?\"undefined\":_typeof2(obj))==='object';}", "function isObject(obj){return obj!==null&&(typeof obj===\"undefined\"?\"undefined\":_typeof2(obj))==='object';}", "function isObject$8(val) {\n return kindOf$3(val) === 'object' || typeof val === 'function';\n}", "function isObject(e){return Object.prototype.toString.call(e)===\"[object Object]\"}", "function isObjectLike(value) {\n return typeof value === \"object\" && !!value;\n}", "function isObject(obj){return obj!==null&&(typeof obj==='undefined'?'undefined':_typeof(obj))==='object';}", "function IsObject(x) {\n\t return typeof x === \"object\" ? x !== null : typeof x === \"function\";\n\t }", "function isObject(o){ return typeof o === 'object' && o !== null; }", "function isObjectLike(value) {\n return _typeof$1(value) == 'object' && value !== null;\n }", "function isObject$2556(x$2572) {\n return function isObject$2556(x$2573) {\n return function (a0$2574) {\n if (Object.prototype.toString.call(a0$2574) === '[object Object]') {\n return true;\n }\n return false;\n }.call(this, x$2573);\n }.curry().apply(null, arguments);\n }", "function IsObject(x) {\r\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\r\n }", "function IsObject(x) {\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\n }", "function IsObject(x) {\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\n }", "function IsObject(x) {\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\n }", "function IsObject(x) {\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\n }", "function IsObject(x) {\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\n }", "function IsObject(x) {\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\n }", "function IsObject(x) {\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\n }", "function isObject(a) {\r\n return (a && typeof a == 'object') || isFunction(a);\r\n}", "function isObject(obj) {\n // incase of arrow function and array\n return Object(obj) === obj && String(obj) === '[object Object]' && !isFunction(obj) && !isArray(obj);\n }", "function isObject(obj){\n return Object.prototype.toString.call(obj) == '[object Object]';\n }", "function IsObject(x) {\r\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\r\n }", "function IsObject(x) {\r\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\r\n }", "function IsObject(x) {\r\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\r\n }", "function IsObject(x) {\r\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\r\n }", "function isObjectLike$a(value) {\n return typeof value == 'object' && value !== null;\n}", "function isObject(obj) {\n\n return obj && typeof obj === \"object\";\n}", "function isObject$1(value) {\n return typeof value === 'object' && value !== null || typeof value === 'function';\n }", "function isIterableObject(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n var t = typeof(obj);\n var types = {'string': 0, 'function': 0, 'number': 0, 'undefined': 0, 'boolean': 0};\n return types[t] === undefined;\n}", "function isObject(value) { return typeof value === \"object\" && value !== null; }", "function _isObject(v) {\n return (Object.prototype.toString.call(v) === '[object Object]');\n}", "function _isObject(v) {\n return (Object.prototype.toString.call(v) === '[object Object]');\n}", "function _isObject(v) {\n return (Object.prototype.toString.call(v) === '[object Object]');\n}", "function _isObject(v) {\n return (Object.prototype.toString.call(v) === '[object Object]');\n}", "function _isObject(v) {\n return (Object.prototype.toString.call(v) === '[object Object]');\n}", "function IsObject(x) {\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\n }", "function IsObject(x) {\n return typeof x === \"object\" ? x !== null : typeof x === \"function\";\n }", "function isObject(a) {\n return (!!a) && (a.constructor === Object);\n}", "function isPlainObject(obj){return _toString.call(obj)==='[object Object]';}", "function isPlainObject(obj){return _toString.call(obj)==='[object Object]';}", "function isObject_(test) {\r\n return Object.prototype.toString.call(test) === '[object Object]';\r\n}", "function isObject(obj) {\n return kindOf(obj) === 'object' || kindOf(obj) === 'function';\n}", "function utilIsIterable(obj) {\n\t\treturn obj != null && typeof obj[Symbol.iterator] === 'function'; // lazy equality for null\n\t}", "function isObject_(test) {\r\n return Object.prototype.toString.call(test) === '[object Object]';\r\n}", "function isObject(x) {\n return x != null && typeof x === 'object';\n}", "function h$isObject(o) {\n return typeof(o) === 'object';\n}", "function h$isObject(o) {\n return typeof(o) === 'object';\n}", "function h$isObject(o) {\n return typeof(o) === 'object';\n}", "function h$isObject(o) {\n return typeof(o) === 'object';\n}", "function h$isObject(o) {\n return typeof(o) === 'object';\n}", "function isObjectLike(obj) {\n return typeof obj === \"object\" && obj !== null;\n}", "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "function isObject(obj) {\r\n\t var type = typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\r\n\t return type === \"function\" || type === \"object\" && !!obj;\r\n\t}", "__key_in_object(object, key) {\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n return true\n } else {\n return false\n }\n }", "function isObject(value) {\n return value && typeof value === 'object' && value.constructor === Object;\n}", "function isObject(value) {\n return value && typeof value === 'object';\n}" ]
[ "0.7044971", "0.6979962", "0.6857963", "0.68213487", "0.6803169", "0.6780778", "0.67303896", "0.67208385", "0.6709952", "0.66844535", "0.667722", "0.667722", "0.667722", "0.66489047", "0.6640121", "0.6640121", "0.6640121", "0.6640121", "0.66260475", "0.6623466", "0.6623466", "0.6623466", "0.6623466", "0.6623466", "0.6623466", "0.6623466", "0.6623011", "0.6618866", "0.65955013", "0.65955013", "0.65772307", "0.6570807", "0.65695477", "0.65676165", "0.65434545", "0.65434545", "0.65381896", "0.65330714", "0.6512504", "0.6489239", "0.6488304", "0.64775455", "0.6471987", "0.6466582", "0.6466492", "0.6457259", "0.6457259", "0.6457259", "0.6457259", "0.6457259", "0.6457259", "0.6457259", "0.64559424", "0.6455155", "0.64509547", "0.64448196", "0.644428", "0.644428", "0.644428", "0.644407", "0.64396864", "0.64361405", "0.64266396", "0.6422855", "0.6421253", "0.6421253", "0.6421253", "0.6421253", "0.6421253", "0.6415018", "0.6415018", "0.63898325", "0.63859534", "0.63859534", "0.63783175", "0.63778925", "0.63690317", "0.6364809", "0.63645756", "0.6350539", "0.6350539", "0.6350539", "0.6350539", "0.6350539", "0.63501644", "0.63469696", "0.63469696", "0.63469696", "0.63469696", "0.63469696", "0.63469696", "0.63469696", "0.63469696", "0.63469696", "0.63469696", "0.63469696", "0.63469696", "0.63459915", "0.63441324", "0.6338594", "0.6338242" ]
0.0
-1
Performs equality by iterating through keys on an object and returning false when any key has values which are not strictly equal between the arguments. Returns true when the values of all keys are strictly equal.
function shallowEqual(objA, objB) { if (objectIs(objA, objB)) { return true; } if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { return false; } var keysA = Object.keys(objA); var keysB = Object.keys(objB); if (keysA.length !== keysB.length) { return false; } // Test for A's keys different from B. for (var i = 0; i < keysA.length; i++) { if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) { return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function equalForKeys(a, b, keys) {\n if (!angular.isArray(keys) && angular.isObject(keys)) {\n keys = protoKeys(keys, [\"$$keys\", \"$$values\", \"$$equals\", \"$$validates\", \"$$new\", \"$$parent\"]);\n }\n if (!keys) {\n keys = [];\n for (var n in a) keys.push(n); // Used instead of Object.keys() for IE8 compatibility\n }\n\n for (var i = 0; i < keys.length; i++) {\n var k = keys[i];\n if (a[k] != b[k]) return false; // Not '===', values aren't necessarily normalized\n }\n return true;\n }", "function equalForKeys(a, b, keys) {\n if (!angular.isArray(keys) && angular.isObject(keys)) {\n keys = protoKeys(keys, [\"$$keys\", \"$$values\", \"$$equals\", \"$$validates\", \"$$new\", \"$$parent\"]);\n }\n if (!keys) {\n keys = [];\n for (var n in a) keys.push(n); // Used instead of Object.keys() for IE8 compatibility\n }\n\n for (var i = 0; i < keys.length; i++) {\n var k = keys[i];\n if (a[k] != b[k]) return false; // Not '===', values aren't necessarily normalized\n }\n return true;\n }", "function allEqual(args) {\n for (var i = 1; i < args.length; i++) {\n if (args[i] != args[0])\n return false;\n }\n return true;\n}", "function keyValueChecker (object1, object2) {\r\n\tfor (var property1 in object1) {\r\n\t\tfor (var property2 in object2) {\r\n\t\t\tif (property1 == property2 && object1[property1] == object2[property2]) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n}", "function allEqual(args) {\r\n\tvar firstValue = arguments[0],\r\n\t\ti;\r\n\tfor (i = 1; i < arguments.length; i += 1) {\r\n\t\tif (arguments[i] != firstValue) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n}", "function isEqual(left, right) {\n const OBJECT_STRING = '[object Object]';\n if (typeof left !== 'object' || typeof right !== 'object') {\n return left === right;\n }\n if (left === null || right === null)\n return left === right;\n const leftArray = Array.isArray(left);\n const rightArray = Array.isArray(right);\n if (leftArray !== rightArray)\n return false;\n const leftPlainObject = Object.prototype.toString.call(left) === OBJECT_STRING;\n const rightPlainObject = Object.prototype.toString.call(right) === OBJECT_STRING;\n if (leftPlainObject !== rightPlainObject)\n return false;\n if (!leftPlainObject && !leftArray)\n return false;\n const leftKeys = Object.keys(left);\n const rightKeys = Object.keys(right);\n if (leftKeys.length !== rightKeys.length)\n return false;\n const keySet = {};\n for (let i = 0; i < leftKeys.length; i += 1) {\n keySet[leftKeys[i]] = true;\n }\n for (let i = 0; i < rightKeys.length; i += 1) {\n keySet[rightKeys[i]] = true;\n }\n const allKeys = Object.keys(keySet);\n if (allKeys.length !== leftKeys.length) {\n return false;\n }\n const l = left;\n const r = right;\n const pred = (key) => {\n return isEqual(l[key], r[key]);\n };\n return allKeys.every(pred);\n}", "function sameKeys(objA, objB, ignoreOrder) {\n var keysA = Object.keys(objA)\n var keysB = Object.keys(objB)\n\n if (keysA.length !== keysB.length)\n return false\n\n if (ignoreOrder) keysA.sort(), keysB.sort()\n\n for (var i = 0; i < keysA.length; i++)\n if (keysA[i] !== keysB[i])\n return false\n\n return true\n}", "function isEqual(objA, objB, ...ignoredKeys) {\n if (objA === objB) {\n // Reference equality\n return true;\n }\n\n if (!objA !== !objB) {\n // Either one undefined/null but not both\n return false;\n }\n\n let keysA = immutable.Set.fromKeys(objA);\n let keysB = immutable.Set.fromKeys(objB);\n let keys = keysA.union(keysB).subtract(ignoredKeys);\n\n return keys.every(key => {\n // Use Immutable.js's equivalence algorithm. Note that StoreRef and\n // QueryData implement valueOf() or equals()/hashCode(), which this\n // algorithm uses for comparisons.\n return immutable.is(objA[key], objB[key]);\n });\n}", "function isEqual(a, b) {\n let aKeys = Object.keys(a);\n let bKeys = Object.keys(b);\n\n if (aKeys.length !== bKeys.length) {\n return false;\n }\n\n for (let i = 0; i < aKeys.length; i++) {\n var currentKey = aKeys[i];\n\n if (a[currentKey] !== b[currentKey]) {\n return false;\n } \n }\n\n return true;\n}", "function isKeyMatch(object1, object2) {\n var object1Keys = Object.keys(object1);\n var object2Keys = Object.keys(object2);\n\n for (var i = 0; i < object1Keys.length; i++) {\n if (object1Keys[i] !== object2Keys[i]) {\n return false; // not the same key here\n }\n return true; //if made it here, all keys match\n }\n }", "function Object$prototype$equals(other) {\n var self = this;\n var keys = Object.keys(this).sort();\n return equals(keys, Object.keys(other).sort()) &&\n keys.every(function(k) { return equals(self[k], other[k]); });\n }", "function iterableEquality(a, b) {\n if (\n typeof a !== 'object' ||\n typeof b !== 'object' ||\n Array.isArray(a) ||\n Array.isArray(b) ||\n a === null ||\n b === null\n ) {\n return undefined\n }\n if (a && b && a.constructor !== b.constructor) {\n // check if the object are natives and then shallow equal them\n return a.sketchObject && b.sketchObject && a.sketchObject == b.sketchObject\n }\n\n if (a.size !== undefined) {\n if (a.size !== b.size) {\n return false\n } else if (isA('Set', a)) {\n var allFound = true\n for (var aValue of a) {\n if (!b.has(aValue)) {\n allFound = false\n break\n }\n }\n if (allFound) {\n return true\n }\n } else if (isA('Map', a)) {\n var allFound = true\n for (var aEntry of a) {\n if (\n !b.has(aEntry[0]) ||\n !equals(aEntry[1], b.get(aEntry[0]), [iterableEquality])\n ) {\n allFound = false\n break\n }\n }\n if (allFound) {\n return true\n }\n }\n }\n\n if (Object.keys(a).length !== Object.keys(a).length) {\n return false\n }\n\n var aKeys = Object.keys(a).sort()\n var bKeys = Object.keys(b).sort()\n\n for (var i = 0; i < aKeys.length; i += 1) {\n var aKey = aKeys[i]\n var bKey = bKeys[i]\n if (aKey !== bKey || !equals(a[aKey], b[bKey], [iterableEquality])) {\n return false\n }\n }\n\n return true\n}", "function Object$prototype$equals(other) {\n var self = this;\n var keys = sortedKeys (this);\n return equals (keys, sortedKeys (other)) &&\n keys.every (function(k) { return equals (self[k], other[k]); });\n }", "function setsEqual(a, b) {\n var ka = Object.keys(a).sort();\n var kb = Object.keys(b).sort();\n if (ka.length != kb.length) {\n return false;\n }\n for (var i in ka) {\n if (kb[i] != ka[i]) {\n return false;\n }\n }\n return true;\n}", "function allEqual() {\n\tfor (let i = 1; i < arguments.length; i++) {\n\t\tif (arguments[i] === '' || arguments[i] !== arguments[i - 1]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}", "function validateKeys(object, expectedKeys) {\n // if the enumerable properties of object is not the same as expectedKeys, return false\n if (Object.keys(object).length !== expectedKeys.length) {\n return false;\n }\n\n // Loop through expectedKeys\n for(let i = 0; i < expectedKeys.length; i++) {\n // While loop through expectedkeys.length\n // if Object.keys(object) DOES NOT find, the key matching expectedKey[i], return false\n // Goes through the array of strings, that is the keys of the object parameter, and if the key is found, it returns true\n if(!Object.keys(object).find(key => key === expectedKeys[i])) {\n return false;\n }\n }\n // otherwise return true\n return true;\n}", "function deepEqual(value1, value2) {\n if (value1 === value2) {\n return true;\n }\n if (value1 == null || typeof value1 != \"object\" ||\n value2 == null || typeof value2 != \"object\") {\n return false;\n }\n // The Object.keys() method returns an array of a given object's own property names, in the same order as we get with a normal loop. Example below:\n // const object1 = {\n // a: 'somestring',\n // b: 42,\n // c: false\n // };\n\n // console.log(Object.keys(object1));\n // expected output: Array [\"a\", \"b\", \"c\"]\n // basically runs a for loop thru each object and creates an array of those values\n let keysA = Object.keys(value1);\n let keysB = Object.keys(value2);\n\n if (keysA.length != keysB.length) {\n return false;\n }\n\n for (let key of keysA) {\n if (!keysB.includes(key) || !deepEqual(value1[key], value2[key])) {\n return false;\n }\n }\n \n return true;\n}", "function sameProps(objA, objB) {\n var keysA = Object.keys(objA)\n var keysB = Object.keys(objB)\n\n if (keysA.length !== keysB.length)\n return false\n\n for (var i = 0; i < keysA.length; i++) {\n if (keysA[i] !== keysB[i])\n return false\n }\n\n return true\n}", "function objectsEqual(obj1, obj2) {\n let obj1Keys = Object.keys(obj1);\n let obj1Values = Object.values(obj1);\n let obj2Keys = Object.keys(obj2);\n let obj2Values = Object.values(obj2);\n\n if (obj1Keys.length !== obj2Keys.length || obj1Values.length !== obj2Values.length) {\n return false;\n }\n\n for (let i = 0; i < obj1Keys.length; i += 1) {\n if (obj1Keys[i] !== obj2Keys[i]) {\n return false;\n }\n }\n\n for (let i = 0; i < obj1Values.length; i += 1) {\n if (obj1Values[i] !== obj2Values[i]) {\n return false;\n }\n }\n\n return true;\n}", "function objectsEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n return (keysMatch(a, b) && valuesMatch(a, b));\n}", "function equalObjects(a, b) {\n if ((typeof a === 'undefined' ? 'undefined' : _typeof(a)) !== (typeof b === 'undefined' ? 'undefined' : _typeof(b))) {\n return false;\n }\n if ((typeof a === 'undefined' ? 'undefined' : _typeof(a)) !== 'object') {\n return a === b;\n }\n if (a === b) {\n return true;\n }\n if (toString.call(a) === '[object Date]') {\n if (toString.call(b) === '[object Date]') {\n return +a === +b;\n }\n return false;\n }\n if (Array.isArray(a)) {\n if (Array.isArray(b)) {\n if (a.length !== b.length) {\n return false;\n }\n for (var i = 0; i < a.length; i++) {\n if (!equalObjects(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n return false;\n }\n if (Object.keys(a).length !== Object.keys(b).length) {\n return false;\n }\n for (var key in a) {\n if (!equalObjects(a[key], b[key])) {\n return false;\n }\n }\n return true;\n}", "function compareObjects(left, right) {\n var left_keys = Object.keys(left);\n var right_keys = Object.keys(right);\n if (!compareArrays(left_keys, right_keys)) {\n return false;\n }return left_keys.every(function (key) {\n return compare(left[key], right[key]);\n });\n}", "function hasPropsAndVals(obj, kv) {\n if (typeof (obj) !== 'object' || typeof (kv) !== 'object') {\n return (false);\n }\n\n if (Object.keys(kv).length === 0) {\n return (true);\n }\n\n return (Object.keys(kv).every(function (k) {\n return (obj[k] && obj[k] === kv[k]);\n }));\n}", "function compareKeyValuePair(object1, object2){\r\n for (objectKey in object1){\r\n if (typeof object1[objectKey] !== 'function'){\r\n if (typeof object2[objectKey] != 'undefined'){\r\n if (object1[objectKey] == object2[objectKey]){\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n return false; \r\n}", "deepEqual(a, b) {\n // If two \n if(a === b) {\n return true\n }; \n\n // Check for any condition that would cause args not to be equal\n if(a === null || b === null || typeof a != 'object' || typeof b != 'object') {\n return false\n };\n\n // Check for equality in number of properties and properties themselves\n var propsA = 0, \n propsB = 0;\n\n for(var prop in a) {\n propsA += 1;\n\n for (var prop in b) {\n propsB += 1;\n if (!(prop in a) || !this.deepEqual(a[prop], b[prop])) {\n return false;\n }\n }\n }\n\n return propsInA == propsInB;\n }", "function forEveryKeyInObject (obj, fn) {\n if (Object.keys(obj).length < 1) {\n return false\n }\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n if (!fn(key)) return false\n }\n }\n return true\n }", "function comparePairs(obj1, obj2){\n\tvar keys1 = Object.keys(obj1);\n\tvar keys2 = Object.keys(obj2);\n\tfor(var i = 0; i < keys1.length; i ++){\n\t\tif (keys1[i] === keys2[i] || obj1[keys1[i]] === obj2[keys2[i]]){\n\t\t\treturn true\n\t\t}\n\t\treturn false\n\t}\n}", "function sameKeys(objA, objB, protoCheck, deepCheck) {\n var keysA = Object.getNestedKeys(objA, protoCheck, !deepCheck)\n var keysB = Object.getNestedKeys(objB, protoCheck, !deepCheck)\n\n if (keysA.length !== keysB.length)\n return false\n\n for (var i = 0; i < keysA.length; i++)\n if (keysA[i] !== keysB[i])\n return false\n\n return true\n}", "function are_equal(a1, a2)\n{\n if (typeof(a1) != typeof(a2))\n return false;\n \n switch(typeof(a1)) {\n case 'object':\n // arrays\n if (a1.length) {\n if (a1.length != a2.length)\n return false;\n for (var i = 0; i < a1.length; ++i) {\n if (!are_equal(a1[i], a2[i]))\n return false\n }\n }\n // associative arrays\n else {\n var keys = {};\n for (var key in a1) {\n keys[key] = true;\n }\n for (var key in a2) {\n keys[key] = true;\n }\n for (var key in keys) {\n if (!are_equal(a1[key], a2[key]))\n return false;\n }\n }\n return true;\n \n default:\n return a1 == a2;\n }\n}", "function areEquals(a, b) {\n\n\tlet aProps = Object.getOwnPropertyNames(a);\n let bProps = Object.getOwnPropertyNames(b);\n\n if (bProps.length !== aProps.length)\n \treturn false;\n\n for (let key of aProps) {\n \tif (!bProps.includes(key) || b[key] !== a[key])\n \t\treturn false;\n }\n\n for (let key of bProps) {\n \tif (!aProps.includes(key) || b[key] !== a[key])\n \t\treturn false;\n }\n\n return true;\n}", "function allValuesEqualTo(input, value, opts) {\n if (Array.isArray(input)) {\n if (input.length === 0) {\n return true;\n }\n\n if (opts.arraysMustNotContainPlaceholders && input.length > 0 && input.some(el => isEq(el, value))) {\n return false;\n } // so at this point\n // backwards traversal for increased performance:\n\n\n for (let i = input.length; i--;) {\n if (!allValuesEqualTo(input[i], value, opts)) {\n return false;\n }\n }\n\n return true;\n }\n\n if (isObj(input)) {\n const keys = Object.keys(input);\n\n if (keys.length === 0) {\n return true;\n }\n\n for (let i = keys.length; i--;) {\n if (!allValuesEqualTo(input[keys[i]], value, opts)) {\n return false;\n }\n }\n\n return true;\n }\n\n return isEq(input, value);\n} // T H E E X P O S E D W R A P P E R F U N C T I O N", "function _areEquals(a, b) {\n if (a === b)\n return true;\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n var arrA = Array.isArray(a), arrB = Array.isArray(b), i, length, key;\n if (arrA && arrB) {\n length = a.length;\n if (length != b.length)\n return false;\n for (i = length; i-- !== 0;)\n if (!_areEquals(a[i], b[i]))\n return false;\n return true;\n }\n if (arrA != arrB)\n return false;\n var keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length)\n return false;\n for (i = length; i-- !== 0;)\n if (!b.hasOwnProperty(keys[i]))\n return false;\n for (i = length; i-- !== 0;) {\n key = keys[i];\n if (!_areEquals(a[key], b[key]))\n return false;\n }\n return true;\n }\n return a !== a && b !== b;\n}", "function _areEquals(a, b) {\n if (a === b)\n return true;\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n var arrA = Array.isArray(a), arrB = Array.isArray(b), i, length, key;\n if (arrA && arrB) {\n length = a.length;\n if (length != b.length)\n return false;\n for (i = length; i-- !== 0;)\n if (!_areEquals(a[i], b[i]))\n return false;\n return true;\n }\n if (arrA != arrB)\n return false;\n var keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length)\n return false;\n for (i = length; i-- !== 0;)\n if (!b.hasOwnProperty(keys[i]))\n return false;\n for (i = length; i-- !== 0;) {\n key = keys[i];\n if (!_areEquals(a[key], b[key]))\n return false;\n }\n return true;\n }\n return a !== a && b !== b;\n}", "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}", "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}", "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}", "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}", "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}", "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}", "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}", "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}", "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}", "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}", "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}", "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}", "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}", "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}", "function keyValMatch(obj1, obj2){\n\tfor(key in obj1){\n\t\tfor(otherKey in obj2){\n\t\t\tif(key == otherKey && obj1[key] == obj2[otherKey]){\n\t\t\t\t\n\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t}\n\treturn false;\n}", "function areObjectsEqual(obj1, obj2) {\n if (Object.keys(obj1).length !== Object.keys(obj2).length) {\n return false;\n }\n let objectLength = Object.keys(obj1).length;\n let i = 1;\n for (let key in obj1) {\n if (!obj2[key] || obj1[key] !== obj2[key]) {\n return false;\n } else if (objectLength === i) {\n return true;\n }\n i++;\n }\n}", "function equal(a, b) {\n\n if (Object.is(a, b))\n return true;\n\n\t// Dates must have equal time values\n\tif (isDate(a) && isDate(b))\n\t\treturn a.getTime() === b.getTime();\n\n\t// Non-objects must be strictly equal (types must be equal)\n\tif (!isObject(a) || !isObject(b))\n\t\treturn a === b;\n\n\t// Prototypes must be identical. getPrototypeOf may throw on\n\t// ES3 engines that don't provide access to the prototype.\n\ttry {\n\n\t if (Object.getPrototypeOf(a) !== Object.getPrototypeOf(b))\n\t\t return false;\n\n\t} catch (err) {}\n\n\tvar aKeys = Object.keys(a),\n\t\tbKeys = Object.keys(b);\n\n\t// Number of own properties must be identical\n\tif (aKeys.length !== bKeys.length)\n\t\treturn false;\n\n\tfor (var i$0 = 0; i$0 < aKeys.length; ++i$0) {\n\n\t\t// Names of own properties must be identical\n\t\tif (!OP_hasOwnProperty.call(b, aKeys[i$0]))\n\t\t\treturn false;\n\n\t\t// Values of own properties must be equal\n\t\tif (!equal(a[aKeys[i$0]], b[aKeys[i$0]]))\n\t\t\treturn false;\n\t}\n\n\treturn true;\n}", "function deepEqual(object1, object2) {\n const keys1 = Object.keys(object1);\n const keys2 = Object.keys(object2);\n \n if (keys1.length !== keys2.length) {\n return false;\n }\n \n for (const key of keys1) {\n const val1 = object1[key];\n const val2 = object2[key];\n const areObjects = isObject(val1) && isObject(val2);\n if (\n areObjects && !deepEqual(val1, val2) ||\n !areObjects && val1 !== val2\n ) {\n return false;\n }\n }\n \n return true;\n}", "function sameKeysNested(objA, objB, ignoreOrder) {\n var keysA = Object.keys(objA)\n var keysB = Object.keys(objB)\n\n if (keysA.length !== keysB.length)\n return false\n\n if (ignoreOrder) keysA.sort(), keysB.sort()\n\n for (var i = 0; i < keysA.length; i++)\n if (keysA[i] !== keysB[i])\n return false\n\n if (typeof objA[keysA[i]] === \"object\")\n sameKeysNested(objA[keysA[i]], objB[keysB[i]], ignoreOrder)\n\n return true\n}", "function deepEqual(a, b) {\n if (a === null && b === null)\n return true;\n if (a === undefined && b === undefined)\n return true;\n if (areBothNaN(a, b))\n return true;\n if (typeof a !== \"object\")\n return a === b;\n var aIsArray = isArrayLike(a);\n var aIsMap = isMapLike(a);\n if (aIsArray !== isArrayLike(b)) {\n return false;\n }\n else if (aIsMap !== isMapLike(b)) {\n return false;\n }\n else if (aIsArray) {\n if (a.length !== b.length)\n return false;\n for (var i = a.length - 1; i >= 0; i--)\n if (!deepEqual(a[i], b[i]))\n return false;\n return true;\n }\n else if (aIsMap) {\n if (a.size !== b.size)\n return false;\n var equals_1 = true;\n a.forEach(function (value, key) {\n equals_1 = equals_1 && deepEqual(b.get(key), value);\n });\n return equals_1;\n }\n else if (typeof a === \"object\" && typeof b === \"object\") {\n if (a === null || b === null)\n return false;\n if (isMapLike(a) && isMapLike(b)) {\n if (a.size !== b.size)\n return false;\n // Freaking inefficient.... Create PR if you run into this :) Much appreciated!\n return deepEqual(observable.shallowMap(a).entries(), observable.shallowMap(b).entries());\n }\n if (getEnumerableKeys(a).length !== getEnumerableKeys(b).length)\n return false;\n for (var prop in a) {\n if (!(prop in b))\n return false;\n if (!deepEqual(a[prop], b[prop]))\n return false;\n }\n return true;\n }\n return false;\n}", "function deepEqual(a, b) {\n if (a === null && b === null)\n return true;\n if (a === undefined && b === undefined)\n return true;\n if (areBothNaN(a, b))\n return true;\n if (typeof a !== \"object\")\n return a === b;\n var aIsArray = isArrayLike(a);\n var aIsMap = isMapLike(a);\n if (aIsArray !== isArrayLike(b)) {\n return false;\n }\n else if (aIsMap !== isMapLike(b)) {\n return false;\n }\n else if (aIsArray) {\n if (a.length !== b.length)\n return false;\n for (var i = a.length - 1; i >= 0; i--)\n if (!deepEqual(a[i], b[i]))\n return false;\n return true;\n }\n else if (aIsMap) {\n if (a.size !== b.size)\n return false;\n var equals_1 = true;\n a.forEach(function (value, key) {\n equals_1 = equals_1 && deepEqual(b.get(key), value);\n });\n return equals_1;\n }\n else if (typeof a === \"object\" && typeof b === \"object\") {\n if (a === null || b === null)\n return false;\n if (isMapLike(a) && isMapLike(b)) {\n if (a.size !== b.size)\n return false;\n // Freaking inefficient.... Create PR if you run into this :) Much appreciated!\n return deepEqual(observable.shallowMap(a).entries(), observable.shallowMap(b).entries());\n }\n if (getEnumerableKeys(a).length !== getEnumerableKeys(b).length)\n return false;\n for (var prop in a) {\n if (!(prop in b))\n return false;\n if (!deepEqual(a[prop], b[prop]))\n return false;\n }\n return true;\n }\n return false;\n}", "function dictsAreEquivalent(a, b) {\n // Create arrays of property names\n var aProps = Object.getOwnPropertyNames(a);\n var bProps = Object.getOwnPropertyNames(b);\n\n // If number of properties is different,\n // objects are not equivalent\n if (aProps.length != bProps.length) {\n return false;\n }\n\n for (var i = 0; i < aProps.length; i++) {\n var propName = aProps[i];\n\n // If values of same property are not equal,\n // objects are not equivalent\n if (a[propName] !== b[propName]) {\n return false;\n }\n }\n\n // If we made it this far, objects\n // are considered equivalent\n return true;\n}", "function keyValMatch(obj1, obj2) {\r\n\t//create nested loop\r\n\t//for each key in obj 1, check each key of obj 2 for match\r\n\tfor(key1 in obj1) {\r\n\t\tfor(key2 in obj2) {\r\n\t\t\tif ( (key1 == key2) && (obj1[key1] == obj2[key2])) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn false;\r\n}", "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n var length, i, keys;\n\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n\n for (i = length; i-- !== 0;) if (!equal(a[i], b[i])) return false;\n\n return true;\n } // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n\n\n var it;\n\n if (hasMap && a instanceof Map && b instanceof Map) {\n if (a.size !== b.size) return false;\n it = a.entries();\n\n while (!(i = it.next()).done) if (!b.has(i.value[0])) return false;\n\n it = a.entries();\n\n while (!(i = it.next()).done) if (!equal(i.value[1], b.get(i.value[0]))) return false;\n\n return true;\n }\n\n if (hasSet && a instanceof Set && b instanceof Set) {\n if (a.size !== b.size) return false;\n it = a.entries();\n\n while (!(i = it.next()).done) if (!b.has(i.value[0])) return false;\n\n return true;\n } // END: Modifications\n\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n\n for (i = length; i-- !== 0;) if (a[i] !== b[i]) return false;\n\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;) if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; // END: fast-deep-equal\n // START: react-fast-compare\n // custom handling for DOM elements\n\n\n if (hasElementType && a instanceof Element) return false; // custom handling for React/Preact\n\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n continue;\n } // all other properties should be traversed as usual\n\n\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n } // END: react-fast-compare\n // START: fast-deep-equal\n\n\n return true;\n }\n\n return a !== a && b !== b;\n} // end fast-deep-equal", "function shallowEqual(actual /*: Object*/, expected /*: Object*/) /*: boolean*/ {\n\t var keys = _Object$keys(expected);\n\n\t for (var _iterator3 = (keys /*: Array<string>*/), _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _getIterator(_iterator3);;) {\n\t var _ref3;\n\n\t if (_isArray3) {\n\t if (_i3 >= _iterator3.length) break;\n\t _ref3 = _iterator3[_i3++];\n\t } else {\n\t _i3 = _iterator3.next();\n\t if (_i3.done) break;\n\t _ref3 = _i3.value;\n\t }\n\n\t var key = _ref3;\n\n\t if (actual[key] !== expected[key]) {\n\t return false;\n\t }\n\t }\n\n\t return true;\n\t}", "function sameProperties(objA, objB) {\n var keysA = Object.keys(objA).sort()\n var keysB = Object.keys(objB).sort()\n\n if (keysA.length !== keysB.length)\n return false\n\n for (var i = 0; i < keysA.length; i++)\n if (keysA[i] !== keysB[i] || objA[keysA[i]] !== objB[keysB[i]])\n return false\n\n return true\n}", "function _shallowCompareKeys(objA, objB, keys) {\n\t return _filterKeys(objA, objB, keys).every(function (key) {\n\t return objA.hasOwnProperty(key) === objB.hasOwnProperty(key) && objA[key] === objB[key];\n\t });\n\t}", "function has_all(obj, keys) {\n for (var i in keys) {\n let key = keys[i];\n if (!(key in obj)) {\n return false;\n }\n }\n return true;\n}", "function matchItems(object1, object2) {\n for (var key in object1) {\n for (var anotherKey in object2) {\n if (key === anotherKey) {\n if (object1[key] === object2[anotherKey]) {\n return true;\n } \n }\n }\n }\n return false;\n }", "function deepEqual(a, b) {\n if (a === null && b === null)\n return true;\n if (a === undefined && b === undefined)\n return true;\n if (typeof a !== \"object\")\n return a === b;\n var aIsArray = isArrayLike(a);\n var aIsMap = isMapLike(a);\n if (aIsArray !== isArrayLike(b)) {\n return false;\n }\n else if (aIsMap !== isMapLike(b)) {\n return false;\n }\n else if (aIsArray) {\n if (a.length !== b.length)\n return false;\n for (var i = a.length - 1; i >= 0; i--)\n if (!deepEqual(a[i], b[i]))\n return false;\n return true;\n }\n else if (aIsMap) {\n if (a.size !== b.size)\n return false;\n var equals_1 = true;\n a.forEach(function (value, key) {\n equals_1 = equals_1 && deepEqual(b.get(key), value);\n });\n return equals_1;\n }\n else if (typeof a === \"object\" && typeof b === \"object\") {\n if (a === null || b === null)\n return false;\n if (isMapLike(a) && isMapLike(b)) {\n if (a.size !== b.size)\n return false;\n // Freaking inefficient.... Create PR if you run into this :) Much appreciated!\n return deepEqual(observable.shallowMap(a).entries(), observable.shallowMap(b).entries());\n }\n if (getEnumerableKeys(a).length !== getEnumerableKeys(b).length)\n return false;\n for (var prop in a) {\n if (!(prop in b))\n return false;\n if (!deepEqual(a[prop], b[prop]))\n return false;\n }\n return true;\n }\n return false;\n}", "function deepEqual(a, b) {\n if (a === null && b === null)\n return true;\n if (a === undefined && b === undefined)\n return true;\n if (typeof a !== \"object\")\n return a === b;\n var aIsArray = isArrayLike(a);\n var aIsMap = isMapLike(a);\n if (aIsArray !== isArrayLike(b)) {\n return false;\n }\n else if (aIsMap !== isMapLike(b)) {\n return false;\n }\n else if (aIsArray) {\n if (a.length !== b.length)\n return false;\n for (var i = a.length - 1; i >= 0; i--)\n if (!deepEqual(a[i], b[i]))\n return false;\n return true;\n }\n else if (aIsMap) {\n if (a.size !== b.size)\n return false;\n var equals_1 = true;\n a.forEach(function (value, key) {\n equals_1 = equals_1 && deepEqual(b.get(key), value);\n });\n return equals_1;\n }\n else if (typeof a === \"object\" && typeof b === \"object\") {\n if (a === null || b === null)\n return false;\n if (isMapLike(a) && isMapLike(b)) {\n if (a.size !== b.size)\n return false;\n // Freaking inefficient.... Create PR if you run into this :) Much appreciated!\n return deepEqual(observable.shallowMap(a).entries(), observable.shallowMap(b).entries());\n }\n if (getEnumerableKeys(a).length !== getEnumerableKeys(b).length)\n return false;\n for (var prop in a) {\n if (!(prop in b))\n return false;\n if (!deepEqual(a[prop], b[prop]))\n return false;\n }\n return true;\n }\n return false;\n}", "function deepEqual(a, b) {\n if (a === null && b === null)\n return true;\n if (a === undefined && b === undefined)\n return true;\n if (typeof a !== \"object\")\n return a === b;\n var aIsArray = isArrayLike(a);\n var aIsMap = isMapLike(a);\n if (aIsArray !== isArrayLike(b)) {\n return false;\n }\n else if (aIsMap !== isMapLike(b)) {\n return false;\n }\n else if (aIsArray) {\n if (a.length !== b.length)\n return false;\n for (var i = a.length - 1; i >= 0; i--)\n if (!deepEqual(a[i], b[i]))\n return false;\n return true;\n }\n else if (aIsMap) {\n if (a.size !== b.size)\n return false;\n var equals_1 = true;\n a.forEach(function (value, key) {\n equals_1 = equals_1 && deepEqual(b.get(key), value);\n });\n return equals_1;\n }\n else if (typeof a === \"object\" && typeof b === \"object\") {\n if (a === null || b === null)\n return false;\n if (isMapLike(a) && isMapLike(b)) {\n if (a.size !== b.size)\n return false;\n // Freaking inefficient.... Create PR if you run into this :) Much appreciated!\n return deepEqual(observable.shallowMap(a).entries(), observable.shallowMap(b).entries());\n }\n if (getEnumerableKeys(a).length !== getEnumerableKeys(b).length)\n return false;\n for (var prop in a) {\n if (!(prop in b))\n return false;\n if (!deepEqual(a[prop], b[prop]))\n return false;\n }\n return true;\n }\n return false;\n}", "function areThereDuplicates(...args) {\n let obj = {};\n\n for (let val of args) {\n obj[val] = (obj[val] || 0) + 1;\n }\n \n for(let key in obj) {\n if(obj[key] !== 1) return true;\n }\n \n return false;\n}", "function deepEqual(a, b) {\n if (typeof a !== 'object' || typeof b !== 'object' || a == null || b == null)\n return a === b;\n if (Object.keys(a).length !== Object.keys(b).length) return false;\n for (let i = 0; i < Object.keys(a).length; i++)\n if (!deepEqual(a[Object.keys(a)[i]], b[Object.keys(a)[i]])) return false;\n return true;\n}", "function shallowEqualObjects(a, b) {\r\n if (a && !b || b && !a) {\r\n return false;\r\n }\r\n\r\n for (var key in a) {\r\n if (a[key] !== b[key]) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n} // Copied from: https://github.com/jonschlinkert/is-plain-object", "function looseEqual(a,b){if(a===b){return true;}var isObjectA=isObject(a);var isObjectB=isObject(b);if(isObjectA&&isObjectB){try{var isArrayA=Array.isArray(a);var isArrayB=Array.isArray(b);if(isArrayA&&isArrayB){return a.length===b.length&&a.every(function(e,i){return looseEqual(e,b[i]);});}else if(!isArrayA&&!isArrayB){var keysA=Object.keys(a);var keysB=Object.keys(b);return keysA.length===keysB.length&&keysA.every(function(key){return looseEqual(a[key],b[key]);});}else{/* istanbul ignore next */return false;}}catch(e){/* istanbul ignore next */return false;}}else if(!isObjectA&&!isObjectB){return String(a)===String(b);}else{return false;}}", "function looseEqual(a,b){if(a===b){return true;}var isObjectA=isObject(a);var isObjectB=isObject(b);if(isObjectA&&isObjectB){try{var isArrayA=Array.isArray(a);var isArrayB=Array.isArray(b);if(isArrayA&&isArrayB){return a.length===b.length&&a.every(function(e,i){return looseEqual(e,b[i]);});}else if(!isArrayA&&!isArrayB){var keysA=Object.keys(a);var keysB=Object.keys(b);return keysA.length===keysB.length&&keysA.every(function(key){return looseEqual(a[key],b[key]);});}else{/* istanbul ignore next */return false;}}catch(e){/* istanbul ignore next */return false;}}else if(!isObjectA&&!isObjectB){return String(a)===String(b);}else{return false;}}", "function deepEqual(firstObject, secondObject) {\n const firstKeys = Object.keys(firstObject);\n const secondKeys = Object.keys(secondObject);\n\n if (firstKeys.length !== secondKeys.length) {\n return false;\n }\n\n for (const key of firstKeys) {\n const val1 = firstObject[key];\n const val2 = secondObject[key];\n const areObjects = val1 != null && typeof val1 === 'object' && val2 != null && typeof val2 === 'object';\n if (\n areObjects && !deepEqual(val1, val2) ||\n !areObjects && val1 !== val2\n ) {\n return false;\n }\n }\n\n return true;\n}", "function equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0; )\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && a instanceof Map && b instanceof Map) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && a instanceof Set && b instanceof Set) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (\n hasArrayBuffer &&\n ArrayBuffer.isView(a) &&\n ArrayBuffer.isView(b)\n ) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0; ) if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp)\n return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf)\n return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString)\n return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0; )\n if (!Object.prototype.hasOwnProperty.call(b, keys[i]))\n return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0; ) {\n if (\n (keys[i] === '_owner' ||\n keys[i] === '__v' ||\n keys[i] === '__o') &&\n a.$$typeof\n ) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n }", "function objEquals(a, b)\r\n{\r\n for(x in b)\r\n if(typeof(a[x]) == \"undefined\")\r\n return false;\r\n\r\n for(x in a)\r\n {\r\n if(typeof(b[x]) == \"undefined\")\r\n return false;\r\n\r\n if(a[x])\r\n {\r\n if(typeof(a[x]) == \"object\")\r\n {\r\n if(typeof(b[x]) != \"object\" || !objEquals(a[x], b[x]))\r\n return false;\r\n }\r\n else if(a[x] !== b[x])\r\n return false;\r\n }\r\n else if(b[x])\r\n return false;\r\n }\r\n\r\n return true;\r\n}", "function shallowCompareKeys(objA, objB, keys) {\n\t // treat `null` and `undefined` as the same\n\t if (objA == null && objB == null) {\n\t return true;\n\t }\n\t else if (objA == null || objB == null) {\n\t return false;\n\t }\n\t else if (Array.isArray(objA) || Array.isArray(objB)) {\n\t return false;\n\t }\n\t else if (keys != null) {\n\t return _shallowCompareKeys(objA, objB, keys);\n\t }\n\t else {\n\t // shallowly compare all keys from both objects\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t return (_shallowCompareKeys(objA, objB, { include: keysA }) && _shallowCompareKeys(objA, objB, { include: keysB }));\n\t }\n\t}", "function has_match(first_object, second_object) {\n\tfor (key in first_object) {\n\t\tif (first_object.key === second_object.key) {\n\t\t\treturn true; break;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n}", "function keyValueMatch(obj1, obj2) {\n\tfor (var key1 in obj1) {\n\t\tfor (var key2 in obj2) {\n\t\t\tif (key1 == key2) {\n\t\t\t\tif (obj1[key1] == obj2[key2]) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}" ]
[ "0.65744436", "0.65744436", "0.6468666", "0.6456315", "0.643489", "0.6336228", "0.62963444", "0.6272564", "0.624131", "0.62243676", "0.6214185", "0.6183737", "0.6158076", "0.61295843", "0.6128047", "0.6075044", "0.6034758", "0.601491", "0.60053355", "0.5978394", "0.5977129", "0.5949941", "0.5944158", "0.5941802", "0.5939812", "0.5921284", "0.5921085", "0.58979046", "0.5850362", "0.5843675", "0.58280855", "0.5823165", "0.5823165", "0.58006006", "0.58006006", "0.58006006", "0.58006006", "0.58006006", "0.58006006", "0.58006006", "0.58006006", "0.58006006", "0.58006006", "0.58006006", "0.58006006", "0.58006006", "0.58006006", "0.57964885", "0.57863206", "0.5778823", "0.57754815", "0.5745783", "0.57151777", "0.57151777", "0.5713716", "0.56972075", "0.56962824", "0.5694571", "0.56847763", "0.5665374", "0.56622326", "0.5660792", "0.56597966", "0.56597966", "0.56597966", "0.56539506", "0.5638121", "0.5633756", "0.5626689", "0.5626689", "0.5615473", "0.56150204", "0.5604109", "0.5602602", "0.5600766", "0.55944645", "0.5592423", "0.5592423", "0.5592423", "0.5592423", "0.5592423", "0.5592423", "0.5592423", "0.5592423", "0.5592423", "0.5592423", "0.5592423", "0.5592423", "0.5592423", "0.5592423", "0.5592423", "0.5592423", "0.5592423", "0.5592423", "0.5592423", "0.5592423", "0.5592423", "0.5592423", "0.5592423", "0.5592423", "0.5592423" ]
0.0
-1
1 unit of expiration time represents 10ms.
function msToExpirationTime(ms) { // Always subtract from the offset so that we don't clash with the magic number for NoWork. return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function msToExpirationTime(ms){// Always add an offset so that we don't clash with the magic number for NoWork.\nreturn(ms/UNIT_SIZE|0)+MAGIC_NUMBER_OFFSET;}", "function msToExpirationTime(ms){// Always add an offset so that we don't clash with the magic number for NoWork.\nreturn(ms/UNIT_SIZE|0)+MAGIC_NUMBER_OFFSET;}", "function msToExpirationTime(ms){// Always add an offset so that we don't clash with the magic number for NoWork.\nreturn(ms/UNIT_SIZE|0)+MAGIC_NUMBER_OFFSET;}", "function msToExpirationTime(ms){// Always add an offset so that we don't clash with the magic number for NoWork.\nreturn(ms/UNIT_SIZE|0)+MAGIC_NUMBER_OFFSET;}", "function msToExpirationTime(ms){// Always add an offset so that we don't clash with the magic number for NoWork.\nreturn MAGIC_NUMBER_OFFSET-(ms/UNIT_SIZE|0);}", "function msToExpirationTime(ms){// Always add an offset so that we don't clash with the magic number for NoWork.\nreturn MAGIC_NUMBER_OFFSET-(ms/UNIT_SIZE|0);}", "function msToExpirationTime(ms){// Always add an offset so that we don't clash with the magic number for NoWork.\nreturn MAGIC_NUMBER_OFFSET-(ms/UNIT_SIZE|0);}", "function msToExpirationTime(ms) {\n // 加上偏移量以避免10ms以内的与NoWork冲突\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms){// Always subtract from the offset so that we don't clash with the magic number for NoWork.\nreturn MAGIC_NUMBER_OFFSET-(ms/UNIT_SIZE|0);}", "function msToExpirationTime(ms){// Always subtract from the offset so that we don't clash with the magic number for NoWork.\nreturn MAGIC_NUMBER_OFFSET-(ms/UNIT_SIZE|0);}", "function msToExpirationTime(ms){// Always subtract from the offset so that we don't clash with the magic number for NoWork.\nreturn MAGIC_NUMBER_OFFSET-(ms/UNIT_SIZE|0);}", "function msToExpirationTime(ms){// Always add an offset so that we don't clash with the magic number for NoWork.\n\treturn(ms/UNIT_SIZE|0)+MAGIC_NUMBER_OFFSET;}", "function msToExpirationTime(ms) {\n\t // Always add an offset so that we don't clash with the magic number for NoWork.\n\t return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n\t}", "function getExpirationInSeconds () {\n const nowInSeconds = Math.floor(Date.now() / 1000)\n\n return {\n iat: nowInSeconds,\n exp: nowInSeconds + 30\n }\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n }", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n }", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n }", "function calculateExpire() {\n var expiresIn = Math.round((((messageObject.expiresOn-new Date(Date.now())) % 86400000) % 3600000) / 60000); // minutes\n console.log(expiresIn);\n return expiresIn\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n }", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n }", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n }", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n }", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n }", "function msToExpirationTime(ms) {\n // Always subtract from the offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - ((ms / UNIT_SIZE) | 0);\n }", "function msToExpirationTime(ms) {\n // Always subtract from the offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n }", "function msToExpirationTime(ms) {\n // Always subtract from the offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n }", "function msToExpirationTime(ms) {\n // Always subtract from the offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n }", "function msToExpirationTime(ms) {\n // Always subtract from the offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n }", "function msToExpirationTime(ms) {\n // Always subtract from the offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n }", "function msToExpirationTime(ms) {\n // Always subtract from the offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n }", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n}", "function msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n}" ]
[ "0.69083685", "0.69083685", "0.69083685", "0.69083685", "0.68177795", "0.68177795", "0.68177795", "0.6728504", "0.66832036", "0.66832036", "0.66832036", "0.6663674", "0.66431606", "0.66385615", "0.65983444", "0.65983444", "0.65983444", "0.6567885", "0.65556103", "0.65173113", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.6494671", "0.64938873", "0.64938873", "0.64938873", "0.64938873", "0.6479297", "0.6379728", "0.6379728", "0.6379728", "0.6379728", "0.6379728", "0.6379728", "0.63776934", "0.63776934", "0.63776934", "0.63776934", "0.63776934", "0.63776934", "0.63776934", "0.63776934", "0.63776934", "0.63776934", "0.63776934" ]
0.0
-1
to be able to optimize each path individually by branching early. This needs a compiler or we can do it manually. Helpers that don't need this branching live outside of this function.
function ChildReconciler(shouldTrackSideEffects) { function deleteChild(returnFiber, childToDelete) { if (!shouldTrackSideEffects) { // Noop. return; } // Deletions are added in reversed order so we add it to the front. // At this point, the return fiber's effect list is empty except for // deletions, so we can just append the deletion to the list. The remaining // effects aren't added until the complete phase. Once we implement // resuming, this may not be true. var last = returnFiber.lastEffect; if (last !== null) { last.nextEffect = childToDelete; returnFiber.lastEffect = childToDelete; } else { returnFiber.firstEffect = returnFiber.lastEffect = childToDelete; } childToDelete.nextEffect = null; childToDelete.effectTag = Deletion; } function deleteRemainingChildren(returnFiber, currentFirstChild) { if (!shouldTrackSideEffects) { // Noop. return null; } // TODO: For the shouldClone case, this could be micro-optimized a bit by // assuming that after the first child we've already added everything. var childToDelete = currentFirstChild; while (childToDelete !== null) { deleteChild(returnFiber, childToDelete); childToDelete = childToDelete.sibling; } return null; } function mapRemainingChildren(returnFiber, currentFirstChild) { // Add the remaining children to a temporary map so that we can find them by // keys quickly. Implicit (null) keys get added to this set with their index // instead. var existingChildren = new Map(); var existingChild = currentFirstChild; while (existingChild !== null) { if (existingChild.key !== null) { existingChildren.set(existingChild.key, existingChild); } else { existingChildren.set(existingChild.index, existingChild); } existingChild = existingChild.sibling; } return existingChildren; } function useFiber(fiber, pendingProps) { // We currently set sibling to null and index to 0 here because it is easy // to forget to do before returning it. E.g. for the single child case. var clone = createWorkInProgress(fiber, pendingProps); clone.index = 0; clone.sibling = null; return clone; } function placeChild(newFiber, lastPlacedIndex, newIndex) { newFiber.index = newIndex; if (!shouldTrackSideEffects) { // Noop. return lastPlacedIndex; } var current = newFiber.alternate; if (current !== null) { var oldIndex = current.index; if (oldIndex < lastPlacedIndex) { // This is a move. newFiber.effectTag = Placement; return lastPlacedIndex; } else { // This item can stay in place. return oldIndex; } } else { // This is an insertion. newFiber.effectTag = Placement; return lastPlacedIndex; } } function placeSingleChild(newFiber) { // This is simpler for the single child case. We only need to do a // placement for inserting new children. if (shouldTrackSideEffects && newFiber.alternate === null) { newFiber.effectTag = Placement; } return newFiber; } function updateTextNode(returnFiber, current, textContent, expirationTime) { if (current === null || current.tag !== HostText) { // Insert var created = createFiberFromText(textContent, returnFiber.mode, expirationTime); created.return = returnFiber; return created; } else { // Update var existing = useFiber(current, textContent); existing.return = returnFiber; return existing; } } function updateElement(returnFiber, current, element, expirationTime) { if (current !== null) { if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path: isCompatibleFamilyForHotReloading(current, element) )) { // Move based on index var existing = useFiber(current, element.props); existing.ref = coerceRef(returnFiber, current, element); existing.return = returnFiber; { existing._debugSource = element._source; existing._debugOwner = element._owner; } return existing; } } // Insert var created = createFiberFromElement(element, returnFiber.mode, expirationTime); created.ref = coerceRef(returnFiber, current, element); created.return = returnFiber; return created; } function updatePortal(returnFiber, current, portal, expirationTime) { if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) { // Insert var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime); created.return = returnFiber; return created; } else { // Update var existing = useFiber(current, portal.children || []); existing.return = returnFiber; return existing; } } function updateFragment(returnFiber, current, fragment, expirationTime, key) { if (current === null || current.tag !== Fragment) { // Insert var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key); created.return = returnFiber; return created; } else { // Update var existing = useFiber(current, fragment); existing.return = returnFiber; return existing; } } function createChild(returnFiber, newChild, expirationTime) { if (typeof newChild === 'string' || typeof newChild === 'number') { // Text nodes don't have keys. If the previous node is implicitly keyed // we can continue to replace it without aborting even if it is not a text // node. var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime); created.return = returnFiber; return created; } if (typeof newChild === 'object' && newChild !== null) { switch (newChild.$$typeof) { case REACT_ELEMENT_TYPE: { var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime); _created.ref = coerceRef(returnFiber, null, newChild); _created.return = returnFiber; return _created; } case REACT_PORTAL_TYPE: { var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime); _created2.return = returnFiber; return _created2; } } if (isArray$1(newChild) || getIteratorFn(newChild)) { var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null); _created3.return = returnFiber; return _created3; } throwOnInvalidObjectType(returnFiber, newChild); } { if (typeof newChild === 'function') { warnOnFunctionType(); } } return null; } function updateSlot(returnFiber, oldFiber, newChild, expirationTime) { // Update the fiber if the keys match, otherwise return null. var key = oldFiber !== null ? oldFiber.key : null; if (typeof newChild === 'string' || typeof newChild === 'number') { // Text nodes don't have keys. If the previous node is implicitly keyed // we can continue to replace it without aborting even if it is not a text // node. if (key !== null) { return null; } return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime); } if (typeof newChild === 'object' && newChild !== null) { switch (newChild.$$typeof) { case REACT_ELEMENT_TYPE: { if (newChild.key === key) { if (newChild.type === REACT_FRAGMENT_TYPE) { return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key); } return updateElement(returnFiber, oldFiber, newChild, expirationTime); } else { return null; } } case REACT_PORTAL_TYPE: { if (newChild.key === key) { return updatePortal(returnFiber, oldFiber, newChild, expirationTime); } else { return null; } } } if (isArray$1(newChild) || getIteratorFn(newChild)) { if (key !== null) { return null; } return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null); } throwOnInvalidObjectType(returnFiber, newChild); } { if (typeof newChild === 'function') { warnOnFunctionType(); } } return null; } function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) { if (typeof newChild === 'string' || typeof newChild === 'number') { // Text nodes don't have keys, so we neither have to check the old nor // new node for the key. If both are text nodes, they match. var matchedFiber = existingChildren.get(newIdx) || null; return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime); } if (typeof newChild === 'object' && newChild !== null) { switch (newChild.$$typeof) { case REACT_ELEMENT_TYPE: { var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null; if (newChild.type === REACT_FRAGMENT_TYPE) { return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key); } return updateElement(returnFiber, _matchedFiber, newChild, expirationTime); } case REACT_PORTAL_TYPE: { var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null; return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime); } } if (isArray$1(newChild) || getIteratorFn(newChild)) { var _matchedFiber3 = existingChildren.get(newIdx) || null; return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null); } throwOnInvalidObjectType(returnFiber, newChild); } { if (typeof newChild === 'function') { warnOnFunctionType(); } } return null; } /** * Warns if there is a duplicate or missing key */ function warnOnInvalidKey(child, knownKeys) { { if (typeof child !== 'object' || child === null) { return knownKeys; } switch (child.$$typeof) { case REACT_ELEMENT_TYPE: case REACT_PORTAL_TYPE: warnForMissingKey(child); var key = child.key; if (typeof key !== 'string') { break; } if (knownKeys === null) { knownKeys = new Set(); knownKeys.add(key); break; } if (!knownKeys.has(key)) { knownKeys.add(key); break; } error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key); break; } } return knownKeys; } function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) { // This algorithm can't optimize by searching from both ends since we // don't have backpointers on fibers. I'm trying to see how far we can get // with that model. If it ends up not being worth the tradeoffs, we can // add it later. // Even with a two ended optimization, we'd want to optimize for the case // where there are few changes and brute force the comparison instead of // going for the Map. It'd like to explore hitting that path first in // forward-only mode and only go for the Map once we notice that we need // lots of look ahead. This doesn't handle reversal as well as two ended // search but that's unusual. Besides, for the two ended optimization to // work on Iterables, we'd need to copy the whole set. // In this first iteration, we'll just live with hitting the bad case // (adding everything to a Map) in for every insert/move. // If you change this code, also update reconcileChildrenIterator() which // uses the same algorithm. { // First, validate keys. var knownKeys = null; for (var i = 0; i < newChildren.length; i++) { var child = newChildren[i]; knownKeys = warnOnInvalidKey(child, knownKeys); } } var resultingFirstChild = null; var previousNewFiber = null; var oldFiber = currentFirstChild; var lastPlacedIndex = 0; var newIdx = 0; var nextOldFiber = null; for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) { if (oldFiber.index > newIdx) { nextOldFiber = oldFiber; oldFiber = null; } else { nextOldFiber = oldFiber.sibling; } var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime); if (newFiber === null) { // TODO: This breaks on empty slots like null children. That's // unfortunate because it triggers the slow path all the time. We need // a better way to communicate whether this was a miss or null, // boolean, undefined, etc. if (oldFiber === null) { oldFiber = nextOldFiber; } break; } if (shouldTrackSideEffects) { if (oldFiber && newFiber.alternate === null) { // We matched the slot, but we didn't reuse the existing fiber, so we // need to delete the existing child. deleteChild(returnFiber, oldFiber); } } lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx); if (previousNewFiber === null) { // TODO: Move out of the loop. This only happens for the first run. resultingFirstChild = newFiber; } else { // TODO: Defer siblings if we're not at the right index for this slot. // I.e. if we had null values before, then we want to defer this // for each null value. However, we also don't want to call updateSlot // with the previous one. previousNewFiber.sibling = newFiber; } previousNewFiber = newFiber; oldFiber = nextOldFiber; } if (newIdx === newChildren.length) { // We've reached the end of the new children. We can delete the rest. deleteRemainingChildren(returnFiber, oldFiber); return resultingFirstChild; } if (oldFiber === null) { // If we don't have any more existing children we can choose a fast path // since the rest will all be insertions. for (; newIdx < newChildren.length; newIdx++) { var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime); if (_newFiber === null) { continue; } lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx); if (previousNewFiber === null) { // TODO: Move out of the loop. This only happens for the first run. resultingFirstChild = _newFiber; } else { previousNewFiber.sibling = _newFiber; } previousNewFiber = _newFiber; } return resultingFirstChild; } // Add all children to a key map for quick lookups. var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves. for (; newIdx < newChildren.length; newIdx++) { var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime); if (_newFiber2 !== null) { if (shouldTrackSideEffects) { if (_newFiber2.alternate !== null) { // The new fiber is a work in progress, but if there exists a // current, that means that we reused the fiber. We need to delete // it from the child list so that we don't add it to the deletion // list. existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key); } } lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx); if (previousNewFiber === null) { resultingFirstChild = _newFiber2; } else { previousNewFiber.sibling = _newFiber2; } previousNewFiber = _newFiber2; } } if (shouldTrackSideEffects) { // Any existing children that weren't consumed above were deleted. We need // to add them to the deletion list. existingChildren.forEach(function (child) { return deleteChild(returnFiber, child); }); } return resultingFirstChild; } function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) { // This is the same implementation as reconcileChildrenArray(), // but using the iterator instead. var iteratorFn = getIteratorFn(newChildrenIterable); if (!(typeof iteratorFn === 'function')) { { throw Error( "An object is not an iterable. This error is likely caused by a bug in React. Please file an issue." ); } } { // We don't support rendering Generators because it's a mutation. // See https://github.com/facebook/react/issues/12995 if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag newChildrenIterable[Symbol.toStringTag] === 'Generator') { if (!didWarnAboutGenerators) { error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.'); } didWarnAboutGenerators = true; } // Warn about using Maps as children if (newChildrenIterable.entries === iteratorFn) { if (!didWarnAboutMaps) { error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.'); } didWarnAboutMaps = true; } // First, validate keys. // We'll get a different iterator later for the main pass. var _newChildren = iteratorFn.call(newChildrenIterable); if (_newChildren) { var knownKeys = null; var _step = _newChildren.next(); for (; !_step.done; _step = _newChildren.next()) { var child = _step.value; knownKeys = warnOnInvalidKey(child, knownKeys); } } } var newChildren = iteratorFn.call(newChildrenIterable); if (!(newChildren != null)) { { throw Error( "An iterable object provided no iterator." ); } } var resultingFirstChild = null; var previousNewFiber = null; var oldFiber = currentFirstChild; var lastPlacedIndex = 0; var newIdx = 0; var nextOldFiber = null; var step = newChildren.next(); for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) { if (oldFiber.index > newIdx) { nextOldFiber = oldFiber; oldFiber = null; } else { nextOldFiber = oldFiber.sibling; } var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime); if (newFiber === null) { // TODO: This breaks on empty slots like null children. That's // unfortunate because it triggers the slow path all the time. We need // a better way to communicate whether this was a miss or null, // boolean, undefined, etc. if (oldFiber === null) { oldFiber = nextOldFiber; } break; } if (shouldTrackSideEffects) { if (oldFiber && newFiber.alternate === null) { // We matched the slot, but we didn't reuse the existing fiber, so we // need to delete the existing child. deleteChild(returnFiber, oldFiber); } } lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx); if (previousNewFiber === null) { // TODO: Move out of the loop. This only happens for the first run. resultingFirstChild = newFiber; } else { // TODO: Defer siblings if we're not at the right index for this slot. // I.e. if we had null values before, then we want to defer this // for each null value. However, we also don't want to call updateSlot // with the previous one. previousNewFiber.sibling = newFiber; } previousNewFiber = newFiber; oldFiber = nextOldFiber; } if (step.done) { // We've reached the end of the new children. We can delete the rest. deleteRemainingChildren(returnFiber, oldFiber); return resultingFirstChild; } if (oldFiber === null) { // If we don't have any more existing children we can choose a fast path // since the rest will all be insertions. for (; !step.done; newIdx++, step = newChildren.next()) { var _newFiber3 = createChild(returnFiber, step.value, expirationTime); if (_newFiber3 === null) { continue; } lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx); if (previousNewFiber === null) { // TODO: Move out of the loop. This only happens for the first run. resultingFirstChild = _newFiber3; } else { previousNewFiber.sibling = _newFiber3; } previousNewFiber = _newFiber3; } return resultingFirstChild; } // Add all children to a key map for quick lookups. var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves. for (; !step.done; newIdx++, step = newChildren.next()) { var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime); if (_newFiber4 !== null) { if (shouldTrackSideEffects) { if (_newFiber4.alternate !== null) { // The new fiber is a work in progress, but if there exists a // current, that means that we reused the fiber. We need to delete // it from the child list so that we don't add it to the deletion // list. existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key); } } lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx); if (previousNewFiber === null) { resultingFirstChild = _newFiber4; } else { previousNewFiber.sibling = _newFiber4; } previousNewFiber = _newFiber4; } } if (shouldTrackSideEffects) { // Any existing children that weren't consumed above were deleted. We need // to add them to the deletion list. existingChildren.forEach(function (child) { return deleteChild(returnFiber, child); }); } return resultingFirstChild; } function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) { // There's no need to check for keys on text nodes since we don't have a // way to define them. if (currentFirstChild !== null && currentFirstChild.tag === HostText) { // We already have an existing node so let's just update it and delete // the rest. deleteRemainingChildren(returnFiber, currentFirstChild.sibling); var existing = useFiber(currentFirstChild, textContent); existing.return = returnFiber; return existing; } // The existing first child is not a text node so we need to create one // and delete the existing ones. deleteRemainingChildren(returnFiber, currentFirstChild); var created = createFiberFromText(textContent, returnFiber.mode, expirationTime); created.return = returnFiber; return created; } function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) { var key = element.key; var child = currentFirstChild; while (child !== null) { // TODO: If key === null and child.key === null, then this only applies to // the first item in the list. if (child.key === key) { switch (child.tag) { case Fragment: { if (element.type === REACT_FRAGMENT_TYPE) { deleteRemainingChildren(returnFiber, child.sibling); var existing = useFiber(child, element.props.children); existing.return = returnFiber; { existing._debugSource = element._source; existing._debugOwner = element._owner; } return existing; } break; } case Block: // We intentionally fallthrough here if enableBlocksAPI is not on. // eslint-disable-next-lined no-fallthrough default: { if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path: isCompatibleFamilyForHotReloading(child, element) )) { deleteRemainingChildren(returnFiber, child.sibling); var _existing3 = useFiber(child, element.props); _existing3.ref = coerceRef(returnFiber, child, element); _existing3.return = returnFiber; { _existing3._debugSource = element._source; _existing3._debugOwner = element._owner; } return _existing3; } break; } } // Didn't match. deleteRemainingChildren(returnFiber, child); break; } else { deleteChild(returnFiber, child); } child = child.sibling; } if (element.type === REACT_FRAGMENT_TYPE) { var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key); created.return = returnFiber; return created; } else { var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime); _created4.ref = coerceRef(returnFiber, currentFirstChild, element); _created4.return = returnFiber; return _created4; } } function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) { var key = portal.key; var child = currentFirstChild; while (child !== null) { // TODO: If key === null and child.key === null, then this only applies to // the first item in the list. if (child.key === key) { if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) { deleteRemainingChildren(returnFiber, child.sibling); var existing = useFiber(child, portal.children || []); existing.return = returnFiber; return existing; } else { deleteRemainingChildren(returnFiber, child); break; } } else { deleteChild(returnFiber, child); } child = child.sibling; } var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime); created.return = returnFiber; return created; } // This API will tag the children with the side-effect of the reconciliation // itself. They will be added to the side-effect list as we pass through the // children and the parent. function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) { // This function is not recursive. // If the top level item is an array, we treat it as a set of children, // not as a fragment. Nested arrays on the other hand will be treated as // fragment nodes. Recursion happens at the normal flow. // Handle top level unkeyed fragments as if they were arrays. // This leads to an ambiguity between <>{[...]}</> and <>...</>. // We treat the ambiguous cases above the same. var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null; if (isUnkeyedTopLevelFragment) { newChild = newChild.props.children; } // Handle object types var isObject = typeof newChild === 'object' && newChild !== null; if (isObject) { switch (newChild.$$typeof) { case REACT_ELEMENT_TYPE: return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime)); case REACT_PORTAL_TYPE: return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime)); } } if (typeof newChild === 'string' || typeof newChild === 'number') { return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime)); } if (isArray$1(newChild)) { return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime); } if (getIteratorFn(newChild)) { return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime); } if (isObject) { throwOnInvalidObjectType(returnFiber, newChild); } { if (typeof newChild === 'function') { warnOnFunctionType(); } } if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) { // If the new child is undefined, and the return fiber is a composite // component, throw an error. If Fiber return types are disabled, // we already threw above. switch (returnFiber.tag) { case ClassComponent: { { var instance = returnFiber.stateNode; if (instance.render._isMockFunction) { // We allow auto-mocks to proceed as if they're returning null. break; } } } // Intentionally fall through to the next case, which handles both // functions and classes // eslint-disable-next-lined no-fallthrough case FunctionComponent: { var Component = returnFiber.type; { { throw Error( (Component.displayName || Component.name || 'Component') + "(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null." ); } } } } } // Remaining cases are all treated as empty. return deleteRemainingChildren(returnFiber, currentFirstChild); } return reconcileChildFibers; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "optimiseSetOperation(path, nextValue) {\n // console.log('optimiseSetOperation', path, nextValue)\n // If target value is not a plain value, unable to optimise\n if (typeof nextValue === 'object') {\n // console.log(\"Not optimisable because next value is object\")\n return false;\n } // Check the source values, if there is more than one value being assigned,\n // we won't optimise\n\n\n var matches = (0, _extractWithPath.default)(path, this.PRESTAGE); // If we are not overwriting exactly one key, this cannot be optimised, so we bail\n\n if (matches.length !== 1) {\n // console.log('Not optimisable because match count is != 1', JSON.stringify(matches))\n return false;\n } // Okay, we are assigning exactly one value to exactly one existing slot, so we might optimise\n\n\n var match = matches[0]; // If the value of the match is an array or object, we cannot safely optimise this since the meaning\n // of pre-existing operations might change (in theory, at least), so we bail\n\n if (typeof match.value === 'object') {\n // console.log(\"Not optimisable because old value is object\")\n return false;\n } // If the new and old value are the equal, we optimise this operation by discarding it\n // Now, let's build the operation\n\n\n var op;\n\n if (match.value === nextValue) {\n // If new and old values are equal, we optimise this by deleting the operation\n // console.log(\"Omitting operation\")\n op = null;\n } else if (typeof match.value === 'string' && typeof nextValue === 'string') {\n // console.log(\"Rewriting to dmp\")\n // We are updating a string to another string, so we are making a diffMatchPatch\n var patch = this.dmp.patch_make(match.value, nextValue).map(patch => patch.toString()).join('');\n op = {\n patch: {\n id: this.PRESTAGE._id,\n diffMatchPatch: {\n [path]: patch\n }\n }\n };\n } else {\n // console.log(\"Not able to rewrite to dmp, making normal set\")\n // We are changing the type of the value, so must make a normal set-operation\n op = {\n patch: {\n id: this.PRESTAGE._id,\n set: {\n [path]: nextValue\n }\n }\n };\n } // Let's make a plain, concrete path from the array-path. We use this to keep only the latest set\n // operation touching this path in the buffer.\n\n\n var canonicalPath = (0, _arrayToJSONMatchPath.default)(match.path); // Store this operation, overwriting any previous operations touching this same path\n\n if (op) {\n this.setOperations[canonicalPath] = op;\n } else {\n delete this.setOperations[canonicalPath];\n } // Signal that we succeeded in optimizing this patch\n\n\n return true;\n }", "function buildPaths(path) {\n\n for (var name in path) {\n var current = path[name];\n\n if (traverse(path, current, name)) {\n buildPaths(addProperties(current, path, name));\n }\n\n }\n }", "function o0(o1)\n{\n var o2 = -1;\n try {\nfor (var o259 = 0; o3 < o1.length; function (o502, name, o38, o781, o782, o837, o585, o838, o549) {\n try {\no839.o468();\n}catch(e){}\n // TODO we should allow people to just pass in a complete filename instead\n // of parent and name being that we just join them anyways\n var o840 = name ? o591.resolve(o591.o592(o502, name)) : o502;\n\n function o841(o842) {\n function o843(o842) {\n try {\nif (!o838) {\n try {\no474.o800(o502, name, o842, o781, o782, o549);\n}catch(e){}\n }\n}catch(e){}\n try {\nif (o837) try {\no837();\n}catch(e){}\n}catch(e){}\n try {\no334('cp ' + o840);\n}catch(e){}\n }\n var o844 = false;\n try {\nModule['preloadPlugins'].forEach(function (o845) {\n try {\nif (o844) try {\nreturn;\n}catch(e){}\n}catch(e){}\n try {\nif (o845['canHandle'](o840)) {\n try {\no845['handle'](o842, o840, o843, function () {\n try {\nif (o585) try {\no585();\n}catch(e){}\n}catch(e){}\n try {\no334('cp ' + o840);\n}catch(e){}\n });\n}catch(e){}\n try {\no844 = true;\n}catch(e){}\n }\n}catch(e){}\n });\n}catch(e){}\n try {\nif (!o844) try {\no843(o842);\n}catch(e){}\n}catch(e){}\n }\n try {\no332('cp ' + o840);\n}catch(e){}\n try {\nif (typeof o38 == 'string') {\n try {\no839.o846(o38, function (o842) {\n try {\no841(o842);\n}catch(e){}\n }, o585);\n}catch(e){}\n } else {\n try {\no841(o38);\n}catch(e){}\n }\n}catch(e){}\n })\n {\n try {\nif (o1[o3] == undefined)\n {\n try {\nif (o2 == -1)\n {\n try {\no2 = o3;\n}catch(e){}\n }\n}catch(e){}\n }\n else\n {\n try {\nif (o2 != -1)\n {\n try {\no4.o5(o2 + \"-\" + (o3-1) + \" = undefined\");\n}catch(e){}\n try {\no2 = -1;\n}catch(e){}\n }\n}catch(e){}\n try {\no4.o5(o3 + \" = \" + o1[o3]);\n}catch(e){}\n }\n}catch(e){}\n }\n}catch(e){}\n}", "findPath(unit) {\n /**\n * The open list (Nodes yet to check),\n * this list is always sorted according to the\n * score of its nodes:\n */\n let openList = [];\n\n /**\n * The closed list (Nodes already checked):\n */\n this.closedList = [];\n\n this.nodeScoring.posFinishX = unit.route.finish.posX;\n this.nodeScoring.posFinishY = unit.route.finish.posY;\n\n let done = false;\n let cumCostPath = -1;\n let iteCnt = 0;\n let tmpCost = 0;\n let tmp = null;\n\n //\tThe node which is currently being processed:\n let curNode = unit.route.start;\n\n let i, j;\n\n /**\n * MAIN LOOP:\n */\n while (!done) {\n /** If we've reached the destination: */\n if (curNode.equals(unit.route.finish)) {\n done = true;\n cumCostPath = curNode.cost;\n\n unit.route.Steps.push(curNode);\n tmp = curNode;\n while (tmp.parent != null) {\n unit.route.Steps.push(tmp.parent);\n tmp = tmp.parent;\n }\n unit.route.Steps.reverse();\n unit.route.routeActive = true;\n }\n /** If not yet: */\n else {\n /** EXPAND THE CURRENT NODE: */\n for (i = -1; i < 2; i++) {\n for (j = -1; j < 2; j++) {\n /** Current node is already expanded: */\n if (i == 0 && j == 0) {\n continue;\n }\n /** If we're out of bounds: */\n if (curNode.posX + i < 0 || curNode.posX + i >= this.map.width || curNode.posY + j < 0 || curNode.posY + j >= this.map.height) {\n continue;\n }\n /** If it's an obstacle: */\n //if (this.map.getTileType(curNode.posY + j, curNode.posX + i) == this.INDEX_FOR_OBSTACLE) {\n if (this.map.getTileType(curNode.posX + i, curNode.posY + j) == this.INDEX_FOR_OBSTACLE) {\n continue;\n }\n /** Is this neighbor already done with ?: */\n if (this.closedList != null) {\n tmp = this.closedList.find(a => (a.posX == curNode.posX + i && a.posY == curNode.posY + j));\n if (tmp != null) {\n tmp = null;\n continue;\n }\n }\n\n /** Skip diagonally adjacent nodes IF NO_DIAG_MOV == true: */\n if (i != 0 && j != 0 && this.NO_DIAG_MOV) {\n continue;\n }\n /** THIS IS FOR PSEUDO-NO_DIAG_MOV\n YOU SHALL NOT MOVE DIAGONALLY IF\n AN OBSTACLE IS ADJACENT TO current_node\n AND THIS NODE:\n */\n if (i != 0 && j != 0 && this.HALF_DIAG_MOV) {\n if (this.map.getTileType(curNode.posX + i, curNode.posY) == this.INDEX_FOR_OBSTACLE)\n continue;\n if (this.map.getTileType(curNode.posX, curNode.posY + j) == this.INDEX_FOR_OBSTACLE)\n continue;\n }\n /** Check whether this neighbor is already on the open list,\n * if yes - update its costs accordingly:\n */\n if (openList != null) {\n tmp = openList.find(a => (a.posX == curNode.posX + i && a.posY == curNode.posY + j));\n }\n\n if (openList != null && tmp != null) {\n /** checking for diagonal vs (horizontal / vertical step): */\n if (i != 0 && j != 0) {\n /** Is curNode the better predecessor\n * than what we have atm ?:\n */\n if (tmp.cost > curNode.cost + 14) {\n tmp.cost = curNode.cost + 14;\n tmp.parent = curNode;\n }\n }\n else {\n if (tmp.cost > curNode.cost + 10) {\n tmp.cost = curNode.cost + 10;\n tmp.parent = curNode;\n }\n }\n\n }\n /** tmp is neither on the openList nor on the closedList\n * so we gotta add it to the open list:\n */\n else {\n if (i != 0 && j != 0) {\n tmpCost = curNode.cost + 14;\n }\n else {\n tmpCost = curNode.cost + 10;\n }\n tmp = new Node(curNode.posX + i, curNode.posY + j);\n tmp.cost = tmpCost;\n tmp.parent = curNode;\n if (openList == null) {\n openList = [];\n }\n openList.push(tmp);\n //openList.sort(this.nodeScoring.compareManhattan);\n //openList.sort(function() { this.nodeScoring.compareManhattan(); });\n // TODO: find out why this works and what exactly it does D:\n // TODO: compareManhattan() does not get a and b (= undefined) !!!\n /** PATH SCORING: */\n openList.sort((a, b) => {\n this.nodeScoring.compareManhattan(a, b);\n });\n }\n }\n }\n\n /** ADD curNode TO THE closedList: */\n if (this.closedList == null) {\n this.closedList = [];\n }\n this.closedList.push(curNode);\n /** REMOVE curNode FROM THE openList: */\n let index = openList.indexOf(curNode);\n if (index > -1) {\n openList.splice(index, 1);\n }\n\n /** if openList is empty, there are no open nodes left, even though destination is not reached yet: */\n if (openList.length == 0) {\n unit.route.Steps = null;\n unit.route.finish = null;\n unit.route.routeActive = false;\n done = true;\n console.log(\"NO PATH FOUND!\");\n }\n else {\n curNode = openList[0];\n }\n iteCnt++;\n }\n }\n }", "function findPaths(c, paths) {\n if (c.length > 1){\n let path1 = paths.slice()\n let path2 = paths.slice()\n\n path1 = (c[1] !== 1)\n ? [...path1, 1]\n : 0\n\n path2 = (c[2] !== 2)\n ? [...path2, 2]\n : 0\n\n if (path1 === 0 && path2 === 0){\n paths = 0\n } else if (path1 !== 0 && path2 === 0){\n return findPaths(c.slice(1), path1)\n } else if (path1 === 0 && path2 !== 0){\n return findPaths(c.slice(2), path2)\n } else if (path1 !== 0 && path2 !== 0){\n path1 = findPaths(c.slice(1), path1)\n path2 = findPaths(c.slice(2), path2)\n return (path1.length < path2.length)\n ? path1\n : path2\n }\n }\n return paths\n}", "genAllPaths() {\n const startTime = moment.now()\n let iterations = 0\n \n const edges = this.get('edges')\n const root = this.get('root')\n const startNode = root.source\n const endNode = root.target\n\n let open = []\n let paths = []\n let pathObjects = []\n let curr = [startNode] //Not sure if needed\n\n while(curr != null){\n for(let j = 0; j < edges.length; j++){\n if(edges[j].source == curr[curr.length-1] && edges[j].target != startNode && !curr.includes(edges[j].target)){\n let newPath = curr.concat(edges[j].target)\n if(edges[j].target == endNode && edges[j].target != startNode && paths.toString().indexOf(curr.toString()) < 0){\n paths[paths.length] = newPath.copy()\n pathObjects.push({path: newPath.copy(), degredationVariance: Math.abs(this.calcDegredation(newPath) - root.data)})\n }else{\n open[open.length] = newPath.copy()\n }\n }else if(edges[j].target == curr[curr.length-1] && edges[j].source != startNode && !curr.includes(edges[j].source)){\n let newPath = curr.concat(edges[j].source)\n if(edges[j].source == endNode && paths.toString().indexOf(curr.toString()) < 0){\n paths[paths.length] = newPath.copy()\n pathObjects.push({path: newPath.copy(), degredationVariance: Math.abs(this.calcDegredation(newPath) - root.data)})\n }else{\n open[open.length] = newPath.copy()\n }\n }\n iterations++\n }\n if(open.length > 0){\n curr = open.pop()\n }else{\n curr = null\n }\n }\n\n this.setStats({'time': (moment.now() - startTime) /1000, 'iterations': iterations})\n this.set('allPaths', pathObjects.sort(function(a, b) { return a.degredationVariance - b.degredationVariance}))\n }", "function AssignPathValue() {\n\tfor(iI = 0; iI < 20; iI ++) { // scan the grid repeatedly to fill in all the spots\n\t\tfor(iPV = 0; iPV < 100; iPV ++) {\n\t\t\tif(gridArr[iPV].pathValue > 0 && // has an assigned path value\n\t\t\tgridArr[iPV].explored > 0 && // only apply to explored places\n\t\t\tgridArr[iPV].open > 0) { // is an open space\n\t\t\t\tiNorth = iPV - 10;\n\t\t\t\tif(iNorth >= 0 && // is on map\n\t\t\t\tgridArr[iNorth].explored > 0 && // only check explored places\n\t\t\t\tgridArr[iNorth].room != \"SC\" && // is not a secret chamber\n\t\t\t\tgridArr[iNorth].open > 0) { // is an open tile\n\t\t\t\t\tif(gridArr[iNorth].pathValue < 1 || // unassigned path value\n\t\t\t\t\tgridArr[iNorth].pathValue > gridArr[iPV].pathValue + 1) { // there is a new shortest way there\n\t\t\t\t\t\tgridArr[iNorth].pathValue = gridArr[iPV].pathValue + 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tiEast = iPV + 1;\n\t\t\t\tif(iEast < 100 && // is on map\n\t\t\t\tgridArr[iEast].explored > 0 && // only check explored places\n\t\t\t\tgridArr[iEast].room != \"SC\" && // is not a secret chamber\n\t\t\t\tMath.floor(iEast / 10) == Math.floor(iPV / 10) && // is on same Y axis as iPV\n\t\t\t\tgridArr[iEast].open > 0) { // is an open tile\n\t\t\t\t\tif(gridArr[iEast].pathValue < 1 || // unassigned path value\n\t\t\t\t\tgridArr[iEast].pathValue > gridArr[iPV].pathValue + 1) { // there is a new shortest way there\n\t\t\t\t\t\tgridArr[iEast].pathValue = gridArr[iPV].pathValue + 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tiSouth = iPV + 10;\n\t\t\t\tif(iSouth < 100 && // is on map\n\t\t\t\tgridArr[iSouth].explored > 0 && // only check explored places\n\t\t\t\tgridArr[iSouth].room != \"SC\" && // is not a secret chamber\n\t\t\t\tgridArr[iSouth].open > 0) { // is an open tile\n\t\t\t\t\tif(gridArr[iSouth].pathValue < 1 || // unassigned path value\n\t\t\t\t\tgridArr[iSouth].pathValue > gridArr[iPV].pathValue + 1) { // there is a new shortest way there\n\t\t\t\t\t\tgridArr[iSouth].pathValue = gridArr[iPV].pathValue + 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tiWest = iPV - 1;\n\t\t\t\tif(iWest >= 0 && // is on map\n\t\t\t\tgridArr[iWest].explored > 0 && // only check explored places\n\t\t\t\tgridArr[iWest].room != \"SC\" && // is not a secret chamber\n\t\t\t\tMath.floor(iWest / 10) == Math.floor(iPV / 10) && // is on same Y axis as iPV\n\t\t\t\tgridArr[iWest].open > 0) { // is an open tile\n\t\t\t\t\tif(gridArr[iWest].pathValue < 1 || // unassigned path value\n\t\t\t\t\tgridArr[iWest].pathValue > gridArr[iPV].pathValue + 1) { // there is a new shortest way there\n\t\t\t\t\t\tgridArr[iWest].pathValue = gridArr[iPV].pathValue + 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tUpdateTileMap();\n}", "function shortenPaths(graph) {\n var foundNonTrivialPaths = true,\n startNode = null,\n startNodeName = null,\n minWeight = 0;\n\n while(foundNonTrivialPaths) {\n foundNonTrivialPaths = false;\n for(startNodeName in graph) {\n startNode = graph[startNodeName];\n depthFirstSearch(\n startNodeName, \n graph, \n followingNonTrivialPath(\n [],\n [\n correctMinimumWeight,\n modifyStep\n ],\n [\n resetMinimumWeight\n ]\n )\n );\n }\n }\n\n function followingNonTrivialPath (startFns, stepFns, endFns) {\n return function inner (path, pathIndex) {\n if(path.length > 1) {\n foundNonTrivialPaths = true;\n startFns.forEach(function eachStartFn (startFn) {\n startFn.call(this, path, pathIndex);\n });\n stepFns.forEach(function eachStepFn (fn) {\n path.forEach(stepFns);\n });\n endFns.forEach(function eachEndFn (endFn) {\n endFn.call(this, path, pathIndex);\n });\n }\n }\n }\n\n function modifyStep (step, stepIndex, path) { \n if(step.edge.weight === minWeight) {\n delete step.node.edges[step.nextNodeName];\n }\n else {\n // reduce weight of edge by lowest weight along non-trivial path\n step.edge.weight -= minWeight;\n }\n\n if(stepIndex === path.length - 1) {\n // get/create edge between start and end of current path\n ensureAttr(startNode.edges, step.nextNodeName, { weight: 0});\n startNode.edges[step.nextNodeName].weight += minWeight; \n } \n }\n\n function correctMinimumWeight (step) {\n if(step.edge != null && step.edge.weight > 0 && minWeight === 0 || minWeight > 0 && step.edge.weight < minWeight) {\n minWeight = step.edge.weight;\n }\n }\n \n function resetMinimumWeight () {\n minWeight = 0;\n }\n }", "function branchingProcess() {\n var implicantsPowerSet = powerSet(remainingImplicants);\n validSolutions = filterPowerSet(implicantsPowerSet); //array contains valid cominations\n var currentValidSolutions = validSolutions.slice();\n minimalSolutions = filterPossibleSolutions(currentValidSolutions); //array contains valid combainations with least cost\n}", "isReachable(vertID1, vertID2, curr=null, path=[]) {\n if(curr == vertID1) {\n return [];\n }\n if(curr == vertID2) {\n path.push(curr);\n return path;\n }\n let result = [];\n curr = curr || vertID1;\n for(let edge of this.edgeList) {\n if(edge[0] == curr) {\n path.push(edge[0]);\n result.push(this.isReachable(vertID1, vertID2, edge[1], path));\n }\n }\n return result;\n }", "async function traversePaths(canvas) {\n log(\"Traversing all paths...\");\n\n if (DEBUG_PATH) {\n drawing.canvasClear(tilesOverlay);\n drawing.canvasDrawLine(tilesOverlay, 0, 0, tilesOverlay.width, 0, [0xff, 0, 0, 0xff], 3);\n drawing.canvasDrawLine(tilesOverlay, tilesOverlay.width, 0, tilesOverlay.width, tilesOverlay.height, [0xff, 0, 0, 0xff], 3);\n drawing.canvasDrawLine(tilesOverlay, tilesOverlay.width, tilesOverlay.height, 0, tilesOverlay.height, [0xff, 0, 0, 0xff], 3);\n drawing.canvasDrawLine(tilesOverlay, 0, tilesOverlay.height, 0, 0, [0xff, 0, 0, 0xff], 3);\n }\n\n // top paths\n for (let i = 0; i < metaInfo.topPaths.length; i++) {\n const path = metaInfo.topPaths[i];\n path.x0 = path.offset;\n path.y0 = metaInfo.topEdge;\n await traversePath(canvas, path, DIR.BOTTOM);\n }\n // right paths\n for (let i = 0; i < metaInfo.rightPaths.length; i++) {\n const path = metaInfo.rightPaths[i];\n path.x0 = metaInfo.rigthEdge;\n path.y0 = path.offset;\n await traversePath(canvas, path, DIR.LEFT);\n }\n // bottom paths\n for (let i = 0; i < metaInfo.bottomPaths.length; i++) {\n const path = metaInfo.bottomPaths[i];\n path.x0 = path.offset;\n path.y0 = metaInfo.bottomEdge;\n await traversePath(canvas, path, DIR.TOP);\n }\n // left paths\n for (let i = 0; i < metaInfo.leftPaths.length; i++) {\n const path = metaInfo.leftPaths[i];\n path.x0 = metaInfo.leftEdge;\n path.y0 = path.offset;\n await traversePath(canvas, path, DIR.RIGHT);\n }\n}", "function build_full_paths(FI, FP, Paths) {\n var i = 0,\n L = 0,\n R = 0,\n C = 0,\n j = 0,\n pl = Paths.length;\n var dad = [],\n q = [];\n\n for (; i < pl; ++i) {\n dad[i] = q[i] = i;\n FP[i] = Paths[i];\n }\n\n for (; j < q.length; ++j) {\n i = q[j];\n L = FI[i].L;\n R = FI[i].R;\n C = FI[i].C;\n\n if (dad[i] === i) {\n if (L !== -1\n /*NOSTREAM*/\n && dad[L] !== L) dad[i] = dad[L];\n if (R !== -1 && dad[R] !== R) dad[i] = dad[R];\n }\n\n if (C !== -1\n /*NOSTREAM*/\n ) dad[C] = i;\n\n if (L !== -1 && i != dad[i]) {\n dad[L] = dad[i];\n if (q.lastIndexOf(L) < j) q.push(L);\n }\n\n if (R !== -1 && i != dad[i]) {\n dad[R] = dad[i];\n if (q.lastIndexOf(R) < j) q.push(R);\n }\n }\n\n for (i = 1; i < pl; ++i) if (dad[i] === i) {\n if (R !== -1\n /*NOSTREAM*/\n && dad[R] !== R) dad[i] = dad[R];else if (L !== -1 && dad[L] !== L) dad[i] = dad[L];\n }\n\n for (i = 1; i < pl; ++i) {\n if (FI[i].type === 0\n /* unknown */\n ) continue;\n j = i;\n if (j != dad[j]) do {\n j = dad[j];\n FP[i] = FP[j] + \"/\" + FP[i];\n } while (j !== 0 && -1 !== dad[j] && j != dad[j]);\n dad[i] = -1;\n }\n\n FP[0] += \"/\";\n\n for (i = 1; i < pl; ++i) {\n if (FI[i].type !== 2\n /* stream */\n ) FP[i] += \"/\";\n }\n }", "function recurse(tree,path) \n{\n for (var key in tree) \n {\n\tif (key == 'model') \n\t{\n\t compile(tree[key], path);\n\t continue;\n\t}\n\n\trecurse(tree[key], path == '' ? key : path + '.' + key)\n }\n}", "function workPath(dest) {\r\n let element = dest;\r\n while (element !== undefined) {\r\n pathArray.push(element);\r\n element = element.parent;\r\n }\r\n aStarUnfinished = false;\r\n}", "recurseThroughPath(path, breakingConditionCallback) {\n const indexOfSeparator = path.indexOf('/');\n\n // breaking condition\n if (indexOfSeparator === -1) {\n return breakingConditionCallback(path);\n }\n\n const leftHalf = path.substring(0, indexOfSeparator);\n const rightHalf = path.substring(indexOfSeparator + 1, path.length);\n\n return {\n [leftHalf]: this.recurseThroughPath(rightHalf, breakingConditionCallback),\n };\n }", "computeDrawPathBuffers() {\n const buffer = this._pathBuffer;\n let preview,current,next;\n const cList = $objs.cases_s;\n for (let i=0, l=buffer.length; i<l; i++) {\n const preview = buffer[i-1];\n const current = buffer[i ];\n const next = buffer[i+1];\n const preview_id = preview && cList.indexOf(preview);\n const current_id = current && cList.indexOf(current);\n const next_id = next && cList.indexOf(next);\n //TODO: FIXME: compute distance via global position for Math.hypot\n if(preview){\n current.pathConnexion[String(preview_id)] = Math.hypot(preview.x-current.x, preview.y-current.y);\n };\n if(next){\n current.pathConnexion[String(next_id)] = Math.hypot(next.x-current.x, next.y-current.y);\n };\n };\n console.log0('PathsBuffers: ', buffer);\n this._pathBuffer = [];\n this.refreshPath();\n }", "_calculatePath() {\n\t\tlet startNode = { x: this.gridX, y: this.gridY };\n\t\tlet goalNode = { x: window.uncover.player.gridX, y: window.uncover.player.gridY };\n\t\tstartNode.g = 0;\n\t\tstartNode.f = Math.pow(startNode.x - goalNode.x, 2) + Math.pow(startNode.y - goalNode.y, 2);\n\n\t\tlet openList = [startNode];\n\t\tlet closedList = [];\n\n\t\tconst neighborPositions = [{ dx: 0, dy: -1}, { dx: 1, dy: 0}, { dx: 0, dy: 1}, { dx: -1, dy: 0}];\n\n\t\tlet iterations = 0;\n\t\twhile (openList.length > 0) {\n\t\t\titerations++;\n\t\t\tif (iterations >= this._maxIterations) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Find node with minimum f\n\t\t\tlet currentNodeIndex = 0;\n\t\t\tfor (let i = 1; i < openList.length; i++) {\n\t\t\t\tif (openList[i].f < openList[currentNodeIndex].f) {\n\t\t\t\t\tcurrentNodeIndex = i;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet currentNode = openList[currentNodeIndex];\n\t\t\topenList.splice(currentNodeIndex, 1);\n\t\t\tclosedList.push(currentNode);\n\n\t\t\t// Found the goal node, create path\n\t\t\tif (currentNode.x === goalNode.x && currentNode.y === goalNode.y) {\n\t\t\t\treturn this._constructPath(currentNode);\n\t\t\t}\n\n\t\t\t// Create adjacent neighbors\n\t\t\tconst neighbors = []; \n\t\t\tfor (let neighborPosition of neighborPositions) {\n\t\t\t\tconst xPosition = currentNode.x + neighborPosition.dx;\n\t\t\t\tconst yPosition = currentNode.y + neighborPosition.dy;\n\t\t\t\tif (xPosition < 0 || xPosition >= window.uncover.gameGrid.gridSize || yPosition < 0 || yPosition >= window.uncover.gameGrid.gridSize) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst isNeighborInClosedList = closedList.some((node) => node.x === xPosition && node.y === yPosition);\n\t\t\t\tif (isNeighborInClosedList) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (window.uncover.gameGrid.grid[xPosition][yPosition] != GridType.FILLED) {\n\t\t\t\t\tcontinue;\n\t\t\t\t} \n\n\t\t\t\tneighbors.push({ x: xPosition, y: yPosition, parent: currentNode });\n\t\t\t}\n\n\t\t\tfor (let neighbor of neighbors) {\n\t\t\t\tneighbor.g = currentNode.g + 1;\n\t\t\t\tneighbor.h = Math.pow(neighbor.x - goalNode.x, 2) + Math.pow(neighbor.y - goalNode.y, 2);\n\t\t\t\tneighbor.f = neighbor.g + neighbor.h;\n\n\t\t\t\tconst neighborInOpenListIndex = openList.findIndex((node) => node.x === neighbor.x && node.y === neighbor.y);\n\t\t\t\tconst isNeighborInOpenList = neighborInOpenListIndex >= 0;\n\t\t\t\tif (isNeighborInOpenList) {\n\t\t\t\t\tif (neighbor.g > openList[neighborInOpenListIndex].g) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\topenList.push(neighbor);\n\t\t\t}\n\t\t}\n\n\t\treturn [];\n\t}", "function applyPath(){\n\t\tvar cap = [];\n\t\tdelta = 0;\n\t\tGraph.instance.edges.forEach(function(key,edge){\n\t\t\tstate.edgePrevCost[edge.id] = edge.resources[1];\n\t\t});\n\t\tfor (var i =0; i<state.edgesOfSP.length; i++){\n\t\t\t\n\t\t\tcap[i] = state.edgesOfSP[i].resources[0]-state.edgesOfSP[i].state.flow;\n\t\t\t\n\t\t}\n var minCap = d3.min(cap);\n\t\t\n\t\tvar excessDemandMin = Math.min(Graph.instance.nodes.get(state.sourceId).b , -Graph.instance.nodes.get(state.targetId).b);\n\t\tdelta = Math.min(minCap, excessDemandMin);\n\t\t\n\t\n\t\tfor (var i = 0; i < state.edgesOfSP.length; i++){\n \n var edge = state.edgesOfSP[i];\n\n edge.state.flow += edge.start.state.predecessor[\"direction\"] * delta;\n\t\t\tminCost += delta * edge.edges[\"cost\"];\n }\n\t\tGraph.instance.nodes.forEach(function(key,node){\n\t\t\tbs[node.id] = node.b;\n\t\t\tif(node.id == state.sourceId){\n\t\t\t\tnode.b = node.b-delta;\n\t\t\t\tbOfS = node.b;\n\t\t\t}else if(node.id == state.targetId){\n\t\t\t\tnode.b = node.b + delta;\n\t\t\t\tbOfT = node.b;\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tnode.b = 0;\n\t\t\t}\n\t\t});\n\t\t\n\t\tGraph.instance.edges.forEach(function(key, edge) {\n\t\t\tedge.inSP = false;\n\t\t\tif(edge.state.flow == edge.resources[0]){\n\t\t\t\tedge.state.usedUp = true;\t\n\t\t\t}else{\n\t\t\t\tedge.state.usedUp = false;\t\n\n\t\t\t}\n });\n logger.log(\"Applied augmenting path with flow \"+state.augmentation);\n\t\tdel = 0;\n\t\tstate.distancesOfNodes = [];\n state.show_residual_graph = false;\n\t\tstate.shortestPath = [];\n state.current_step = STEP_MAINLOOP;\n\t\t\n\t}", "function _helper(node) {\n if (!node) {\n return;\n }\n\n path.push(node.val);\n // console.log('p:', path.join(', '));\n let sum = 0;\n for (let i = path.length - 1; i >= 0; i--) {\n sum += path[i];\n if (sum === k) {\n console.log('path:', path.slice(i));\n }\n }\n\n _helper(node.left);\n _helper(node.right);\n path.pop();\n }", "function walkPathAndBuildOutput(root, node, jsonArg, path,\n depth, seed, results, requestedPath,\n optimizedPath, optimizedLength,\n fromReferenceArg, referenceContainer,\n modelRoot, expired, expireImmediate,\n branchSelector, boxValues, materialized,\n hasDataSource, treatErrorsAsValues,\n allowFromWhenceYouCame) {\n\n var json = jsonArg, type, refTarget;\n var fromReference = fromReferenceArg;\n\n // ============ Check for base cases ================\n\n // If there's nowhere to go, we've reached a terminal node, or hit\n // the end of the path, stop now. Either build missing paths or report the value.\n if (undefined === node ||\n undefined !== (type = node.$type) ||\n undefined === path) {\n arr[1] = node === undefined;\n arr[0] = onValueType(node, type, json,\n path, depth, seed, results,\n requestedPath, depth,\n optimizedPath, optimizedLength,\n fromReference, modelRoot, expired, expireImmediate,\n branchSelector, boxValues, materialized, hasDataSource,\n treatErrorsAsValues, onValue, onMissing, onMaterialize);\n return arr;\n }\n\n var f_meta, f_old_keys, f_new_keys, f_code = '';\n\n var next, nextKey,\n keyset, keyIsRange,\n keys = path['$keys'],\n nodeAbsPath, jsonAbsPath,\n nextDepth = depth + 1, rangeEnd,\n nextJSON, nextReferenceContainer,\n nextOptimizedLength, nextOptimizedPath,\n optimizedLengthNext = optimizedLength + 1,\n refContainerAbsPath, refContainerRefPath;\n\n if (allowFromWhenceYouCame && referenceContainer) {\n refContainerRefPath = referenceContainer.value;\n refContainerAbsPath = referenceContainer[f_abs_path];\n }\n\n if (!json || 'object' !== typeof json) {\n json = undefined;\n } else if (f_meta = json[f_meta_data]) {\n\n nodeAbsPath = node[f_abs_path];\n jsonAbsPath = f_meta[f_meta_abs_path];\n\n if (!branchSelector && !(json instanceof FalcorJSON)) {\n json.__proto__ = {};\n json.__proto__[f_meta_data] = f_meta;\n json.__proto__.__proto__ = FalcorJSON.prototype;\n }\n\n if (!arrayEqual(nodeAbsPath, jsonAbsPath)) {\n f_meta['$code'] = '';\n f_meta[f_meta_status] = hasDataSource && 'pending' || 'incomplete';\n f_meta[f_meta_abs_path] = nodeAbsPath;\n f_meta[f_meta_version] = node[f_version];\n refContainerRefPath && (f_meta[f_meta_deref_to] = refContainerRefPath);\n refContainerAbsPath && (f_meta[f_meta_deref_from] = refContainerAbsPath);\n if (f_old_keys = f_meta[f_meta_keys]) {\n f_meta[f_meta_keys] = Object.create(null);\n for (nextKey in f_old_keys) {\n if (f_old_keys[nextKey]) {\n delete json[nextKey];\n }\n }\n }\n arr[0] = json;\n arr[1] = true;\n return arr;\n } else if (!(\n f_meta[f_meta_version] !== node[f_version] ||\n f_meta['$code'] !== path['$code'])) {\n results.hasValue = true;\n arr[0] = json;\n arr[1] = false;\n return arr;\n }\n\n f_old_keys = f_meta[f_meta_keys];\n f_meta[f_meta_abs_path] = nodeAbsPath;\n f_meta[f_meta_version] = node[f_version];\n refContainerRefPath && (f_meta[f_meta_deref_to] = refContainerRefPath);\n refContainerAbsPath && (f_meta[f_meta_deref_from] = refContainerAbsPath);\n }\n\n f_new_keys = Object.create(null);\n\n var keysIndex = -1;\n var keysLength = keys.length;\n var nextPath, nextPathKey,\n hasMissingPath = false;\n\n iteratingKeyset:\n while (++keysIndex < keysLength) {\n\n keyset = keys[keysIndex];\n nextPath = path[keysIndex];\n\n // If `null` appears before the end of the path, throw an error.\n // If `null` is at the end of the path, but the reference doesn't\n // point to a sentinel value, throw an error.\n //\n // Inserting `null` at the end of the path indicates the target of a ref\n // should be returned, rather than the ref itself. When `null` is the last\n // key, the path is lengthened by one, ensuring that if a ref is encountered\n // just before the `null` key, the reference is followed before terminating.\n if (null === keyset) {\n if (nextPath !== undefined) {\n throw new NullInPathError();\n }\n f_code = '' + getHashCode('' + f_code + 'null');\n continue;\n }\n // If the keyset is a primitive value, we've found our `nextKey`.\n else if ('object' !== typeof keyset) {\n nextKey = keyset;\n rangeEnd = undefined;\n keyIsRange = false;\n nextPathKey = nextKey;\n }\n // If the Keyset isn't null or primitive, then it must be a Range.\n else {\n rangeEnd = keyset.to;\n nextKey = keyset.from || 0;\n if ('number' !== typeof rangeEnd) {\n rangeEnd = nextKey + (keyset.length || 0) - 1;\n }\n if ((rangeEnd - nextKey) < 0) {\n break iteratingKeyset;\n }\n keyIsRange = true;\n nextPathKey = '[' + nextKey + '..' + rangeEnd + ']';\n }\n\n // Now that we have the next key, step down one level in the cache.\n do {\n fromReference = false;\n nextJSON = json && json[nextKey];\n nextOptimizedPath = optimizedPath;\n nextOptimizedLength = optimizedLengthNext;\n nextReferenceContainer = referenceContainer;\n\n next = node[nextKey];\n requestedPath[depth] = nextKey;\n optimizedPath[optimizedLength] = nextKey;\n\n if (nextPath === undefined) {\n\n walkPathAndBuildOutput(\n root, next, nextJSON, nextPath, nextDepth, seed,\n results, requestedPath, nextOptimizedPath,\n nextOptimizedLength, fromReference, nextReferenceContainer,\n modelRoot, expired, expireImmediate, branchSelector, boxValues,\n materialized, hasDataSource, treatErrorsAsValues, allowFromWhenceYouCame\n );\n\n if (arr[1] === true) {\n hasMissingPath = true;\n }\n\n if ((nextJSON = arr[0]) === undefined && !materialized) {\n if (json && json.hasOwnProperty(nextKey)) {\n delete json[nextKey];\n }\n continue;\n }\n }\n else {\n // If we encounter a ref, inline the reference target and continue\n // evaluating the path.\n if (next &&\n // If the reference is expired, it will be invalidated and\n // reported as missing in the next call to walkPath below.\n next.$type === $ref && !isExpired(next, expireImmediate)) {\n\n // Retrieve the reference target and next referenceContainer (if\n // this reference points to other references) and continue\n // following the path. If the reference resolves to a missing\n // path or leaf node, it will be handled in the next call to\n // walkPath.\n refTarget = getReferenceTarget(root, next, modelRoot, expireImmediate);\n\n next = refTarget[0];\n fromReference = true;\n nextOptimizedPath = refTarget[1];\n nextReferenceContainer = refTarget[2];\n nextOptimizedLength = nextOptimizedPath.length;\n refTarget[0] = refTarget[1] = refTarget[2] = undefined;\n }\n\n // Continue following the path\n\n // Inspect the return value from the step and determine whether to\n // create or write into the JSON branch at this level.\n //\n // 1. If the next node was a leaf value, nextJSON is the value.\n // 2. If the next node was a missing path, nextJSON is undefined.\n // 3. If the next node was a branch, then nextJSON will either be an\n // Object or undefined. If nextJSON is undefined, all paths under\n // this step resolved to missing paths. If it's an Object, then\n // at least one path resolved to a successful leaf value.\n //\n // This check defers creating branches until we see at least one\n // cache hit. Otherwise, don't waste the cycles creating a branch\n // if everything underneath is a cache miss.\n\n walkPathAndBuildOutput(\n root, next, nextJSON, nextPath, nextDepth, seed,\n results, requestedPath, nextOptimizedPath,\n nextOptimizedLength, fromReference, nextReferenceContainer,\n modelRoot, expired, expireImmediate, branchSelector, boxValues,\n materialized, hasDataSource, treatErrorsAsValues, allowFromWhenceYouCame\n );\n\n if (arr[1] === true) {\n hasMissingPath = true;\n }\n\n if ((nextJSON = arr[0]) === undefined) {\n if (json && json.hasOwnProperty(nextKey)) {\n delete json[nextKey];\n }\n continue;\n }\n }\n\n // The json value will initially be undefined. If we're here,\n // then at least one leaf value was encountered, so create a\n // branch to contain it.\n if (f_meta === undefined) {\n f_meta = {};\n f_meta[f_meta_version] = node[f_version];\n f_meta[f_meta_abs_path] = node[f_abs_path];\n refContainerRefPath && (f_meta[f_meta_deref_to] = refContainerRefPath);\n refContainerAbsPath && (f_meta[f_meta_deref_from] = refContainerAbsPath);\n json = {};\n json[f_meta_data] = f_meta;\n json.__proto__ = FalcorJSON.prototype;\n // Empower developers to instrument branch node creation by\n // providing a custom function. If they do, delegate branch\n // node creation to them.\n if (branchSelector) {\n json = branchSelector(json);\n } else {\n var tmp = json;\n json = {};\n json.__proto__ = tmp;\n tmp = undefined;\n }\n }\n\n f_new_keys[nextKey] = true;\n if (f_old_keys && (nextKey in f_old_keys)) {\n f_old_keys[nextKey] = false;\n }\n\n // Set the reported branch or leaf into this branch.\n json[nextKey] = nextJSON;\n }\n // Re-enter the inner loop and continue iterating the Range, or exit\n // here if we encountered a Key.\n while (keyIsRange && ++nextKey <= rangeEnd);\n\n f_code = '' + getHashCode('' + f_code +\n ( !hasMissingPath ? nextPathKey : '') +\n ( nextPath ? nextPath['$code'] : ''));\n }\n\n if (f_meta) {\n f_meta['$code'] = f_code;\n f_meta[f_meta_keys] = f_new_keys;\n if (!hasMissingPath) {\n f_meta[f_meta_status] = 'resolved';\n } else if (hasDataSource) {\n f_meta[f_meta_status] = 'pending';\n } else if (!materialized) {\n f_meta[f_meta_status] = 'incomplete';\n } else {\n f_meta[f_meta_status] = 'resolved';\n }\n\n if (f_old_keys) {\n for (nextKey in f_old_keys) {\n if (f_old_keys[nextKey]) {\n delete json[nextKey];\n }\n }\n }\n }\n\n // `json` will be a branch if any cache hits, or undefined if all cache misses\n\n arr[0] = json;\n arr[1] = hasMissingPath;\n\n return arr;\n}", "function findPath (start, stop, mapToUse) {\n var checked = [];\n var queue = [];\n var villages = [];\n\n queue.push([start]);\n checked.push(start);\n\n while(queue.length !== 0){\n var path = queue.shift(); // Get shortest path\n var t = path[path.length - 1]; // Take last element without removing it\n var tx = t[0];\n var ty = t[1];\n\n // If the last element is the one we are looking for\n // return the path\n if((mapToUse[tx][ty]).position.equals(stop)){\n return path;\n }\n\n var newPath = [];\n // Add all adjacent nodes to paths and push them to the \"prio\" queue\n // Paths cannot go through moutains\n if(customIndexOf(checked, [(tx+1),ty]) == -1 &&\n !isOutOfBounds(tx+1, ty, mapToUse) &&\n isPassable(tx+1, ty, mapToUse)){\n newPath = path.slice();\n checked.push([(tx+1),ty]); // Push node to checked so we dont use it again\n newPath.push([(tx+1),ty]);\n queue.push(newPath.slice()); // Push old path plus new node to prio queue\n }\n\n if (customIndexOf(checked, [(tx-1),ty]) == -1 &&\n !isOutOfBounds(tx-1, ty, mapToUse) &&\n isPassable(tx-1, ty, mapToUse)) {\n newPath = path.slice();\n checked.push([(tx-1),ty]);\n newPath.push([(tx-1),ty]);\n queue.push(newPath.slice());\n }\n\n if (customIndexOf(checked, [tx,(ty+1)]) == -1 &&\n !isOutOfBounds(tx, ty+1, mapToUse) &&\n isPassable(tx, ty+1, mapToUse)) {\n newPath = path.slice();\n checked.push([tx,(ty+1)]);\n newPath.push([tx,(ty+1)]);\n queue.push(newPath.slice());\n }\n\n if (customIndexOf(checked, [tx,(ty-1)]) == -1 &&\n !isOutOfBounds(tx, ty-1, mapToUse) &&\n isPassable(tx, ty-1, mapToUse)) {\n newPath = path.slice();\n checked.push([tx,(ty-1)]);\n newPath.push([tx,(ty-1)]);\n queue.push(newPath.slice());\n }\n\n queue.sort(function(a, b){return a.length - b.length;}); // This is needed as I'm too lazy to create/use a prio queue\n }\n\n return null;\n}", "function compress(path) {\n return __WEBPACK_IMPORTED_MODULE_0_tslib__[\"a\" /* __awaiter */](this, void 0, void 0, function () {\n var compressor, before;\n return __WEBPACK_IMPORTED_MODULE_0_tslib__[\"b\" /* __generator */](this, function (_a) {\n switch (_a.label) {\n case 0:\n if (path.length <= 1) {\n return [2 /*return*/, path]; //can't compress single one\n }\n return [4 /*yield*/, createCompressor(path)];\n case 1:\n compressor = _a.sent();\n do {\n before = path.length;\n path = compressor(path);\n } while (before > path.length);\n //console.log('after', path.map((path) => path.toString()));\n return [2 /*return*/, path];\n }\n });\n });\n}", "genComputedPaths() {\n const allPaths = this.get('allPaths')\n const objectMap = this.get('objectMap')\n let computedPaths = []\n\n for(const path of allPaths){\n let computedPath = []\n let firstPath = objectMap.get(path[0] + '-' + path[1]) || objectMap.get(path[1] + '-' + path[0])\n let sum = 0\n for(let i = 0; i< firstPath.length; i++){\n sum += firstPath.data\n }\n computedPath.push({\n 'label': path[0], \n 'data': firstPath.data,\n 'sum': sum\n })\n\n for(let i = 1; i < path.length; i++){\n let nextPath = objectMap.get(path[i-1] + '-' + path[i]) || objectMap.get(path[i] + '-' + path[i-1])\n \n computedPath.push({\n 'label': path[i], \n 'data': nextPath\n })\n }\n \n computedPaths.push(computedPath)\n \n }\n this.set('computedPaths', computedPaths) \n }", "function traverse(cur_pos, tc, b, visited, optPaths) {\n if(tc<0) return -2;\n\n if(cur_pos==b){\n optPaths[b][\"spt\"] = tc;\n optPaths[b][\"path\"] = [];\n optPaths[b][\"path\"].push(b);\n optPaths[b][\"res\"] = graph_vertices[b];\n console.log(\"base case\");\n return optPaths[b][\"res\"];\n }\n\n // let copiedOptPaths = JSON.parse(JSON.stringify(optPaths));\n let maxRes = -1, rec_ans, maxST = -1;\n visited[cur_pos] = 1;\n let temp_path = [];\n\n for(let i=0; i<graph_edges[cur_pos].length; i++){\n let toVis = graph_edges[cur_pos][i][0];\n let nbr_wt = graph_edges[cur_pos][i][1];\n console.log(toVis, nbr_wt);\n \n if(visited[toVis]==0){\n visited[toVis]=1;\n rec_ans = traverse(toVis, tc-nbr_wt, b, visited, optPaths);\n visited[toVis]=0;\n\n // if(rec_ans>maxRes || (rec_ans==maxRes && (maxST<optPaths[b][\"spt\"]))){\n if(parseInt(rec_ans)>parseInt(maxRes) || (rec_ans==maxRes && (maxST<optPaths[b][\"spt\"]))){\n maxRes = rec_ans;\n maxST = optPaths[b][\"spt\"];\n\n temp_path = optPaths[toVis][\"path\"];\n // optPaths[cur_pos] = optPaths[toVis];\n console.log(\"max res update:\", maxRes, optPaths[cur_pos][\"path\"]);\n }\n }\n\n }\n\n if(maxRes != -1){\n optPaths[cur_pos][\"res\"] = maxRes + graph_vertices[cur_pos];\n temp_path.unshift(cur_pos);\n }\n \n optPaths[cur_pos][\"path\"] = temp_path;\n optPaths[cur_pos][\"spt\"] = maxST;\n // optPaths[cur_pos][\"res\"] += graph_vertices[cur_pos];\n\n visited[cur_pos] = 0; // backtracking\n if(maxRes==-1) return -2;\n\n console.log(\"return value:\", optPaths[cur_pos][\"res\"]);\n return optPaths[cur_pos][\"res\"];\n}", "function solvePath() {\n let r = 19\n let c = 19\n shortestPath.push(board[r][c])\n while (true) {\n let parent = board[r][c].parentNode\n shortestPath.unshift(parent);\n r = parent.r\n c = parent.c\n if (r == 0 && c == 0) {\n return\n }\n }\n}", "function build_full_paths(FI, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1 && i != dad[i]) { dad[L] = dad[i]; if(q.lastIndexOf(L) < j) q.push(L); }\n\t\tif(R !== -1 && i != dad[i]) { dad[R] = dad[i]; if(q.lastIndexOf(R) < j) q.push(R); }\n\t}\n\tfor(i=1; i < pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = i;\n\t\tif(j != dad[j]) do {\n\t\t\tj = dad[j];\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t} while (j !== 0 && -1 !== dad[j] && j != dad[j]);\n\t\tdad[i] = -1;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t}\n}", "function build_full_paths(FI, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1 && i != dad[i]) { dad[L] = dad[i]; if(q.lastIndexOf(L) < j) q.push(L); }\n\t\tif(R !== -1 && i != dad[i]) { dad[R] = dad[i]; if(q.lastIndexOf(R) < j) q.push(R); }\n\t}\n\tfor(i=1; i < pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = i;\n\t\tif(j != dad[j]) do {\n\t\t\tj = dad[j];\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t} while (j !== 0 && -1 !== dad[j] && j != dad[j]);\n\t\tdad[i] = -1;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t}\n}", "function build_full_paths(FI, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1 && i != dad[i]) { dad[L] = dad[i]; if(q.lastIndexOf(L) < j) q.push(L); }\n\t\tif(R !== -1 && i != dad[i]) { dad[R] = dad[i]; if(q.lastIndexOf(R) < j) q.push(R); }\n\t}\n\tfor(i=1; i < pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = i;\n\t\tif(j != dad[j]) do {\n\t\t\tj = dad[j];\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t} while (j !== 0 && -1 !== dad[j] && j != dad[j]);\n\t\tdad[i] = -1;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t}\n}", "function build_full_paths(FI, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1 && i != dad[i]) { dad[L] = dad[i]; if(q.lastIndexOf(L) < j) q.push(L); }\n\t\tif(R !== -1 && i != dad[i]) { dad[R] = dad[i]; if(q.lastIndexOf(R) < j) q.push(R); }\n\t}\n\tfor(i=1; i < pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = i;\n\t\tif(j != dad[j]) do {\n\t\t\tj = dad[j];\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t} while (j !== 0 && -1 !== dad[j] && j != dad[j]);\n\t\tdad[i] = -1;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t}\n}", "function build_full_paths(FI, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1) { dad[L] = dad[i]; if(q.lastIndexOf(L) < j) q.push(L); }\n\t\tif(R !== -1) { dad[R] = dad[i]; if(q.lastIndexOf(R) < j) q.push(R); }\n\t}\n\tfor(i=1; i < pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = dad[i];\n\t\tif(j === 0) FP[i] = FP[0] + \"/\" + FP[i];\n\t\telse while(j !== 0 && j !== dad[j]) {\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t\tj = dad[j];\n\t\t}\n\t\tdad[i] = 0;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t}\n}", "function solvePath(){\n var grid = cGrid;\n stepCount = 0; //resetStep\n startRow = 0;\n exitRow = grid.length-1;\n var point = {\n row: 0,\n col: 0\n };\n\n //1. Loop start row , find the start col and mark\n let startCol = point.col;\n for ( ;startCol < grid[startRow].length; startCol++){\n noEntry = true;\n if (grid[startRow][startCol] == colValues.OPEN){\n point.row = startRow;\n point.col = startCol;\n noEntry = false;\n break;\n }\n }\n if(noEntry){\n writeResults();\n return;\n }\n \n //2. loop and find open path and mark as walked\n do {\n let step = {};\n for( var direct in directions){\n step = movable(point, grid, direct);\n if(step.canMove && step.colValue == colValues.OPEN){\n //mark current step as walked , move and add step count\n grid[point.row][point.col] = colValues.PATH;\n document.getElementById(`${point.row}:${point.col}`).setAttribute(\"blockValue\", \"step\");\n point = getNextPoint(point, direct);\n stepCount ++;\n break;\n }\n }\n //3. Test exit condition\n if ( point.row == exitRow){\n exitReached = true;\n grid[point.row][point.col] = colValues.PATH;\n document.getElementById(`${point.row}:${point.col}`).setAttribute(\"blockValue\", \"step\");\n break;\n }\n } while(true);\n\n writeResults();\n}", "function build_full_paths(FI, FPD, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = new Array(pl), q = new Array(pl);\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1) { dad[L] = dad[i]; q.push(L); }\n\t\tif(R !== -1) { dad[R] = dad[i]; q.push(R); }\n\t}\n\tfor(i=1; i !== pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = dad[i];\n\t\tif(j === 0) FP[i] = FP[0] + \"/\" + FP[i];\n\t\telse while(j !== 0) {\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t\tj = dad[j];\n\t\t}\n\t\tdad[i] = 0;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t\tFPD[FP[i]] = FI[i];\n\t}\n}", "function build_full_paths(FI, FPD, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = new Array(pl), q = new Array(pl);\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1) { dad[L] = dad[i]; q.push(L); }\n\t\tif(R !== -1) { dad[R] = dad[i]; q.push(R); }\n\t}\n\tfor(i=1; i !== pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = dad[i];\n\t\tif(j === 0) FP[i] = FP[0] + \"/\" + FP[i];\n\t\telse while(j !== 0) {\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t\tj = dad[j];\n\t\t}\n\t\tdad[i] = 0;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t\tFPD[FP[i]] = FI[i];\n\t}\n}", "function build_full_paths(FI, FPD, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = new Array(pl), q = new Array(pl);\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1) { dad[L] = dad[i]; q.push(L); }\n\t\tif(R !== -1) { dad[R] = dad[i]; q.push(R); }\n\t}\n\tfor(i=1; i !== pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = dad[i];\n\t\tif(j === 0) FP[i] = FP[0] + \"/\" + FP[i];\n\t\telse while(j !== 0) {\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t\tj = dad[j];\n\t\t}\n\t\tdad[i] = 0;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t\tFPD[FP[i]] = FI[i];\n\t}\n}", "function build_full_paths(FI, FPD, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = new Array(pl), q = new Array(pl);\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1) { dad[L] = dad[i]; q.push(L); }\n\t\tif(R !== -1) { dad[R] = dad[i]; q.push(R); }\n\t}\n\tfor(i=1; i !== pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = dad[i];\n\t\tif(j === 0) FP[i] = FP[0] + \"/\" + FP[i];\n\t\telse while(j !== 0) {\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t\tj = dad[j];\n\t\t}\n\t\tdad[i] = 0;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t\tFPD[FP[i]] = FI[i];\n\t}\n}", "function augmentingPaths (graph, start, end) {\n \n// Keep track of vertices with that have been visited with \"processedList\" to avoid cycles\n// If a cycle existed and \"end\" could not be found the code would execute forever\n// Also, using \"processedList\" may be faster in graphs with a large edges/vertices ratio\nprocessedList = [];\nprocessedList.push(start)\n \n// \"Queue\" keeps track of the growth of the paths as the breadth first search proceeds\nqueue = [];\nqueue.push([start]);\n \nwhile (queue.length > 0) {\n path = [];\n path = queue[0];\n queue.splice(0, 1);\n\n vert = path[path.length - 1];\n \n \n if (vert == end) {\n return path;\n }\n\n adjacentVerts = [];\n\n for (var j = 0; j < graph.length; j++) {\n if (graph[vert][j] != 0) {\n adjacentVerts.push(j);\n }\n }\n\n for (var i = 0; i < adjacentVerts.length; i++) {\n\n currVert = adjacentVerts[i];\n\n if (!(processedList.includes(currVert))) {\n processedList.push(currVert);\n newPath = path.slice();\n newPath.push(currVert);\n queue.push(newPath);\n }\n }\n}\nreturn (\"Failure\")\n}", "getDepthByFilename() {\nlet projectPath = this._projectPath;\nlet includesByFilename = {};\nlet includeByFilename = {}; // To check for circular includes...\nlet depthByFilename = {};\nconst makeNodeByFilename = (node) => {\nif (node.includes) {\nincludesByFilename[node.filename] = node.includes;\nnode.includes.forEach((node) => {\nmakeNodeByFilename(node);\n});\n}\n};\nconst makeIncludes = (node) => {\nif (this._error) {\nreturn;\n}\nif (node.includes) {\nnode.includes.forEach((includeNode) => {\nlet filename1 = path.removePath(projectPath, node.filename);\nlet filename2 = includeNode.filename;\nlet index1 = filename1 + '!' + filename2;\nlet index2 = filename2 + '!' + filename1;\nif ((index1 in includeByFilename) || (index2 in includeByFilename)) {\nif (!this._error) {\nif (this._onError) {\nthis._onError({\ntype: 'Error',\nmessage: 'Circular include in ' +\n'<i class=\"error\">\"' + filename1 + '\"</i> and ' +\n'<i class=\"error\">' + filename2 + '\"</i>.'\n});\n}\nthis._error = true;\n}\nreturn;\n}\nincludeByFilename[index1] = true;\nmakeIncludes(includeNode);\n});\n} else if (node.filename in includesByFilename) {\nnode.includes = includesByFilename[node.filename];\n}\n};\nconst makeIncludeOrder = (node, depth) => {\nif (node.filename in depthByFilename) {\ndepthByFilename[node.filename] = Math.max(depthByFilename[node.filename], depth);\n} else {\ndepthByFilename[node.filename] = depth;\n}\nif (node.includes) {\nnode.includes.forEach((node) => {\nmakeIncludeOrder(node, depth + 1);\n});\n}\n};\nmakeNodeByFilename(this._includeRoot);\nmakeIncludes(this._includeRoot);\nif (!this._error) {\nmakeIncludeOrder(this._includeRoot, 0);\n}\nreturn this._error ? null : depthByFilename;\n}", "function setPath(body) {\n if (body.grid1 != null) {\n setPath1(path1 => [...path1, start]);\n \n for (let data of body.grid1){ \n let pos = {lat: data.lat, lng: data.long};\n // console.log(pos);\n setPath1(path1 => [...path1, pos]);\n // setGrid(grid => [...grid, pos]);\n \n } \n setPath1(path1 => [...path1, end]);\n setPath1Length(body.grid1Length);\n setPath1NetElev(body.grid1ElevNet);\n setPath1Shortest(body.grid1Shortest);\n }\n if (body.grid2 != null) { \n setPath2(path2 => [...path2, start]);\n for (let data of body.grid2){ \n let pos = {lat: data.lat, lng: data.long};\n setPath2(path2 => [...path2, pos]);\n }\n \n setPath2(path2 => [...path2, end]);\n setPath2Length(body.grid2Length);\n setPath2NetElev(body.grid2ElevNet);\n setPath2Shortest(body.grid2Shortest);\n }\n if (body.grid3 != null) { \n setPath3(path3=> [...path3, start]);\n for (let data of body.grid3){ \n let pos = {lat: data.lat, lng: data.long};\n setPath3(path3 => [...path3, pos]);\n }\n \n setPath3(path3 => [...path3, end]);\n\n }\n \n }", "function build_full_paths(FI, FPD, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1) { dad[L] = dad[i]; q.push(L); }\n\t\tif(R !== -1) { dad[R] = dad[i]; q.push(R); }\n\t}\n\tfor(i=1; i !== pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = dad[i];\n\t\tif(j === 0) FP[i] = FP[0] + \"/\" + FP[i];\n\t\telse while(j !== 0 && j !== dad[j]) {\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t\tj = dad[j];\n\t\t}\n\t\tdad[i] = 0;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t\tFPD[FP[i]] = FI[i];\n\t}\n}", "function findPaths_nX(from, to, n, lineBanList, costBound) {\n //console.log(\"nX finder (\" + n + \") from \" + from.getName() + \" to \" + to.getName())\n // Basically:\n // f(0) => f(0)\n // f(1) => f(1)\n // f(n) = f(0) + f(n-1) for n >= 2\n var results = new Array();\n if (n <= 0) {\n var tempResult = findPaths_0X(from, to);\n // Need to exclude possibility of some results overapping with the lineStack.\n for (var i = 0; i < tempResult.length; i++) {\n if (lineBanList.indexOf(tempResult[i].connections[0].getLine()) == -1) {\n // Line unused previously. Add it.\n results.push(tempResult[i]);\n }\n }\n return results;\n }\n if (n == 1) {\n var tempResult = findPaths_1X(from, to, costBound);\n // Need to exclude possibility of some results overapping with the lineStack.\n for (var i = 0; i < tempResult.length; i++) {\n var currentPath = tempResult[i];\n var notInvolvedInLinestack = true;\n for (var j = 0; j < 2; j++) {\n if (lineBanList.indexOf(currentPath.connections[j].getLine()) != -1) {\n notInvolvedInLinestack = false;\n }\n }\n if (notInvolvedInLinestack) {\n results.push(currentPath);\n }\n }\n return results;\n }\n for (var i = 0; i < HK18_ALL_LINES.length; i++) {\n var L1 = HK18_ALL_LINES[i];\n if (lineBanList.indexOf(L1) != -1) {\n // It is already being considered. Move on.\n continue;\n }\n var L1_beginCheckIndex = L1.getIndexOfWaypoint(from);\n if (L1_beginCheckIndex == -1) {\n // Line does not call at FROM, user will never be able to leave using Line\n continue;\n }\n // Here, user definitely can depart from FROM.\n // But will he ever reach the destination with paths satisfying the above parameters?\n // There's no easy way to find out except brute-force checking everyone.\n // For each waypoint of L1:\n var L1_stops = L1.getStops();\n var degree = n - 1;\n var newBanList = lineBanList.concat(L1);\n for (var j = L1_beginCheckIndex + 1; j < L1_stops.length; j++) {\n // Conduct search\n var checkingStop = L1_stops[j];\n if (checkingStop.isInternal()) {\n // Interchanging at internal stations is banned. Next ine.\n continue;\n }\n // Find the possible results\n var probableResults = findPaths_nX(checkingStop, to, degree, newBanList, costBound);\n if (probableResults.length == 0) {\n // No results. Next.\n continue;\n }\n // Have results. Prepend/unshift the paths to include this line, then filter by cost bound.\n var thisConnection = new Connection(L1, L1_beginCheckIndex, j);\n for (var k = 0; k < probableResults.length; k++) {\n var currentResult = probableResults[k];\n currentResult.connections.unshift(thisConnection);\n // Add to result if the final cost is lower than costBound.\n if (currentResult.getTotalAdjustedCost() < costBound) {\n console.log(\"Adding path result:\");\n console.log(currentResult);\n results.push(currentResult);\n }\n }\n }\n /*\n let stops = L1.getStops();\n let degree = n - 1;\n let tempLineStack = lineBanList.concat(L1);\n //console.log(\"LineStack = \" + tempLineStack)\n let fromIndex = -1;\n // Check from index = 1 (exclude the 1st) so that the line is effective.\n for (let j = L1_fromIndex + 1; j < stops.length; j++)\n {\n // First check that L1 is contains FROM.\n if (stops[j] == from || stops[j].isNeighborOf(from))\n {\n fromIndex = j;\n break;\n }\n }\n if (fromIndex == -1)\n {\n // User can never depart from FROM using L1. Next line.\n continue;\n }\n \n // We know the user may depart at some index -> FROM.\n // But at which waypoint should the user interchange?\n // Check every waypoint down the line.\n for (let j = fromIndex + 1; j < stops.length; j++)\n {\n \n }\n */\n }\n // Again, having to interchange is a very significant cost already, so we aim to minimize the travel cost.\n var minCost = Infinity;\n for (var i = 0; i < results.length; i++) {\n var calcCost = results[i].getTotalAdjustedCost();\n if (calcCost < minCost) {\n minCost = calcCost;\n }\n }\n for (var i = results.length - 1; i >= 0; i--) {\n if (results[i].getTotalAdjustedCost() > minCost) {\n results.splice(i, 1);\n }\n }\n // Here, we need additional work.\n // Sometimes, you may obtain results where several lines travel along the same path towards the destination.\n // The algorithm may wrongly identify several interchange points and suggests interchanges,\n // but as we humans observe the results, we find that those suggestions are quite similar.\n // We need to eliminate results that are similar.\n var tempResults = results;\n results = [];\n // Transfer tempResults back to results\n for (var i = 0; i < tempResults.length; i++) {\n var shouldAdd = true;\n for (var j = 0; j < results.length; j++) {\n if (!tempResults[i].isDistinctComparedToOther(results[j])) {\n shouldAdd = false;\n break;\n }\n }\n if (shouldAdd) {\n results.push(tempResults[i]);\n }\n }\n // Supposedly, all is done. Return the results.\n return results;\n}", "function build_full_paths(FI, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1) { dad[L] = dad[i]; q.push(L); }\n\t\tif(R !== -1) { dad[R] = dad[i]; q.push(R); }\n\t}\n\tfor(i=1; i !== pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = dad[i];\n\t\tif(j === 0) FP[i] = FP[0] + \"/\" + FP[i];\n\t\telse while(j !== 0 && j !== dad[j]) {\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t\tj = dad[j];\n\t\t}\n\t\tdad[i] = 0;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t}\n}", "function build_full_paths(FI, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1) { dad[L] = dad[i]; q.push(L); }\n\t\tif(R !== -1) { dad[R] = dad[i]; q.push(R); }\n\t}\n\tfor(i=1; i !== pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = dad[i];\n\t\tif(j === 0) FP[i] = FP[0] + \"/\" + FP[i];\n\t\telse while(j !== 0 && j !== dad[j]) {\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t\tj = dad[j];\n\t\t}\n\t\tdad[i] = 0;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t}\n}", "function build_full_paths(FI, FPD, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1) { dad[L] = dad[i]; q.push(L); }\n\t\tif(R !== -1) { dad[R] = dad[i]; q.push(R); }\n\t}\n\tfor(i=1; i !== pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = dad[i];\n\t\tif(j === 0) FP[i] = FP[0] + \"/\" + FP[i];\n\t\telse while(j !== 0) {\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t\tj = dad[j];\n\t\t}\n\t\tdad[i] = 0;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t\tFPD[FP[i]] = FI[i];\n\t}\n}", "function build_full_paths(FI, FPD, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1) { dad[L] = dad[i]; q.push(L); }\n\t\tif(R !== -1) { dad[R] = dad[i]; q.push(R); }\n\t}\n\tfor(i=1; i !== pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = dad[i];\n\t\tif(j === 0) FP[i] = FP[0] + \"/\" + FP[i];\n\t\telse while(j !== 0) {\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t\tj = dad[j];\n\t\t}\n\t\tdad[i] = 0;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t\tFPD[FP[i]] = FI[i];\n\t}\n}", "function alternatingPath(amountOfSurroundingTiles) {\n if (amountOfSurroundingTiles === 0) {\n for (var i = visitedTiles.length - 1; i >= 0 ; i--) {\n var backStepY = parseInt(visitedTiles[i].visibleTile.dataset['yco']);\n var backStepX = parseInt(visitedTiles[i].visibleTile.dataset['xco']);\n\n tiles[backStepX + '|' + backStepY].closed = false;\n\n newStart = checkNeighbours(newStart, backStepX, backStepY);\n /*uppon finding an opportunity to walk by it jumps out the function*/\n if (newStart.length > 0) {\n return newStart;\n };\n\n tiles[backStepX + '|' + backStepY].closed = true;\n };\n } else {\n return;\n };\n}", "function buildRoutes(path) {\n\n for (var name in path) {\n var current = path[name];\n\n if (traverse(path, current, name)) {\n buildRoutes(addRoutes(current, path, name));\n }\n\n }\n }", "function calculateNextVelInPaths(){\n pathStats.size += pathStats.calculateSpeed;\n for (let i = 0; i < pathStats.calculateSpeed; i++){\n for (const p of allPlanets){\n p.calculateNextVelInPath();\n }\n }\n}", "function bestPathFinder(bPath , path){\n if (path < bPath){\n return path;\n }\n return bPath\n}", "function path() {\n if (finds(loc + 61) && tmp - 1 == result[loc + 61]) //bottom node to destinations node\n value = loc + 61;\n else if (finds(loc - 61) && tmp - 1 == result[loc - 61]) //top node to destinations node\n {\n value = loc - 61;\n } else if (\n (loc - 1) % 61 < loc % 61 &&\n finds(loc - 1) &&\n tmp - 1 == result[loc - 1]\n )\n //left side node to destination node\n value = loc - 1;\n else if (\n (loc + 1) % 61 > loc % 61 &&\n finds(loc + 1) &&\n tmp - 1 == result[loc + 1]\n )\n //right side node to destination node\n value = loc + 1;\n else if (\n finds(loc - 62) &&\n (loc - 62) % 61 < loc % 61 &&\n tmp - 1 == result[loc - 62]\n )//top right side node to destination node\n value = loc - 62;\n else if (\n finds(loc - 60) &&\n (loc - 60) % 61 > loc % 61 &&\n tmp - 1 == result[loc - 60]\n )//top left side node to destination node\n value = loc - 60;\n else if (\n finds(loc + 60) &&\n (loc + 60) % 61 < loc % 61 &&\n tmp - 1 == result[loc + 60]\n )//bottom right side node to destination node\n value = loc + 60;\n else if (\n finds(loc + 62) &&\n (loc + 62) % 61 > loc % 61 &&\n tmp - 1 == result[loc + 62]\n )//bottom right side node to destination node\n value = loc + 62;\n\n tmp = result[value];\n loc = value;\n if (loc != source)\n //this gives moving effect to bot\n {\n d[loc].style.backgroundColor = destinationColor;\n \n }\n}", "function Findpath(xStart, yStart, xGoal, yGoal)\n{\n\n \n\n // reset the paths of the tiles from the previous pathfinding tile\n ResetPaths();\n\n var attempts = 0;\n\n var StartingTile = Tiles[xStart][yStart];\n\n if (StartingTile == null)\n {\n console.log(\"uh oh\");\n }\n\n // this array keeps track of all tiles that we need to check (aka the neighboring tiles of already explored tiles)\n var TileQueue = [];\n\n TileQueue.push(StartingTile);\n\n // this array keeps track of all the tiles we've already checked\n //let alreadyVisitedTiles = [StartingTile];\n var alreadyVisitedTiles = [];\n\n // we are returning the final path of the tiles, from beginning to end\n var FinalPath = [];\n\n let EndTileFound = false;\n\n // loop through every tile in the tile queue\n while(TileQueue.length > 0 && EndTileFound == false)\n {\n attempts++;\n var CurrentTile = TileQueue.pop();\n alreadyVisitedTiles.push(CurrentTile);\n // is this the end tile?\n if (CurrentTile.x == xGoal && CurrentTile.y == yGoal)\n {\n\n\n // return the path to get to this tile\n FinalPath = CurrentTile.Path;\n\n // add the finalTile to the path\n FinalPath.push(CurrentTile);\n\n EndTileFound = true;\n\n // we don't need to check the rest of the TileQueue\n break;\n }\n\n if (attempts == 1)\n {\n console.log(\"test\");\n }\n\n // add each of the neighboring tiles to the TileQueue, if we haven't visited them before\n CurrentTile.Neighbours.forEach(function (item, index){\n\n \n // get the path that the pathfinding algorithm took up to this point\n let CurrentPath = CurrentTile.Path;\n\n if((TileQueue.indexOf(item) == -1 ) &&\n alreadyVisitedTiles.indexOf(item) == -1)\n {\n // Javascript copies by reference by default, so we need to create a new object and assign it to the temporary variable...\n let TemporaryPath = []; \n Object.assign(TemporaryPath, CurrentPath); \n TemporaryPath.push(CurrentTile);\n \n\n // add the tile we are visiting the neighboring tile from (the current tile)\n item.Path = TemporaryPath;\n\n // add the neighboring tile to the TileQueue\n TileQueue.unshift(item);\n }\n\n });\n }\n\n if (FinalPath.length == 0)\n {\n console.log(FinalPath.length + Tiles[xStart][yStart].TileType + \" \" + Tiles[xGoal][yGoal].TileType + \" Attempts = \" + attempts);\n console.log(xStart + \",\" + yStart + \"|\");\n console.log(xGoal + \",\" + yGoal);\n\n console.log(alreadyVisitedTiles);\n }\n \n // return the finalPath\n return FinalPath;\n}", "function simplifyPaths(arcs, opts) {\n var simplifyPath = getSimplifyFunction(opts);\n arcs.setThresholds(new Float64Array(arcs.getPointCount())); // Create array to hold simplification data\n if (opts.spherical) {\n simplifyPaths3D(arcs, simplifyPath);\n protectWorldEdges(arcs);\n } else {\n simplifyPaths2D(arcs, simplifyPath);\n }\n if (opts.lock_box) {\n protectContentEdges(arcs);\n }\n }", "function calculatePath (startIndex, endIndex, onlyMeasure = false) {\n // startIndex ist der Index im TileArray von dem der Pfad startet\n // endIndex ist der Index im TileArray zu dem der Pfad geht\n // onlyMeasure = true begrenzt den Pfad nicht auf die maximale Bewegungsweite während einem Kampf\n \n let mappedList = [];\n let frontierList = [];\n let frontierListValues = [];\n let activeNode;\n let pathFound = false;\n let pathToTravel = [];\n let distance = 0;\n \n //Fange Ausnahmen ab startIndex = endIndex\n if (startIndex == endIndex || endIndex == undefined) {\n return {\n first: pathToTravel,\n second: distance\n }\n }\n \n // finde A und füge ihn der frontierList hinzu {name, wayPointUsefulness}\n tileArray[startIndex].entryPoint = \"Start\";\n tileArray[startIndex].distanceTravelled = 0;\n tileArray[startIndex].wayPointUsefulness = tileArray[startIndex].distanceTravelled + tileArray[startIndex].estimatedWayToB(endIndex);\n tileArray[startIndex].difDegree = Phaser.Math.Angle.BetweenPoints(tileArray[startIndex], tileArray[endIndex]);\n frontierList.push(tileArray[startIndex]);\n \n // gehe folgende Schleife solange durch bis es einen Weg gibt\n while (pathFound == false) {\n \n // Wenn kein Weg möglich ist brich diese Schleife ab\n if (frontierList.length == 0) {\n pathToTravel = [];\n break;\n }\n \n // gehe frontierList durch nach niedrigster wayPointUsefulness + Tiebreaker (geringster Winkelunterschied zur Luftlinie)\n frontierListValues.length = 0;\n for (let i = 0; i < frontierList.length; i++) {\n let difDegree = Math.abs(Phaser.Math.Angle.ShortestBetween(tileArray[startIndex].difDegree, frontierList[i].difDegree))/1000;\n frontierListValues.push(frontierList[i].wayPointUsefulness + difDegree);\n }\n activeNode = frontierListValues.indexOf(Math.min(...frontierListValues));\n \n // Wenn Knoten mit Niedrigster wayPointUsefulness schon das Ziel ist, ist A* fertig\n if (frontierList[activeNode].name == endIndex) {\n pathFound = true; // unterbricht diese Schleife und damit das Pfadsuchen\n let backtraceIndex = endIndex; // Sucht den Index des Zielfeldes\n pathToTravel.unshift(backtraceIndex); // Fügt das Zielfeld dem Pfad hinzu\n \n while (tileArray[tileArray[backtraceIndex].entryPoint].name != startIndex) {\n pathToTravel.unshift(tileArray[backtraceIndex].entryPoint);\n backtraceIndex = tileArray[backtraceIndex].entryPoint;\n }\n \n break;\n }\n \n // berechne für diesen alle neighbors\n frontierList[activeNode].checkForNeighbors();\n \n // Füge Neighbors des aktuellen Knotens der Frontierlist hinzu\n for (let i = 0; i < frontierList[activeNode].neighbors.length; i++) {\n \n let distanceTravelled = frontierList[activeNode].distanceTravelled + frontierList[activeNode].neighborsDistance[i];\n if (containsObject(frontierList[activeNode].neighbors[i], frontierList)) {\n if (distanceTravelled < frontierList[activeNode].neighbors[i].distanceTravelled) {\n frontierList[activeNode].neighbors[i].distanceTravelled = distanceTravelled;\n frontierList[activeNode].neighbors[i].wayPointUsefulness = frontierList[activeNode].neighbors[i].distanceTravelled + frontierList[activeNode].neighbors[i].estimatedWayToB(endIndex);\n frontierList[activeNode].neighbors[i].entryPoint = frontierList[activeNode].name;\n }\n } else if (containsObject(frontierList[activeNode].neighbors[i], mappedList)) {\n continue;\n } else {\n frontierList[activeNode].neighbors[i].distanceTravelled = frontierList[activeNode].distanceTravelled + frontierList[activeNode].neighborsDistance[i];\n frontierList[activeNode].neighbors[i].wayPointUsefulness = frontierList[activeNode].neighbors[i].distanceTravelled + frontierList[activeNode].neighbors[i].estimatedWayToB(endIndex);\n frontierList[activeNode].neighbors[i].entryPoint = frontierList[activeNode].name;\n frontierList[activeNode].neighbors[i].difDegree = Phaser.Math.Angle.BetweenPoints(frontierList[activeNode].neighbors[i], tileArray[endIndex])\n frontierList.push(frontierList[activeNode].neighbors[i]);\n }\n }\n \n // Füge den aktiven Knoten der mappedList hinzu und Lösche den aktven Knoten aus der frontierList\n mappedList.push(frontierList[activeNode]);\n frontierList.splice(activeNode,1);\n }\n \n // wenn gerade ein Kampf ist soll die Bewegung begrenzt sein auf die Maximale Bewegungsweite des aktiven Charakters\n if (fightmode == true && onlyMeasure == false) {\n movementStopper: for (let l = 0; l < pathToTravel.length; l++) {\n if (tileArray[pathToTravel[l]].distanceTravelled > activeChar.movementCounter) {\n pathToTravel.length = l;\n break movementStopper;\n }\n }\n }\n \n // wenn das Ziefeld der Bewegung besetzt ist, wird die Bewegung gekürzt\n checkEnd: while (pathToTravel.length > 0) {\n if (checkFor (tileArray[pathToTravel[pathToTravel.length-1]].occupiedBy, Figure) || checkFor (tileArray[pathToTravel[pathToTravel.length-1]].occupiedBy, Enemy)) {\n pathToTravel.length = pathToTravel.length-1;\n } else {\n break checkEnd;\n }\n }\n \n // speichert die Entfernung bis zum Ende des Pfades\n if (pathToTravel.length > 0) {\n distance += tileArray[pathToTravel[pathToTravel.length-1]].distanceTravelled;\n }\n \n // räumt alle Tiles wieder auf\n clearNodes();\n return {\n first: pathToTravel,\n second: distance\n }\n}", "composedPath() {\n const composedPath = [];\n\n const { currentTarget, _path: path } = this;\n\n if (path.length === 0) {\n return composedPath;\n }\n\n composedPath.push(currentTarget);\n\n let currentTargetIndex = 0;\n let currentTargetHiddenSubtreeLevel = 0;\n\n for (let index = path.length - 1; index >= 0; index--) {\n const { item, rootOfClosedTree, slotInClosedTree } = path[index];\n\n if (rootOfClosedTree) {\n currentTargetHiddenSubtreeLevel++;\n }\n\n if (item === idlUtils.implForWrapper(currentTarget)) {\n currentTargetIndex = index;\n break;\n }\n\n if (slotInClosedTree) {\n currentTargetHiddenSubtreeLevel--;\n }\n }\n\n let currentHiddenLevel = currentTargetHiddenSubtreeLevel;\n let maxHiddenLevel = currentTargetHiddenSubtreeLevel;\n\n for (let i = currentTargetIndex - 1; i >= 0; i--) {\n const { item, rootOfClosedTree, slotInClosedTree } = path[i];\n\n if (rootOfClosedTree) {\n currentHiddenLevel++;\n }\n\n if (currentHiddenLevel <= maxHiddenLevel) {\n composedPath.unshift(idlUtils.wrapperForImpl(item));\n }\n\n if (slotInClosedTree) {\n currentHiddenLevel--;\n if (currentHiddenLevel < maxHiddenLevel) {\n maxHiddenLevel = currentHiddenLevel;\n }\n }\n }\n\n currentHiddenLevel = currentTargetHiddenSubtreeLevel;\n maxHiddenLevel = currentTargetHiddenSubtreeLevel;\n\n for (let index = currentTargetIndex + 1; index < path.length; index++) {\n const { item, rootOfClosedTree, slotInClosedTree } = path[index];\n\n if (slotInClosedTree) {\n currentHiddenLevel++;\n }\n\n if (currentHiddenLevel <= maxHiddenLevel) {\n composedPath.push(idlUtils.wrapperForImpl(item));\n }\n\n if (rootOfClosedTree) {\n currentHiddenLevel--;\n if (currentHiddenLevel < maxHiddenLevel) {\n maxHiddenLevel = currentHiddenLevel;\n }\n }\n }\n\n return composedPath;\n }", "path(start, end)\n {\n // Check if the end is reachable\n let endInfo = this.positionInfo(end);\n if (endInfo.passable === false)\n return undefined;\n\n // For node n, parent[n] is the node immediately preceding it on the cheapest path from start to n currently known\n let parent = new Map();\n\n // For node n, gScore[n] is the cost of the cheapest path from start to n currently known\n let gScore = new Map([[start.toString(), 0]]);\n\n // For node n, fScore[n] = gScore[n] + h(n)\n let fScore = new Map([[start.toString(), 0]]);\n\n // The heap of discovered nodes that need to be (re-)expanded\n let openHeap = new BinaryHeap(node => fScore.get(node.toString()) || 0);\n openHeap.push(start);\n\n // The set of closed nodes\n let closedSet = new Set();\n\n // Iterate while the heap is not empty\n while (openHeap.size > 0)\n {\n // Grab the lowest f(x) to process next\n let node = openHeap.pop();\n\n // End case -- result has been found, return the traced path\n if (node.x === end.x && node.y === end.y)\n {\n let path = [node];\n while (parent.has(node.toString()))\n {\n node = parent.get(node.toString());\n path.unshift(node);\n }\n return path.map(position => this.positionInfo(position));\n }\n\n // Normal case -- move node from open to closed, process each of its neighbors\n closedSet.add(node.toString());\n\n // Find all neighbors for the current node\n for (let neighbor of this.getNeighbors(node))\n {\n let neighborInfo = this.positionInfo(neighbor);\n\n // If the neighbor is already closed or is not passable, then continue\n if (closedSet.has(neighbor.toString()) || neighborInfo.passable === false)\n continue;\n\n // The g score is the shortest distance from start to current node\n // We need to check if the path we have arrived at this neighbor is the shortest one we have seen yet\n let gScoreTentative = gScore.get(node.toString()) + neighborInfo.cost;\n if (!gScore.has(neighbor.toString()) || gScoreTentative < gScore.get(neighbor.toString()))\n {\n parent.set(neighbor.toString(), node);\n gScore.set(neighbor.toString(), gScoreTentative);\n fScore.set(neighbor.toString(), gScoreTentative + Vector.manhattanDistance(neighbor, end));\n\n if (!openHeap.has(neighbor))\n openHeap.push(neighbor);\n else\n openHeap.rescoreElement(neighbor);\n }\n }\n }\n\n // No path found, so return undefined\n return undefined;\n }", "function pathGatherer(){\n var indicator = Grid[EndPoint[0]][EndPoint[1]].VisitedAt\n var currentPoint = [EndPoint[0],EndPoint[1]]\n var path = []\n\n while( indicator != 0){\n console.log(indicator)\n console.log(\"Current: \" + currentPoint[0] + \"-\" + currentPoint[1])\n if(currentPoint[0]!=EndPoint[0] | currentPoint[1]!=EndPoint[1]){\n console.log(currentPoint,\"not equal to\",EndPoint)\n document.getElementById(Grid[currentPoint[0]][currentPoint[1]].id).innerHTML=\"<div id='path\"+currentPoint[0]+\"x\"+currentPoint[1]+\"' class='path'></div>\";\n document.getElementById(\"path\"+currentPoint[0]+\"x\"+currentPoint[1]).style.animationDelay=indicator/15+\"s\"\n }\n \n Grid[currentPoint[0]][currentPoint[1]].State = \"Path\"\n //update, find the \n indicator -= 1\n //-x NORTH\n if(currentPoint[0] > 0){\n if(Grid[currentPoint[0]-1][currentPoint[1]].VisitedAt == indicator){\n path.push([currentPoint[0],currentPoint[1],\"NORTH\"])\n currentPoint[0] -= 1\n continue\n }\n \n }\n //+x SOUTH\n if(currentPoint[0] < GRID_ROW_SIZE-1){\n if(Grid[currentPoint[0]+1][currentPoint[1]].VisitedAt == indicator){\n path.push([currentPoint[0],currentPoint[1],\"SOUTH\"])\n currentPoint[0] += 1\n continue\n }\n \n }\n //-y WEST\n if(currentPoint[1] > 0){\n if(Grid[currentPoint[0]][currentPoint[1]-1].VisitedAt == indicator){\n path.push([currentPoint[0],currentPoint[1],\"WEST\"])\n currentPoint[1] -= 1\n continue\n }\n \n }\n //+y EAST\n if(currentPoint[1] < GRID_COL_SIZE-1){\n if(Grid[currentPoint[0]][currentPoint[1]+1].VisitedAt == indicator){\n path.push([currentPoint[0],currentPoint[1],\"EAST\"])\n currentPoint[1] += 1\n continue\n }\n \n }\n\n }\n //!! the path is the REVERSE PATH from the END to the START \n Grid[EndPoint[0]][EndPoint[1]].State = \"End\"\n console.log(path)\n consoleGridPrinter()\n}", "getPaths(regex, point = new Coordinate(0,0)){\n // Paths will be a multi-dimension array that basically \n // substitutes the parenthesis in the regex\n // We can traverse down any path this way\n let paths = [[0]];\n let i = 0;\n let j = 0;\n let char = -1;\n\n // Keeps track of where we are\n let location = new Coordinate(point.x, point.y);\n this.visited[location] = true;\n\n // Navigate through the regex\n while(++char < regex.length){\n // New path\n if(regex[char] == '|'){\n paths[++i] = [0];\n j = 0;\n location = new Coordinate(point.x, point.y);\n }\n // Another layer found, recurse down\n else if(regex[char] == '('){\n let inner = this.getPaths(regex.substring(char + 1), location);\n // Offset what character we are looking at to avoid infinite recursion\n char += inner.end;\n // Group the inner paths with the outer path\n paths[i][++j] = inner.paths;\n // True if the path doesn't need to traverse down into deeper layers\n // Example: EESS(WNSE|)SSS\n if(regex[char + 1] && regex[char + 1] != '|' && regex[char + 1] != ')'){ \n paths[i][++j] = 0;\n }\n }\n // Layer ends\n else if(regex[char] == ')'){\n break;\n }\n // Add to the path\n else{\n // Move our location\n switch(regex[char]){\n case 'N': location.north(); break;\n case 'S': location.south(); break;\n case 'E': location.east(); break;\n case 'W': location.west(); break;\n }\n // We have not been here before, count it\n if(!this.visited[location]){\n this.visited[location] = true;\n paths[i][j]++;\n }\n }\n }\n // Return where we ended and the paths created\n return {\n end: char + 1,\n paths: paths\n }\n }", "function gen_intermediate_code_internal(/* CPUARMState * */ env,\n /* TranslationBlock * */ tb,\n /* int */ search_pc)\n{\n var /* DisasContext */ dc1, dc=dc1;/* *dc = &dc1;*/\n var /* uint16_t * */ gen_opc_end;\n var j, lj;\n var /* target_ulong */ pc_start;\n var /* uint32_t */ next_page_start;\n dc1 = new DisasContext();\n dc=dc1;\n /* generate intermediate code */\n pc_start = tb.pc;\n\n dc.tb = tb;\n\n //gen_opc_ptr = gen_opc_buf;\n //gen_opc_end = gen_opc_buf + (512 - 32);\n //gen_opparam_ptr = gen_opparam_buf;\n\n dc.is_jmp = 0;\n dc.pc = pc_start;\n dc.singlestep_enabled = env.singlestep_enabled;\n dc.condjmp = 0;\n dc.thumb = env.thumb;\n dc.condexec_mask = (env.condexec_bits & 0xf) << 1;\n dc.condexec_cond = env.condexec_bits >> 4;\n dc.is_mem = 0;\n\n if (arm_feature(env, ARM_FEATURE_M)) {\n dc.user = ((env.v7m.exception == 0) && (env.v7m.control & 1));\n } else {\n dc.user = (env.uncached_cpsr & 0x1f) == ARM_CPU_MODE_USR;\n }\n\n next_page_start = (pc_start & ~((1 << 10) - 1)) + (1 << 10);\n //nb_gen_labels = 0;\n lj = -1;\n /* Reset the conditional execution bits immediately. This avoids\n complications trying to do it at the end of the block. */\n if (env.condexec_bits)\n gen_op_set_condexec(0);\n do {\n\n if (dc.pc >= 0xfffffff0 && arm_feature(env, ARM_FEATURE_M)) {\n /* We always get here via a jump, so know we are not in a\n conditional execution block. */\n gen_op_exception_exit();\n }\n\n /*\n if (env.nb_breakpoints > 0) {\n for(j = 0; j < env.nb_breakpoints; j++) {\n if (cpu_single_env.breakpoints[j] == dc.pc) {\n gen_set_condexec(dc);\n gen_op_movl_T0_im((long)dc.pc);\n gen_op_movl_reg_TN[0][15]();\n gen_op_debug();\n dc.is_jmp = 1;\n // Advance PC so that clearing the breakpoint will\n // invalidate this TB. \n dc.pc += 2;\n goto done_generating;\n break;\n }\n }\n }\n */\n /*\n if (search_pc) {\n j = gen_opc_ptr - gen_opc_buf;\n if (lj < j) {\n lj++;\n while (lj < j)\n gen_opc_instr_start[lj++] = 0;\n }\n gen_opc_pc[lj] = dc.pc;\n gen_opc_instr_start[lj] = 1;\n }\n */\n if (env.thumb) {\n disas_thumb_insn(env, dc);\n if (dc.condexec_mask) {\n dc.condexec_cond = (dc.condexec_cond & 0xe)\n | ((dc.condexec_mask >> 4) & 1);\n dc.condexec_mask = (dc.condexec_mask << 1) & 0x1f;\n if (dc.condexec_mask == 0) {\n dc.condexec_cond = 0;\n }\n }\n } else {\n disas_arm_insn(env, dc);\n }\n if (dc.condjmp && !dc.is_jmp) {\n gen_set_label(dc.condlabel, dc.tb.tc_ptr);\n dc.condjmp = 0;\n }\n /* Terminate the TB on memory ops if watchpoints are present. */\n /* FIXME: This should be replacd by the deterministic execution\n * IRQ raising bits. */\n //if (dc.is_mem && env.nb_watchpoints)\n // break;\n\n /* Translation stops when a conditional branch is enoutered.\n * Otherwise the subsequent code could get translated several times.\n * Also stop translation when a page boundary is reached. This\n * ensures prefech aborts occur at the right place. */\n } while (!dc.is_jmp && /* gen_opc_ptr < gen_opc_end &&\n !env.singlestep_enabled && */ dc.pc < next_page_start);\n\n /* At this stage dc.condjmp will only be set when the skipped\n instruction was a conditional branch or trap, and the PC has\n already been written. */\n if (env.singlestep_enabled == 0) {\n /* Make sure the pc is updated, and raise a debug exception. */\n if (dc.condjmp) {\n gen_set_condexec(dc);\n if (dc.is_jmp == 5) {\n gen_op_swi();\n } else {\n gen_op_debug();\n }\n gen_set_label(dc.condlabel, dc.tb.tc_ptr);\n }\n if (dc.condjmp || !dc.is_jmp) {\n gen_op_movl_T0_im(dc.pc);\n gen_op_movl_reg_TN[0][15]();\n dc.condjmp = 0;\n }\n gen_set_condexec(dc);\n if (dc.is_jmp == 5 && !dc.condjmp) {\n gen_op_swi();\n } else {\n /* FIXME: Single stepping a WFI insn will not halt\n the CPU. */\n gen_op_debug();\n }\n } else {\n /* While branches must always occur at the end of an IT block,\n there are a few other things that can cause us to terminate\n the TB in the middel of an IT block:\n - Exception generating instructions (bkpt, swi, undefined).\n - Page boundaries.\n - Hardware watchpoints.\n Hardware breakpoints have already been handled and skip this code.\n */\n gen_set_condexec(dc);\n switch(dc.is_jmp) {\n case 0:\n gen_goto_tb(dc, 1, dc.pc);\n break;\n default:\n case 1:\n case 2:\n /* indicate that the hash table must be used to find the next TB */\n gen_op_movl_T0_0();\n gen_op_exit_tb();\n break;\n case 3:\n /* nothing more to generate */\n break;\n case 4:\n gen_op_wfi();\n break;\n case 5:\n gen_op_swi();\n break;\n }\n if (dc.condjmp) {\n gen_set_label(dc.condlabel, dc.tb.tc_ptr);\n gen_set_condexec(dc);\n gen_goto_tb(dc, 1, dc.pc);\n dc.condjmp = 0;\n }\n }\n /* XXX: FIX ME GOTO\ndone_generating:\n gen_opc_ptr.push({func:op_end);\n*/\n /*\n if (loglevel & (1 << 1)) {\n fprintf(logfile, \"----------------\\n\");\n fprintf(logfile, \"IN: %s\\n\", lookup_symbol(pc_start));\n target_disas(logfile, pc_start, dc.pc - pc_start, env.thumb);\n fprintf(logfile, \"\\n\");\n if (loglevel & ((1 << 2))) {\n fprintf(logfile, \"OP:\\n\");\n dump_ops(gen_opc_buf, gen_opparam_buf);\n fprintf(logfile, \"\\n\");\n }\n }\n */\n /*\n if (search_pc) {\n j = gen_opc_ptr - gen_opc_buf;\n lj++;\n while (lj <= j)\n gen_opc_instr_start[lj++] = 0;\n } else {\n */\n gen_opc_ptr.push({func:op_end});\n tb.size = dc.pc - pc_start;\n //}\n return 0;\n}", "dedupePathParts(path) {\n let startPathIdxs = [];\n let curPathIdx = -1;\n let startPartPos = 0;\n let intersections = [];\n let pathParts = [];\n for (let i = 1; i < path.length; i++) {\n let lastKey = path[i - 1].x + \"__\" + path[i - 1].y;\n let key = path[i].x + \"__\" + path[i].y;\n if (this.pathsMatrix[lastKey] && this.pathsMatrix[key] && !this.pathsMatrix[key][curPathIdx]) {\n let commonIdxs = _.intersection(_.keys(this.pathsMatrix[lastKey]), _.keys(this.pathsMatrix[key]));\n if (commonIdxs.length > 0) {\n if (curPathIdx === -1 && i !== 1) {\n pathParts.push({\n path: path.slice(startPartPos, i),\n startPathIdxs: startPathIdxs,\n endPathIdxs: getPathIdxs(this.pathsMatrix, lastKey),\n intersections: intersections\n });\n }\n curPathIdx = commonIdxs[0];\n }\n else {\n startPathIdxs = getPathIdxs(this.pathsMatrix, lastKey);\n startPartPos = i - 1;\n intersections = [];\n curPathIdx = -1;\n }\n }\n else if (this.pathsMatrix[lastKey] && !this.pathsMatrix[key]) {\n if (curPathIdx === -1) {\n intersections.push(..._.map(_.keys(this.pathsMatrix[lastKey]), (idx) => {\n return {\n idx: idx,\n from: i - startPartPos,\n pos: this.pathsMatrix[lastKey][idx]\n };\n }));\n }\n else {\n startPathIdxs = getPathIdxs(this.pathsMatrix, lastKey);\n startPartPos = i - 1;\n intersections = [];\n }\n curPathIdx = -1;\n }\n }\n if (curPathIdx === -1) {\n pathParts.push({\n path: path.slice(startPartPos),\n startPathIdxs: startPathIdxs,\n endPathIdxs: [],\n intersections: intersections\n });\n }\n // console.log(\"---\");\n // pathParts.forEach((pathPart) => {\n // console.log(pathPart);\n // });\n return pathParts;\n }", "function GetPath2() : int {\n\t\tnumberOfHops = 0; \n\t\tnumberOfHops1 = 0; \n\t\tvar ToMovePos : int; \n\t\tvar ToMovePos2 : int; \n\n\t\tvar i : int = 0;\n\t\tfor(var a : int = 0; a < ClosedNodes.Length; a++){ \n\t\t\tif (ClosedNodes[a] != 0){ \n\t\t\t\ti++; \n\t\t\t\t//Debug.Log(parent_Closed[a]+\" \"+ClosedNodes[a]);\n\t\t\t\t} }\n\n\t\tvar match_name = targetLeaf;\n\t\tfor(var b : int = (i-1); b >= 0 ; b--){\n\t\t\tif (ClosedNodes[b] == match_name){\n\t\t\t\tnumberOfHops++;\n\t\t\t\tmatch_name = parent_Closed[b];\n\t\t\t\tif (match_name == frogLeaf ){\n\t\t\t\t\tToMovePos = ClosedNodes[b];\n\t\t\t\t\tb = -20;\n\t\t\t\t\t//Debug.Log(\"ToMovePos \"+ToMovePos);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t\tvar match_name2 = targetLeaf2;\n\t\t\tfor(var c : int = (i-1); c >= 0 ; c--){\n\t\t\tif (ClosedNodes[c] == match_name2){\n\t\t\t\tnumberOfHops1++;\n\t\t\t\t//Debug.Log(parent_Closed[b]);\n\t\t\t\tmatch_name2 = parent_Closed[c];\n\t\t\t\tif (match_name2 == frogLeaf ){\n\t\t\t\t\tToMovePos2 = ClosedNodes[c];\n\t\t\t\t\tc = -20;\n\t\t\t\t\t//Debug.Log(\"ToMovePos \"+ToMovePos);\n\t\t\t\t}\n\t\t\t}\n\t\t} \n\n\t\tif (numberOfHops1 !=0){\n\t\t\tif (numberOfHops1 < numberOfHops){\n\t\t\t\t//Debug.Log(\"ToMovePos2 \"+ToMovePos2);\n\t\t\t\treturn ToMovePos2;\n\t\t\t\t}\n\t\t\telse if(numberOfHops !=0){\n\t\t\t\t\t//Debug.Log(\"ToMovePos \"+ToMovePos); \n\t\t\t\t\treturn ToMovePos;\n\t\t\t\t\t}\n\t\t\t\t else{\n\t\t\t\t \t//Debug.Log(\"ToMovePos2 \"+ToMovePos2); \n\t\t\t\t \treturn ToMovePos2;\n\t\t\t\t \t}\n\t\t\t}\n\t\telse {\n\t\t\t//Debug.Log(\"ToMovePos \"+ToMovePos); \n\t\t\treturn ToMovePos;\n\t\t\t}\n\t}", "animateShortestPath(nodesInShortestPathOrder) {\n for (let i = 1; i < nodesInShortestPathOrder.length-1; i++) {\n setTimeout(() => {\n const node = nodesInShortestPathOrder[i];\n document.getElementById(`node-${node.row}-${node.col}`).className =\n 'node node-shortest-path';\n }, 50 * i);\n }\n if(nodesInShortestPathOrder.length<=1){\n setTimeout(() => {\n alert(\"Path Not Found!!\");\n },1000);\n }\n }", "findShortestPaths(source) {\n source.setDistance(0)\n let unsettledNodes = []\n let settledNodes = []\n\n unsettledNodes.push(source)\n let a = 0\n while (unsettledNodes.length != 0) {\n a++\n let currentNode = this.getLowestDistanceNode(unsettledNodes)\n unsettledNodes.splice(unsettledNodes.indexOf(currentNode), 1)\n\n for (let i = 0; i < currentNode.adjacentNodes.length; i++) {\n let adjacentNode = currentNode.adjacentNodes[i][0]\n let edgeWeight = currentNode.adjacentNodes[i][1]\n if (!settledNodes.includes(adjacentNode) && !unsettledNodes.includes(adjacentNode)) {\n this.calculateMinimumDistance(adjacentNode, edgeWeight, currentNode)\n unsettledNodes.push(adjacentNode)\n }\n }\n settledNodes.push(currentNode)\n }\n //console.log(a + \" iterations\")\n }", "fillMazeProcedural(mazeTemplateCompressed) {\n const template = this.Utilities.uncompressTemplate(mazeTemplateCompressed);\n // tslint:disable-next-line:prefer-const\n let path = template.MazePath.split(\"\");\n this.StartLocation = template.StartLocation;\n this.EndLocation = template.EndLocation;\n this.BestPath = template.BestPath;\n this.MazeDifficulty = template.MazeDifficulty;\n this.GridWidth = template.GridWidth;\n this.GridHeight = template.GridHeight;\n this.GridLayers = template.GridLayers;\n this.MazeGrid = this.generateGrid();\n // MazePath: myMaze.MazePath,\n // Start: JSON.stringify(myMaze.StartLocation),\n // End: JSON.stringify(myMaze.EndLocation),\n // BestPath: myMaze.BestPath,\n // Difficulty: myMaze.MazeDifficulty,\n // tslint:disable-next-line:prefer-const\n let cellsList = [new Cell(0, 0, 0)];\n let next;\n let mazePath = \"\";\n let index = -1;\n while (cellsList.length > 0) {\n // index is the newest\n index = cellsList.length - 1;\n const currentCell = cellsList[index];\n next = path.shift();\n if (next === \"\" || next === undefined) {\n break;\n }\n else if (next === this.Utilities.Back) {\n cellsList.splice(index, 1);\n }\n else {\n const nextCell = this.directionModifier(cellsList[index], next);\n // const result2: any = \n this.carvePathBetweenCells(currentCell, nextCell, next);\n this.MazeGrid[currentCell.Z][currentCell.Y][currentCell.X] = currentCell;\n this.MazeGrid[nextCell.Z][nextCell.Y][nextCell.X] = nextCell;\n cellsList.push(nextCell);\n index = -1;\n }\n if (index !== -1) {\n cellsList.splice(index, 1);\n }\n mazePath += next;\n }\n return mazePath;\n }", "findPaths(){\n gridArray.forEach(function(yValue, yCoord){\n yValue.forEach(function(xValue, xCoord){\n BadBoggle.searchPath([[yCoord, xCoord]], yCoord, xCoord);\n });\n });\n }", "function crawl(path) {\n\t if (path.is(\"_templateLiteralProduced\")) {\n\t crawl(path.get(\"left\"));\n\t crawl(path.get(\"right\"));\n\t } else if (!path.isBaseType(\"string\") && !path.isBaseType(\"number\")) {\n\t path.replaceWith(t.callExpression(t.identifier(\"String\"), [path.node]));\n\t }\n\t}", "function crawl(path) {\n\t if (path.is(\"_templateLiteralProduced\")) {\n\t crawl(path.get(\"left\"));\n\t crawl(path.get(\"right\"));\n\t } else if (!path.isBaseType(\"string\") && !path.isBaseType(\"number\")) {\n\t path.replaceWith(t.callExpression(t.identifier(\"String\"), [path.node]));\n\t }\n\t}", "function findPath(startPos, goalPos, pathNumber, ignoreTowerSpawns, ignoreTowers) {\n //copy mapGrid array to a temp array\n var grid = copyArray(gameLoop.returnMapOfPath(pathNumber));\n\n //Set Goal\n grid[goalPos.indexX][goalPos.indexY] = 'GOAL';\n\n // Each \"location\" will store its coordinates\n // and the shortest path required to arrive there\n var location = {\n distX: startPos.indexX,\n distY: startPos.indexY,\n path: [],\n block: 'START'\n };\n\n // Initialize the queue with the start location already inside\n var queue = [location];\n\n // Loop through the grid searching for the goal\n while (queue.length > 0) {\n // Take the first location off the queue\n var currentLocation = queue.shift();\n\n // Explore North\n var newLocation = exploreInDirection(currentLocation, 0, grid, ignoreTowerSpawns, ignoreTowers);\n if (newLocation.block === 'GOAL') {\n return newLocation.path;\n } else if (newLocation.block === 'Valid') {\n queue.push(newLocation);\n }\n\n // Explore East\n var newLocation = exploreInDirection(currentLocation, 1, grid, ignoreTowerSpawns, ignoreTowers);\n if (newLocation.block === 'GOAL') {\n return newLocation.path;\n } else if (newLocation.block === 'Valid') {\n queue.push(newLocation);\n }\n\n // Explore South\n var newLocation = exploreInDirection(currentLocation, 2, grid, ignoreTowerSpawns, ignoreTowers);\n if (newLocation.block === 'GOAL') {\n return newLocation.path;\n } else if (newLocation.block === 'Valid') {\n queue.push(newLocation);\n }\n\n // Explore West\n var newLocation = exploreInDirection(currentLocation, 3, grid, ignoreTowerSpawns, ignoreTowers);\n if (newLocation.block === 'GOAL') {\n return newLocation.path;\n } else if (newLocation.block === 'Valid') {\n queue.push(newLocation);\n }\n }\n\n // No valid path found\n return false;\n\n}", "function optimize(ast) {\n }", "function optimize(ast) {\n }", "function checkPathOfIndivue(individue)\n{\n var path = [];\n var position = Object.assign({},init_position);\n var steps = individue.data\n steps.forEach(function(doubleNible){\n var firstSetOfMovements = posible_directions[doubleNible & filter[1] >>> 4];\n var secondSetOfMovements = posible_directions[doubleNible & filter[0]];\n\n firstSetOfMovements.forEach(function(step){\n switch(step)\n {\n case lft:\n if(position.y-1>=0)\n {\n var temp_element=map[position.x][position.y-1];\n if(!Object.is(temp_element,wall_character)){ position.y--; path.push(step);}\n }\n break;\n case rgt:\n if(position.y+1<map.length)\n {\n var temp_element=map[position.x][position.y+1];\n if(!Object.is(temp_element,wall_character)){ position.y++; path.push(step); }\n }\n break;\n case up_:\n if(position.x-1>=0)\n {\n var temp_element=map[position.x-1][position.y];\n if(!Object.is(temp_element,wall_character)){ position.x--; path.push(step); }\n }\n break;\n case dwn:\n if(position.x+1<map[0].length)\n {\n var temp_element=map[position.x+1][position.y];\n if(!Object.is(temp_element,wall_character)){ position.x++; path.push(step); }\n }\n break;\n }\n })\n secondSetOfMovements.forEach(function(step){\n switch(step)\n {\n case lft:\n if(position.y-1>=0)\n {\n var temp_element=map[position.x][position.y-1];\n if(!Object.is(temp_element,wall_character)){ position.y--; path.push(step);}\n }\n break;\n case rgt:\n if(position.y+1<map.length)\n {\n var temp_element=map[position.x][position.y+1];\n if(!Object.is(temp_element,wall_character)){ position.y++; path.push(step); }\n }\n break;\n case up_:\n if(position.x-1>=0)\n {\n var temp_element=map[position.x-1][position.y];\n if(!Object.is(temp_element,wall_character)){ position.x--; path.push(step); }\n }\n break;\n case dwn:\n if(position.x+1<map[0].length)\n {\n var temp_element=map[position.x+1][position.y];\n if(!Object.is(temp_element,wall_character)){ position.x++; path.push(step); }\n }\n break;\n }\n })\n })\n return path;\n}", "function optimizeBootModules () {\n\t\t\tgrunt.log.writeln('OK'.green);\n\t\t\tif (!options.dirs || !options.dirs.length) {\n\t\t\t\tfinalize();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tgrunt.util.async.forEachSeries(options.dirs, function(dir, next) {\n\t\t\t\tif (typeof dir === 'string') {\n\t\t\t\t\tdir = {\n\t\t\t\t\t\tcombine: false,\n\t\t\t\t\t\tname: dir\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\toptimizeDir(dir, next);\n\t\t\t}, function () {\n\t\t\t\tfinalize();\n\t\t\t});\n\t\t}", "function possiblePaths(n,paths){\nif(n==1){\n paths=1;\n return paths;\n}\nif(n==2){\n paths=2;\n return paths;\n}\nif(n==3){\n paths=4;\n return paths;\n}\npaths=possiblePaths(n-1)+possiblePaths(n-2)+possiblePaths(n-3);\nreturn paths;\n}", "function calculatePath() {\n // create Nodes from the Start and End x,y coordinates\n let mypathStart = Node(null, { x: pathStart[0], y: pathStart[1] });\n let mypathEnd = Node(null, { x: pathEnd[0], y: pathEnd[1] });\n // create an array that will contain all world cells\n let AStar = new Array(worldSize);\n // list of currently open Nodes\n let Open = [mypathStart];\n // list of the final output array\n let result = [];\n // reference to a Node (that is nearby)\n let myNeighbours;\n // reference to a Node (that we are considering now)\n let myNode;\n // reference to a Node (that starts a path in question)\n let myPath;\n // temp integer variables used in the calculations\n let length, max, min, i, j;\n // iterate through the open list until none are left\n do {\n max = worldSize;\n min = -1;\n for (i = 0; i < length; i++) {\n if (Open[i].f < max) {\n max = Open[i].f;\n min = i;\n }\n }\n // grab the next node and remove it from Open array\n myNode = Open.splice(min, 1)[0];\n // is it the destination node?\n if (myNode.value === mypathEnd.value) {\n // we found a path!\n do {\n result.unshift([myNode.x, myNode.y]);\n\n myNode = myNode.Parent;\n }\n while (myNode !== null);\n\n // clear the working arrays\n AStar = Open = [];\n\n return result;\n }\n\n // find which nearby nodes are walkable\n myNeighbours = neighbours(myNode.x, myNode.y);\n for (i = 0, j = myNeighbours.length; i < j; i++) {\n // test each one that hasn't been tried already\n myPath = Node(myNode, myNeighbours[i]);\n if (!AStar[myPath.value]) {\n // estimated cost of this particular route so far\n myPath.g = myNode.g + distanceFunction(myNeighbours[i], myNode);\n // estimated cost of entire guessed route to the destination\n myPath.f = myPath.g + distanceFunction(myNeighbours[i], mypathEnd);\n // remember this new path for testing above\n Open.push(myPath);\n // mark this node in the world graph as visited\n AStar[myPath.value] = true;\n }\n }\n\n length = Open.length;\n } while (0 < length);\n\n return result;\n }", "function calculatePath() {\n\t // create Nodes from the Start and End x,y coordinates\n\t var mypathStart = Node(null, { x: pathStart[0], y: pathStart[1] });\n\t var mypathEnd = Node(null, { x: pathEnd[0], y: pathEnd[1] });\n\t // create an array that will contain all world cells\n\t var AStar = new Array(worldSize);\n\t // list of currently open Nodes\n\t var Open = [mypathStart];\n\t // list of closed Nodes\n\t var Closed = [];\n\t // list of the final output array\n\t var result = [];\n\t // reference to a Node (that is nearby)\n\t var myNeighbours;\n\t // reference to a Node (that we are considering now)\n\t var myNode;\n\t // reference to a Node (that starts a path in question)\n\t var myPath;\n\t // temp integer variables used in the calculations\n\t var length, max, min, i, j;\n\t // iterate through the open list until none are left\n\t while (length = Open.length) {\n\t max = worldSize * 999999;\n\t min = -1;\n\t for (i = 0; i < length; i++) {\n\t if (Open[i].f < max) {\n\t max = Open[i].f;\n\t min = i;\n\t }\n\t }\n\t // grab the next node and remove it from Open array\n\t myNode = Open.splice(min, 1)[0];\n\t // is it the destination node?\n\t if (myNode.value === mypathEnd.value) {\n\t myPath = Closed[Closed.push(myNode) - 1];\n\t do {\n\t result.push([myPath.x, myPath.y]);\n\t } while (myPath = myPath.Parent);\n\t // clear the working arrays\n\t AStar = Closed = Open = [];\n\t // we want to return start to finish\n\t result.reverse();\n\t } else // not the destination\n\t {\n\t // find which nearby nodes are walkable\n\t myNeighbours = Neighbours(myNode.x, myNode.y);\n\t // test each one that hasn't been tried already\n\t for (i = 0, j = myNeighbours.length; i < j; i++) {\n\t myPath = Node(myNode, myNeighbours[i], world[myNeighbours[i].x][myNeighbours[i].y]);\n\t if (!AStar[myPath.value]) {\n\t // estimated cost of this particular route so far\n\t myPath.g += myNode.g + distanceFunction(myNeighbours[i], myNode);\n\t // estimated cost of entire guessed route to the destination\n\t myPath.f = myPath.g + distanceFunction(myNeighbours[i], mypathEnd);\n\t // remember this new path for testing above\n\t Open.push(myPath);\n\t // mark this node in the world graph as visited\n\t AStar[myPath.value] = true;\n\t }\n\t }\n\t // remember this route as having no more untested options\n\t Closed.push(myNode);\n\t }\n\t } // keep iterating until the Open list is empty\n\t return result;\n\t }", "solveDFS() {\n for (let maxDepth = 0; maxDepth <= 10; maxDepth++) {\n let path = this.dfs(maxDepth);\n if (path) {\n this.drawSolvedPath(path);\n return path;\n }\n }\n return null;\n }", "computePathToComplete(){\n if (Object.keys(this.state.legs_dict).length !== 0 &&Object.keys(this.state.stops_dict).length !== 0 && this.state.driver_location !== null) {\n\n // Time required to complete all legs\n var time_complete_all_legs = 0\n // Time required to complete driver's remaining path\n var time_complete = 0\n \n // Append legs dictionary with start and stop locations and compute time required to drive from start to stop.\n // Also, compute times to complete driver's path and all legs\n var new_legs_dict = {}\n var is_passed_driver_leg = false\n\n for (var key in this.state.legs_dict) {\n var dict_specs = this.state.legs_dict[key]\n dict_specs[\"startStop_x\"] = this.state.stops_dict[dict_specs[\"startStop\"]][\"x\"]\n dict_specs[\"startStop_y\"] = this.state.stops_dict[dict_specs[\"startStop\"]][\"y\"]\n dict_specs[\"endStop_x\"] = this.state.stops_dict[dict_specs[\"endStop\"]][\"x\"]\n dict_specs[\"endStop_y\"] = this.state.stops_dict[dict_specs[\"endStop\"]][\"y\"]\n \n // Distance between subsequent stops\n var dist = Math.sqrt(Math.pow(dict_specs[\"endStop_x\"] - dict_specs[\"startStop_x\"], 2) + \n Math.pow(dict_specs[\"endStop_y\"] - dict_specs[\"startStop_y\"], 2))\n // Time required to drive from the start to the stop point\n dict_specs[\"time\"] = dist / dict_specs[\"speedLimit\"]\n\n // Update leg info\n new_legs_dict[key] = dict_specs\n\n // Update time to complete the entire path and the remaining path\n time_complete_all_legs += new_legs_dict[key][\"time\"]\n if (is_passed_driver_leg) time_complete += new_legs_dict[key][\"time\"]\n if (key === this.state.driver_location[\"activeLegID\"]) is_passed_driver_leg = true\n }\n\n // Update time to complete the remaining path with the time to complete the current leg\n time_complete += new_legs_dict[this.state.driver_location[\"activeLegID\"]][\"time\"] * (100 - parseInt(this.state.driver_location[\"legProgress\"])) / 100\n \n this.setState({legs_dict: new_legs_dict,\n bonus2_time_complete_all_legs: time_complete_all_legs,\n bonus2_time_complete: time_complete\n })\n } else {\n this.setState({alert_info: {status: true,\n type: \"warning\",\n reason: \"computePath\",\n message: \"Legs, stops and driver location are reqired for this feature to work\"}})\n }\n }", "function paths(data, ctx) {\n\t ctx.clearRect(-1, -1, w() + 2, h() + 2);\n\t ctx.beginPath();\n\t data.forEach(function (d) {\n\t if (__.bundleDimension !== null && __.bundlingStrength > 0 || __.smoothness > 0) {\n\t single_curve(d, ctx);\n\t } else {\n\t single_path(d, ctx);\n\t }\n\t });\n\t ctx.stroke();\n\t }", "searchPath( pastPositions, currY, currX ){\n var wentSomewhere = false;\n \n //Try to go up\n if(BadBoggle.validPath(pastPositions, currY - 1, currX)){\n BadBoggle.searchPath( \n pastPositions.concat([[currY - 1, currX]]),\n currY - 1,\n currX\n );\n\n wentSomewhere = true;\n }\n\n //Try to go right \n if(BadBoggle.validPath(pastPositions, currY, currX + 1)){\n BadBoggle.searchPath( \n pastPositions.concat([[currY, currX + 1]]),\n currY,\n currX + 1\n );\n\n wentSomewhere = true;\n }\n\n //Try to go down \n if(BadBoggle.validPath(pastPositions, currY + 1, currX)){\n BadBoggle.searchPath( \n pastPositions.concat([[currY + 1, currX]]),\n currY + 1,\n currX\n );\n\n wentSomewhere = true;\n }\n\n //Try to go left \n if(BadBoggle.validPath(pastPositions, currY, currX - 1)){\n BadBoggle.searchPath( \n pastPositions.concat([[currY, currX - 1]]),\n currY,\n currX - 1\n );\n\n wentSomewhere = true;\n }\n\n // If all paths are exhausted, add the path to the array\n if(wentSomewhere === false){\n var pathString = '';\n pastPositions.forEach(function(coords){\n pathString += gridArray[coords[0]][coords[1]];\n });\n gridPaths.push( pathString );\n }\n }", "function iterateFromLeaves(f) {\n function optimizeNextFromLeaves(node) {\n if (node instanceof SourceNode) {\n return;\n }\n var next = node.parent;\n if (f(node)) {\n optimizeNextFromLeaves(next);\n }\n }\n return optimizeNextFromLeaves;\n }", "generateAndTestMap(){\r\n let test = null;\r\n let ok = false\r\n while(test === null && !ok) {\r\n this.generateField();\r\n\r\n let pf = new Pathfinding(this);\r\n test = pf.findPath()\r\n }\r\n if(test.length < this.minPath) test = this.generateAndTestMap();\r\n return test;\r\n }", "findWay(passedGrid) {\n // console.log('moj gridek', passedGrid)\n var pathFinder = (entranceX, entranceY, grid) => {\n var distanceFromTop = entranceX;\n var distanceFromLeft = entranceY;\n\n var location = {\n distanceFromTop: distanceFromTop,\n distanceFromLeft: distanceFromLeft,\n path: [],\n status: 'Start'\n }\n\n //inicjalizacja kolejki\n var queue = [];\n queue.push(location);\n\n //loop grida\n while (queue.length > 0) {\n //zwrocenie pierwszego elementu z kolejki\n var currentLocation = queue.shift();\n\n //polnoc\n var newLocation = explore(currentLocation, 'North', grid);\n //jesli wyjscie przekazac do stanu aplikacji kolejke z najkrotsza sciezka\n if (newLocation.status === 'Exit') {\n this.setState(prevState => ({\n exit: [...prevState.exit, newLocation.path]\n }))\n return newLocation.path;\n //droga\n } else if (newLocation.status === 'Valid') {\n queue.push(newLocation);\n }\n\n //wschod\n var newLocation = explore(currentLocation, 'East', grid);\n if (newLocation.status === 'Exit') {\n this.setState(prevState => ({\n exit: [...prevState.exit, newLocation.path]\n }))\n return newLocation.path;\n } else if (newLocation.status === 'Valid') {\n queue.push(newLocation);\n }\n\n //poludnie\n var newLocation = explore(currentLocation, 'South', grid);\n if (newLocation.status === 'Exit') {\n this.setState(prevState => ({\n exit: [...prevState.exit, newLocation.path]\n }))\n return newLocation.path;\n } else if (newLocation.status === 'Valid') {\n queue.push(newLocation);\n }\n\n //zachod\n var newLocation = explore(currentLocation, 'West', grid);\n if (newLocation.status === 'Exit') {\n this.setState(prevState => ({\n exit: [...prevState.exit, newLocation.path]\n }))\n return newLocation.path;\n } else if (newLocation.status === 'Valid') {\n queue.push(newLocation);\n }\n }\n //nie znaleziono drogi\n this.setState(prevState => ({\n exit: [...prevState.exit, 'Nie znaleziono wyjścia, ten grobowiec będzie twoim grobowcem']\n }))\n return false;\n }\n\n //sprawdzenie typu lokacji\n var locationStatus = (location, grid) => {\n let gridSize = grid.length;\n let dft = location.distanceFromTop;\n let dfl = location.distanceFromLeft;\n // console.log(gridSize, 'size')\n // console.log(location)\n // console.log(grid, dft, dfl);\n\n if (location.distanceFromLeft < 0 ||\n location.distanceFromLeft >= gridSize ||\n location.distanceFromTop < 0 ||\n location.distanceFromTop >= gridSize) {\n //poza gridem\n return 'Invalid';\n //jesli wyjscie\n } else if (grid[dft][dfl].type === 'w') {\n return 'Exit';\n //jesli nie droga (zablokowana lub odwiedzona)\n } else if (grid[dft][dfl].type !== 'o') {\n return 'Blocked';\n //jesli droga\n } else {\n return 'Valid';\n }\n }\n\n //chodzenie\n var explore = (currentLocation, direction, grid) => {\n var newPath = currentLocation.path.slice();\n newPath.push(direction);\n\n var dft = currentLocation.distanceFromTop;\n var dfl = currentLocation.distanceFromLeft;\n\n if (direction === 'North') {\n dft -= 1;\n } else if (direction === 'East') {\n dfl += 1;\n } else if (direction === 'South') {\n dft += 1;\n } else if (direction === 'West') {\n dfl -= 1;\n }\n\n var newLocation = {\n distanceFromTop: dft,\n distanceFromLeft: dfl,\n path: newPath,\n status: 'Unknown'\n };\n\n newLocation.status = locationStatus(newLocation, grid);\n\n //jesli droga, to oznacz lokacje jako odwiedzoną\n if (newLocation.status === 'Valid') {\n grid[newLocation.distanceFromTop][newLocation.distanceFromLeft] = 'Visited';\n }\n\n return newLocation;\n }\n console.log(pathFinder(this.state.startY, this.state.startX, passedGrid));\n }", "nextStep(){\n this.search.shift()\n this.search = this.children.concat(this.search)\n\n if( this.search.length == 0){\n this.finished = true\n }\n else{\n this.state = this.search[0]\n this.children = []\n\n // If it is a final state\n if( this.blockInPath(this.state, this.maze.getFinish()) && this.state.length < this.cost){\n this.bestPath = this.state\n this.cost = this.state.length\n }\n // Branch and Bound: Examine the following paths only if they are better than the current best\n else if(this.state.length + 1 < this.cost){\n // Get the children paths with no repeating nodes\n this.children = this.getChildren(this.state).filter( child => !this.blockInPath(this.state, child[child.length - 1]) )\n \n }\n }\n \n }", "function nextStepPaths(x, z, xCount, zCount, board, endChar, xPrev, zPrev, ignorePointsBehind, dst) {\n function checkAdjacent(expect, expect2, expect3, xx, zz, notExpect) {\n if (xx === xPrev && zz === zPrev) {\n return null;\n }\n var ch = board[zz][xx];\n if (ch === expect || ch === expect2 || ch === expect3) {\n dst.push({ x: xx, z: zz });\n }\n else if (notExpect === ch) { }\n else if (ch === endChar) {\n return { x: xx, z: zz };\n }\n return null;\n }\n var res = ForEachUtil.forEachDirection(x, z, xCount, zCount, {\n top: function (x, z) { return checkAdjacent('|', '/', '\\\\', x, z, '-'); },\n topRight: function (x, z) { return checkAdjacent('/', '|', '-', x, z, '\\\\'); },\n right: function (x, z) { return checkAdjacent('-', '/', '\\\\', x, z, '|'); },\n bottomRight: function (x, z) { return checkAdjacent('\\\\', '|', '-', x, z, '/'); },\n bottom: function (x, z) { return checkAdjacent('|', '/', '\\\\', x, z, '-'); },\n bottomLeft: function (x, z) { return checkAdjacent('/', '|', '-', x, z, '\\\\'); },\n left: function (x, z) { return checkAdjacent('-', '/', '\\\\', x, z, '|'); },\n topLeft: function (x, z) { return checkAdjacent('\\\\', '|', '-', x, z, '//'); },\n }, ignorePointsBehind, xPrev, zPrev);\n return res;\n }", "followPaths(path_so_far) {\n // logging\n this.get_paths_ran += 1;\n if (this.get_paths_ran % 10000 == 0) {\n Log(\"get paths ran \" + String(this.get_paths_ran));\n }\n let note = this.db[path_so_far.all_members.last()];\n let all_members = path_so_far.all_members;\n let items = path_so_far.items;\n let new_paths_to_follow = [];\n let note_links_to = note.links_to.slice();\n let note_linked_from = note.linked_from.slice();\n note_links_to.forEach((link) => {\n // check whether the linked note also links to the current note\n let linked_to_or_both_ways = LINKED_TO;\n if (note_linked_from.contains(link)) {\n // remove it from the passive links to be followed later\n let index = note_linked_from.indexOf(link, 0);\n note_linked_from.splice(index, 1);\n linked_to_or_both_ways = LINKED_BOTH;\n }\n let new_path = {\n all_members: all_members.concat(link),\n items: items.concat([[link, linked_to_or_both_ways]]),\n };\n new_paths_to_follow.push(new_path);\n });\n note_linked_from.forEach((link) => {\n let new_path = {\n all_members: all_members.concat(link),\n items: items.concat([[link, LINKED_FROM]]),\n };\n new_paths_to_follow.push(new_path);\n });\n let called_itself = false; // whether the function called itself\n // function calls itself to explore every new path\n new_paths_to_follow.forEach((path) => {\n // the path without the next note that is to be explored\n let all_items_so_far = path.all_members.slice(0, -1);\n let last_item_path = path.all_members.last();\n let last_item = this.getNoteFromPath(last_item_path);\n // stop if this note is already part of the explored path\n if (all_items_so_far.includes(last_item_path)) {\n return;\n }\n // stop if the path meanders too much\n if (path.all_members.length - last_item.distance_from_CN > 1) {\n return;\n }\n this.followPaths(path);\n called_itself = true;\n });\n if (!called_itself) {\n // only add the path if it does't lead anywhere else. No need to have paths that are parts of other paths\n this.all_paths.push(path_so_far);\n }\n }", "onCodePathEnd() {\n for (const node of scopeInfo.uselessContinues) {\n context.report({\n node,\n loc: node.loc,\n messageId: \"unnecessaryContinue\",\n fix(fixer) {\n if (isRemovable(node) && !sourceCode.getCommentsInside(node).length) {\n\n /*\n * Extend the replacement range to include the\n * entire function to avoid conflicting with\n * no-else-return.\n * https://github.com/eslint/eslint/issues/8026\n */\n return new FixTracker(fixer, sourceCode)\n .retainEnclosingFunction(node)\n .remove(node);\n }\n return null;\n }\n });\n }\n\n scopeInfo = scopeInfo.upper;\n }", "function getForwardPathsLoopgains(paths){\r\n var forwardLoopgains = [];\r\n\r\n paths.forEach(p => {\r\n var forwardEdges = extractPathEdges(p);\r\n var flg = calculateLoopGain(forwardEdges);\r\n forwardLoopgains.push(flg);\r\n });\r\n\r\n return forwardLoopgains;\r\n}", "function mapPath(wire){\r\n\t// Start at origin\r\n\t\tlet x = 0;\r\n\t\tlet y = 0;\r\n\t\tlet steps = 0;\r\n\r\n\t// Create an empty array to pass back after filling\r\n\t\tvar xyArray = new Array();\r\n\t\r\n\tfor(let i=0; i<wire.length; i++){\r\n\t\tlet instruction = wire[i];\r\n\t\tlet direction = instruction.substring(0,1);\r\n\t\tlet travelDist = Number(instruction.substring(1,instruction.length));\r\n\r\n\t\t\tswitch(direction){\r\n\t\t\t\tcase \"R\":\r\n\t\t\t\t\t//Moving X in a positive direction, but Y remains the same...\r\n\t\t\t\t\tfor(let z=0; z<travelDist; z++){\r\n\t\t\t\t\t\tx = x+1;\r\n\t\t\t\t\t\tsteps++;\r\n\t\t\t\t\t\txyArray.push(x + \",\" + y + \",\" + steps);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"L\":\r\n\t\t\t\t\t//Moving X in a negative direction, but Y remains the same.\r\n\t\t\t\t\tfor(let z=0; z<travelDist; z++){\r\n\t\t\t\t\t\tx = x-1;\r\n\t\t\t\t\t\tsteps++;\r\n\t\t\t\t\t\txyArray.push(x + \",\" + y + \",\" + steps);\r\n\t\t\t\t\t}\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"U\":\r\n\t\t\t\t\t//Moving Y in a postive direction, but X stays the same.\r\n\t\t\t\t\tfor(let z=0; z<travelDist; z++){\r\n\t\t\t\t\t\ty = y+1;\r\n\t\t\t\t\t\tsteps++;\r\n\t\t\t\t\t\txyArray.push(x + \",\" + y + \",\" + steps);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"D\":\r\n\t\t\t\t\t//Moving Y in a negative direction, but X stays the same.\r\n\t\t\t\t\tfor(let z=0; z<travelDist; z++){\r\n\t\t\t\t\t\ty = y-1;\r\n\t\t\t\t\t\tsteps++;\r\n\t\t\t\t\t\txyArray.push(x + \",\" + y + \",\" + steps);\r\n\t\t\t\t\t}\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tconsole.log(\"Should never be here....!!!!!\");\r\n\t\t\t}\r\n\r\n\t}\r\n\t\r\n\treturn xyArray;\r\n\t\r\n}", "function findAndAdd2ProngsOnAllPaths(shape) {\n let for2ProngsArray = shape.for2ProngsArray;\n for (let k = 0; k < for2ProngsArray.length; k++) {\n let for2Prongs = for2ProngsArray[k];\n findAndAdd2Prongs(shape, k, for2Prongs);\n }\n}", "function solveMaze(){\n var Xqueue=[parseInt(src_x)]; \n var Yqueue=[parseInt(src_y)]; \n let pathFound=false;\n var xLoc;\n var yLoc;\n\n while(Xqueue.length>0 && !pathFound){\n xLoc=Xqueue.shift();\n yLoc=Yqueue.shift();\n if(xLoc>1){\n if(tiles[xLoc-1][yLoc].state=='f'){\n pathFound=true;\n }\n }\n if(xLoc<tileColCount-1){\n if(tiles[xLoc+1][yLoc].state=='f'){\n pathFound=true;\n }\n }\n if(yLoc>1){\n if(tiles[xLoc][yLoc-1].state=='f'){\n pathFound=true;\n }\n }\n \n if(yLoc<tileRowCount-1){\n if(tiles[xLoc][yLoc+1].state=='f'){\n pathFound=true;\n }\n }\n if(xLoc>1){\n if(tiles[xLoc-1][yLoc].state=='e'){\n Xqueue.push(xLoc-1);\n Yqueue.push(yLoc);\n tiles[xLoc-1][yLoc].state=tiles[xLoc][yLoc].state+'l';\n // rect(xloc-1,yLoc,tileW,tileH,tiles[xLoc-1][yLoc].state);\n }\n }\n if(xLoc<tileColCount-1){\n if(tiles[xLoc+1][yLoc].state=='e'){\n Xqueue.push(xLoc+1);\n Yqueue.push(yLoc);\n tiles[xLoc+1][yLoc].state=tiles[xLoc][yLoc].state+'r';\n //rect(xloc+1,yLoc,tileW,tileH,tiles[xLoc+1][yLoc].state);\n }\n }\n if(yLoc>1){\n if(tiles[xLoc][yLoc-1].state=='e'){\n Xqueue.push(xLoc);\n Yqueue.push(yLoc-1);\n tiles[xLoc][yLoc-1].state=tiles[xLoc][yLoc].state+'u';\n // rect(xloc,yLoc-1,tileW,tileH,tiles[xLoc][yLoc-1].state);\n }\n }\n if(yLoc<tileRowCount-1){\n if(tiles[xLoc][yLoc+1].state=='e'){\n Xqueue.push(xLoc);\n Yqueue.push(yLoc+1);\n tiles[xLoc][yLoc+1].state=tiles[xLoc][yLoc].state+'d';\n // rect(xloc,yLoc+1,tileW,tileH,tiles[xLoc][yLoc+1].state);\n }\n }\n //setInterval(draw(),100);\n }\n if(!pathFound){\n output.innerHTML=\"No Solution\";\n }\n else{\n output.innerHTML=\"Solved\";\n let path=tiles[xLoc][yLoc].state; \n let pathLength=path.length;\n let currX=parseInt(src_x); \n let currY=parseInt(src_y); \n for(let i=0;i<pathLength-1;i++){\n if(path.charAt(i+1)=='u'){\n currY-=1;\n }\n if(path.charAt(i+1)=='d'){\n currY+=1;\n }\n if(path.charAt(i+1)=='l'){\n currX-=1;\n }\n if(path.charAt(i+1)=='r'){\n currX+=1;\n }\n tiles[currX][currY].state='p';\n }\n }\n}", "buildPath(num) {\n var result = new Set();\n var cur = num;\n const maxBound = this.props.maxBound;\n while (!result.has(cur) && cur <= maxBound && cur >= -maxBound) {\n result.add(cur);\n cur = this.getDestination(cur);\n }\n return [...result];\n }", "function calculatePath()\n\n{\n\n// create Nodes from the Start and End x,y coordinates\n\nvar\n\nmypathStart = Node(null, {x:pathStart[0], y:pathStart[1]});\n\nvar mypathEnd = Node(null, {x:pathEnd[0], y:pathEnd[1]});\n\n// create an array that will contain all world cells\n\nvar AStar = new Array(worldSize);\n\n// list of currently open Nodes\n\nvar Open = [mypathStart];\n\n// list of closed Nodes\n\nvar Closed = [];\n\n// list of the final output array\n\nvar result = [];\n\n// reference to a Node (that is nearby)\n\nvar myNeighbours;\n\n// reference to a Node (that we are considering now)\n\nvar myNode;\n\n// reference to a Node (that starts a path in question)\n\nvar myPath;\n\n// temp integer variables used in the calculations\n\nvar length, max, min, i, j;\n\n// iterate through the open list until none are left\n\nwhile(length = Open.length)\n\n{\n\nmax = worldSize;\n\nmin = -1;\n\nfor(i = 0; i < length; i++)\n\n{\n\nif(Open[i].f < max)\n\n{\n\nmax = Open[i].f;\n\nmin = i;\n\n}\n\n}\n\n// grab the next node and remove it from Open array\n\nmyNode = Open.splice(min, 1)[0];\n\n// is it the destination node?\n\nif(myNode.value === mypathEnd.value)\n\n{\n\nmyPath = Closed[Closed.push(myNode) - 1];\n\ndo\n\n{\n\nresult.push([myPath.x, myPath.y]);\n\n}\n\nwhile (myPath = myPath.Parent);\n\n// clear the working arrays\n\nAStar = Closed = Open = [];\n\n// we want to return start to finish\n\nresult.reverse();\n\n}\n\nelse // not the destination\n\n{\n\n// find which nearby nodes are walkable\n\nmyNeighbours = Neighbours(myNode.x, myNode.y);\n\n// test each one that hasn't been tried already\n\nfor(i = 0, j = myNeighbours.length; i < j; i++)\n\n{\n\nmyPath = Node(myNode, myNeighbours[i]);\n\nif (!AStar[myPath.value])\n\n{\n\n// estimated cost of this particular route so far\n\nmyPath.g = myNode.g + distanceFunction(myNeighbours[i], myNode);\n\n// estimated cost of entire guessed route to the destination\n\nmyPath.f = myPath.g + distanceFunction(myNeighbours[i], mypathEnd);\n\n// remember this new path for testing above\n\nOpen.push(myPath);\n\n// mark this node in the world graph as visited\n\nAStar[myPath.value] = true;\n\n}\n\n}\n\n// remember this route as having no more untested options\n\nClosed.push(myNode);\n\n}\n\n} // keep iterating until the Open list is empty\n\nreturn result;\n\n}", "function getParentConditionalPath(path) {\n var parentPath;\n while (parentPath = path.parentPath) {\n if (parentPath.isIfStatement() || parentPath.isConditionalExpression()) {\n if (path.key === \"test\") {\n return;\n } else {\n return parentPath;\n }\n } else {\n path = parentPath;\n }\n }\n}", "function buildPath(pathStack, timer, visitedNodes, visitedNodesPainted) {\r\n\r\n pathStack.forEach(element => {\r\n setTimeout(function() {element.classList += \" pathNode\"}, timer * 50)\r\n timer++\r\n });\r\n}", "function hivtrace_get_path(next, i, j) {\n\n var all_paths = [];\n var i = parseInt(i);\n var j = parseInt(j);\n\n for (var c = 0; c < next[i][j].length; c++) {\n\n var k = next[i][j][c];\n var intermediate = k;\n\n if (intermediate == null || intermediate == i) {\n return [\n [parseInt(i), parseInt(j)]\n ];\n } else {\n\n var paths_i_k = hivtrace_get_path(next, i, intermediate);\n var paths_k_j = hivtrace_get_path(next, intermediate, j);\n\n for (var i_k_index = 0; i_k_index < paths_i_k.length; i_k_index++) {\n var i_k = paths_i_k[i_k_index];\n for (var k_j_index = 0; k_j_index < paths_k_j.length; k_j_index++) {\n var k_j = paths_k_j[k_j_index];\n if (i_k.length) {\n if ((i_k[0] == i) && (i_k[i_k.length - 1] == k) && (k_j[0] == k) && (k_j[k_j.length - 1] == j)) {\n i_k.pop()\n all_paths.push(i_k.concat(k_j));\n }\n }\n }\n }\n }\n }\n\n return all_paths;\n\n}", "function getParentConditionalPath(path) {\n\t var parentPath;\n\t while (parentPath = path.parentPath) {\n\t if (parentPath.isIfStatement() || parentPath.isConditionalExpression()) {\n\t if (path.key === \"test\") {\n\t return;\n\t } else {\n\t return parentPath;\n\t }\n\t } else {\n\t path = parentPath;\n\t }\n\t }\n\t}", "function getParentConditionalPath(path) {\n\t var parentPath;\n\t while (parentPath = path.parentPath) {\n\t if (parentPath.isIfStatement() || parentPath.isConditionalExpression()) {\n\t if (path.key === \"test\") {\n\t return;\n\t } else {\n\t return parentPath;\n\t }\n\t } else {\n\t path = parentPath;\n\t }\n\t }\n\t}", "shortestPath(start, goal) {\n // start isn't moveable to\n if (!this.moveable(start.x / this.tileW, start.y / this.tileH)) {\n return [];\n }\n let openSet = [];\n let closedSet = [];\n openSet.push(start);\n\n // clear path finding data\n for (let y = 0; y < round(height / this.tileH); y++) {\n for (let x = 0; x < round(width / this.tileW); x++) {\n this.map[y][x].f = 0;\n this.map[y][x].g = 0;\n this.map[y][x].h = 0;\n this.map[y][x].parent = null;\n }\n }\n\n while (openSet.length > 0) {\n // get lowest cost node in open set\n let currentNode = openSet[0];\n for (let i = 0; i < openSet.length; i++) {\n if (openSet[i].f < currentNode.f)\n currentNode = openSet[i];\n }\n\n // if end has been reached, then finish\n if (currentNode.x == goal.x && currentNode.y == goal.y) {\n let path = []\n while (currentNode.parent != null) {\n path.push(currentNode);\n currentNode = currentNode.parent;\n }\n return path.reverse();\n }\n\n // remove currentNode from openset, and put into closed set\n closedSet.push(currentNode);\n for (let i = openSet.length - 1; i >= 0; i--) {\n if (openSet[i] === currentNode) {\n openSet.splice(i, 1);\n }\n }\n\n // evaluate currentNode's neighbours\n for (let i = 0; i < currentNode.neighbours.length; i++) {\n let neighbour = currentNode.neighbours[i];\n if (!this.moveable(neighbour.x / this.tileW, neighbour.y / this.tileH)) {\n continue;\n }\n if (closedSet.includes(neighbour))\n continue;\n // valid neighbour found..\n let gScore = currentNode.g + 1;\n let bestG = false;\n if (!openSet.includes(neighbour)) {\n // first time at neighbour, so it's the best\n bestG = true;\n neighbour.h = this.heuristic(neighbour.x, neighbour.y, goal.x, goal.y);\n openSet.push(neighbour);\n } else if (gScore < neighbour.g) {\n // worse path to it exists in openset..\n bestG = true;\n openSet.splice(openSet.indexOf(neighbour), 1);\n }\n\n if (bestG) {\n neighbour.parent = currentNode;\n neighbour.g = gScore;\n neighbour.f = neighbour.h + neighbour.g;\n }\n }\n }\n // no path found\n return [];\n }", "function crawl(path) {\n if (path.is(\"_templateLiteralProduced\")) {\n crawl(path.get(\"left\"));\n crawl(path.get(\"right\"));\n } else if (!path.isBaseType(\"string\") && !path.isBaseType(\"number\")) {\n path.replaceWith(t.callExpression(t.identifier(\"String\"), [path.node]));\n }\n}", "function crawl(path) {\n if (path.is(\"_templateLiteralProduced\")) {\n crawl(path.get(\"left\"));\n crawl(path.get(\"right\"));\n } else if (!path.isBaseType(\"string\") && !path.isBaseType(\"number\")) {\n path.replaceWith(t.callExpression(t.identifier(\"String\"), [path.node]));\n }\n}", "function optimize (root, options) {\n\t if (!root) { return }\n\t isStaticKey = genStaticKeysCached(options.staticKeys || '');\n\t isPlatformReservedTag = options.isReservedTag || no;\n\t // first pass: mark all non-static nodes.\n\t markStatic$1(root);\n\t // second pass: mark static roots.\n\t markStaticRoots(root, false);\n\t}", "function optimize (root, options) {\n\t if (!root) { return }\n\t isStaticKey = genStaticKeysCached(options.staticKeys || '');\n\t isPlatformReservedTag = options.isReservedTag || no;\n\t // first pass: mark all non-static nodes.\n\t markStatic$1(root);\n\t // second pass: mark static roots.\n\t markStaticRoots(root, false);\n\t}", "function optimize (root, options) {\n\t if (!root) { return }\n\t isStaticKey = genStaticKeysCached(options.staticKeys || '');\n\t isPlatformReservedTag = options.isReservedTag || no;\n\t // first pass: mark all non-static nodes.\n\t markStatic$1(root);\n\t // second pass: mark static roots.\n\t markStaticRoots(root, false);\n\t}" ]
[ "0.56930166", "0.55992", "0.54393184", "0.5373869", "0.53721833", "0.5369765", "0.53634197", "0.5341836", "0.52746236", "0.5250546", "0.52375257", "0.52365315", "0.52195805", "0.5217819", "0.52080554", "0.52057695", "0.5189535", "0.51850003", "0.51837337", "0.5168765", "0.5150163", "0.5149208", "0.51422936", "0.5129931", "0.5121538", "0.51181537", "0.51181537", "0.51181537", "0.51181537", "0.51161486", "0.51124436", "0.51091003", "0.51091003", "0.51091003", "0.51091003", "0.51049644", "0.510208", "0.5092701", "0.50831586", "0.5075177", "0.50692767", "0.50692767", "0.5068363", "0.5068363", "0.5059519", "0.5043064", "0.5039433", "0.5002585", "0.4994473", "0.49929348", "0.4989117", "0.49801812", "0.4976735", "0.49585906", "0.49523488", "0.49386346", "0.49357983", "0.49343562", "0.49254414", "0.49230027", "0.49106264", "0.49099502", "0.49085248", "0.49054623", "0.49054623", "0.490297", "0.49000373", "0.49000373", "0.48966947", "0.48966405", "0.48914257", "0.48910734", "0.48887965", "0.48783073", "0.48731118", "0.4872376", "0.48703766", "0.48681384", "0.48677942", "0.48577338", "0.485309", "0.48523778", "0.48390096", "0.48385113", "0.48382324", "0.48312607", "0.48206663", "0.48160702", "0.48120597", "0.4810175", "0.48083326", "0.48061782", "0.48024833", "0.47950113", "0.47950113", "0.47948116", "0.4791906", "0.4791906", "0.4775913", "0.4775913", "0.4775913" ]
0.0
-1
Warns if there is a duplicate or missing key
function warnOnInvalidKey(child, knownKeys) { { if (typeof child !== 'object' || child === null) { return knownKeys; } switch (child.$$typeof) { case REACT_ELEMENT_TYPE: case REACT_PORTAL_TYPE: warnForMissingKey(child); var key = child.key; if (typeof key !== 'string') { break; } if (knownKeys === null) { knownKeys = new Set(); knownKeys.add(key); break; } if (!knownKeys.has(key)) { knownKeys.add(key); break; } error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key); break; } } return knownKeys; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "checkDuplicates(error) {\n if (error.name === \"MongoError\" && error.code === 11000) {\n // check if the error from Mongodb is duplication error\n // eslint-disable-next-line no-useless-escape\n const regex = /index\\:\\ (?:.*\\.)?\\$?(?:([_a-z0-9]*)(?:_\\d*)|([_a-z0-9]*))\\s*dup key/i;\n const match = error.message.match(regex);\n const fieldName = match[1] || match[2];\n return new APIError({\n message: `${fieldName} already exists`,\n status: httpStatus.CONFLICT,\n isPublic: true,\n stack: error.stack,\n });\n }\n return error;\n }", "function testInsert_UniqueKeyViolation_SingleColumn() {\n var table = env.schema.table('tableE');\n var emailIndexSchema = table.getIndices()[1];\n assertTrue(emailIndexSchema.isUnique);\n var emailIndex = env.indexStore.get(emailIndexSchema.getNormalizedName());\n var rowIdIndex = env.indexStore.get(table.getRowIdIndexName());\n\n var journal = createJournal([table]);\n var row1 = table.createRow({'id': 'pk1', 'email': 'emailAddress1'});\n journal.insert(table, [row1]);\n journal.commit();\n assertTrue(emailIndex.containsKey(row1.payload()['email']));\n assertTrue(rowIdIndex.containsKey(row1.id()));\n assertEquals(1, env.cache.getCount());\n\n journal = createJournal([table]);\n var row2 = table.createRow({'id': 'pk2', 'email': 'emailAddress1'});\n lf.testing.util.assertThrowsError(\n 201, // Duplicate keys are not allowed.\n journal.insert.bind(journal, table, [row2]));\n journal.rollback();\n\n assertEquals(row1.id(), emailIndex.get(row1.payload()['email'])[0]);\n assertTrue(rowIdIndex.containsKey(row1.id()));\n assertEquals(1, env.cache.getCount());\n}", "function getKeyError(err){\n var regex = /index\\:\\ (?:.*\\.)?\\$?(?:([_a-z0-9]*)(?:_\\d*)|([_a-z0-9]*))\\s*dup key/i,\n match = err.match(regex);\n return match[1] || match[2]; \n}", "isUniqueConstraintViolation(error) {\n return /duplicate key value violates unique constraint/.test(String(error));\n }", "function warnOnInvalidKey(child,knownKeys){{if(_typeof(child)!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning$1(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;default:break;}}return knownKeys;}", "function warnOnInvalidKey(child,knownKeys){{if(_typeof(child)!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}error('Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;}}return knownKeys;}", "function warnOnInvalidKey(child,knownKeys){{if(typeof child!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning$1(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;default:break;}}return knownKeys;}", "function warnOnInvalidKey(child,knownKeys){{if(typeof child!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}error('Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;}}return knownKeys;}", "function warnOnInvalidKey(child,knownKeys){{if(typeof child!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}error('Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;}}return knownKeys;}", "function warnOnInvalidKey(child,knownKeys){{if((typeof child==='undefined'?'undefined':_typeof(child))!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning$1(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;default:break;}}return knownKeys;}", "function warnOnInvalidKey(child,knownKeys){{if((typeof child==='undefined'?'undefined':_typeof(child))!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_CALL_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.%s',key,getCurrentFiberStackAddendum$1());break;default:break;}}return knownKeys;}", "function warnOnInvalidKey(child,knownKeys){{if((typeof child==='undefined'?'undefined':_typeof(child))!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_CALL_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.%s',key,getCurrentFiberStackAddendum$1());break;default:break;}}return knownKeys;}", "function warnOnInvalidKey(child,knownKeys){{if((typeof child==='undefined'?'undefined':_typeof(child))!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_CALL_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.%s',key,getCurrentFiberStackAddendum$1());break;default:break;}}return knownKeys;}", "function warnOnInvalidKey(child,knownKeys){{if(typeof child!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.%s',key,getCurrentFiberStackAddendum$7());break;default:break;}}return knownKeys;}", "function warnOnInvalidKey(child,knownKeys){{if((typeof child==='undefined'?'undefined':_typeof(child))!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.%s',key,getCurrentFiberStackAddendum$7());break;default:break;}}return knownKeys;}", "function warnOnInvalidKey(child,knownKeys,returnFiber){{if(_typeof(child)!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child,returnFiber);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}error('Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;}}return knownKeys;}", "function testInsert_PrimaryKeyViolation3() {\n var table = env.schema.table('tableA');\n var pkIndexSchema = table.getConstraint().getPrimaryKey();\n var pkIndex = env.indexStore.get(pkIndexSchema.getNormalizedName());\n\n var rows = [];\n for (var i = 0; i < 3; i++) {\n rows.push(table.createRow(\n {'id': 'pk' + i.toString(), 'name': 'DummyName'}));\n }\n for (var j = 0; j < 3; j++) {\n rows.push(table.createRow({'id': 'samePk', 'name': 'DummyName'}));\n }\n\n var journal = createJournal([table]);\n lf.testing.util.assertThrowsError(\n 201, // Duplicate keys are not allowed.\n journal.insert.bind(journal, table, rows));\n journal.rollback();\n\n assertEquals(0, env.cache.getCount());\n var rowIdIndex = env.indexStore.get(table.getRowIdIndexName());\n assertEquals(0, pkIndex.getRange().length);\n assertEquals(0, rowIdIndex.getRange().length);\n}", "function warnOnInvalidKey(child,knownKeys,returnFiber){{if(typeof child!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child,returnFiber);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}error('Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;}}return knownKeys;}", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error(\n 'Encountered two children with the same key, `%s`. ' +\n 'Keys should be unique so that components maintain their identity ' +\n 'across updates. Non-unique keys may cause children to be ' +\n 'duplicated and/or omitted — the behavior is unsupported and ' +\n 'could change in a future version.',\n key,\n );\n\n break;\n }\n }\n\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }", "function makeEnsureExistsCallback(callback) {\n return function ensureExistsCallback(error,success) {\n //winston.log('info',sprintf(\"ensureExistsCallback:(%s,%s)\",JSON.stringify(error),JSON.stringify(success)));\n if (!error) {\n callback(null,1);\n }\n else if (error['code'] == mongo.errors.duplicateKeyError) {\n callback(null,0);\n } \n else {\n callback(error);\n }\n }\n }", "function warnOnInvalidKey(child, knownKeys, returnFiber) {\n if (typeof child !== 'object' || child === null) return knownKeys;\n switch(child.$$typeof){\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n if (typeof key !== 'string') break;\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n error(\"Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted \\u2014 the behavior is unsupported and could change in a future version.\", key);\n break;\n }\n return knownKeys;\n }", "checkForDuplicates(state, indexDictionary) {\n const data = state.dictionaries[indexDictionary].content;\n\n data.forEach((value) => {\n state.dictionaries[indexDictionary].content = data.map((pair, index) => {\n // Make sure the object is not itself\n if (data.indexOf(pair) !== data.indexOf(value)) {\n if (pair.domain === value.domain && pair.range === value.range) {\n if (\n data[index].validity.status\n && data[index].validity.reason === ''\n ) {\n // Change validity of the pair to false and assign the reason why\n data[index].validity.status = false;\n data[index].validity.reason = reasonNotValid.duplicate;\n }\n }\n }\n return pair;\n });\n });\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n\t {\n\t if (typeof child !== 'object' || child === null) {\n\t return knownKeys;\n\t }\n\t switch (child.$$typeof) {\n\t case REACT_ELEMENT_TYPE:\n\t case REACT_CALL_TYPE:\n\t case REACT_PORTAL_TYPE:\n\t warnForMissingKey(child);\n\t var key = child.key;\n\t if (typeof key !== 'string') {\n\t break;\n\t }\n\t if (knownKeys === null) {\n\t knownKeys = new Set();\n\t knownKeys.add(key);\n\t break;\n\t }\n\t if (!knownKeys.has(key)) {\n\t knownKeys.add(key);\n\t break;\n\t }\n\t warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n\t break;\n\t default:\n\t break;\n\t }\n\t }\n\t return knownKeys;\n\t }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$2());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$7());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n\n default:\n break;\n }\n }\n return knownKeys;\n }", "async testValidateKeyMissingKeyData() {\n const key = createKey().setKeyData(null);\n\n try {\n await Util.validateKey(key);\n } catch (e) {\n assertEquals(\n ExceptionText.InvalidKeyMissingKeyData(key.getKeyId()), e.toString());\n return;\n }\n fail('An exception should be thrown.');\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }", "function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }" ]
[ "0.64586234", "0.63743407", "0.62774295", "0.61566454", "0.61478174", "0.61425227", "0.61372644", "0.61251426", "0.61251426", "0.61219513", "0.6114083", "0.6114083", "0.6114083", "0.61133426", "0.61059004", "0.6096614", "0.60936666", "0.6082668", "0.5989997", "0.59782195", "0.59782195", "0.59782195", "0.59782195", "0.5968301", "0.5958314", "0.59582865", "0.5956432", "0.59424883", "0.59424883", "0.59424883", "0.59424883", "0.59424883", "0.59424883", "0.5940093", "0.59280837", "0.59280837", "0.59275055", "0.5918077", "0.59043187", "0.59043187", "0.59043187", "0.59043187", "0.5888681", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.58638847", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966", "0.5862966" ]
0.0
-1
itself. They will be added to the sideeffect list as we pass through the children and the parent.
function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) { // This function is not recursive. // If the top level item is an array, we treat it as a set of children, // not as a fragment. Nested arrays on the other hand will be treated as // fragment nodes. Recursion happens at the normal flow. // Handle top level unkeyed fragments as if they were arrays. // This leads to an ambiguity between <>{[...]}</> and <>...</>. // We treat the ambiguous cases above the same. var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null; if (isUnkeyedTopLevelFragment) { newChild = newChild.props.children; } // Handle object types var isObject = typeof newChild === 'object' && newChild !== null; if (isObject) { switch (newChild.$$typeof) { case REACT_ELEMENT_TYPE: return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime)); case REACT_PORTAL_TYPE: return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime)); } } if (typeof newChild === 'string' || typeof newChild === 'number') { return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime)); } if (isArray$1(newChild)) { return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime); } if (getIteratorFn(newChild)) { return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime); } if (isObject) { throwOnInvalidObjectType(returnFiber, newChild); } { if (typeof newChild === 'function') { warnOnFunctionType(); } } if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) { // If the new child is undefined, and the return fiber is a composite // component, throw an error. If Fiber return types are disabled, // we already threw above. switch (returnFiber.tag) { case ClassComponent: { { var instance = returnFiber.stateNode; if (instance.render._isMockFunction) { // We allow auto-mocks to proceed as if they're returning null. break; } } } // Intentionally fall through to the next case, which handles both // functions and classes // eslint-disable-next-lined no-fallthrough case FunctionComponent: { var Component = returnFiber.type; { { throw Error( (Component.displayName || Component.name || 'Component') + "(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null." ); } } } } } // Remaining cases are all treated as empty. return deleteRemainingChildren(returnFiber, currentFirstChild); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) // Noop.\n return;\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) // Noop.\n return null;\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while(childToDelete !== null){\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n while(existingChild !== null){\n if (existingChild.key !== null) existingChildren.set(existingChild.key, existingChild);\n else existingChildren.set(existingChild.index, existingChild);\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) // Noop.\n return lastPlacedIndex;\n var current3 = newFiber.alternate;\n if (current3 !== null) {\n var oldIndex = current3.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else // This item can stay in place.\n return oldIndex;\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) newFiber.flags = Placement;\n return newFiber;\n }\n function updateTextNode(returnFiber, current3, textContent, lanes) {\n if (current3 === null || current3.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current3, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n function updateElement(returnFiber, current3, element, lanes) {\n if (current3 !== null) {\n if (current3.elementType === element.type || isCompatibleFamilyForHotReloading(current3, element)) {\n // Move based on index\n var existing = useFiber(current3, element.props);\n existing.ref = coerceRef(returnFiber, current3, element);\n existing.return = returnFiber;\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n return existing;\n }\n } // Insert\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current3, element);\n created.return = returnFiber;\n return created;\n }\n function updatePortal(returnFiber, current3, portal, lanes) {\n if (current3 === null || current3.tag !== HostPortal || current3.stateNode.containerInfo !== portal.containerInfo || current3.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current3, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n function updateFragment(returnFiber, current3, fragment, lanes, key) {\n if (current3 === null || current3.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current3, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n if (typeof newChild === 'object' && newChild !== null) {\n switch(newChild.$$typeof){\n case REACT_ELEMENT_TYPE:\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n case REACT_PORTAL_TYPE:\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n _created2.return = returnFiber;\n return _created2;\n }\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n _created3.return = returnFiber;\n return _created3;\n }\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n if (typeof newChild === 'function') warnOnFunctionType(returnFiber);\n return null;\n }\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) return null;\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n if (typeof newChild === 'object' && newChild !== null) {\n switch(newChild.$$typeof){\n case REACT_ELEMENT_TYPE:\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else return null;\n case REACT_PORTAL_TYPE:\n if (newChild.key === key) return updatePortal(returnFiber, oldFiber, newChild, lanes);\n else return null;\n }\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) return null;\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n if (typeof newChild === 'function') warnOnFunctionType(returnFiber);\n return null;\n }\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n if (typeof newChild === 'object' && newChild !== null) {\n switch(newChild.$$typeof){\n case REACT_ELEMENT_TYPE:\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n case REACT_PORTAL_TYPE:\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n if (typeof newChild === 'function') warnOnFunctionType(returnFiber);\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */ function warnOnInvalidKey(child, knownKeys, returnFiber) {\n if (typeof child !== 'object' || child === null) return knownKeys;\n switch(child.$$typeof){\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n if (typeof key !== 'string') break;\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n error(\"Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted \\u2014 the behavior is unsupported and could change in a future version.\", key);\n break;\n }\n return knownKeys;\n }\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // First, validate keys.\n var knownKeys = null;\n for(var i = 0; i < newChildren.length; i++){\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for(; oldFiber !== null && newIdx < newChildren.length; newIdx++){\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else nextOldFiber = oldFiber.sibling;\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) oldFiber = nextOldFiber;\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n else // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for(; newIdx < newChildren.length; newIdx++){\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n if (_newFiber === null) continue;\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n else previousNewFiber.sibling = _newFiber;\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n for(; newIdx < newChildren.length; newIdx++){\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) resultingFirstChild = _newFiber2;\n else previousNewFiber.sibling = _newFiber2;\n previousNewFiber = _newFiber2;\n }\n }\n if (shouldTrackSideEffects) // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function(child) {\n return deleteChild(returnFiber, child);\n });\n return resultingFirstChild;\n }\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n if (!(typeof iteratorFn === 'function')) throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) error(\"Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers.\");\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) error(\"Using Maps as children is not supported. Use an array of keyed ReactElements instead.\");\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for(; !_step.done; _step = _newChildren.next()){\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n var newChildren = iteratorFn.call(newChildrenIterable);\n if (!(newChildren != null)) throw Error(\"An iterable object provided no iterator.\");\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n for(; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()){\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else nextOldFiber = oldFiber.sibling;\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) oldFiber = nextOldFiber;\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n else // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for(; !step.done; newIdx++, step = newChildren.next()){\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n if (_newFiber3 === null) continue;\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n else previousNewFiber.sibling = _newFiber3;\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n for(; !step.done; newIdx++, step = newChildren.next()){\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) resultingFirstChild = _newFiber4;\n else previousNewFiber.sibling = _newFiber4;\n previousNewFiber = _newFiber4;\n }\n }\n if (shouldTrackSideEffects) // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function(child) {\n return deleteChild(returnFiber, child);\n });\n return resultingFirstChild;\n }\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n while(child !== null){\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch(child.tag){\n case Fragment:\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n return existing;\n }\n break;\n case Block:\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n default:\n if (child.elementType === element.type || isCompatibleFamilyForHotReloading(child, element)) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var _existing3 = useFiber(child, element.props);\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n return _existing3;\n }\n break;\n } // Didn't match.\n deleteRemainingChildren(returnFiber, child);\n break;\n } else deleteChild(returnFiber, child);\n child = child.sibling;\n }\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n while(child !== null){\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else deleteChild(returnFiber, child);\n child = child.sibling;\n }\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n if (isUnkeyedTopLevelFragment) newChild = newChild.props.children;\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n if (isObject) switch(newChild.$$typeof){\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n }\n if (typeof newChild === 'string' || typeof newChild === 'number') return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n if (isArray$1(newChild)) return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n if (getIteratorFn(newChild)) return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n if (isObject) throwOnInvalidObjectType(returnFiber, newChild);\n if (typeof newChild === 'function') warnOnFunctionType(returnFiber);\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch(returnFiber.tag){\n case ClassComponent:\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) break;\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n throw Error((getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");\n }\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(\n returnFiber,\n current,\n textContent,\n expirationTime,\n ) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(\n textContent,\n returnFiber.mode,\n expirationTime,\n );\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(\n returnFiber,\n current,\n element,\n expirationTime,\n ) {\n if (current !== null) {\n if (\n current.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element)\n ) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n var created = createFiberFromElement(\n element,\n returnFiber.mode,\n expirationTime,\n );\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(\n returnFiber,\n current,\n portal,\n expirationTime,\n ) {\n if (\n current === null ||\n current.tag !== HostPortal ||\n current.stateNode.containerInfo !== portal.containerInfo ||\n current.stateNode.implementation !== portal.implementation\n ) {\n // Insert\n var created = createFiberFromPortal(\n portal,\n returnFiber.mode,\n expirationTime,\n );\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(\n returnFiber,\n current,\n fragment,\n expirationTime,\n key,\n ) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(\n fragment,\n returnFiber.mode,\n expirationTime,\n key,\n );\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (\n typeof newChild === 'string' ||\n typeof newChild === 'number'\n ) {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText(\n '' + newChild,\n returnFiber.mode,\n expirationTime,\n );\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE: {\n var _created = createFiberFromElement(\n newChild,\n returnFiber.mode,\n expirationTime,\n );\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE: {\n var _created2 = createFiberFromPortal(\n newChild,\n returnFiber.mode,\n expirationTime,\n );\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(\n newChild,\n returnFiber.mode,\n expirationTime,\n null,\n );\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(\n returnFiber,\n oldFiber,\n newChild,\n expirationTime,\n ) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (\n typeof newChild === 'string' ||\n typeof newChild === 'number'\n ) {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(\n returnFiber,\n oldFiber,\n '' + newChild,\n expirationTime,\n );\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE: {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(\n returnFiber,\n oldFiber,\n newChild.props.children,\n expirationTime,\n key,\n );\n }\n\n return updateElement(\n returnFiber,\n oldFiber,\n newChild,\n expirationTime,\n );\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE: {\n if (newChild.key === key) {\n return updatePortal(\n returnFiber,\n oldFiber,\n newChild,\n expirationTime,\n );\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(\n returnFiber,\n oldFiber,\n newChild,\n expirationTime,\n null,\n );\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(\n existingChildren,\n returnFiber,\n newIdx,\n newChild,\n expirationTime,\n ) {\n if (\n typeof newChild === 'string' ||\n typeof newChild === 'number'\n ) {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(\n returnFiber,\n matchedFiber,\n '' + newChild,\n expirationTime,\n );\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE: {\n var _matchedFiber =\n existingChildren.get(\n newChild.key === null ? newIdx : newChild.key,\n ) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(\n returnFiber,\n _matchedFiber,\n newChild.props.children,\n expirationTime,\n newChild.key,\n );\n }\n\n return updateElement(\n returnFiber,\n _matchedFiber,\n newChild,\n expirationTime,\n );\n }\n\n case REACT_PORTAL_TYPE: {\n var _matchedFiber2 =\n existingChildren.get(\n newChild.key === null ? newIdx : newChild.key,\n ) || null;\n\n return updatePortal(\n returnFiber,\n _matchedFiber2,\n newChild,\n expirationTime,\n );\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(\n returnFiber,\n _matchedFiber3,\n newChild,\n expirationTime,\n null,\n );\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error(\n 'Encountered two children with the same key, `%s`. ' +\n 'Keys should be unique so that components maintain their identity ' +\n 'across updates. Non-unique keys may cause children to be ' +\n 'duplicated and/or omitted — the behavior is unsupported and ' +\n 'could change in a future version.',\n key,\n );\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(\n returnFiber,\n currentFirstChild,\n newChildren,\n expirationTime,\n ) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (\n ;\n oldFiber !== null && newIdx < newChildren.length;\n newIdx++\n ) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(\n returnFiber,\n oldFiber,\n newChildren[newIdx],\n expirationTime,\n );\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(\n newFiber,\n lastPlacedIndex,\n newIdx,\n );\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(\n returnFiber,\n newChildren[newIdx],\n expirationTime,\n );\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(\n _newFiber,\n lastPlacedIndex,\n newIdx,\n );\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n var existingChildren = mapRemainingChildren(\n returnFiber,\n oldFiber,\n ); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(\n existingChildren,\n returnFiber,\n newIdx,\n newChildren[newIdx],\n expirationTime,\n );\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(\n _newFiber2.key === null ? newIdx : _newFiber2.key,\n );\n }\n }\n\n lastPlacedIndex = placeChild(\n _newFiber2,\n lastPlacedIndex,\n newIdx,\n );\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function(child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(\n returnFiber,\n currentFirstChild,\n newChildrenIterable,\n expirationTime,\n ) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error(\n 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.',\n );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (\n typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator'\n ) {\n if (!didWarnAboutGenerators) {\n error(\n 'Using Generators as children is unsupported and will likely yield ' +\n 'unexpected results because enumerating a generator mutates it. ' +\n 'You may convert it to an array with `Array.from()` or the ' +\n '`[...spread]` operator before rendering. Keep in mind ' +\n 'you might need to polyfill these features for older browsers.',\n );\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error(\n 'Using Maps as children is unsupported and will likely yield ' +\n 'unexpected results. Convert it to a sequence/iterable of keyed ' +\n 'ReactElements instead.',\n );\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error('An iterable object provided no iterator.');\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (\n ;\n oldFiber !== null && !step.done;\n newIdx++, step = newChildren.next()\n ) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(\n returnFiber,\n oldFiber,\n step.value,\n expirationTime,\n );\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(\n newFiber,\n lastPlacedIndex,\n newIdx,\n );\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(\n returnFiber,\n step.value,\n expirationTime,\n );\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(\n _newFiber3,\n lastPlacedIndex,\n newIdx,\n );\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n var existingChildren = mapRemainingChildren(\n returnFiber,\n oldFiber,\n ); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(\n existingChildren,\n returnFiber,\n newIdx,\n step.value,\n expirationTime,\n );\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(\n _newFiber4.key === null ? newIdx : _newFiber4.key,\n );\n }\n }\n\n lastPlacedIndex = placeChild(\n _newFiber4,\n lastPlacedIndex,\n newIdx,\n );\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function(child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(\n returnFiber,\n currentFirstChild,\n textContent,\n expirationTime,\n ) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (\n currentFirstChild !== null &&\n currentFirstChild.tag === HostText\n ) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(\n returnFiber,\n currentFirstChild.sibling,\n );\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(\n textContent,\n returnFiber.mode,\n expirationTime,\n );\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(\n returnFiber,\n currentFirstChild,\n element,\n expirationTime,\n ) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment: {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(\n child,\n element.props.children,\n );\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default: {\n if (\n child.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element)\n ) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(\n returnFiber,\n child,\n element,\n );\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(\n element.props.children,\n returnFiber.mode,\n expirationTime,\n element.key,\n );\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(\n element,\n returnFiber.mode,\n expirationTime,\n );\n\n _created4.ref = coerceRef(\n returnFiber,\n currentFirstChild,\n element,\n );\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(\n returnFiber,\n currentFirstChild,\n portal,\n expirationTime,\n ) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (\n child.tag === HostPortal &&\n child.stateNode.containerInfo === portal.containerInfo &&\n child.stateNode.implementation === portal.implementation\n ) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(\n portal,\n returnFiber.mode,\n expirationTime,\n );\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n function reconcileChildFibers(\n returnFiber,\n currentFirstChild,\n newChild,\n expirationTime,\n ) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment =\n typeof newChild === 'object' &&\n newChild !== null &&\n newChild.type === REACT_FRAGMENT_TYPE &&\n newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n var isObject =\n typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(\n reconcileSingleElement(\n returnFiber,\n currentFirstChild,\n newChild,\n expirationTime,\n ),\n );\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(\n reconcileSinglePortal(\n returnFiber,\n currentFirstChild,\n newChild,\n expirationTime,\n ),\n );\n }\n }\n\n if (\n typeof newChild === 'string' ||\n typeof newChild === 'number'\n ) {\n return placeSingleChild(\n reconcileSingleTextNode(\n returnFiber,\n currentFirstChild,\n '' + newChild,\n expirationTime,\n ),\n );\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(\n returnFiber,\n currentFirstChild,\n newChild,\n expirationTime,\n );\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(\n returnFiber,\n currentFirstChild,\n newChild,\n expirationTime,\n );\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (\n typeof newChild === 'undefined' &&\n !isUnkeyedTopLevelFragment\n ) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent: {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent: {\n var Component = returnFiber.type;\n\n {\n {\n throw Error(\n (Component.displayName ||\n Component.name ||\n 'Component') +\n '(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.',\n );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\nreturn;}// Deletions are added in reversed order so we add it to the front.\n// At this point, the return fiber's effect list is empty except for\n// deletions, so we can just append the deletion to the list. The remaining\n// effects aren't added until the complete phase. Once we implement\n// resuming, this may not be true.\nvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.flags=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\nreturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n// assuming that after the first child we've already added everything.\nvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n// keys quickly. Implicit (null) keys get added to this set with their index\n// instead.\nvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps){// We currently set sibling to null and index to 0 here because it is easy\n// to forget to do before returning it. E.g. for the single child case.\nvar clone=createWorkInProgress(fiber,pendingProps);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\nreturn lastPlacedIndex;}var current=newFiber.alternate;if(current!==null){var oldIndex=current.index;if(oldIndex<lastPlacedIndex){// This is a move.\nnewFiber.flags=Placement;return lastPlacedIndex;}else{// This item can stay in place.\nreturn oldIndex;}}else{// This is an insertion.\nnewFiber.flags=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n// placement for inserting new children.\nif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.flags=Placement;}return newFiber;}function updateTextNode(returnFiber,current,textContent,lanes){if(current===null||current.tag!==HostText){// Insert\nvar created=createFiberFromText(textContent,returnFiber.mode,lanes);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,textContent);existing.return=returnFiber;return existing;}}function updateElement(returnFiber,current,element,lanes){if(current!==null){if(current.elementType===element.type||// Keep this check inline so it only runs on the false path:\nisCompatibleFamilyForHotReloading(current,element)){// Move based on index\nvar existing=useFiber(current,element.props);existing.ref=coerceRef(returnFiber,current,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}}// Insert\nvar created=createFiberFromElement(element,returnFiber.mode,lanes);created.ref=coerceRef(returnFiber,current,element);created.return=returnFiber;return created;}function updatePortal(returnFiber,current,portal,lanes){if(current===null||current.tag!==HostPortal||current.stateNode.containerInfo!==portal.containerInfo||current.stateNode.implementation!==portal.implementation){// Insert\nvar created=createFiberFromPortal(portal,returnFiber.mode,lanes);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,portal.children||[]);existing.return=returnFiber;return existing;}}function updateFragment(returnFiber,current,fragment,lanes,key){if(current===null||current.tag!==Fragment){// Insert\nvar created=createFiberFromFragment(fragment,returnFiber.mode,lanes,key);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,fragment);existing.return=returnFiber;return existing;}}function createChild(returnFiber,newChild,lanes){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nvar created=createFiberFromText(''+newChild,returnFiber.mode,lanes);created.return=returnFiber;return created;}if(_typeof(newChild)==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _created=createFiberFromElement(newChild,returnFiber.mode,lanes);_created.ref=coerceRef(returnFiber,null,newChild);_created.return=returnFiber;return _created;}case REACT_PORTAL_TYPE:{var _created2=createFiberFromPortal(newChild,returnFiber.mode,lanes);_created2.return=returnFiber;return _created2;}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _created3=createFiberFromFragment(newChild,returnFiber.mode,lanes,null);_created3.return=returnFiber;return _created3;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType(returnFiber);}}return null;}function updateSlot(returnFiber,oldFiber,newChild,lanes){// Update the fiber if the keys match, otherwise return null.\nvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,lanes);}if(_typeof(newChild)==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,lanes,key);}return updateElement(returnFiber,oldFiber,newChild,lanes);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,lanes);}else{return null;}}}if(isArray$1(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,lanes,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType(returnFiber);}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,lanes){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n// new node for the key. If both are text nodes, they match.\nvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,lanes);}if(_typeof(newChild)==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,lanes,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,lanes);}case REACT_PORTAL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber2,newChild,lanes);}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _matchedFiber3=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber3,newChild,lanes,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType(returnFiber);}}return null;}/**\n * Warns if there is a duplicate or missing key\n */function warnOnInvalidKey(child,knownKeys,returnFiber){{if(_typeof(child)!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child,returnFiber);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}error('Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,lanes){// This algorithm can't optimize by searching from both ends since we\n// don't have backpointers on fibers. I'm trying to see how far we can get\n// with that model. If it ends up not being worth the tradeoffs, we can\n// add it later.\n// Even with a two ended optimization, we'd want to optimize for the case\n// where there are few changes and brute force the comparison instead of\n// going for the Map. It'd like to explore hitting that path first in\n// forward-only mode and only go for the Map once we notice that we need\n// lots of look ahead. This doesn't handle reversal as well as two ended\n// search but that's unusual. Besides, for the two ended optimization to\n// work on Iterables, we'd need to copy the whole set.\n// In this first iteration, we'll just live with hitting the bad case\n// (adding everything to a Map) in for every insert/move.\n// If you change this code, also update reconcileChildrenIterator() which\n// uses the same algorithm.\n{// First, validate keys.\nvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys,returnFiber);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],lanes);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],lanes);if(_newFiber===null){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],lanes);if(_newFiber2!==null){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,lanes){// This is the same implementation as reconcileChildrenArray(),\n// but using the iterator instead.\nvar iteratorFn=getIteratorFn(newChildrenIterable);if(!(typeof iteratorFn==='function')){{throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");}}{// We don't support rendering Generators because it's a mutation.\n// See https://github.com/facebook/react/issues/12995\nif(typeof Symbol==='function'&&// $FlowFixMe Flow doesn't know about toStringTag\nnewChildrenIterable[Symbol.toStringTag]==='Generator'){if(!didWarnAboutGenerators){error('Using Generators as children is unsupported and will likely yield '+'unexpected results because enumerating a generator mutates it. '+'You may convert it to an array with `Array.from()` or the '+'`[...spread]` operator before rendering. Keep in mind '+'you might need to polyfill these features for older browsers.');}didWarnAboutGenerators=true;}// Warn about using Maps as children\nif(newChildrenIterable.entries===iteratorFn){if(!didWarnAboutMaps){error('Using Maps as children is not supported. '+'Use an array of keyed ReactElements instead.');}didWarnAboutMaps=true;}// First, validate keys.\n// We'll get a different iterator later for the main pass.\nvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys,returnFiber);}}}var newChildren=iteratorFn.call(newChildrenIterable);if(!(newChildren!=null)){{throw Error(\"An iterable object provided no iterator.\");}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,lanes);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,lanes);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,lanes);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,lanes){// There's no need to check for keys on text nodes since we don't have a\n// way to define them.\nif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n// the rest.\ndeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent);existing.return=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n// and delete the existing ones.\ndeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.mode,lanes);created.return=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,lanes){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){switch(child.tag){case Fragment:{if(element.type===REACT_FRAGMENT_TYPE){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.props.children);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}break;}case Block:// We intentionally fallthrough here if enableBlocksAPI is not on.\n// eslint-disable-next-lined no-fallthrough\ndefault:{if(child.elementType===element.type||// Keep this check inline so it only runs on the false path:\nisCompatibleFamilyForHotReloading(child,element)){deleteRemainingChildren(returnFiber,child.sibling);var _existing3=useFiber(child,element.props);_existing3.ref=coerceRef(returnFiber,child,element);_existing3.return=returnFiber;{_existing3._debugSource=element._source;_existing3._debugOwner=element._owner;}return _existing3;}break;}}// Didn't match.\ndeleteRemainingChildren(returnFiber,child);break;}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.mode,lanes,element.key);created.return=returnFiber;return created;}else{var _created4=createFiberFromElement(element,returnFiber.mode,lanes);_created4.ref=coerceRef(returnFiber,currentFirstChild,element);_created4.return=returnFiber;return _created4;}}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,lanes){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[]);existing.return=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.mode,lanes);created.return=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n// itself. They will be added to the side-effect list as we pass through the\n// children and the parent.\nfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,lanes){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=_typeof(newChild)==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=_typeof(newChild)==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,lanes));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,lanes));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,lanes));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,lanes);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,lanes);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType(returnFiber);}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase Block:case FunctionComponent:case ForwardRef:case SimpleMemoComponent:{{{throw Error((getComponentName(returnFiber.type)||'Component')+\"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");}}}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\nreturn;}// Deletions are added in reversed order so we add it to the front.\n// At this point, the return fiber's effect list is empty except for\n// deletions, so we can just append the deletion to the list. The remaining\n// effects aren't added until the complete phase. Once we implement\n// resuming, this may not be true.\nvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else {returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.flags=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\nreturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n// assuming that after the first child we've already added everything.\nvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n// keys quickly. Implicit (null) keys get added to this set with their index\n// instead.\nvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else {existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps){// We currently set sibling to null and index to 0 here because it is easy\n// to forget to do before returning it. E.g. for the single child case.\nvar clone=createWorkInProgress(fiber,pendingProps);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\nreturn lastPlacedIndex;}var current=newFiber.alternate;if(current!==null){var oldIndex=current.index;if(oldIndex<lastPlacedIndex){// This is a move.\nnewFiber.flags=Placement;return lastPlacedIndex;}else {// This item can stay in place.\nreturn oldIndex;}}else {// This is an insertion.\nnewFiber.flags=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n// placement for inserting new children.\nif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.flags=Placement;}return newFiber;}function updateTextNode(returnFiber,current,textContent,lanes){if(current===null||current.tag!==HostText){// Insert\nvar created=createFiberFromText(textContent,returnFiber.mode,lanes);created.return=returnFiber;return created;}else {// Update\nvar existing=useFiber(current,textContent);existing.return=returnFiber;return existing;}}function updateElement(returnFiber,current,element,lanes){if(current!==null){if(current.elementType===element.type||// Keep this check inline so it only runs on the false path:\nisCompatibleFamilyForHotReloading(current,element)){// Move based on index\nvar existing=useFiber(current,element.props);existing.ref=coerceRef(returnFiber,current,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}}// Insert\nvar created=createFiberFromElement(element,returnFiber.mode,lanes);created.ref=coerceRef(returnFiber,current,element);created.return=returnFiber;return created;}function updatePortal(returnFiber,current,portal,lanes){if(current===null||current.tag!==HostPortal||current.stateNode.containerInfo!==portal.containerInfo||current.stateNode.implementation!==portal.implementation){// Insert\nvar created=createFiberFromPortal(portal,returnFiber.mode,lanes);created.return=returnFiber;return created;}else {// Update\nvar existing=useFiber(current,portal.children||[]);existing.return=returnFiber;return existing;}}function updateFragment(returnFiber,current,fragment,lanes,key){if(current===null||current.tag!==Fragment){// Insert\nvar created=createFiberFromFragment(fragment,returnFiber.mode,lanes,key);created.return=returnFiber;return created;}else {// Update\nvar existing=useFiber(current,fragment);existing.return=returnFiber;return existing;}}function createChild(returnFiber,newChild,lanes){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nvar created=createFiberFromText(''+newChild,returnFiber.mode,lanes);created.return=returnFiber;return created;}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _created=createFiberFromElement(newChild,returnFiber.mode,lanes);_created.ref=coerceRef(returnFiber,null,newChild);_created.return=returnFiber;return _created;}case REACT_PORTAL_TYPE:{var _created2=createFiberFromPortal(newChild,returnFiber.mode,lanes);_created2.return=returnFiber;return _created2;}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _created3=createFiberFromFragment(newChild,returnFiber.mode,lanes,null);_created3.return=returnFiber;return _created3;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType(returnFiber);}}return null;}function updateSlot(returnFiber,oldFiber,newChild,lanes){// Update the fiber if the keys match, otherwise return null.\nvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,lanes);}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,lanes,key);}return updateElement(returnFiber,oldFiber,newChild,lanes);}else {return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,lanes);}else {return null;}}}if(isArray$1(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,lanes,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType(returnFiber);}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,lanes){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n// new node for the key. If both are text nodes, they match.\nvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,lanes);}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,lanes,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,lanes);}case REACT_PORTAL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber2,newChild,lanes);}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _matchedFiber3=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber3,newChild,lanes,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType(returnFiber);}}return null;}/**\n * Warns if there is a duplicate or missing key\n */function warnOnInvalidKey(child,knownKeys,returnFiber){{if(typeof child!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child,returnFiber);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}error('Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,lanes){// This algorithm can't optimize by searching from both ends since we\n// don't have backpointers on fibers. I'm trying to see how far we can get\n// with that model. If it ends up not being worth the tradeoffs, we can\n// add it later.\n// Even with a two ended optimization, we'd want to optimize for the case\n// where there are few changes and brute force the comparison instead of\n// going for the Map. It'd like to explore hitting that path first in\n// forward-only mode and only go for the Map once we notice that we need\n// lots of look ahead. This doesn't handle reversal as well as two ended\n// search but that's unusual. Besides, for the two ended optimization to\n// work on Iterables, we'd need to copy the whole set.\n// In this first iteration, we'll just live with hitting the bad case\n// (adding everything to a Map) in for every insert/move.\n// If you change this code, also update reconcileChildrenIterator() which\n// uses the same algorithm.\n{// First, validate keys.\nvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys,returnFiber);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else {nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],lanes);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else {// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],lanes);if(_newFiber===null){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber;}else {previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],lanes);if(_newFiber2!==null){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else {previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,lanes){// This is the same implementation as reconcileChildrenArray(),\n// but using the iterator instead.\nvar iteratorFn=getIteratorFn(newChildrenIterable);if(!(typeof iteratorFn==='function')){{throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");}}{// We don't support rendering Generators because it's a mutation.\n// See https://github.com/facebook/react/issues/12995\nif(typeof Symbol==='function'&&// $FlowFixMe Flow doesn't know about toStringTag\nnewChildrenIterable[Symbol.toStringTag]==='Generator'){if(!didWarnAboutGenerators){error('Using Generators as children is unsupported and will likely yield '+'unexpected results because enumerating a generator mutates it. '+'You may convert it to an array with `Array.from()` or the '+'`[...spread]` operator before rendering. Keep in mind '+'you might need to polyfill these features for older browsers.');}didWarnAboutGenerators=true;}// Warn about using Maps as children\nif(newChildrenIterable.entries===iteratorFn){if(!didWarnAboutMaps){error('Using Maps as children is not supported. '+'Use an array of keyed ReactElements instead.');}didWarnAboutMaps=true;}// First, validate keys.\n// We'll get a different iterator later for the main pass.\nvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys,returnFiber);}}}var newChildren=iteratorFn.call(newChildrenIterable);if(!(newChildren!=null)){{throw Error(\"An iterable object provided no iterator.\");}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else {nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,lanes);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else {// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,lanes);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber3;}else {previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,lanes);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else {previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,lanes){// There's no need to check for keys on text nodes since we don't have a\n// way to define them.\nif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n// the rest.\ndeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent);existing.return=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n// and delete the existing ones.\ndeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.mode,lanes);created.return=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,lanes){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){switch(child.tag){case Fragment:{if(element.type===REACT_FRAGMENT_TYPE){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.props.children);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}break;}case Block:// We intentionally fallthrough here if enableBlocksAPI is not on.\n// eslint-disable-next-lined no-fallthrough\ndefault:{if(child.elementType===element.type||// Keep this check inline so it only runs on the false path:\nisCompatibleFamilyForHotReloading(child,element)){deleteRemainingChildren(returnFiber,child.sibling);var _existing3=useFiber(child,element.props);_existing3.ref=coerceRef(returnFiber,child,element);_existing3.return=returnFiber;{_existing3._debugSource=element._source;_existing3._debugOwner=element._owner;}return _existing3;}break;}}// Didn't match.\ndeleteRemainingChildren(returnFiber,child);break;}else {deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.mode,lanes,element.key);created.return=returnFiber;return created;}else {var _created4=createFiberFromElement(element,returnFiber.mode,lanes);_created4.ref=coerceRef(returnFiber,currentFirstChild,element);_created4.return=returnFiber;return _created4;}}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,lanes){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[]);existing.return=returnFiber;return existing;}else {deleteRemainingChildren(returnFiber,child);break;}}else {deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.mode,lanes);created.return=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n// itself. They will be added to the side-effect list as we pass through the\n// children and the parent.\nfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,lanes){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=typeof newChild==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=typeof newChild==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,lanes));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,lanes));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,lanes));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,lanes);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,lanes);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType(returnFiber);}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase Block:case FunctionComponent:case ForwardRef:case SimpleMemoComponent:{{{throw Error((getComponentName(returnFiber.type)||'Component')+\"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");}}}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\nreturn;}// Deletions are added in reversed order so we add it to the front.\n// At this point, the return fiber's effect list is empty except for\n// deletions, so we can just append the deletion to the list. The remaining\n// effects aren't added until the complete phase. Once we implement\n// resuming, this may not be true.\nvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.effectTag=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\nreturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n// assuming that after the first child we've already added everything.\nvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n// keys quickly. Implicit (null) keys get added to this set with their index\n// instead.\nvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps){// We currently set sibling to null and index to 0 here because it is easy\n// to forget to do before returning it. E.g. for the single child case.\nvar clone=createWorkInProgress(fiber,pendingProps);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\nreturn lastPlacedIndex;}var current=newFiber.alternate;if(current!==null){var oldIndex=current.index;if(oldIndex<lastPlacedIndex){// This is a move.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}else{// This item can stay in place.\nreturn oldIndex;}}else{// This is an insertion.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n// placement for inserting new children.\nif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.effectTag=Placement;}return newFiber;}function updateTextNode(returnFiber,current,textContent,expirationTime){if(current===null||current.tag!==HostText){// Insert\nvar created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created[\"return\"]=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,textContent);existing[\"return\"]=returnFiber;return existing;}}function updateElement(returnFiber,current,element,expirationTime){if(current!==null){if(current.elementType===element.type||// Keep this check inline so it only runs on the false path:\nisCompatibleFamilyForHotReloading(current,element)){// Move based on index\nvar existing=useFiber(current,element.props);existing.ref=coerceRef(returnFiber,current,element);existing[\"return\"]=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}}// Insert\nvar created=createFiberFromElement(element,returnFiber.mode,expirationTime);created.ref=coerceRef(returnFiber,current,element);created[\"return\"]=returnFiber;return created;}function updatePortal(returnFiber,current,portal,expirationTime){if(current===null||current.tag!==HostPortal||current.stateNode.containerInfo!==portal.containerInfo||current.stateNode.implementation!==portal.implementation){// Insert\nvar created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created[\"return\"]=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,portal.children||[]);existing[\"return\"]=returnFiber;return existing;}}function updateFragment(returnFiber,current,fragment,expirationTime,key){if(current===null||current.tag!==Fragment){// Insert\nvar created=createFiberFromFragment(fragment,returnFiber.mode,expirationTime,key);created[\"return\"]=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,fragment);existing[\"return\"]=returnFiber;return existing;}}function createChild(returnFiber,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nvar created=createFiberFromText(''+newChild,returnFiber.mode,expirationTime);created[\"return\"]=returnFiber;return created;}if(_typeof(newChild)==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _created=createFiberFromElement(newChild,returnFiber.mode,expirationTime);_created.ref=coerceRef(returnFiber,null,newChild);_created[\"return\"]=returnFiber;return _created;}case REACT_PORTAL_TYPE:{var _created2=createFiberFromPortal(newChild,returnFiber.mode,expirationTime);_created2[\"return\"]=returnFiber;return _created2;}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _created3=createFiberFromFragment(newChild,returnFiber.mode,expirationTime,null);_created3[\"return\"]=returnFiber;return _created3;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateSlot(returnFiber,oldFiber,newChild,expirationTime){// Update the fiber if the keys match, otherwise return null.\nvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,expirationTime);}if(_typeof(newChild)==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,expirationTime,key);}return updateElement(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}}if(isArray$1(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n// new node for the key. If both are text nodes, they match.\nvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,expirationTime);}if(_typeof(newChild)==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,expirationTime,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,expirationTime);}case REACT_PORTAL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber2,newChild,expirationTime);}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _matchedFiber3=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber3,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}/**\n * Warns if there is a duplicate or missing key\n */function warnOnInvalidKey(child,knownKeys){{if(_typeof(child)!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}error('Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,expirationTime){// This algorithm can't optimize by searching from both ends since we\n// don't have backpointers on fibers. I'm trying to see how far we can get\n// with that model. If it ends up not being worth the tradeoffs, we can\n// add it later.\n// Even with a two ended optimization, we'd want to optimize for the case\n// where there are few changes and brute force the comparison instead of\n// going for the Map. It'd like to explore hitting that path first in\n// forward-only mode and only go for the Map once we notice that we need\n// lots of look ahead. This doesn't handle reversal as well as two ended\n// search but that's unusual. Besides, for the two ended optimization to\n// work on Iterables, we'd need to copy the whole set.\n// In this first iteration, we'll just live with hitting the bad case\n// (adding everything to a Map) in for every insert/move.\n// If you change this code, also update reconcileChildrenIterator() which\n// uses the same algorithm.\n{// First, validate keys.\nvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],expirationTime);if(_newFiber===null){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],expirationTime);if(_newFiber2!==null){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren[\"delete\"](_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,expirationTime){// This is the same implementation as reconcileChildrenArray(),\n// but using the iterator instead.\nvar iteratorFn=getIteratorFn(newChildrenIterable);if(!(typeof iteratorFn==='function')){{throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");}}{// We don't support rendering Generators because it's a mutation.\n// See https://github.com/facebook/react/issues/12995\nif(typeof Symbol==='function'&&// $FlowFixMe Flow doesn't know about toStringTag\nnewChildrenIterable[Symbol.toStringTag]==='Generator'){if(!didWarnAboutGenerators){error('Using Generators as children is unsupported and will likely yield '+'unexpected results because enumerating a generator mutates it. '+'You may convert it to an array with `Array.from()` or the '+'`[...spread]` operator before rendering. Keep in mind '+'you might need to polyfill these features for older browsers.');}didWarnAboutGenerators=true;}// Warn about using Maps as children\nif(newChildrenIterable.entries===iteratorFn){if(!didWarnAboutMaps){error('Using Maps as children is unsupported and will likely yield '+'unexpected results. Convert it to a sequence/iterable of keyed '+'ReactElements instead.');}didWarnAboutMaps=true;}// First, validate keys.\n// We'll get a different iterator later for the main pass.\nvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys);}}}var newChildren=iteratorFn.call(newChildrenIterable);if(!(newChildren!=null)){{throw Error(\"An iterable object provided no iterator.\");}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,expirationTime);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,expirationTime);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren[\"delete\"](_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,expirationTime){// There's no need to check for keys on text nodes since we don't have a\n// way to define them.\nif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n// the rest.\ndeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent);existing[\"return\"]=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n// and delete the existing ones.\ndeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created[\"return\"]=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,expirationTime){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){switch(child.tag){case Fragment:{if(element.type===REACT_FRAGMENT_TYPE){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.props.children);existing[\"return\"]=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}break;}case Block:// We intentionally fallthrough here if enableBlocksAPI is not on.\n// eslint-disable-next-lined no-fallthrough\ndefault:{if(child.elementType===element.type||// Keep this check inline so it only runs on the false path:\nisCompatibleFamilyForHotReloading(child,element)){deleteRemainingChildren(returnFiber,child.sibling);var _existing3=useFiber(child,element.props);_existing3.ref=coerceRef(returnFiber,child,element);_existing3[\"return\"]=returnFiber;{_existing3._debugSource=element._source;_existing3._debugOwner=element._owner;}return _existing3;}break;}}// Didn't match.\ndeleteRemainingChildren(returnFiber,child);break;}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.mode,expirationTime,element.key);created[\"return\"]=returnFiber;return created;}else{var _created4=createFiberFromElement(element,returnFiber.mode,expirationTime);_created4.ref=coerceRef(returnFiber,currentFirstChild,element);_created4[\"return\"]=returnFiber;return _created4;}}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,expirationTime){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[]);existing[\"return\"]=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created[\"return\"]=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n// itself. They will be added to the side-effect list as we pass through the\n// children and the parent.\nfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=_typeof(newChild)==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=_typeof(newChild)==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionComponent:{var Component=returnFiber.type;{{throw Error((Component.displayName||Component.name||'Component')+\"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");}}}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\nreturn;}// Deletions are added in reversed order so we add it to the front.\n// At this point, the return fiber's effect list is empty except for\n// deletions, so we can just append the deletion to the list. The remaining\n// effects aren't added until the complete phase. Once we implement\n// resuming, this may not be true.\nvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.effectTag=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\nreturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n// assuming that after the first child we've already added everything.\nvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n// keys quickly. Implicit (null) keys get added to this set with their index\n// instead.\nvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps){// We currently set sibling to null and index to 0 here because it is easy\n// to forget to do before returning it. E.g. for the single child case.\nvar clone=createWorkInProgress(fiber,pendingProps);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\nreturn lastPlacedIndex;}var current=newFiber.alternate;if(current!==null){var oldIndex=current.index;if(oldIndex<lastPlacedIndex){// This is a move.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}else{// This item can stay in place.\nreturn oldIndex;}}else{// This is an insertion.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n// placement for inserting new children.\nif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.effectTag=Placement;}return newFiber;}function updateTextNode(returnFiber,current,textContent,expirationTime){if(current===null||current.tag!==HostText){// Insert\nvar created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,textContent);existing.return=returnFiber;return existing;}}function updateElement(returnFiber,current,element,expirationTime){if(current!==null){if(current.elementType===element.type||// Keep this check inline so it only runs on the false path:\nisCompatibleFamilyForHotReloading(current,element)){// Move based on index\nvar existing=useFiber(current,element.props);existing.ref=coerceRef(returnFiber,current,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}}// Insert\nvar created=createFiberFromElement(element,returnFiber.mode,expirationTime);created.ref=coerceRef(returnFiber,current,element);created.return=returnFiber;return created;}function updatePortal(returnFiber,current,portal,expirationTime){if(current===null||current.tag!==HostPortal||current.stateNode.containerInfo!==portal.containerInfo||current.stateNode.implementation!==portal.implementation){// Insert\nvar created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,portal.children||[]);existing.return=returnFiber;return existing;}}function updateFragment(returnFiber,current,fragment,expirationTime,key){if(current===null||current.tag!==Fragment){// Insert\nvar created=createFiberFromFragment(fragment,returnFiber.mode,expirationTime,key);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,fragment);existing.return=returnFiber;return existing;}}function createChild(returnFiber,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nvar created=createFiberFromText(''+newChild,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _created=createFiberFromElement(newChild,returnFiber.mode,expirationTime);_created.ref=coerceRef(returnFiber,null,newChild);_created.return=returnFiber;return _created;}case REACT_PORTAL_TYPE:{var _created2=createFiberFromPortal(newChild,returnFiber.mode,expirationTime);_created2.return=returnFiber;return _created2;}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _created3=createFiberFromFragment(newChild,returnFiber.mode,expirationTime,null);_created3.return=returnFiber;return _created3;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateSlot(returnFiber,oldFiber,newChild,expirationTime){// Update the fiber if the keys match, otherwise return null.\nvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,expirationTime);}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,expirationTime,key);}return updateElement(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}}if(isArray$1(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n// new node for the key. If both are text nodes, they match.\nvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,expirationTime);}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,expirationTime,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,expirationTime);}case REACT_PORTAL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber2,newChild,expirationTime);}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _matchedFiber3=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber3,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}/**\n * Warns if there is a duplicate or missing key\n */function warnOnInvalidKey(child,knownKeys){{if(typeof child!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}error('Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,expirationTime){// This algorithm can't optimize by searching from both ends since we\n// don't have backpointers on fibers. I'm trying to see how far we can get\n// with that model. If it ends up not being worth the tradeoffs, we can\n// add it later.\n// Even with a two ended optimization, we'd want to optimize for the case\n// where there are few changes and brute force the comparison instead of\n// going for the Map. It'd like to explore hitting that path first in\n// forward-only mode and only go for the Map once we notice that we need\n// lots of look ahead. This doesn't handle reversal as well as two ended\n// search but that's unusual. Besides, for the two ended optimization to\n// work on Iterables, we'd need to copy the whole set.\n// In this first iteration, we'll just live with hitting the bad case\n// (adding everything to a Map) in for every insert/move.\n// If you change this code, also update reconcileChildrenIterator() which\n// uses the same algorithm.\n{// First, validate keys.\nvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],expirationTime);if(_newFiber===null){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],expirationTime);if(_newFiber2!==null){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,expirationTime){// This is the same implementation as reconcileChildrenArray(),\n// but using the iterator instead.\nvar iteratorFn=getIteratorFn(newChildrenIterable);if(!(typeof iteratorFn==='function')){{throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");}}{// We don't support rendering Generators because it's a mutation.\n// See https://github.com/facebook/react/issues/12995\nif(typeof Symbol==='function'&&// $FlowFixMe Flow doesn't know about toStringTag\nnewChildrenIterable[Symbol.toStringTag]==='Generator'){if(!didWarnAboutGenerators){error('Using Generators as children is unsupported and will likely yield '+'unexpected results because enumerating a generator mutates it. '+'You may convert it to an array with `Array.from()` or the '+'`[...spread]` operator before rendering. Keep in mind '+'you might need to polyfill these features for older browsers.');}didWarnAboutGenerators=true;}// Warn about using Maps as children\nif(newChildrenIterable.entries===iteratorFn){if(!didWarnAboutMaps){error('Using Maps as children is unsupported and will likely yield '+'unexpected results. Convert it to a sequence/iterable of keyed '+'ReactElements instead.');}didWarnAboutMaps=true;}// First, validate keys.\n// We'll get a different iterator later for the main pass.\nvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys);}}}var newChildren=iteratorFn.call(newChildrenIterable);if(!(newChildren!=null)){{throw Error(\"An iterable object provided no iterator.\");}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,expirationTime);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,expirationTime);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,expirationTime){// There's no need to check for keys on text nodes since we don't have a\n// way to define them.\nif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n// the rest.\ndeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent);existing.return=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n// and delete the existing ones.\ndeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,expirationTime){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){switch(child.tag){case Fragment:{if(element.type===REACT_FRAGMENT_TYPE){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.props.children);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}break;}case Block:// We intentionally fallthrough here if enableBlocksAPI is not on.\n// eslint-disable-next-lined no-fallthrough\ndefault:{if(child.elementType===element.type||// Keep this check inline so it only runs on the false path:\nisCompatibleFamilyForHotReloading(child,element)){deleteRemainingChildren(returnFiber,child.sibling);var _existing3=useFiber(child,element.props);_existing3.ref=coerceRef(returnFiber,child,element);_existing3.return=returnFiber;{_existing3._debugSource=element._source;_existing3._debugOwner=element._owner;}return _existing3;}break;}}// Didn't match.\ndeleteRemainingChildren(returnFiber,child);break;}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.mode,expirationTime,element.key);created.return=returnFiber;return created;}else{var _created4=createFiberFromElement(element,returnFiber.mode,expirationTime);_created4.ref=coerceRef(returnFiber,currentFirstChild,element);_created4.return=returnFiber;return _created4;}}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,expirationTime){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[]);existing.return=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n// itself. They will be added to the side-effect list as we pass through the\n// children and the parent.\nfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=typeof newChild==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=typeof newChild==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionComponent:{var Component=returnFiber.type;{{throw Error((Component.displayName||Component.name||'Component')+\"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");}}}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\nreturn;}// Deletions are added in reversed order so we add it to the front.\n// At this point, the return fiber's effect list is empty except for\n// deletions, so we can just append the deletion to the list. The remaining\n// effects aren't added until the complete phase. Once we implement\n// resuming, this may not be true.\nvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.effectTag=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\nreturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n// assuming that after the first child we've already added everything.\nvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n// keys quickly. Implicit (null) keys get added to this set with their index\n// instead.\nvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps){// We currently set sibling to null and index to 0 here because it is easy\n// to forget to do before returning it. E.g. for the single child case.\nvar clone=createWorkInProgress(fiber,pendingProps);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\nreturn lastPlacedIndex;}var current=newFiber.alternate;if(current!==null){var oldIndex=current.index;if(oldIndex<lastPlacedIndex){// This is a move.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}else{// This item can stay in place.\nreturn oldIndex;}}else{// This is an insertion.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n// placement for inserting new children.\nif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.effectTag=Placement;}return newFiber;}function updateTextNode(returnFiber,current,textContent,expirationTime){if(current===null||current.tag!==HostText){// Insert\nvar created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,textContent);existing.return=returnFiber;return existing;}}function updateElement(returnFiber,current,element,expirationTime){if(current!==null){if(current.elementType===element.type||// Keep this check inline so it only runs on the false path:\nisCompatibleFamilyForHotReloading(current,element)){// Move based on index\nvar existing=useFiber(current,element.props);existing.ref=coerceRef(returnFiber,current,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}}// Insert\nvar created=createFiberFromElement(element,returnFiber.mode,expirationTime);created.ref=coerceRef(returnFiber,current,element);created.return=returnFiber;return created;}function updatePortal(returnFiber,current,portal,expirationTime){if(current===null||current.tag!==HostPortal||current.stateNode.containerInfo!==portal.containerInfo||current.stateNode.implementation!==portal.implementation){// Insert\nvar created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,portal.children||[]);existing.return=returnFiber;return existing;}}function updateFragment(returnFiber,current,fragment,expirationTime,key){if(current===null||current.tag!==Fragment){// Insert\nvar created=createFiberFromFragment(fragment,returnFiber.mode,expirationTime,key);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,fragment);existing.return=returnFiber;return existing;}}function createChild(returnFiber,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nvar created=createFiberFromText(''+newChild,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _created=createFiberFromElement(newChild,returnFiber.mode,expirationTime);_created.ref=coerceRef(returnFiber,null,newChild);_created.return=returnFiber;return _created;}case REACT_PORTAL_TYPE:{var _created2=createFiberFromPortal(newChild,returnFiber.mode,expirationTime);_created2.return=returnFiber;return _created2;}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _created3=createFiberFromFragment(newChild,returnFiber.mode,expirationTime,null);_created3.return=returnFiber;return _created3;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateSlot(returnFiber,oldFiber,newChild,expirationTime){// Update the fiber if the keys match, otherwise return null.\nvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,expirationTime);}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,expirationTime,key);}return updateElement(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}}if(isArray$1(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n// new node for the key. If both are text nodes, they match.\nvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,expirationTime);}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,expirationTime,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,expirationTime);}case REACT_PORTAL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber2,newChild,expirationTime);}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _matchedFiber3=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber3,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}/**\n * Warns if there is a duplicate or missing key\n */function warnOnInvalidKey(child,knownKeys){{if(typeof child!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}error('Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,expirationTime){// This algorithm can't optimize by searching from both ends since we\n// don't have backpointers on fibers. I'm trying to see how far we can get\n// with that model. If it ends up not being worth the tradeoffs, we can\n// add it later.\n// Even with a two ended optimization, we'd want to optimize for the case\n// where there are few changes and brute force the comparison instead of\n// going for the Map. It'd like to explore hitting that path first in\n// forward-only mode and only go for the Map once we notice that we need\n// lots of look ahead. This doesn't handle reversal as well as two ended\n// search but that's unusual. Besides, for the two ended optimization to\n// work on Iterables, we'd need to copy the whole set.\n// In this first iteration, we'll just live with hitting the bad case\n// (adding everything to a Map) in for every insert/move.\n// If you change this code, also update reconcileChildrenIterator() which\n// uses the same algorithm.\n{// First, validate keys.\nvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],expirationTime);if(_newFiber===null){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],expirationTime);if(_newFiber2!==null){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,expirationTime){// This is the same implementation as reconcileChildrenArray(),\n// but using the iterator instead.\nvar iteratorFn=getIteratorFn(newChildrenIterable);if(!(typeof iteratorFn==='function')){{throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");}}{// We don't support rendering Generators because it's a mutation.\n// See https://github.com/facebook/react/issues/12995\nif(typeof Symbol==='function'&&// $FlowFixMe Flow doesn't know about toStringTag\nnewChildrenIterable[Symbol.toStringTag]==='Generator'){if(!didWarnAboutGenerators){error('Using Generators as children is unsupported and will likely yield '+'unexpected results because enumerating a generator mutates it. '+'You may convert it to an array with `Array.from()` or the '+'`[...spread]` operator before rendering. Keep in mind '+'you might need to polyfill these features for older browsers.');}didWarnAboutGenerators=true;}// Warn about using Maps as children\nif(newChildrenIterable.entries===iteratorFn){if(!didWarnAboutMaps){error('Using Maps as children is unsupported and will likely yield '+'unexpected results. Convert it to a sequence/iterable of keyed '+'ReactElements instead.');}didWarnAboutMaps=true;}// First, validate keys.\n// We'll get a different iterator later for the main pass.\nvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys);}}}var newChildren=iteratorFn.call(newChildrenIterable);if(!(newChildren!=null)){{throw Error(\"An iterable object provided no iterator.\");}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,expirationTime);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,expirationTime);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,expirationTime){// There's no need to check for keys on text nodes since we don't have a\n// way to define them.\nif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n// the rest.\ndeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent);existing.return=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n// and delete the existing ones.\ndeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,expirationTime){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){switch(child.tag){case Fragment:{if(element.type===REACT_FRAGMENT_TYPE){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.props.children);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}break;}case Block:// We intentionally fallthrough here if enableBlocksAPI is not on.\n// eslint-disable-next-lined no-fallthrough\ndefault:{if(child.elementType===element.type||// Keep this check inline so it only runs on the false path:\nisCompatibleFamilyForHotReloading(child,element)){deleteRemainingChildren(returnFiber,child.sibling);var _existing3=useFiber(child,element.props);_existing3.ref=coerceRef(returnFiber,child,element);_existing3.return=returnFiber;{_existing3._debugSource=element._source;_existing3._debugOwner=element._owner;}return _existing3;}break;}}// Didn't match.\ndeleteRemainingChildren(returnFiber,child);break;}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.mode,expirationTime,element.key);created.return=returnFiber;return created;}else{var _created4=createFiberFromElement(element,returnFiber.mode,expirationTime);_created4.ref=coerceRef(returnFiber,currentFirstChild,element);_created4.return=returnFiber;return _created4;}}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,expirationTime){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[]);existing.return=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n// itself. They will be added to the side-effect list as we pass through the\n// children and the parent.\nfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=typeof newChild==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=typeof newChild==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionComponent:{var Component=returnFiber.type;{{throw Error((Component.displayName||Component.name||'Component')+\"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");}}}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\nreturn;}// Deletions are added in reversed order so we add it to the front.\n// At this point, the return fiber's effect list is empty except for\n// deletions, so we can just append the deletion to the list. The remaining\n// effects aren't added until the complete phase. Once we implement\n// resuming, this may not be true.\nvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.effectTag=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\nreturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n// assuming that after the first child we've already added everything.\nvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n// keys quickly. Implicit (null) keys get added to this set with their index\nvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps,expirationTime){// We currently set sibling to null and index to 0 here because it is easy\n// to forget to do before returning it. E.g. for the single child case.\nvar clone=createWorkInProgress(fiber,pendingProps,expirationTime);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\nreturn lastPlacedIndex;}var current=newFiber.alternate;if(current!==null){var oldIndex=current.index;if(oldIndex<lastPlacedIndex){// This is a move.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}else{// This item can stay in place.\nreturn oldIndex;}}else{// This is an insertion.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n// placement for inserting new children.\nif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.effectTag=Placement;}return newFiber;}function updateTextNode(returnFiber,current,textContent,expirationTime){if(current===null||current.tag!==HostText){// Insert\nvar created=createFiberFromText(textContent,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,textContent,expirationTime);existing['return']=returnFiber;return existing;}}function updateElement(returnFiber,current,element,expirationTime){if(current!==null&&current.type===element.type){// Move based on index\nvar existing=useFiber(current,element.props,expirationTime);existing.ref=coerceRef(current,element);existing['return']=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{// Insert\nvar created=createFiberFromElement(element,returnFiber.internalContextTag,expirationTime);created.ref=coerceRef(current,element);created['return']=returnFiber;return created;}}function updateCall(returnFiber,current,call,expirationTime){// TODO: Should this also compare handler to determine whether to reuse?\nif(current===null||current.tag!==CallComponent){// Insert\nvar created=createFiberFromCall(call,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}else{// Move based on index\nvar existing=useFiber(current,call,expirationTime);existing['return']=returnFiber;return existing;}}function updateReturn(returnFiber,current,returnNode,expirationTime){if(current===null||current.tag!==ReturnComponent){// Insert\nvar created=createFiberFromReturn(returnNode,returnFiber.internalContextTag,expirationTime);created.type=returnNode.value;created['return']=returnFiber;return created;}else{// Move based on index\nvar existing=useFiber(current,null,expirationTime);existing.type=returnNode.value;existing['return']=returnFiber;return existing;}}function updatePortal(returnFiber,current,portal,expirationTime){if(current===null||current.tag!==HostPortal||current.stateNode.containerInfo!==portal.containerInfo||current.stateNode.implementation!==portal.implementation){// Insert\nvar created=createFiberFromPortal(portal,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,portal.children||[],expirationTime);existing['return']=returnFiber;return existing;}}function updateFragment(returnFiber,current,fragment,expirationTime,key){if(current===null||current.tag!==Fragment){// Insert\nvar created=createFiberFromFragment(fragment,returnFiber.internalContextTag,expirationTime,key);created['return']=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,fragment,expirationTime);existing['return']=returnFiber;return existing;}}function createChild(returnFiber,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nvar created=createFiberFromText(''+newChild,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.type===REACT_FRAGMENT_TYPE){var _created=createFiberFromFragment(newChild.props.children,returnFiber.internalContextTag,expirationTime,newChild.key);_created['return']=returnFiber;return _created;}else{var _created2=createFiberFromElement(newChild,returnFiber.internalContextTag,expirationTime);_created2.ref=coerceRef(null,newChild);_created2['return']=returnFiber;return _created2;}}case REACT_CALL_TYPE:{var _created3=createFiberFromCall(newChild,returnFiber.internalContextTag,expirationTime);_created3['return']=returnFiber;return _created3;}case REACT_RETURN_TYPE:{var _created4=createFiberFromReturn(newChild,returnFiber.internalContextTag,expirationTime);_created4.type=newChild.value;_created4['return']=returnFiber;return _created4;}case REACT_PORTAL_TYPE:{var _created5=createFiberFromPortal(newChild,returnFiber.internalContextTag,expirationTime);_created5['return']=returnFiber;return _created5;}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _created6=createFiberFromFragment(newChild,returnFiber.internalContextTag,expirationTime,null);_created6['return']=returnFiber;return _created6;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateSlot(returnFiber,oldFiber,newChild,expirationTime){// Update the fiber if the keys match, otherwise return null.\nvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,expirationTime);}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,expirationTime,key);}return updateElement(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_CALL_TYPE:{if(newChild.key===key){return updateCall(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_RETURN_TYPE:{// Returns don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a\n// yield.\nif(key===null){return updateReturn(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}}if(isArray$1(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n// new node for the key. If both are text nodes, they match.\nvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,expirationTime);}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,expirationTime,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,expirationTime);}case REACT_CALL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updateCall(returnFiber,_matchedFiber2,newChild,expirationTime);}case REACT_RETURN_TYPE:{// Returns don't have keys, so we neither have to check the old nor\n// new node for the key. If both are returns, they match.\nvar _matchedFiber3=existingChildren.get(newIdx)||null;return updateReturn(returnFiber,_matchedFiber3,newChild,expirationTime);}case REACT_PORTAL_TYPE:{var _matchedFiber4=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber4,newChild,expirationTime);}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _matchedFiber5=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber5,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}/**\n * Warns if there is a duplicate or missing key\n */function warnOnInvalidKey(child,knownKeys){{if((typeof child==='undefined'?'undefined':_typeof(child))!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_CALL_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.%s',key,getCurrentFiberStackAddendum$1());break;default:break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,expirationTime){// This algorithm can't optimize by searching from boths ends since we\n// don't have backpointers on fibers. I'm trying to see how far we can get\n// with that model. If it ends up not being worth the tradeoffs, we can\n// add it later.\n// Even with a two ended optimization, we'd want to optimize for the case\n// where there are few changes and brute force the comparison instead of\n// going for the Map. It'd like to explore hitting that path first in\n// forward-only mode and only go for the Map once we notice that we need\n// lots of look ahead. This doesn't handle reversal as well as two ended\n// search but that's unusual. Besides, for the two ended optimization to\n// work on Iterables, we'd need to copy the whole set.\n// In this first iteration, we'll just live with hitting the bad case\n// (adding everything to a Map) in for every insert/move.\n// If you change this code, also update reconcileChildrenIterator() which\n// uses the same algorithm.\n{// First, validate keys.\nvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],expirationTime);if(!_newFiber){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],expirationTime);if(_newFiber2){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren['delete'](_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,expirationTime){// This is the same implementation as reconcileChildrenArray(),\n// but using the iterator instead.\nvar iteratorFn=getIteratorFn(newChildrenIterable);!(typeof iteratorFn==='function')?invariant(false,'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.'):void 0;{// Warn about using Maps as children\nif(typeof newChildrenIterable.entries==='function'){var possibleMap=newChildrenIterable;if(possibleMap.entries===iteratorFn){warning(didWarnAboutMaps,'Using Maps as children is unsupported and will likely yield '+'unexpected results. Convert it to a sequence/iterable of keyed '+'ReactElements instead.%s',getCurrentFiberStackAddendum$1());didWarnAboutMaps=true;}}// First, validate keys.\n// We'll get a different iterator later for the main pass.\nvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys);}}}var newChildren=iteratorFn.call(newChildrenIterable);!(newChildren!=null)?invariant(false,'An iterable object provided no iterator.'):void 0;var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(!oldFiber){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,expirationTime);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,expirationTime);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren['delete'](_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,expirationTime){// There's no need to check for keys on text nodes since we don't have a\n// way to define them.\nif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n// the rest.\ndeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent,expirationTime);existing['return']=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n// and delete the existing ones.\ndeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,expirationTime){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===Fragment?element.type===REACT_FRAGMENT_TYPE:child.type===element.type){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.type===REACT_FRAGMENT_TYPE?element.props.children:element.props,expirationTime);existing.ref=coerceRef(child,element);existing['return']=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.internalContextTag,expirationTime,element.key);created['return']=returnFiber;return created;}else{var _created7=createFiberFromElement(element,returnFiber.internalContextTag,expirationTime);_created7.ref=coerceRef(currentFirstChild,element);_created7['return']=returnFiber;return _created7;}}function reconcileSingleCall(returnFiber,currentFirstChild,call,expirationTime){var key=call.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===CallComponent){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,call,expirationTime);existing['return']=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromCall(call,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}function reconcileSingleReturn(returnFiber,currentFirstChild,returnNode,expirationTime){// There's no need to check for keys on yields since they're stateless.\nvar child=currentFirstChild;if(child!==null){if(child.tag===ReturnComponent){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,null,expirationTime);existing.type=returnNode.value;existing['return']=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);}}var created=createFiberFromReturn(returnNode,returnFiber.internalContextTag,expirationTime);created.type=returnNode.value;created['return']=returnFiber;return created;}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,expirationTime){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[],expirationTime);existing['return']=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n// itself. They will be added to the side-effect list as we pass through the\n// children and the parent.\nfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nif((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null){newChild=newChild.props.children;}// Handle object types\nvar isObject=(typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_CALL_TYPE:return placeSingleChild(reconcileSingleCall(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_RETURN_TYPE:return placeSingleChild(reconcileSingleReturn(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionalComponent:{var Component=returnFiber.type;invariant(false,'%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.',Component.displayName||Component.name||'Component');}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\nreturn;}// Deletions are added in reversed order so we add it to the front.\n// At this point, the return fiber's effect list is empty except for\n// deletions, so we can just append the deletion to the list. The remaining\n// effects aren't added until the complete phase. Once we implement\n// resuming, this may not be true.\nvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.effectTag=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\nreturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n// assuming that after the first child we've already added everything.\nvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n// keys quickly. Implicit (null) keys get added to this set with their index\nvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps,expirationTime){// We currently set sibling to null and index to 0 here because it is easy\n// to forget to do before returning it. E.g. for the single child case.\nvar clone=createWorkInProgress(fiber,pendingProps,expirationTime);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\nreturn lastPlacedIndex;}var current=newFiber.alternate;if(current!==null){var oldIndex=current.index;if(oldIndex<lastPlacedIndex){// This is a move.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}else{// This item can stay in place.\nreturn oldIndex;}}else{// This is an insertion.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n// placement for inserting new children.\nif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.effectTag=Placement;}return newFiber;}function updateTextNode(returnFiber,current,textContent,expirationTime){if(current===null||current.tag!==HostText){// Insert\nvar created=createFiberFromText(textContent,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,textContent,expirationTime);existing['return']=returnFiber;return existing;}}function updateElement(returnFiber,current,element,expirationTime){if(current!==null&&current.type===element.type){// Move based on index\nvar existing=useFiber(current,element.props,expirationTime);existing.ref=coerceRef(current,element);existing['return']=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{// Insert\nvar created=createFiberFromElement(element,returnFiber.internalContextTag,expirationTime);created.ref=coerceRef(current,element);created['return']=returnFiber;return created;}}function updateCall(returnFiber,current,call,expirationTime){// TODO: Should this also compare handler to determine whether to reuse?\nif(current===null||current.tag!==CallComponent){// Insert\nvar created=createFiberFromCall(call,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}else{// Move based on index\nvar existing=useFiber(current,call,expirationTime);existing['return']=returnFiber;return existing;}}function updateReturn(returnFiber,current,returnNode,expirationTime){if(current===null||current.tag!==ReturnComponent){// Insert\nvar created=createFiberFromReturn(returnNode,returnFiber.internalContextTag,expirationTime);created.type=returnNode.value;created['return']=returnFiber;return created;}else{// Move based on index\nvar existing=useFiber(current,null,expirationTime);existing.type=returnNode.value;existing['return']=returnFiber;return existing;}}function updatePortal(returnFiber,current,portal,expirationTime){if(current===null||current.tag!==HostPortal||current.stateNode.containerInfo!==portal.containerInfo||current.stateNode.implementation!==portal.implementation){// Insert\nvar created=createFiberFromPortal(portal,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,portal.children||[],expirationTime);existing['return']=returnFiber;return existing;}}function updateFragment(returnFiber,current,fragment,expirationTime,key){if(current===null||current.tag!==Fragment){// Insert\nvar created=createFiberFromFragment(fragment,returnFiber.internalContextTag,expirationTime,key);created['return']=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,fragment,expirationTime);existing['return']=returnFiber;return existing;}}function createChild(returnFiber,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nvar created=createFiberFromText(''+newChild,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.type===REACT_FRAGMENT_TYPE){var _created=createFiberFromFragment(newChild.props.children,returnFiber.internalContextTag,expirationTime,newChild.key);_created['return']=returnFiber;return _created;}else{var _created2=createFiberFromElement(newChild,returnFiber.internalContextTag,expirationTime);_created2.ref=coerceRef(null,newChild);_created2['return']=returnFiber;return _created2;}}case REACT_CALL_TYPE:{var _created3=createFiberFromCall(newChild,returnFiber.internalContextTag,expirationTime);_created3['return']=returnFiber;return _created3;}case REACT_RETURN_TYPE:{var _created4=createFiberFromReturn(newChild,returnFiber.internalContextTag,expirationTime);_created4.type=newChild.value;_created4['return']=returnFiber;return _created4;}case REACT_PORTAL_TYPE:{var _created5=createFiberFromPortal(newChild,returnFiber.internalContextTag,expirationTime);_created5['return']=returnFiber;return _created5;}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _created6=createFiberFromFragment(newChild,returnFiber.internalContextTag,expirationTime,null);_created6['return']=returnFiber;return _created6;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateSlot(returnFiber,oldFiber,newChild,expirationTime){// Update the fiber if the keys match, otherwise return null.\nvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,expirationTime);}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,expirationTime,key);}return updateElement(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_CALL_TYPE:{if(newChild.key===key){return updateCall(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_RETURN_TYPE:{// Returns don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a\n// yield.\nif(key===null){return updateReturn(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}}if(isArray$1(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n// new node for the key. If both are text nodes, they match.\nvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,expirationTime);}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,expirationTime,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,expirationTime);}case REACT_CALL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updateCall(returnFiber,_matchedFiber2,newChild,expirationTime);}case REACT_RETURN_TYPE:{// Returns don't have keys, so we neither have to check the old nor\n// new node for the key. If both are returns, they match.\nvar _matchedFiber3=existingChildren.get(newIdx)||null;return updateReturn(returnFiber,_matchedFiber3,newChild,expirationTime);}case REACT_PORTAL_TYPE:{var _matchedFiber4=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber4,newChild,expirationTime);}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _matchedFiber5=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber5,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}/**\n * Warns if there is a duplicate or missing key\n */function warnOnInvalidKey(child,knownKeys){{if((typeof child==='undefined'?'undefined':_typeof(child))!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_CALL_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.%s',key,getCurrentFiberStackAddendum$1());break;default:break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,expirationTime){// This algorithm can't optimize by searching from boths ends since we\n// don't have backpointers on fibers. I'm trying to see how far we can get\n// with that model. If it ends up not being worth the tradeoffs, we can\n// add it later.\n// Even with a two ended optimization, we'd want to optimize for the case\n// where there are few changes and brute force the comparison instead of\n// going for the Map. It'd like to explore hitting that path first in\n// forward-only mode and only go for the Map once we notice that we need\n// lots of look ahead. This doesn't handle reversal as well as two ended\n// search but that's unusual. Besides, for the two ended optimization to\n// work on Iterables, we'd need to copy the whole set.\n// In this first iteration, we'll just live with hitting the bad case\n// (adding everything to a Map) in for every insert/move.\n// If you change this code, also update reconcileChildrenIterator() which\n// uses the same algorithm.\n{// First, validate keys.\nvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],expirationTime);if(!_newFiber){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],expirationTime);if(_newFiber2){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren['delete'](_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,expirationTime){// This is the same implementation as reconcileChildrenArray(),\n// but using the iterator instead.\nvar iteratorFn=getIteratorFn(newChildrenIterable);!(typeof iteratorFn==='function')?invariant(false,'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.'):void 0;{// Warn about using Maps as children\nif(typeof newChildrenIterable.entries==='function'){var possibleMap=newChildrenIterable;if(possibleMap.entries===iteratorFn){warning(didWarnAboutMaps,'Using Maps as children is unsupported and will likely yield '+'unexpected results. Convert it to a sequence/iterable of keyed '+'ReactElements instead.%s',getCurrentFiberStackAddendum$1());didWarnAboutMaps=true;}}// First, validate keys.\n// We'll get a different iterator later for the main pass.\nvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys);}}}var newChildren=iteratorFn.call(newChildrenIterable);!(newChildren!=null)?invariant(false,'An iterable object provided no iterator.'):void 0;var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(!oldFiber){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,expirationTime);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,expirationTime);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren['delete'](_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,expirationTime){// There's no need to check for keys on text nodes since we don't have a\n// way to define them.\nif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n// the rest.\ndeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent,expirationTime);existing['return']=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n// and delete the existing ones.\ndeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,expirationTime){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===Fragment?element.type===REACT_FRAGMENT_TYPE:child.type===element.type){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.type===REACT_FRAGMENT_TYPE?element.props.children:element.props,expirationTime);existing.ref=coerceRef(child,element);existing['return']=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.internalContextTag,expirationTime,element.key);created['return']=returnFiber;return created;}else{var _created7=createFiberFromElement(element,returnFiber.internalContextTag,expirationTime);_created7.ref=coerceRef(currentFirstChild,element);_created7['return']=returnFiber;return _created7;}}function reconcileSingleCall(returnFiber,currentFirstChild,call,expirationTime){var key=call.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===CallComponent){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,call,expirationTime);existing['return']=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromCall(call,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}function reconcileSingleReturn(returnFiber,currentFirstChild,returnNode,expirationTime){// There's no need to check for keys on yields since they're stateless.\nvar child=currentFirstChild;if(child!==null){if(child.tag===ReturnComponent){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,null,expirationTime);existing.type=returnNode.value;existing['return']=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);}}var created=createFiberFromReturn(returnNode,returnFiber.internalContextTag,expirationTime);created.type=returnNode.value;created['return']=returnFiber;return created;}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,expirationTime){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[],expirationTime);existing['return']=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n// itself. They will be added to the side-effect list as we pass through the\n// children and the parent.\nfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nif((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null){newChild=newChild.props.children;}// Handle object types\nvar isObject=(typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_CALL_TYPE:return placeSingleChild(reconcileSingleCall(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_RETURN_TYPE:return placeSingleChild(reconcileSingleReturn(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionalComponent:{var Component=returnFiber.type;invariant(false,'%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.',Component.displayName||Component.name||'Component');}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\nreturn;}// Deletions are added in reversed order so we add it to the front.\n// At this point, the return fiber's effect list is empty except for\n// deletions, so we can just append the deletion to the list. The remaining\n// effects aren't added until the complete phase. Once we implement\n// resuming, this may not be true.\nvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.effectTag=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\nreturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n// assuming that after the first child we've already added everything.\nvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n// keys quickly. Implicit (null) keys get added to this set with their index\nvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps,expirationTime){// We currently set sibling to null and index to 0 here because it is easy\n// to forget to do before returning it. E.g. for the single child case.\nvar clone=createWorkInProgress(fiber,pendingProps,expirationTime);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\nreturn lastPlacedIndex;}var current=newFiber.alternate;if(current!==null){var oldIndex=current.index;if(oldIndex<lastPlacedIndex){// This is a move.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}else{// This item can stay in place.\nreturn oldIndex;}}else{// This is an insertion.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n// placement for inserting new children.\nif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.effectTag=Placement;}return newFiber;}function updateTextNode(returnFiber,current,textContent,expirationTime){if(current===null||current.tag!==HostText){// Insert\nvar created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,textContent,expirationTime);existing.return=returnFiber;return existing;}}function updateElement(returnFiber,current,element,expirationTime){if(current!==null&&current.type===element.type){// Move based on index\nvar existing=useFiber(current,element.props,expirationTime);existing.ref=coerceRef(returnFiber,current,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{// Insert\nvar created=createFiberFromElement(element,returnFiber.mode,expirationTime);created.ref=coerceRef(returnFiber,current,element);created.return=returnFiber;return created;}}function updatePortal(returnFiber,current,portal,expirationTime){if(current===null||current.tag!==HostPortal||current.stateNode.containerInfo!==portal.containerInfo||current.stateNode.implementation!==portal.implementation){// Insert\nvar created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,portal.children||[],expirationTime);existing.return=returnFiber;return existing;}}function updateFragment(returnFiber,current,fragment,expirationTime,key){if(current===null||current.tag!==Fragment){// Insert\nvar created=createFiberFromFragment(fragment,returnFiber.mode,expirationTime,key);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,fragment,expirationTime);existing.return=returnFiber;return existing;}}function createChild(returnFiber,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nvar created=createFiberFromText(''+newChild,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _created=createFiberFromElement(newChild,returnFiber.mode,expirationTime);_created.ref=coerceRef(returnFiber,null,newChild);_created.return=returnFiber;return _created;}case REACT_PORTAL_TYPE:{var _created2=createFiberFromPortal(newChild,returnFiber.mode,expirationTime);_created2.return=returnFiber;return _created2;}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _created3=createFiberFromFragment(newChild,returnFiber.mode,expirationTime,null);_created3.return=returnFiber;return _created3;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateSlot(returnFiber,oldFiber,newChild,expirationTime){// Update the fiber if the keys match, otherwise return null.\nvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,expirationTime);}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,expirationTime,key);}return updateElement(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}}if(isArray$1(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n// new node for the key. If both are text nodes, they match.\nvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,expirationTime);}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,expirationTime,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,expirationTime);}case REACT_PORTAL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber2,newChild,expirationTime);}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _matchedFiber3=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber3,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}/**\n * Warns if there is a duplicate or missing key\n */function warnOnInvalidKey(child,knownKeys){{if((typeof child==='undefined'?'undefined':_typeof(child))!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.%s',key,getCurrentFiberStackAddendum$7());break;default:break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,expirationTime){// This algorithm can't optimize by searching from boths ends since we\n// don't have backpointers on fibers. I'm trying to see how far we can get\n// with that model. If it ends up not being worth the tradeoffs, we can\n// add it later.\n// Even with a two ended optimization, we'd want to optimize for the case\n// where there are few changes and brute force the comparison instead of\n// going for the Map. It'd like to explore hitting that path first in\n// forward-only mode and only go for the Map once we notice that we need\n// lots of look ahead. This doesn't handle reversal as well as two ended\n// search but that's unusual. Besides, for the two ended optimization to\n// work on Iterables, we'd need to copy the whole set.\n// In this first iteration, we'll just live with hitting the bad case\n// (adding everything to a Map) in for every insert/move.\n// If you change this code, also update reconcileChildrenIterator() which\n// uses the same algorithm.\n{// First, validate keys.\nvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],expirationTime);if(!_newFiber){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],expirationTime);if(_newFiber2){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,expirationTime){// This is the same implementation as reconcileChildrenArray(),\n// but using the iterator instead.\nvar iteratorFn=getIteratorFn(newChildrenIterable);!(typeof iteratorFn==='function')?invariant(false,'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.'):void 0;{// Warn about using Maps as children\nif(newChildrenIterable.entries===iteratorFn){!didWarnAboutMaps?warning(false,'Using Maps as children is unsupported and will likely yield '+'unexpected results. Convert it to a sequence/iterable of keyed '+'ReactElements instead.%s',getCurrentFiberStackAddendum$7()):void 0;didWarnAboutMaps=true;}// First, validate keys.\n// We'll get a different iterator later for the main pass.\nvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys);}}}var newChildren=iteratorFn.call(newChildrenIterable);!(newChildren!=null)?invariant(false,'An iterable object provided no iterator.'):void 0;var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(!oldFiber){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,expirationTime);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,expirationTime);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,expirationTime){// There's no need to check for keys on text nodes since we don't have a\n// way to define them.\nif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n// the rest.\ndeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent,expirationTime);existing.return=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n// and delete the existing ones.\ndeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,expirationTime){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===Fragment?element.type===REACT_FRAGMENT_TYPE:child.type===element.type){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.type===REACT_FRAGMENT_TYPE?element.props.children:element.props,expirationTime);existing.ref=coerceRef(returnFiber,child,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.mode,expirationTime,element.key);created.return=returnFiber;return created;}else{var _created4=createFiberFromElement(element,returnFiber.mode,expirationTime);_created4.ref=coerceRef(returnFiber,currentFirstChild,element);_created4.return=returnFiber;return _created4;}}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,expirationTime){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[],expirationTime);existing.return=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n// itself. They will be added to the side-effect list as we pass through the\n// children and the parent.\nfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=(typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=(typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionalComponent:{var Component=returnFiber.type;invariant(false,'%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.',Component.displayName||Component.name||'Component');}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\nreturn;}// Deletions are added in reversed order so we add it to the front.\n// At this point, the return fiber's effect list is empty except for\n// deletions, so we can just append the deletion to the list. The remaining\n// effects aren't added until the complete phase. Once we implement\n// resuming, this may not be true.\nvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.effectTag=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\nreturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n// assuming that after the first child we've already added everything.\nvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n// keys quickly. Implicit (null) keys get added to this set with their index\nvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps,expirationTime){// We currently set sibling to null and index to 0 here because it is easy\n// to forget to do before returning it. E.g. for the single child case.\nvar clone=createWorkInProgress(fiber,pendingProps,expirationTime);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\nreturn lastPlacedIndex;}var current=newFiber.alternate;if(current!==null){var oldIndex=current.index;if(oldIndex<lastPlacedIndex){// This is a move.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}else{// This item can stay in place.\nreturn oldIndex;}}else{// This is an insertion.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n// placement for inserting new children.\nif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.effectTag=Placement;}return newFiber;}function updateTextNode(returnFiber,current,textContent,expirationTime){if(current===null||current.tag!==HostText){// Insert\nvar created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created['return']=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,textContent,expirationTime);existing['return']=returnFiber;return existing;}}function updateElement(returnFiber,current,element,expirationTime){if(current!==null&&current.type===element.type){// Move based on index\nvar existing=useFiber(current,element.props,expirationTime);existing.ref=coerceRef(returnFiber,current,element);existing['return']=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{// Insert\nvar created=createFiberFromElement(element,returnFiber.mode,expirationTime);created.ref=coerceRef(returnFiber,current,element);created['return']=returnFiber;return created;}}function updatePortal(returnFiber,current,portal,expirationTime){if(current===null||current.tag!==HostPortal||current.stateNode.containerInfo!==portal.containerInfo||current.stateNode.implementation!==portal.implementation){// Insert\nvar created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created['return']=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,portal.children||[],expirationTime);existing['return']=returnFiber;return existing;}}function updateFragment(returnFiber,current,fragment,expirationTime,key){if(current===null||current.tag!==Fragment){// Insert\nvar created=createFiberFromFragment(fragment,returnFiber.mode,expirationTime,key);created['return']=returnFiber;return created;}else{// Update\nvar existing=useFiber(current,fragment,expirationTime);existing['return']=returnFiber;return existing;}}function createChild(returnFiber,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nvar created=createFiberFromText(''+newChild,returnFiber.mode,expirationTime);created['return']=returnFiber;return created;}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _created=createFiberFromElement(newChild,returnFiber.mode,expirationTime);_created.ref=coerceRef(returnFiber,null,newChild);_created['return']=returnFiber;return _created;}case REACT_PORTAL_TYPE:{var _created2=createFiberFromPortal(newChild,returnFiber.mode,expirationTime);_created2['return']=returnFiber;return _created2;}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _created3=createFiberFromFragment(newChild,returnFiber.mode,expirationTime,null);_created3['return']=returnFiber;return _created3;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateSlot(returnFiber,oldFiber,newChild,expirationTime){// Update the fiber if the keys match, otherwise return null.\nvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,expirationTime);}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,expirationTime,key);}return updateElement(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}}if(isArray$1(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n// new node for the key. If both are text nodes, they match.\nvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,expirationTime);}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,expirationTime,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,expirationTime);}case REACT_PORTAL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber2,newChild,expirationTime);}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _matchedFiber3=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber3,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}/**\n * Warns if there is a duplicate or missing key\n */function warnOnInvalidKey(child,knownKeys){{if(typeof child!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.%s',key,getCurrentFiberStackAddendum$7());break;default:break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,expirationTime){// This algorithm can't optimize by searching from boths ends since we\n// don't have backpointers on fibers. I'm trying to see how far we can get\n// with that model. If it ends up not being worth the tradeoffs, we can\n// add it later.\n// Even with a two ended optimization, we'd want to optimize for the case\n// where there are few changes and brute force the comparison instead of\n// going for the Map. It'd like to explore hitting that path first in\n// forward-only mode and only go for the Map once we notice that we need\n// lots of look ahead. This doesn't handle reversal as well as two ended\n// search but that's unusual. Besides, for the two ended optimization to\n// work on Iterables, we'd need to copy the whole set.\n// In this first iteration, we'll just live with hitting the bad case\n// (adding everything to a Map) in for every insert/move.\n// If you change this code, also update reconcileChildrenIterator() which\n// uses the same algorithm.\n{// First, validate keys.\nvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],expirationTime);if(!_newFiber){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],expirationTime);if(_newFiber2){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren['delete'](_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,expirationTime){// This is the same implementation as reconcileChildrenArray(),\n// but using the iterator instead.\nvar iteratorFn=getIteratorFn(newChildrenIterable);!(typeof iteratorFn==='function')?invariant(false,'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.'):void 0;{// Warn about using Maps as children\nif(newChildrenIterable.entries===iteratorFn){!didWarnAboutMaps?warning(false,'Using Maps as children is unsupported and will likely yield '+'unexpected results. Convert it to a sequence/iterable of keyed '+'ReactElements instead.%s',getCurrentFiberStackAddendum$7()):void 0;didWarnAboutMaps=true;}// First, validate keys.\n// We'll get a different iterator later for the main pass.\nvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys);}}}var newChildren=iteratorFn.call(newChildrenIterable);!(newChildren!=null)?invariant(false,'An iterable object provided no iterator.'):void 0;var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(!oldFiber){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,expirationTime);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,expirationTime);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren['delete'](_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,expirationTime){// There's no need to check for keys on text nodes since we don't have a\n// way to define them.\nif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n// the rest.\ndeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent,expirationTime);existing['return']=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n// and delete the existing ones.\ndeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created['return']=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,expirationTime){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===Fragment?element.type===REACT_FRAGMENT_TYPE:child.type===element.type){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.type===REACT_FRAGMENT_TYPE?element.props.children:element.props,expirationTime);existing.ref=coerceRef(returnFiber,child,element);existing['return']=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.mode,expirationTime,element.key);created['return']=returnFiber;return created;}else{var _created4=createFiberFromElement(element,returnFiber.mode,expirationTime);_created4.ref=coerceRef(returnFiber,currentFirstChild,element);_created4['return']=returnFiber;return _created4;}}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,expirationTime){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[],expirationTime);existing['return']=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created['return']=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n// itself. They will be added to the side-effect list as we pass through the\n// children and the parent.\nfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=typeof newChild==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=typeof newChild==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionalComponent:{var Component=returnFiber.type;invariant(false,'%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.',Component.displayName||Component.name||'Component');}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\nreturn;}// Deletions are added in reversed order so we add it to the front.\n// At this point, the return fiber's effect list is empty except for\n// deletions, so we can just append the deletion to the list. The remaining\n// effects aren't added until the complete phase. Once we implement\n// resuming, this may not be true.\nvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.effectTag=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\nreturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n// assuming that after the first child we've already added everything.\nvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n// keys quickly. Implicit (null) keys get added to this set with their index\nvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps,expirationTime){// We currently set sibling to null and index to 0 here because it is easy\n// to forget to do before returning it. E.g. for the single child case.\nvar clone=createWorkInProgress(fiber,pendingProps,expirationTime);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\nreturn lastPlacedIndex;}var current$$1=newFiber.alternate;if(current$$1!==null){var oldIndex=current$$1.index;if(oldIndex<lastPlacedIndex){// This is a move.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}else{// This item can stay in place.\nreturn oldIndex;}}else{// This is an insertion.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n// placement for inserting new children.\nif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.effectTag=Placement;}return newFiber;}function updateTextNode(returnFiber,current$$1,textContent,expirationTime){if(current$$1===null||current$$1.tag!==HostText){// Insert\nvar created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current$$1,textContent,expirationTime);existing.return=returnFiber;return existing;}}function updateElement(returnFiber,current$$1,element,expirationTime){if(current$$1!==null&&current$$1.elementType===element.type){// Move based on index\nvar existing=useFiber(current$$1,element.props,expirationTime);existing.ref=coerceRef(returnFiber,current$$1,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{// Insert\nvar created=createFiberFromElement(element,returnFiber.mode,expirationTime);created.ref=coerceRef(returnFiber,current$$1,element);created.return=returnFiber;return created;}}function updatePortal(returnFiber,current$$1,portal,expirationTime){if(current$$1===null||current$$1.tag!==HostPortal||current$$1.stateNode.containerInfo!==portal.containerInfo||current$$1.stateNode.implementation!==portal.implementation){// Insert\nvar created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current$$1,portal.children||[],expirationTime);existing.return=returnFiber;return existing;}}function updateFragment(returnFiber,current$$1,fragment,expirationTime,key){if(current$$1===null||current$$1.tag!==Fragment){// Insert\nvar created=createFiberFromFragment(fragment,returnFiber.mode,expirationTime,key);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current$$1,fragment,expirationTime);existing.return=returnFiber;return existing;}}function createChild(returnFiber,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nvar created=createFiberFromText(''+newChild,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _created=createFiberFromElement(newChild,returnFiber.mode,expirationTime);_created.ref=coerceRef(returnFiber,null,newChild);_created.return=returnFiber;return _created;}case REACT_PORTAL_TYPE:{var _created2=createFiberFromPortal(newChild,returnFiber.mode,expirationTime);_created2.return=returnFiber;return _created2;}}if(isArray(newChild)||getIteratorFn(newChild)){var _created3=createFiberFromFragment(newChild,returnFiber.mode,expirationTime,null);_created3.return=returnFiber;return _created3;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateSlot(returnFiber,oldFiber,newChild,expirationTime){// Update the fiber if the keys match, otherwise return null.\nvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,expirationTime);}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,expirationTime,key);}return updateElement(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}}if(isArray(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n// new node for the key. If both are text nodes, they match.\nvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,expirationTime);}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,expirationTime,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,expirationTime);}case REACT_PORTAL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber2,newChild,expirationTime);}}if(isArray(newChild)||getIteratorFn(newChild)){var _matchedFiber3=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber3,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}/**\n * Warns if there is a duplicate or missing key\n */function warnOnInvalidKey(child,knownKeys){{if((typeof child==='undefined'?'undefined':_typeof(child))!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning$1(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;default:break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,expirationTime){// This algorithm can't optimize by searching from both ends since we\n// don't have backpointers on fibers. I'm trying to see how far we can get\n// with that model. If it ends up not being worth the tradeoffs, we can\n// add it later.\n// Even with a two ended optimization, we'd want to optimize for the case\n// where there are few changes and brute force the comparison instead of\n// going for the Map. It'd like to explore hitting that path first in\n// forward-only mode and only go for the Map once we notice that we need\n// lots of look ahead. This doesn't handle reversal as well as two ended\n// search but that's unusual. Besides, for the two ended optimization to\n// work on Iterables, we'd need to copy the whole set.\n// In this first iteration, we'll just live with hitting the bad case\n// (adding everything to a Map) in for every insert/move.\n// If you change this code, also update reconcileChildrenIterator() which\n// uses the same algorithm.\n{// First, validate keys.\nvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],expirationTime);if(!_newFiber){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],expirationTime);if(_newFiber2){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,expirationTime){// This is the same implementation as reconcileChildrenArray(),\n// but using the iterator instead.\nvar iteratorFn=getIteratorFn(newChildrenIterable);!(typeof iteratorFn==='function')?invariant(false,'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.'):void 0;{// We don't support rendering Generators because it's a mutation.\n// See https://github.com/facebook/react/issues/12995\nif(typeof Symbol==='function'&&// $FlowFixMe Flow doesn't know about toStringTag\nnewChildrenIterable[Symbol.toStringTag]==='Generator'){!didWarnAboutGenerators?warning$1(false,'Using Generators as children is unsupported and will likely yield '+'unexpected results because enumerating a generator mutates it. '+'You may convert it to an array with `Array.from()` or the '+'`[...spread]` operator before rendering. Keep in mind '+'you might need to polyfill these features for older browsers.'):void 0;didWarnAboutGenerators=true;}// Warn about using Maps as children\nif(newChildrenIterable.entries===iteratorFn){!didWarnAboutMaps?warning$1(false,'Using Maps as children is unsupported and will likely yield '+'unexpected results. Convert it to a sequence/iterable of keyed '+'ReactElements instead.'):void 0;didWarnAboutMaps=true;}// First, validate keys.\n// We'll get a different iterator later for the main pass.\nvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys);}}}var newChildren=iteratorFn.call(newChildrenIterable);!(newChildren!=null)?invariant(false,'An iterable object provided no iterator.'):void 0;var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(!oldFiber){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,expirationTime);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,expirationTime);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,expirationTime){// There's no need to check for keys on text nodes since we don't have a\n// way to define them.\nif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n// the rest.\ndeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent,expirationTime);existing.return=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n// and delete the existing ones.\ndeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,expirationTime){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===Fragment?element.type===REACT_FRAGMENT_TYPE:child.elementType===element.type){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.type===REACT_FRAGMENT_TYPE?element.props.children:element.props,expirationTime);existing.ref=coerceRef(returnFiber,child,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.mode,expirationTime,element.key);created.return=returnFiber;return created;}else{var _created4=createFiberFromElement(element,returnFiber.mode,expirationTime);_created4.ref=coerceRef(returnFiber,currentFirstChild,element);_created4.return=returnFiber;return _created4;}}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,expirationTime){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[],expirationTime);existing.return=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n// itself. They will be added to the side-effect list as we pass through the\n// children and the parent.\nfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=(typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=(typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionComponent:{var Component=returnFiber.type;invariant(false,'%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.',Component.displayName||Component.name||'Component');}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\nreturn;}// Deletions are added in reversed order so we add it to the front.\n// At this point, the return fiber's effect list is empty except for\n// deletions, so we can just append the deletion to the list. The remaining\n// effects aren't added until the complete phase. Once we implement\n// resuming, this may not be true.\nvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.effectTag=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\nreturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n// assuming that after the first child we've already added everything.\nvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n// keys quickly. Implicit (null) keys get added to this set with their index\nvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps,expirationTime){// We currently set sibling to null and index to 0 here because it is easy\n// to forget to do before returning it. E.g. for the single child case.\nvar clone=createWorkInProgress(fiber,pendingProps,expirationTime);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\nreturn lastPlacedIndex;}var current$$1=newFiber.alternate;if(current$$1!==null){var oldIndex=current$$1.index;if(oldIndex<lastPlacedIndex){// This is a move.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}else{// This item can stay in place.\nreturn oldIndex;}}else{// This is an insertion.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n// placement for inserting new children.\nif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.effectTag=Placement;}return newFiber;}function updateTextNode(returnFiber,current$$1,textContent,expirationTime){if(current$$1===null||current$$1.tag!==HostText){// Insert\nvar created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current$$1,textContent,expirationTime);existing.return=returnFiber;return existing;}}function updateElement(returnFiber,current$$1,element,expirationTime){if(current$$1!==null&&current$$1.elementType===element.type){// Move based on index\nvar existing=useFiber(current$$1,element.props,expirationTime);existing.ref=coerceRef(returnFiber,current$$1,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{// Insert\nvar created=createFiberFromElement(element,returnFiber.mode,expirationTime);created.ref=coerceRef(returnFiber,current$$1,element);created.return=returnFiber;return created;}}function updatePortal(returnFiber,current$$1,portal,expirationTime){if(current$$1===null||current$$1.tag!==HostPortal||current$$1.stateNode.containerInfo!==portal.containerInfo||current$$1.stateNode.implementation!==portal.implementation){// Insert\nvar created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current$$1,portal.children||[],expirationTime);existing.return=returnFiber;return existing;}}function updateFragment(returnFiber,current$$1,fragment,expirationTime,key){if(current$$1===null||current$$1.tag!==Fragment){// Insert\nvar created=createFiberFromFragment(fragment,returnFiber.mode,expirationTime,key);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current$$1,fragment,expirationTime);existing.return=returnFiber;return existing;}}function createChild(returnFiber,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nvar created=createFiberFromText(''+newChild,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}if(_typeof(newChild)==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _created=createFiberFromElement(newChild,returnFiber.mode,expirationTime);_created.ref=coerceRef(returnFiber,null,newChild);_created.return=returnFiber;return _created;}case REACT_PORTAL_TYPE:{var _created2=createFiberFromPortal(newChild,returnFiber.mode,expirationTime);_created2.return=returnFiber;return _created2;}}if(isArray(newChild)||getIteratorFn(newChild)){var _created3=createFiberFromFragment(newChild,returnFiber.mode,expirationTime,null);_created3.return=returnFiber;return _created3;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateSlot(returnFiber,oldFiber,newChild,expirationTime){// Update the fiber if the keys match, otherwise return null.\nvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,expirationTime);}if(_typeof(newChild)==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,expirationTime,key);}return updateElement(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}}if(isArray(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n// new node for the key. If both are text nodes, they match.\nvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,expirationTime);}if(_typeof(newChild)==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,expirationTime,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,expirationTime);}case REACT_PORTAL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber2,newChild,expirationTime);}}if(isArray(newChild)||getIteratorFn(newChild)){var _matchedFiber3=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber3,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}/**\n * Warns if there is a duplicate or missing key\n */function warnOnInvalidKey(child,knownKeys){{if(_typeof(child)!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning$1(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;default:break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,expirationTime){// This algorithm can't optimize by searching from both ends since we\n// don't have backpointers on fibers. I'm trying to see how far we can get\n// with that model. If it ends up not being worth the tradeoffs, we can\n// add it later.\n// Even with a two ended optimization, we'd want to optimize for the case\n// where there are few changes and brute force the comparison instead of\n// going for the Map. It'd like to explore hitting that path first in\n// forward-only mode and only go for the Map once we notice that we need\n// lots of look ahead. This doesn't handle reversal as well as two ended\n// search but that's unusual. Besides, for the two ended optimization to\n// work on Iterables, we'd need to copy the whole set.\n// In this first iteration, we'll just live with hitting the bad case\n// (adding everything to a Map) in for every insert/move.\n// If you change this code, also update reconcileChildrenIterator() which\n// uses the same algorithm.\n{// First, validate keys.\nvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],expirationTime);if(!_newFiber){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],expirationTime);if(_newFiber2){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,expirationTime){// This is the same implementation as reconcileChildrenArray(),\n// but using the iterator instead.\nvar iteratorFn=getIteratorFn(newChildrenIterable);!(typeof iteratorFn==='function')?invariant(false,'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.'):void 0;{// We don't support rendering Generators because it's a mutation.\n// See https://github.com/facebook/react/issues/12995\nif(typeof Symbol==='function'&&// $FlowFixMe Flow doesn't know about toStringTag\nnewChildrenIterable[Symbol.toStringTag]==='Generator'){!didWarnAboutGenerators?warning$1(false,'Using Generators as children is unsupported and will likely yield '+'unexpected results because enumerating a generator mutates it. '+'You may convert it to an array with `Array.from()` or the '+'`[...spread]` operator before rendering. Keep in mind '+'you might need to polyfill these features for older browsers.'):void 0;didWarnAboutGenerators=true;}// Warn about using Maps as children\nif(newChildrenIterable.entries===iteratorFn){!didWarnAboutMaps?warning$1(false,'Using Maps as children is unsupported and will likely yield '+'unexpected results. Convert it to a sequence/iterable of keyed '+'ReactElements instead.'):void 0;didWarnAboutMaps=true;}// First, validate keys.\n// We'll get a different iterator later for the main pass.\nvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys);}}}var newChildren=iteratorFn.call(newChildrenIterable);!(newChildren!=null)?invariant(false,'An iterable object provided no iterator.'):void 0;var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(!oldFiber){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,expirationTime);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,expirationTime);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,expirationTime){// There's no need to check for keys on text nodes since we don't have a\n// way to define them.\nif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n// the rest.\ndeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent,expirationTime);existing.return=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n// and delete the existing ones.\ndeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,expirationTime){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===Fragment?element.type===REACT_FRAGMENT_TYPE:child.elementType===element.type){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.type===REACT_FRAGMENT_TYPE?element.props.children:element.props,expirationTime);existing.ref=coerceRef(returnFiber,child,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.mode,expirationTime,element.key);created.return=returnFiber;return created;}else{var _created4=createFiberFromElement(element,returnFiber.mode,expirationTime);_created4.ref=coerceRef(returnFiber,currentFirstChild,element);_created4.return=returnFiber;return _created4;}}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,expirationTime){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[],expirationTime);existing.return=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n// itself. They will be added to the side-effect list as we pass through the\n// children and the parent.\nfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=_typeof(newChild)==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=_typeof(newChild)==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionComponent:{var Component=returnFiber.type;invariant(false,'%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.',Component.displayName||Component.name||'Component');}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\nreturn;}// Deletions are added in reversed order so we add it to the front.\n// At this point, the return fiber's effect list is empty except for\n// deletions, so we can just append the deletion to the list. The remaining\n// effects aren't added until the complete phase. Once we implement\n// resuming, this may not be true.\nvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.effectTag=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\nreturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n// assuming that after the first child we've already added everything.\nvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n// keys quickly. Implicit (null) keys get added to this set with their index\nvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps,expirationTime){// We currently set sibling to null and index to 0 here because it is easy\n// to forget to do before returning it. E.g. for the single child case.\nvar clone=createWorkInProgress(fiber,pendingProps);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\nreturn lastPlacedIndex;}var current$$1=newFiber.alternate;if(current$$1!==null){var oldIndex=current$$1.index;if(oldIndex<lastPlacedIndex){// This is a move.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}else{// This item can stay in place.\nreturn oldIndex;}}else{// This is an insertion.\nnewFiber.effectTag=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n// placement for inserting new children.\nif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.effectTag=Placement;}return newFiber;}function updateTextNode(returnFiber,current$$1,textContent,expirationTime){if(current$$1===null||current$$1.tag!==HostText){// Insert\nvar created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current$$1,textContent);existing.return=returnFiber;return existing;}}function updateElement(returnFiber,current$$1,element,expirationTime){if(current$$1!==null&&current$$1.elementType===element.type){// Move based on index\nvar existing=useFiber(current$$1,element.props);existing.ref=coerceRef(returnFiber,current$$1,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{// Insert\nvar created=createFiberFromElement(element,returnFiber.mode,expirationTime);created.ref=coerceRef(returnFiber,current$$1,element);created.return=returnFiber;return created;}}function updatePortal(returnFiber,current$$1,portal,expirationTime){if(current$$1===null||current$$1.tag!==HostPortal||current$$1.stateNode.containerInfo!==portal.containerInfo||current$$1.stateNode.implementation!==portal.implementation){// Insert\nvar created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current$$1,portal.children||[]);existing.return=returnFiber;return existing;}}function updateFragment(returnFiber,current$$1,fragment,expirationTime,key){if(current$$1===null||current$$1.tag!==Fragment){// Insert\nvar created=createFiberFromFragment(fragment,returnFiber.mode,expirationTime,key);created.return=returnFiber;return created;}else{// Update\nvar existing=useFiber(current$$1,fragment);existing.return=returnFiber;return existing;}}function createChild(returnFiber,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nvar created=createFiberFromText(''+newChild,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _created=createFiberFromElement(newChild,returnFiber.mode,expirationTime);_created.ref=coerceRef(returnFiber,null,newChild);_created.return=returnFiber;return _created;}case REACT_PORTAL_TYPE:{var _created2=createFiberFromPortal(newChild,returnFiber.mode,expirationTime);_created2.return=returnFiber;return _created2;}}if(isArray(newChild)||getIteratorFn(newChild)){var _created3=createFiberFromFragment(newChild,returnFiber.mode,expirationTime,null);_created3.return=returnFiber;return _created3;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateSlot(returnFiber,oldFiber,newChild,expirationTime){// Update the fiber if the keys match, otherwise return null.\nvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n// we can continue to replace it without aborting even if it is not a text\n// node.\nif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,expirationTime);}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,expirationTime,key);}return updateElement(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}}if(isArray(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n// new node for the key. If both are text nodes, they match.\nvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,expirationTime);}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,expirationTime,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,expirationTime);}case REACT_PORTAL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber2,newChild,expirationTime);}}if(isArray(newChild)||getIteratorFn(newChild)){var _matchedFiber3=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber3,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}/**\n * Warns if there is a duplicate or missing key\n */function warnOnInvalidKey(child,knownKeys){{if(typeof child!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning$1(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.',key);break;default:break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,expirationTime){// This algorithm can't optimize by searching from both ends since we\n// don't have backpointers on fibers. I'm trying to see how far we can get\n// with that model. If it ends up not being worth the tradeoffs, we can\n// add it later.\n// Even with a two ended optimization, we'd want to optimize for the case\n// where there are few changes and brute force the comparison instead of\n// going for the Map. It'd like to explore hitting that path first in\n// forward-only mode and only go for the Map once we notice that we need\n// lots of look ahead. This doesn't handle reversal as well as two ended\n// search but that's unusual. Besides, for the two ended optimization to\n// work on Iterables, we'd need to copy the whole set.\n// In this first iteration, we'll just live with hitting the bad case\n// (adding everything to a Map) in for every insert/move.\n// If you change this code, also update reconcileChildrenIterator() which\n// uses the same algorithm.\n{// First, validate keys.\nvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],expirationTime);if(!_newFiber){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],expirationTime);if(_newFiber2){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,expirationTime){// This is the same implementation as reconcileChildrenArray(),\n// but using the iterator instead.\nvar iteratorFn=getIteratorFn(newChildrenIterable);!(typeof iteratorFn==='function')?invariant(false,'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.'):void 0;{// We don't support rendering Generators because it's a mutation.\n// See https://github.com/facebook/react/issues/12995\nif(typeof Symbol==='function'&&// $FlowFixMe Flow doesn't know about toStringTag\nnewChildrenIterable[Symbol.toStringTag]==='Generator'){!didWarnAboutGenerators?warning$1(false,'Using Generators as children is unsupported and will likely yield '+'unexpected results because enumerating a generator mutates it. '+'You may convert it to an array with `Array.from()` or the '+'`[...spread]` operator before rendering. Keep in mind '+'you might need to polyfill these features for older browsers.'):void 0;didWarnAboutGenerators=true;}// Warn about using Maps as children\nif(newChildrenIterable.entries===iteratorFn){!didWarnAboutMaps?warning$1(false,'Using Maps as children is unsupported and will likely yield '+'unexpected results. Convert it to a sequence/iterable of keyed '+'ReactElements instead.'):void 0;didWarnAboutMaps=true;}// First, validate keys.\n// We'll get a different iterator later for the main pass.\nvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys);}}}var newChildren=iteratorFn.call(newChildrenIterable);!(newChildren!=null)?invariant(false,'An iterable object provided no iterator.'):void 0;var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n// unfortunate because it triggers the slow path all the time. We need\n// a better way to communicate whether this was a miss or null,\n// boolean, undefined, etc.\nif(!oldFiber){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n// need to delete the existing child.\ndeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n// I.e. if we had null values before, then we want to defer this\n// for each null value. However, we also don't want to call updateSlot\n// with the previous one.\npreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\ndeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n// since the rest will all be insertions.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,expirationTime);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\nresultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\nvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\nfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,expirationTime);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n// current, that means that we reused the fiber. We need to delete\n// it from the child list so that we don't add it to the deletion\n// list.\nexistingChildren.delete(_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n// to add them to the deletion list.\nexistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,expirationTime){// There's no need to check for keys on text nodes since we don't have a\n// way to define them.\nif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n// the rest.\ndeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent);existing.return=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n// and delete the existing ones.\ndeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,expirationTime){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===Fragment?element.type===REACT_FRAGMENT_TYPE:child.elementType===element.type){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.type===REACT_FRAGMENT_TYPE?element.props.children:element.props);existing.ref=coerceRef(returnFiber,child,element);existing.return=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.mode,expirationTime,element.key);created.return=returnFiber;return created;}else{var _created4=createFiberFromElement(element,returnFiber.mode,expirationTime);_created4.ref=coerceRef(returnFiber,currentFirstChild,element);_created4.return=returnFiber;return _created4;}}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,expirationTime){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n// the first item in the list.\nif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[]);existing.return=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.mode,expirationTime);created.return=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n// itself. They will be added to the side-effect list as we pass through the\n// children and the parent.\nfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=typeof newChild==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=typeof newChild==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionComponent:{var Component=returnFiber.type;invariant(false,'%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.',Component.displayName||Component.name||'Component');}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "function ChildReconciler(shouldTrackSideEffects){function deleteChild(returnFiber,childToDelete){if(!shouldTrackSideEffects){// Noop.\n\treturn;}// Deletions are added in reversed order so we add it to the front.\n\t// At this point, the return fiber's effect list is empty except for\n\t// deletions, so we can just append the deletion to the list. The remaining\n\t// effects aren't added until the complete phase. Once we implement\n\t// resuming, this may not be true.\n\tvar last=returnFiber.lastEffect;if(last!==null){last.nextEffect=childToDelete;returnFiber.lastEffect=childToDelete;}else{returnFiber.firstEffect=returnFiber.lastEffect=childToDelete;}childToDelete.nextEffect=null;childToDelete.effectTag=Deletion;}function deleteRemainingChildren(returnFiber,currentFirstChild){if(!shouldTrackSideEffects){// Noop.\n\treturn null;}// TODO: For the shouldClone case, this could be micro-optimized a bit by\n\t// assuming that after the first child we've already added everything.\n\tvar childToDelete=currentFirstChild;while(childToDelete!==null){deleteChild(returnFiber,childToDelete);childToDelete=childToDelete.sibling;}return null;}function mapRemainingChildren(returnFiber,currentFirstChild){// Add the remaining children to a temporary map so that we can find them by\n\t// keys quickly. Implicit (null) keys get added to this set with their index\n\tvar existingChildren=new Map();var existingChild=currentFirstChild;while(existingChild!==null){if(existingChild.key!==null){existingChildren.set(existingChild.key,existingChild);}else{existingChildren.set(existingChild.index,existingChild);}existingChild=existingChild.sibling;}return existingChildren;}function useFiber(fiber,pendingProps,expirationTime){// We currently set sibling to null and index to 0 here because it is easy\n\t// to forget to do before returning it. E.g. for the single child case.\n\tvar clone=createWorkInProgress(fiber,pendingProps,expirationTime);clone.index=0;clone.sibling=null;return clone;}function placeChild(newFiber,lastPlacedIndex,newIndex){newFiber.index=newIndex;if(!shouldTrackSideEffects){// Noop.\n\treturn lastPlacedIndex;}var current=newFiber.alternate;if(current!==null){var oldIndex=current.index;if(oldIndex<lastPlacedIndex){// This is a move.\n\tnewFiber.effectTag=Placement;return lastPlacedIndex;}else{// This item can stay in place.\n\treturn oldIndex;}}else{// This is an insertion.\n\tnewFiber.effectTag=Placement;return lastPlacedIndex;}}function placeSingleChild(newFiber){// This is simpler for the single child case. We only need to do a\n\t// placement for inserting new children.\n\tif(shouldTrackSideEffects&&newFiber.alternate===null){newFiber.effectTag=Placement;}return newFiber;}function updateTextNode(returnFiber,current,textContent,expirationTime){if(current===null||current.tag!==HostText){// Insert\n\tvar created=createFiberFromText(textContent,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}else{// Update\n\tvar existing=useFiber(current,textContent,expirationTime);existing['return']=returnFiber;return existing;}}function updateElement(returnFiber,current,element,expirationTime){if(current!==null&&current.type===element.type){// Move based on index\n\tvar existing=useFiber(current,element.props,expirationTime);existing.ref=coerceRef(current,element);existing['return']=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{// Insert\n\tvar created=createFiberFromElement(element,returnFiber.internalContextTag,expirationTime);created.ref=coerceRef(current,element);created['return']=returnFiber;return created;}}function updateCall(returnFiber,current,call,expirationTime){// TODO: Should this also compare handler to determine whether to reuse?\n\tif(current===null||current.tag!==CallComponent){// Insert\n\tvar created=createFiberFromCall(call,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}else{// Move based on index\n\tvar existing=useFiber(current,call,expirationTime);existing['return']=returnFiber;return existing;}}function updateReturn(returnFiber,current,returnNode,expirationTime){if(current===null||current.tag!==ReturnComponent){// Insert\n\tvar created=createFiberFromReturn(returnNode,returnFiber.internalContextTag,expirationTime);created.type=returnNode.value;created['return']=returnFiber;return created;}else{// Move based on index\n\tvar existing=useFiber(current,null,expirationTime);existing.type=returnNode.value;existing['return']=returnFiber;return existing;}}function updatePortal(returnFiber,current,portal,expirationTime){if(current===null||current.tag!==HostPortal||current.stateNode.containerInfo!==portal.containerInfo||current.stateNode.implementation!==portal.implementation){// Insert\n\tvar created=createFiberFromPortal(portal,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}else{// Update\n\tvar existing=useFiber(current,portal.children||[],expirationTime);existing['return']=returnFiber;return existing;}}function updateFragment(returnFiber,current,fragment,expirationTime,key){if(current===null||current.tag!==Fragment){// Insert\n\tvar created=createFiberFromFragment(fragment,returnFiber.internalContextTag,expirationTime,key);created['return']=returnFiber;return created;}else{// Update\n\tvar existing=useFiber(current,fragment,expirationTime);existing['return']=returnFiber;return existing;}}function createChild(returnFiber,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n\t// we can continue to replace it without aborting even if it is not a text\n\t// node.\n\tvar created=createFiberFromText(''+newChild,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.type===REACT_FRAGMENT_TYPE){var _created=createFiberFromFragment(newChild.props.children,returnFiber.internalContextTag,expirationTime,newChild.key);_created['return']=returnFiber;return _created;}else{var _created2=createFiberFromElement(newChild,returnFiber.internalContextTag,expirationTime);_created2.ref=coerceRef(null,newChild);_created2['return']=returnFiber;return _created2;}}case REACT_CALL_TYPE:{var _created3=createFiberFromCall(newChild,returnFiber.internalContextTag,expirationTime);_created3['return']=returnFiber;return _created3;}case REACT_RETURN_TYPE:{var _created4=createFiberFromReturn(newChild,returnFiber.internalContextTag,expirationTime);_created4.type=newChild.value;_created4['return']=returnFiber;return _created4;}case REACT_PORTAL_TYPE:{var _created5=createFiberFromPortal(newChild,returnFiber.internalContextTag,expirationTime);_created5['return']=returnFiber;return _created5;}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _created6=createFiberFromFragment(newChild,returnFiber.internalContextTag,expirationTime,null);_created6['return']=returnFiber;return _created6;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateSlot(returnFiber,oldFiber,newChild,expirationTime){// Update the fiber if the keys match, otherwise return null.\n\tvar key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys. If the previous node is implicitly keyed\n\t// we can continue to replace it without aborting even if it is not a text\n\t// node.\n\tif(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,expirationTime);}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,oldFiber,newChild.props.children,expirationTime,key);}return updateElement(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_CALL_TYPE:{if(newChild.key===key){return updateCall(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_RETURN_TYPE:{// Returns don't have keys. If the previous node is implicitly keyed\n\t// we can continue to replace it without aborting even if it is not a\n\t// yield.\n\tif(key===null){return updateReturn(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,expirationTime);}else{return null;}}}if(isArray$1(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,expirationTime){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor\n\t// new node for the key. If both are text nodes, they match.\n\tvar matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,expirationTime);}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;if(newChild.type===REACT_FRAGMENT_TYPE){return updateFragment(returnFiber,_matchedFiber,newChild.props.children,expirationTime,newChild.key);}return updateElement(returnFiber,_matchedFiber,newChild,expirationTime);}case REACT_CALL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updateCall(returnFiber,_matchedFiber2,newChild,expirationTime);}case REACT_RETURN_TYPE:{// Returns don't have keys, so we neither have to check the old nor\n\t// new node for the key. If both are returns, they match.\n\tvar _matchedFiber3=existingChildren.get(newIdx)||null;return updateReturn(returnFiber,_matchedFiber3,newChild,expirationTime);}case REACT_PORTAL_TYPE:{var _matchedFiber4=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber4,newChild,expirationTime);}}if(isArray$1(newChild)||getIteratorFn(newChild)){var _matchedFiber5=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber5,newChild,expirationTime,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}/**\n\t * Warns if there is a duplicate or missing key\n\t */function warnOnInvalidKey(child,knownKeys){{if((typeof child==='undefined'?'undefined':_typeof(child))!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_CALL_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}warning(false,'Encountered two children with the same key, `%s`. '+'Keys should be unique so that components maintain their identity '+'across updates. Non-unique keys may cause children to be '+'duplicated and/or omitted — the behavior is unsupported and '+'could change in a future version.%s',key,getCurrentFiberStackAddendum$1());break;default:break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,expirationTime){// This algorithm can't optimize by searching from boths ends since we\n\t// don't have backpointers on fibers. I'm trying to see how far we can get\n\t// with that model. If it ends up not being worth the tradeoffs, we can\n\t// add it later.\n\t// Even with a two ended optimization, we'd want to optimize for the case\n\t// where there are few changes and brute force the comparison instead of\n\t// going for the Map. It'd like to explore hitting that path first in\n\t// forward-only mode and only go for the Map once we notice that we need\n\t// lots of look ahead. This doesn't handle reversal as well as two ended\n\t// search but that's unusual. Besides, for the two ended optimization to\n\t// work on Iterables, we'd need to copy the whole set.\n\t// In this first iteration, we'll just live with hitting the bad case\n\t// (adding everything to a Map) in for every insert/move.\n\t// If you change this code, also update reconcileChildrenIterator() which\n\t// uses the same algorithm.\n\t{// First, validate keys.\n\tvar knownKeys=null;for(var i=0;i<newChildren.length;i++){var child=newChildren[i];knownKeys=warnOnInvalidKey(child,knownKeys);}}var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;for(;oldFiber!==null&&newIdx<newChildren.length;newIdx++){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,newChildren[newIdx],expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n\t// unfortunate because it triggers the slow path all the time. We need\n\t// a better way to communicate whether this was a miss or null,\n\t// boolean, undefined, etc.\n\tif(oldFiber===null){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n\t// need to delete the existing child.\n\tdeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\n\tresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n\t// I.e. if we had null values before, then we want to defer this\n\t// for each null value. However, we also don't want to call updateSlot\n\t// with the previous one.\n\tpreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(newIdx===newChildren.length){// We've reached the end of the new children. We can delete the rest.\n\tdeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n\t// since the rest will all be insertions.\n\tfor(;newIdx<newChildren.length;newIdx++){var _newFiber=createChild(returnFiber,newChildren[newIdx],expirationTime);if(!_newFiber){continue;}lastPlacedIndex=placeChild(_newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\n\tresultingFirstChild=_newFiber;}else{previousNewFiber.sibling=_newFiber;}previousNewFiber=_newFiber;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\n\tvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\n\tfor(;newIdx<newChildren.length;newIdx++){var _newFiber2=updateFromMap(existingChildren,returnFiber,newIdx,newChildren[newIdx],expirationTime);if(_newFiber2){if(shouldTrackSideEffects){if(_newFiber2.alternate!==null){// The new fiber is a work in progress, but if there exists a\n\t// current, that means that we reused the fiber. We need to delete\n\t// it from the child list so that we don't add it to the deletion\n\t// list.\n\texistingChildren['delete'](_newFiber2.key===null?newIdx:_newFiber2.key);}}lastPlacedIndex=placeChild(_newFiber2,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber2;}else{previousNewFiber.sibling=_newFiber2;}previousNewFiber=_newFiber2;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n\t// to add them to the deletion list.\n\texistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileChildrenIterator(returnFiber,currentFirstChild,newChildrenIterable,expirationTime){// This is the same implementation as reconcileChildrenArray(),\n\t// but using the iterator instead.\n\tvar iteratorFn=getIteratorFn(newChildrenIterable);!(typeof iteratorFn==='function')?invariant(false,'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.'):void 0;{// Warn about using Maps as children\n\tif(typeof newChildrenIterable.entries==='function'){var possibleMap=newChildrenIterable;if(possibleMap.entries===iteratorFn){warning(didWarnAboutMaps,'Using Maps as children is unsupported and will likely yield '+'unexpected results. Convert it to a sequence/iterable of keyed '+'ReactElements instead.%s',getCurrentFiberStackAddendum$1());didWarnAboutMaps=true;}}// First, validate keys.\n\t// We'll get a different iterator later for the main pass.\n\tvar _newChildren=iteratorFn.call(newChildrenIterable);if(_newChildren){var knownKeys=null;var _step=_newChildren.next();for(;!_step.done;_step=_newChildren.next()){var child=_step.value;knownKeys=warnOnInvalidKey(child,knownKeys);}}}var newChildren=iteratorFn.call(newChildrenIterable);!(newChildren!=null)?invariant(false,'An iterable object provided no iterator.'):void 0;var resultingFirstChild=null;var previousNewFiber=null;var oldFiber=currentFirstChild;var lastPlacedIndex=0;var newIdx=0;var nextOldFiber=null;var step=newChildren.next();for(;oldFiber!==null&&!step.done;newIdx++,step=newChildren.next()){if(oldFiber.index>newIdx){nextOldFiber=oldFiber;oldFiber=null;}else{nextOldFiber=oldFiber.sibling;}var newFiber=updateSlot(returnFiber,oldFiber,step.value,expirationTime);if(newFiber===null){// TODO: This breaks on empty slots like null children. That's\n\t// unfortunate because it triggers the slow path all the time. We need\n\t// a better way to communicate whether this was a miss or null,\n\t// boolean, undefined, etc.\n\tif(!oldFiber){oldFiber=nextOldFiber;}break;}if(shouldTrackSideEffects){if(oldFiber&&newFiber.alternate===null){// We matched the slot, but we didn't reuse the existing fiber, so we\n\t// need to delete the existing child.\n\tdeleteChild(returnFiber,oldFiber);}}lastPlacedIndex=placeChild(newFiber,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\n\tresultingFirstChild=newFiber;}else{// TODO: Defer siblings if we're not at the right index for this slot.\n\t// I.e. if we had null values before, then we want to defer this\n\t// for each null value. However, we also don't want to call updateSlot\n\t// with the previous one.\n\tpreviousNewFiber.sibling=newFiber;}previousNewFiber=newFiber;oldFiber=nextOldFiber;}if(step.done){// We've reached the end of the new children. We can delete the rest.\n\tdeleteRemainingChildren(returnFiber,oldFiber);return resultingFirstChild;}if(oldFiber===null){// If we don't have any more existing children we can choose a fast path\n\t// since the rest will all be insertions.\n\tfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber3=createChild(returnFiber,step.value,expirationTime);if(_newFiber3===null){continue;}lastPlacedIndex=placeChild(_newFiber3,lastPlacedIndex,newIdx);if(previousNewFiber===null){// TODO: Move out of the loop. This only happens for the first run.\n\tresultingFirstChild=_newFiber3;}else{previousNewFiber.sibling=_newFiber3;}previousNewFiber=_newFiber3;}return resultingFirstChild;}// Add all children to a key map for quick lookups.\n\tvar existingChildren=mapRemainingChildren(returnFiber,oldFiber);// Keep scanning and use the map to restore deleted items as moves.\n\tfor(;!step.done;newIdx++,step=newChildren.next()){var _newFiber4=updateFromMap(existingChildren,returnFiber,newIdx,step.value,expirationTime);if(_newFiber4!==null){if(shouldTrackSideEffects){if(_newFiber4.alternate!==null){// The new fiber is a work in progress, but if there exists a\n\t// current, that means that we reused the fiber. We need to delete\n\t// it from the child list so that we don't add it to the deletion\n\t// list.\n\texistingChildren['delete'](_newFiber4.key===null?newIdx:_newFiber4.key);}}lastPlacedIndex=placeChild(_newFiber4,lastPlacedIndex,newIdx);if(previousNewFiber===null){resultingFirstChild=_newFiber4;}else{previousNewFiber.sibling=_newFiber4;}previousNewFiber=_newFiber4;}}if(shouldTrackSideEffects){// Any existing children that weren't consumed above were deleted. We need\n\t// to add them to the deletion list.\n\texistingChildren.forEach(function(child){return deleteChild(returnFiber,child);});}return resultingFirstChild;}function reconcileSingleTextNode(returnFiber,currentFirstChild,textContent,expirationTime){// There's no need to check for keys on text nodes since we don't have a\n\t// way to define them.\n\tif(currentFirstChild!==null&&currentFirstChild.tag===HostText){// We already have an existing node so let's just update it and delete\n\t// the rest.\n\tdeleteRemainingChildren(returnFiber,currentFirstChild.sibling);var existing=useFiber(currentFirstChild,textContent,expirationTime);existing['return']=returnFiber;return existing;}// The existing first child is not a text node so we need to create one\n\t// and delete the existing ones.\n\tdeleteRemainingChildren(returnFiber,currentFirstChild);var created=createFiberFromText(textContent,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}function reconcileSingleElement(returnFiber,currentFirstChild,element,expirationTime){var key=element.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n\t// the first item in the list.\n\tif(child.key===key){if(child.tag===Fragment?element.type===REACT_FRAGMENT_TYPE:child.type===element.type){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,element.type===REACT_FRAGMENT_TYPE?element.props.children:element.props,expirationTime);existing.ref=coerceRef(child,element);existing['return']=returnFiber;{existing._debugSource=element._source;existing._debugOwner=element._owner;}return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}if(element.type===REACT_FRAGMENT_TYPE){var created=createFiberFromFragment(element.props.children,returnFiber.internalContextTag,expirationTime,element.key);created['return']=returnFiber;return created;}else{var _created7=createFiberFromElement(element,returnFiber.internalContextTag,expirationTime);_created7.ref=coerceRef(currentFirstChild,element);_created7['return']=returnFiber;return _created7;}}function reconcileSingleCall(returnFiber,currentFirstChild,call,expirationTime){var key=call.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n\t// the first item in the list.\n\tif(child.key===key){if(child.tag===CallComponent){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,call,expirationTime);existing['return']=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromCall(call,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}function reconcileSingleReturn(returnFiber,currentFirstChild,returnNode,expirationTime){// There's no need to check for keys on yields since they're stateless.\n\tvar child=currentFirstChild;if(child!==null){if(child.tag===ReturnComponent){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,null,expirationTime);existing.type=returnNode.value;existing['return']=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);}}var created=createFiberFromReturn(returnNode,returnFiber.internalContextTag,expirationTime);created.type=returnNode.value;created['return']=returnFiber;return created;}function reconcileSinglePortal(returnFiber,currentFirstChild,portal,expirationTime){var key=portal.key;var child=currentFirstChild;while(child!==null){// TODO: If key === null and child.key === null, then this only applies to\n\t// the first item in the list.\n\tif(child.key===key){if(child.tag===HostPortal&&child.stateNode.containerInfo===portal.containerInfo&&child.stateNode.implementation===portal.implementation){deleteRemainingChildren(returnFiber,child.sibling);var existing=useFiber(child,portal.children||[],expirationTime);existing['return']=returnFiber;return existing;}else{deleteRemainingChildren(returnFiber,child);break;}}else{deleteChild(returnFiber,child);}child=child.sibling;}var created=createFiberFromPortal(portal,returnFiber.internalContextTag,expirationTime);created['return']=returnFiber;return created;}// This API will tag the children with the side-effect of the reconciliation\n\t// itself. They will be added to the side-effect list as we pass through the\n\t// children and the parent.\n\tfunction reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n\t// If the top level item is an array, we treat it as a set of children,\n\t// not as a fragment. Nested arrays on the other hand will be treated as\n\t// fragment nodes. Recursion happens at the normal flow.\n\t// Handle top level unkeyed fragments as if they were arrays.\n\t// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n\t// We treat the ambiguous cases above the same.\n\tif((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null){newChild=newChild.props.children;}// Handle object types\n\tvar isObject=(typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_CALL_TYPE:return placeSingleChild(reconcileSingleCall(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_RETURN_TYPE:return placeSingleChild(reconcileSingleReturn(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'){// If the new child is undefined, and the return fiber is a composite\n\t// component, throw an error. If Fiber return types are disabled,\n\t// we already threw above.\n\tswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\n\tbreak;}}}// Intentionally fall through to the next case, which handles both\n\t// functions and classes\n\t// eslint-disable-next-lined no-fallthrough\n\tcase FunctionalComponent:{var Component=returnFiber.type;invariant(false,'%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.',Component.displayName||Component.name||'Component');}}}// Remaining cases are all treated as empty.\n\treturn deleteRemainingChildren(returnFiber,currentFirstChild);}return reconcileChildFibers;}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element)) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error(\"An iterable object provided no iterator.\");\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n\n break;\n }\n\n case Block: // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element)) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error((getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element)) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error(\"An iterable object provided no iterator.\");\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n\n break;\n }\n\n case Block: // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element)) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error((getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element)) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error(\"An iterable object provided no iterator.\");\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n\n break;\n }\n\n case Block: // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element)) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error((getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element)) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error(\"An iterable object provided no iterator.\");\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n\n break;\n }\n\n case Block: // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element)) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error((getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n\t function deleteChild(returnFiber, childToDelete) {\n\t if (!shouldTrackSideEffects) {\n\t // Noop.\n\t return;\n\t }\n\t // Deletions are added in reversed order so we add it to the front.\n\t // At this point, the return fiber's effect list is empty except for\n\t // deletions, so we can just append the deletion to the list. The remaining\n\t // effects aren't added until the complete phase. Once we implement\n\t // resuming, this may not be true.\n\t var last = returnFiber.lastEffect;\n\t if (last !== null) {\n\t last.nextEffect = childToDelete;\n\t returnFiber.lastEffect = childToDelete;\n\t } else {\n\t returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n\t }\n\t childToDelete.nextEffect = null;\n\t childToDelete.effectTag = Deletion;\n\t }\n\t\n\t function deleteRemainingChildren(returnFiber, currentFirstChild) {\n\t if (!shouldTrackSideEffects) {\n\t // Noop.\n\t return null;\n\t }\n\t\n\t // TODO: For the shouldClone case, this could be micro-optimized a bit by\n\t // assuming that after the first child we've already added everything.\n\t var childToDelete = currentFirstChild;\n\t while (childToDelete !== null) {\n\t deleteChild(returnFiber, childToDelete);\n\t childToDelete = childToDelete.sibling;\n\t }\n\t return null;\n\t }\n\t\n\t function mapRemainingChildren(returnFiber, currentFirstChild) {\n\t // Add the remaining children to a temporary map so that we can find them by\n\t // keys quickly. Implicit (null) keys get added to this set with their index\n\t var existingChildren = new Map();\n\t\n\t var existingChild = currentFirstChild;\n\t while (existingChild !== null) {\n\t if (existingChild.key !== null) {\n\t existingChildren.set(existingChild.key, existingChild);\n\t } else {\n\t existingChildren.set(existingChild.index, existingChild);\n\t }\n\t existingChild = existingChild.sibling;\n\t }\n\t return existingChildren;\n\t }\n\t\n\t function useFiber(fiber, pendingProps, expirationTime) {\n\t // We currently set sibling to null and index to 0 here because it is easy\n\t // to forget to do before returning it. E.g. for the single child case.\n\t var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n\t clone.index = 0;\n\t clone.sibling = null;\n\t return clone;\n\t }\n\t\n\t function placeChild(newFiber, lastPlacedIndex, newIndex) {\n\t newFiber.index = newIndex;\n\t if (!shouldTrackSideEffects) {\n\t // Noop.\n\t return lastPlacedIndex;\n\t }\n\t var current = newFiber.alternate;\n\t if (current !== null) {\n\t var oldIndex = current.index;\n\t if (oldIndex < lastPlacedIndex) {\n\t // This is a move.\n\t newFiber.effectTag = Placement;\n\t return lastPlacedIndex;\n\t } else {\n\t // This item can stay in place.\n\t return oldIndex;\n\t }\n\t } else {\n\t // This is an insertion.\n\t newFiber.effectTag = Placement;\n\t return lastPlacedIndex;\n\t }\n\t }\n\t\n\t function placeSingleChild(newFiber) {\n\t // This is simpler for the single child case. We only need to do a\n\t // placement for inserting new children.\n\t if (shouldTrackSideEffects && newFiber.alternate === null) {\n\t newFiber.effectTag = Placement;\n\t }\n\t return newFiber;\n\t }\n\t\n\t function updateTextNode(returnFiber, current, textContent, expirationTime) {\n\t if (current === null || current.tag !== HostText) {\n\t // Insert\n\t var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n\t created['return'] = returnFiber;\n\t return created;\n\t } else {\n\t // Update\n\t var existing = useFiber(current, textContent, expirationTime);\n\t existing['return'] = returnFiber;\n\t return existing;\n\t }\n\t }\n\t\n\t function updateElement(returnFiber, current, element, expirationTime) {\n\t if (current !== null && current.type === element.type) {\n\t // Move based on index\n\t var existing = useFiber(current, element.props, expirationTime);\n\t existing.ref = coerceRef(current, element);\n\t existing['return'] = returnFiber;\n\t {\n\t existing._debugSource = element._source;\n\t existing._debugOwner = element._owner;\n\t }\n\t return existing;\n\t } else {\n\t // Insert\n\t var created = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n\t created.ref = coerceRef(current, element);\n\t created['return'] = returnFiber;\n\t return created;\n\t }\n\t }\n\t\n\t function updateCall(returnFiber, current, call, expirationTime) {\n\t // TODO: Should this also compare handler to determine whether to reuse?\n\t if (current === null || current.tag !== CallComponent) {\n\t // Insert\n\t var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n\t created['return'] = returnFiber;\n\t return created;\n\t } else {\n\t // Move based on index\n\t var existing = useFiber(current, call, expirationTime);\n\t existing['return'] = returnFiber;\n\t return existing;\n\t }\n\t }\n\t\n\t function updateReturn(returnFiber, current, returnNode, expirationTime) {\n\t if (current === null || current.tag !== ReturnComponent) {\n\t // Insert\n\t var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n\t created.type = returnNode.value;\n\t created['return'] = returnFiber;\n\t return created;\n\t } else {\n\t // Move based on index\n\t var existing = useFiber(current, null, expirationTime);\n\t existing.type = returnNode.value;\n\t existing['return'] = returnFiber;\n\t return existing;\n\t }\n\t }\n\t\n\t function updatePortal(returnFiber, current, portal, expirationTime) {\n\t if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n\t // Insert\n\t var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n\t created['return'] = returnFiber;\n\t return created;\n\t } else {\n\t // Update\n\t var existing = useFiber(current, portal.children || [], expirationTime);\n\t existing['return'] = returnFiber;\n\t return existing;\n\t }\n\t }\n\t\n\t function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n\t if (current === null || current.tag !== Fragment) {\n\t // Insert\n\t var created = createFiberFromFragment(fragment, returnFiber.internalContextTag, expirationTime, key);\n\t created['return'] = returnFiber;\n\t return created;\n\t } else {\n\t // Update\n\t var existing = useFiber(current, fragment, expirationTime);\n\t existing['return'] = returnFiber;\n\t return existing;\n\t }\n\t }\n\t\n\t function createChild(returnFiber, newChild, expirationTime) {\n\t if (typeof newChild === 'string' || typeof newChild === 'number') {\n\t // Text nodes don't have keys. If the previous node is implicitly keyed\n\t // we can continue to replace it without aborting even if it is not a text\n\t // node.\n\t var created = createFiberFromText('' + newChild, returnFiber.internalContextTag, expirationTime);\n\t created['return'] = returnFiber;\n\t return created;\n\t }\n\t\n\t if (typeof newChild === 'object' && newChild !== null) {\n\t switch (newChild.$$typeof) {\n\t case REACT_ELEMENT_TYPE:\n\t {\n\t if (newChild.type === REACT_FRAGMENT_TYPE) {\n\t var _created = createFiberFromFragment(newChild.props.children, returnFiber.internalContextTag, expirationTime, newChild.key);\n\t _created['return'] = returnFiber;\n\t return _created;\n\t } else {\n\t var _created2 = createFiberFromElement(newChild, returnFiber.internalContextTag, expirationTime);\n\t _created2.ref = coerceRef(null, newChild);\n\t _created2['return'] = returnFiber;\n\t return _created2;\n\t }\n\t }\n\t\n\t case REACT_CALL_TYPE:\n\t {\n\t var _created3 = createFiberFromCall(newChild, returnFiber.internalContextTag, expirationTime);\n\t _created3['return'] = returnFiber;\n\t return _created3;\n\t }\n\t\n\t case REACT_RETURN_TYPE:\n\t {\n\t var _created4 = createFiberFromReturn(newChild, returnFiber.internalContextTag, expirationTime);\n\t _created4.type = newChild.value;\n\t _created4['return'] = returnFiber;\n\t return _created4;\n\t }\n\t\n\t case REACT_PORTAL_TYPE:\n\t {\n\t var _created5 = createFiberFromPortal(newChild, returnFiber.internalContextTag, expirationTime);\n\t _created5['return'] = returnFiber;\n\t return _created5;\n\t }\n\t }\n\t\n\t if (isArray$1(newChild) || getIteratorFn(newChild)) {\n\t var _created6 = createFiberFromFragment(newChild, returnFiber.internalContextTag, expirationTime, null);\n\t _created6['return'] = returnFiber;\n\t return _created6;\n\t }\n\t\n\t throwOnInvalidObjectType(returnFiber, newChild);\n\t }\n\t\n\t {\n\t if (typeof newChild === 'function') {\n\t warnOnFunctionType();\n\t }\n\t }\n\t\n\t return null;\n\t }\n\t\n\t function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n\t // Update the fiber if the keys match, otherwise return null.\n\t\n\t var key = oldFiber !== null ? oldFiber.key : null;\n\t\n\t if (typeof newChild === 'string' || typeof newChild === 'number') {\n\t // Text nodes don't have keys. If the previous node is implicitly keyed\n\t // we can continue to replace it without aborting even if it is not a text\n\t // node.\n\t if (key !== null) {\n\t return null;\n\t }\n\t return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n\t }\n\t\n\t if (typeof newChild === 'object' && newChild !== null) {\n\t switch (newChild.$$typeof) {\n\t case REACT_ELEMENT_TYPE:\n\t {\n\t if (newChild.key === key) {\n\t if (newChild.type === REACT_FRAGMENT_TYPE) {\n\t return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n\t }\n\t return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n\t } else {\n\t return null;\n\t }\n\t }\n\t\n\t case REACT_CALL_TYPE:\n\t {\n\t if (newChild.key === key) {\n\t return updateCall(returnFiber, oldFiber, newChild, expirationTime);\n\t } else {\n\t return null;\n\t }\n\t }\n\t\n\t case REACT_RETURN_TYPE:\n\t {\n\t // Returns don't have keys. If the previous node is implicitly keyed\n\t // we can continue to replace it without aborting even if it is not a\n\t // yield.\n\t if (key === null) {\n\t return updateReturn(returnFiber, oldFiber, newChild, expirationTime);\n\t } else {\n\t return null;\n\t }\n\t }\n\t\n\t case REACT_PORTAL_TYPE:\n\t {\n\t if (newChild.key === key) {\n\t return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n\t } else {\n\t return null;\n\t }\n\t }\n\t }\n\t\n\t if (isArray$1(newChild) || getIteratorFn(newChild)) {\n\t if (key !== null) {\n\t return null;\n\t }\n\t\n\t return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n\t }\n\t\n\t throwOnInvalidObjectType(returnFiber, newChild);\n\t }\n\t\n\t {\n\t if (typeof newChild === 'function') {\n\t warnOnFunctionType();\n\t }\n\t }\n\t\n\t return null;\n\t }\n\t\n\t function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n\t if (typeof newChild === 'string' || typeof newChild === 'number') {\n\t // Text nodes don't have keys, so we neither have to check the old nor\n\t // new node for the key. If both are text nodes, they match.\n\t var matchedFiber = existingChildren.get(newIdx) || null;\n\t return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n\t }\n\t\n\t if (typeof newChild === 'object' && newChild !== null) {\n\t switch (newChild.$$typeof) {\n\t case REACT_ELEMENT_TYPE:\n\t {\n\t var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\t if (newChild.type === REACT_FRAGMENT_TYPE) {\n\t return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n\t }\n\t return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n\t }\n\t\n\t case REACT_CALL_TYPE:\n\t {\n\t var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\t return updateCall(returnFiber, _matchedFiber2, newChild, expirationTime);\n\t }\n\t\n\t case REACT_RETURN_TYPE:\n\t {\n\t // Returns don't have keys, so we neither have to check the old nor\n\t // new node for the key. If both are returns, they match.\n\t var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\t return updateReturn(returnFiber, _matchedFiber3, newChild, expirationTime);\n\t }\n\t\n\t case REACT_PORTAL_TYPE:\n\t {\n\t var _matchedFiber4 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\t return updatePortal(returnFiber, _matchedFiber4, newChild, expirationTime);\n\t }\n\t }\n\t\n\t if (isArray$1(newChild) || getIteratorFn(newChild)) {\n\t var _matchedFiber5 = existingChildren.get(newIdx) || null;\n\t return updateFragment(returnFiber, _matchedFiber5, newChild, expirationTime, null);\n\t }\n\t\n\t throwOnInvalidObjectType(returnFiber, newChild);\n\t }\n\t\n\t {\n\t if (typeof newChild === 'function') {\n\t warnOnFunctionType();\n\t }\n\t }\n\t\n\t return null;\n\t }\n\t\n\t /**\n\t * Warns if there is a duplicate or missing key\n\t */\n\t function warnOnInvalidKey(child, knownKeys) {\n\t {\n\t if (typeof child !== 'object' || child === null) {\n\t return knownKeys;\n\t }\n\t switch (child.$$typeof) {\n\t case REACT_ELEMENT_TYPE:\n\t case REACT_CALL_TYPE:\n\t case REACT_PORTAL_TYPE:\n\t warnForMissingKey(child);\n\t var key = child.key;\n\t if (typeof key !== 'string') {\n\t break;\n\t }\n\t if (knownKeys === null) {\n\t knownKeys = new Set();\n\t knownKeys.add(key);\n\t break;\n\t }\n\t if (!knownKeys.has(key)) {\n\t knownKeys.add(key);\n\t break;\n\t }\n\t warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n\t break;\n\t default:\n\t break;\n\t }\n\t }\n\t return knownKeys;\n\t }\n\t\n\t function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n\t // This algorithm can't optimize by searching from boths ends since we\n\t // don't have backpointers on fibers. I'm trying to see how far we can get\n\t // with that model. If it ends up not being worth the tradeoffs, we can\n\t // add it later.\n\t\n\t // Even with a two ended optimization, we'd want to optimize for the case\n\t // where there are few changes and brute force the comparison instead of\n\t // going for the Map. It'd like to explore hitting that path first in\n\t // forward-only mode and only go for the Map once we notice that we need\n\t // lots of look ahead. This doesn't handle reversal as well as two ended\n\t // search but that's unusual. Besides, for the two ended optimization to\n\t // work on Iterables, we'd need to copy the whole set.\n\t\n\t // In this first iteration, we'll just live with hitting the bad case\n\t // (adding everything to a Map) in for every insert/move.\n\t\n\t // If you change this code, also update reconcileChildrenIterator() which\n\t // uses the same algorithm.\n\t\n\t {\n\t // First, validate keys.\n\t var knownKeys = null;\n\t for (var i = 0; i < newChildren.length; i++) {\n\t var child = newChildren[i];\n\t knownKeys = warnOnInvalidKey(child, knownKeys);\n\t }\n\t }\n\t\n\t var resultingFirstChild = null;\n\t var previousNewFiber = null;\n\t\n\t var oldFiber = currentFirstChild;\n\t var lastPlacedIndex = 0;\n\t var newIdx = 0;\n\t var nextOldFiber = null;\n\t for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n\t if (oldFiber.index > newIdx) {\n\t nextOldFiber = oldFiber;\n\t oldFiber = null;\n\t } else {\n\t nextOldFiber = oldFiber.sibling;\n\t }\n\t var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\t if (newFiber === null) {\n\t // TODO: This breaks on empty slots like null children. That's\n\t // unfortunate because it triggers the slow path all the time. We need\n\t // a better way to communicate whether this was a miss or null,\n\t // boolean, undefined, etc.\n\t if (oldFiber === null) {\n\t oldFiber = nextOldFiber;\n\t }\n\t break;\n\t }\n\t if (shouldTrackSideEffects) {\n\t if (oldFiber && newFiber.alternate === null) {\n\t // We matched the slot, but we didn't reuse the existing fiber, so we\n\t // need to delete the existing child.\n\t deleteChild(returnFiber, oldFiber);\n\t }\n\t }\n\t lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\t if (previousNewFiber === null) {\n\t // TODO: Move out of the loop. This only happens for the first run.\n\t resultingFirstChild = newFiber;\n\t } else {\n\t // TODO: Defer siblings if we're not at the right index for this slot.\n\t // I.e. if we had null values before, then we want to defer this\n\t // for each null value. However, we also don't want to call updateSlot\n\t // with the previous one.\n\t previousNewFiber.sibling = newFiber;\n\t }\n\t previousNewFiber = newFiber;\n\t oldFiber = nextOldFiber;\n\t }\n\t\n\t if (newIdx === newChildren.length) {\n\t // We've reached the end of the new children. We can delete the rest.\n\t deleteRemainingChildren(returnFiber, oldFiber);\n\t return resultingFirstChild;\n\t }\n\t\n\t if (oldFiber === null) {\n\t // If we don't have any more existing children we can choose a fast path\n\t // since the rest will all be insertions.\n\t for (; newIdx < newChildren.length; newIdx++) {\n\t var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\t if (!_newFiber) {\n\t continue;\n\t }\n\t lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\t if (previousNewFiber === null) {\n\t // TODO: Move out of the loop. This only happens for the first run.\n\t resultingFirstChild = _newFiber;\n\t } else {\n\t previousNewFiber.sibling = _newFiber;\n\t }\n\t previousNewFiber = _newFiber;\n\t }\n\t return resultingFirstChild;\n\t }\n\t\n\t // Add all children to a key map for quick lookups.\n\t var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\t\n\t // Keep scanning and use the map to restore deleted items as moves.\n\t for (; newIdx < newChildren.length; newIdx++) {\n\t var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\t if (_newFiber2) {\n\t if (shouldTrackSideEffects) {\n\t if (_newFiber2.alternate !== null) {\n\t // The new fiber is a work in progress, but if there exists a\n\t // current, that means that we reused the fiber. We need to delete\n\t // it from the child list so that we don't add it to the deletion\n\t // list.\n\t existingChildren['delete'](_newFiber2.key === null ? newIdx : _newFiber2.key);\n\t }\n\t }\n\t lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\t if (previousNewFiber === null) {\n\t resultingFirstChild = _newFiber2;\n\t } else {\n\t previousNewFiber.sibling = _newFiber2;\n\t }\n\t previousNewFiber = _newFiber2;\n\t }\n\t }\n\t\n\t if (shouldTrackSideEffects) {\n\t // Any existing children that weren't consumed above were deleted. We need\n\t // to add them to the deletion list.\n\t existingChildren.forEach(function (child) {\n\t return deleteChild(returnFiber, child);\n\t });\n\t }\n\t\n\t return resultingFirstChild;\n\t }\n\t\n\t function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n\t // This is the same implementation as reconcileChildrenArray(),\n\t // but using the iterator instead.\n\t\n\t var iteratorFn = getIteratorFn(newChildrenIterable);\n\t !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\t\n\t {\n\t // Warn about using Maps as children\n\t if (typeof newChildrenIterable.entries === 'function') {\n\t var possibleMap = newChildrenIterable;\n\t if (possibleMap.entries === iteratorFn) {\n\t warning(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$1());\n\t didWarnAboutMaps = true;\n\t }\n\t }\n\t\n\t // First, validate keys.\n\t // We'll get a different iterator later for the main pass.\n\t var _newChildren = iteratorFn.call(newChildrenIterable);\n\t if (_newChildren) {\n\t var knownKeys = null;\n\t var _step = _newChildren.next();\n\t for (; !_step.done; _step = _newChildren.next()) {\n\t var child = _step.value;\n\t knownKeys = warnOnInvalidKey(child, knownKeys);\n\t }\n\t }\n\t }\n\t\n\t var newChildren = iteratorFn.call(newChildrenIterable);\n\t !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\t\n\t var resultingFirstChild = null;\n\t var previousNewFiber = null;\n\t\n\t var oldFiber = currentFirstChild;\n\t var lastPlacedIndex = 0;\n\t var newIdx = 0;\n\t var nextOldFiber = null;\n\t\n\t var step = newChildren.next();\n\t for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n\t if (oldFiber.index > newIdx) {\n\t nextOldFiber = oldFiber;\n\t oldFiber = null;\n\t } else {\n\t nextOldFiber = oldFiber.sibling;\n\t }\n\t var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\t if (newFiber === null) {\n\t // TODO: This breaks on empty slots like null children. That's\n\t // unfortunate because it triggers the slow path all the time. We need\n\t // a better way to communicate whether this was a miss or null,\n\t // boolean, undefined, etc.\n\t if (!oldFiber) {\n\t oldFiber = nextOldFiber;\n\t }\n\t break;\n\t }\n\t if (shouldTrackSideEffects) {\n\t if (oldFiber && newFiber.alternate === null) {\n\t // We matched the slot, but we didn't reuse the existing fiber, so we\n\t // need to delete the existing child.\n\t deleteChild(returnFiber, oldFiber);\n\t }\n\t }\n\t lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\t if (previousNewFiber === null) {\n\t // TODO: Move out of the loop. This only happens for the first run.\n\t resultingFirstChild = newFiber;\n\t } else {\n\t // TODO: Defer siblings if we're not at the right index for this slot.\n\t // I.e. if we had null values before, then we want to defer this\n\t // for each null value. However, we also don't want to call updateSlot\n\t // with the previous one.\n\t previousNewFiber.sibling = newFiber;\n\t }\n\t previousNewFiber = newFiber;\n\t oldFiber = nextOldFiber;\n\t }\n\t\n\t if (step.done) {\n\t // We've reached the end of the new children. We can delete the rest.\n\t deleteRemainingChildren(returnFiber, oldFiber);\n\t return resultingFirstChild;\n\t }\n\t\n\t if (oldFiber === null) {\n\t // If we don't have any more existing children we can choose a fast path\n\t // since the rest will all be insertions.\n\t for (; !step.done; newIdx++, step = newChildren.next()) {\n\t var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\t if (_newFiber3 === null) {\n\t continue;\n\t }\n\t lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\t if (previousNewFiber === null) {\n\t // TODO: Move out of the loop. This only happens for the first run.\n\t resultingFirstChild = _newFiber3;\n\t } else {\n\t previousNewFiber.sibling = _newFiber3;\n\t }\n\t previousNewFiber = _newFiber3;\n\t }\n\t return resultingFirstChild;\n\t }\n\t\n\t // Add all children to a key map for quick lookups.\n\t var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\t\n\t // Keep scanning and use the map to restore deleted items as moves.\n\t for (; !step.done; newIdx++, step = newChildren.next()) {\n\t var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\t if (_newFiber4 !== null) {\n\t if (shouldTrackSideEffects) {\n\t if (_newFiber4.alternate !== null) {\n\t // The new fiber is a work in progress, but if there exists a\n\t // current, that means that we reused the fiber. We need to delete\n\t // it from the child list so that we don't add it to the deletion\n\t // list.\n\t existingChildren['delete'](_newFiber4.key === null ? newIdx : _newFiber4.key);\n\t }\n\t }\n\t lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\t if (previousNewFiber === null) {\n\t resultingFirstChild = _newFiber4;\n\t } else {\n\t previousNewFiber.sibling = _newFiber4;\n\t }\n\t previousNewFiber = _newFiber4;\n\t }\n\t }\n\t\n\t if (shouldTrackSideEffects) {\n\t // Any existing children that weren't consumed above were deleted. We need\n\t // to add them to the deletion list.\n\t existingChildren.forEach(function (child) {\n\t return deleteChild(returnFiber, child);\n\t });\n\t }\n\t\n\t return resultingFirstChild;\n\t }\n\t\n\t function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n\t // There's no need to check for keys on text nodes since we don't have a\n\t // way to define them.\n\t if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n\t // We already have an existing node so let's just update it and delete\n\t // the rest.\n\t deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n\t var existing = useFiber(currentFirstChild, textContent, expirationTime);\n\t existing['return'] = returnFiber;\n\t return existing;\n\t }\n\t // The existing first child is not a text node so we need to create one\n\t // and delete the existing ones.\n\t deleteRemainingChildren(returnFiber, currentFirstChild);\n\t var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n\t created['return'] = returnFiber;\n\t return created;\n\t }\n\t\n\t function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n\t var key = element.key;\n\t var child = currentFirstChild;\n\t while (child !== null) {\n\t // TODO: If key === null and child.key === null, then this only applies to\n\t // the first item in the list.\n\t if (child.key === key) {\n\t if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n\t deleteRemainingChildren(returnFiber, child.sibling);\n\t var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n\t existing.ref = coerceRef(child, element);\n\t existing['return'] = returnFiber;\n\t {\n\t existing._debugSource = element._source;\n\t existing._debugOwner = element._owner;\n\t }\n\t return existing;\n\t } else {\n\t deleteRemainingChildren(returnFiber, child);\n\t break;\n\t }\n\t } else {\n\t deleteChild(returnFiber, child);\n\t }\n\t child = child.sibling;\n\t }\n\t\n\t if (element.type === REACT_FRAGMENT_TYPE) {\n\t var created = createFiberFromFragment(element.props.children, returnFiber.internalContextTag, expirationTime, element.key);\n\t created['return'] = returnFiber;\n\t return created;\n\t } else {\n\t var _created7 = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n\t _created7.ref = coerceRef(currentFirstChild, element);\n\t _created7['return'] = returnFiber;\n\t return _created7;\n\t }\n\t }\n\t\n\t function reconcileSingleCall(returnFiber, currentFirstChild, call, expirationTime) {\n\t var key = call.key;\n\t var child = currentFirstChild;\n\t while (child !== null) {\n\t // TODO: If key === null and child.key === null, then this only applies to\n\t // the first item in the list.\n\t if (child.key === key) {\n\t if (child.tag === CallComponent) {\n\t deleteRemainingChildren(returnFiber, child.sibling);\n\t var existing = useFiber(child, call, expirationTime);\n\t existing['return'] = returnFiber;\n\t return existing;\n\t } else {\n\t deleteRemainingChildren(returnFiber, child);\n\t break;\n\t }\n\t } else {\n\t deleteChild(returnFiber, child);\n\t }\n\t child = child.sibling;\n\t }\n\t\n\t var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n\t created['return'] = returnFiber;\n\t return created;\n\t }\n\t\n\t function reconcileSingleReturn(returnFiber, currentFirstChild, returnNode, expirationTime) {\n\t // There's no need to check for keys on yields since they're stateless.\n\t var child = currentFirstChild;\n\t if (child !== null) {\n\t if (child.tag === ReturnComponent) {\n\t deleteRemainingChildren(returnFiber, child.sibling);\n\t var existing = useFiber(child, null, expirationTime);\n\t existing.type = returnNode.value;\n\t existing['return'] = returnFiber;\n\t return existing;\n\t } else {\n\t deleteRemainingChildren(returnFiber, child);\n\t }\n\t }\n\t\n\t var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n\t created.type = returnNode.value;\n\t created['return'] = returnFiber;\n\t return created;\n\t }\n\t\n\t function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n\t var key = portal.key;\n\t var child = currentFirstChild;\n\t while (child !== null) {\n\t // TODO: If key === null and child.key === null, then this only applies to\n\t // the first item in the list.\n\t if (child.key === key) {\n\t if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n\t deleteRemainingChildren(returnFiber, child.sibling);\n\t var existing = useFiber(child, portal.children || [], expirationTime);\n\t existing['return'] = returnFiber;\n\t return existing;\n\t } else {\n\t deleteRemainingChildren(returnFiber, child);\n\t break;\n\t }\n\t } else {\n\t deleteChild(returnFiber, child);\n\t }\n\t child = child.sibling;\n\t }\n\t\n\t var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n\t created['return'] = returnFiber;\n\t return created;\n\t }\n\t\n\t // This API will tag the children with the side-effect of the reconciliation\n\t // itself. They will be added to the side-effect list as we pass through the\n\t // children and the parent.\n\t function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n\t // This function is not recursive.\n\t // If the top level item is an array, we treat it as a set of children,\n\t // not as a fragment. Nested arrays on the other hand will be treated as\n\t // fragment nodes. Recursion happens at the normal flow.\n\t\n\t // Handle top level unkeyed fragments as if they were arrays.\n\t // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n\t // We treat the ambiguous cases above the same.\n\t if (typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null) {\n\t newChild = newChild.props.children;\n\t }\n\t\n\t // Handle object types\n\t var isObject = typeof newChild === 'object' && newChild !== null;\n\t\n\t if (isObject) {\n\t switch (newChild.$$typeof) {\n\t case REACT_ELEMENT_TYPE:\n\t return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\t\n\t case REACT_CALL_TYPE:\n\t return placeSingleChild(reconcileSingleCall(returnFiber, currentFirstChild, newChild, expirationTime));\n\t case REACT_RETURN_TYPE:\n\t return placeSingleChild(reconcileSingleReturn(returnFiber, currentFirstChild, newChild, expirationTime));\n\t case REACT_PORTAL_TYPE:\n\t return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n\t }\n\t }\n\t\n\t if (typeof newChild === 'string' || typeof newChild === 'number') {\n\t return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n\t }\n\t\n\t if (isArray$1(newChild)) {\n\t return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n\t }\n\t\n\t if (getIteratorFn(newChild)) {\n\t return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n\t }\n\t\n\t if (isObject) {\n\t throwOnInvalidObjectType(returnFiber, newChild);\n\t }\n\t\n\t {\n\t if (typeof newChild === 'function') {\n\t warnOnFunctionType();\n\t }\n\t }\n\t if (typeof newChild === 'undefined') {\n\t // If the new child is undefined, and the return fiber is a composite\n\t // component, throw an error. If Fiber return types are disabled,\n\t // we already threw above.\n\t switch (returnFiber.tag) {\n\t case ClassComponent:\n\t {\n\t {\n\t var instance = returnFiber.stateNode;\n\t if (instance.render._isMockFunction) {\n\t // We allow auto-mocks to proceed as if they're returning null.\n\t break;\n\t }\n\t }\n\t }\n\t // Intentionally fall through to the next case, which handles both\n\t // functions and classes\n\t // eslint-disable-next-lined no-fallthrough\n\t case FunctionalComponent:\n\t {\n\t var Component = returnFiber.type;\n\t invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n\t }\n\t }\n\t }\n\t\n\t // Remaining cases are all treated as empty.\n\t return deleteRemainingChildren(returnFiber, currentFirstChild);\n\t }\n\t\n\t return reconcileChildFibers;\n\t}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n }\n else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n }\n else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current = newFiber.alternate;\n if (current !== null) {\n var oldIndex = current.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n else {\n // This item can stay in place.\n return oldIndex;\n }\n }\n else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n else {\n // Update\n var existing = useFiber(current, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null && current.type === element.type) {\n // Move based on index\n var existing = useFiber(current, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created['return'] = returnFiber;\n return created;\n }\n }\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n else {\n // Update\n var existing = useFiber(current, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created['return'] = returnFiber;\n return created;\n }\n else {\n // Update\n var existing = useFiber(current, fragment, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created['return'] = returnFiber;\n return _created;\n }\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n _created2['return'] = returnFiber;\n return _created2;\n }\n }\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n _created3['return'] = returnFiber;\n return _created3;\n }\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n }\n else {\n return null;\n }\n }\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n }\n else {\n return null;\n }\n }\n }\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$2());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n }\n else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n }\n else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n }\n else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n }\n else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n return resultingFirstChild;\n }\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n {\n // Warn about using Maps as children\n if (typeof newChildrenIterable.entries === 'function') {\n var possibleMap = newChildrenIterable;\n if (possibleMap.entries === iteratorFn) {\n !didWarnAboutMaps ? warning(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$2()) : void 0;\n didWarnAboutMaps = true;\n }\n }\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n }\n else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n }\n else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n }\n else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n }\n else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n return resultingFirstChild;\n }\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n }\n else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created['return'] = returnFiber;\n return created;\n }\n else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4['return'] = returnFiber;\n return _created4;\n }\n }\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n }\n else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n if (typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null) {\n newChild = newChild.props.children;\n }\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined') {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionalComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element)) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error(\"An iterable object provided no iterator.\");\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n\n break;\n }\n\n case Block: // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element)) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n {\n {\n throw Error((Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element)) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error(\"An iterable object provided no iterator.\");\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n\n break;\n }\n\n case Block: // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element)) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n {\n {\n throw Error((Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element)) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error(\"An iterable object provided no iterator.\");\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n\n break;\n }\n\n case Block: // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element)) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n {\n {\n throw Error((Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element)) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error(\"An iterable object provided no iterator.\");\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n\n break;\n }\n\n case Block: // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element)) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n {\n {\n throw Error((Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element)) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error(\"An iterable object provided no iterator.\");\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n\n break;\n }\n\n case Block: // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element)) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n {\n {\n throw Error((Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element)) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error(\"An iterable object provided no iterator.\");\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n\n break;\n }\n\n case Block: // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element)) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n {\n {\n throw Error((Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current$$1 = newFiber.alternate;\n\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && current$$1.elementType === element.type) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (!_newFiber) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.elementType === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current$$1 = newFiber.alternate;\n\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && current$$1.elementType === element.type) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (!_newFiber) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.elementType === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current$$1 = newFiber.alternate;\n\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && current$$1.elementType === element.type) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (!_newFiber) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.elementType === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current = newFiber.alternate;\n if (current !== null) {\n var oldIndex = current.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n return newFiber;\n }\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element)) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n }\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n _created2.return = returnFiber;\n return _created2;\n }\n }\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n _created3.return = returnFiber;\n return _created3;\n }\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n return null;\n }\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n return null;\n }\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n }\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n if (_newFiber === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n return resultingFirstChild;\n }\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n didWarnAboutGenerators = true;\n }\n // Warn about using Maps as children\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n didWarnAboutMaps = true;\n }\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n var newChildren = iteratorFn.call(newChildrenIterable);\n if (!(newChildren != null)) {\n {\n throw Error(\"An iterable object provided no iterator.\");\n }\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; (newIdx++, step = newChildren.next())) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; (newIdx++, step = newChildren.next())) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; (newIdx++, step = newChildren.next())) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n return resultingFirstChild;\n }\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n break;\n }\n case Block:\n default:\n {\n if (child.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element)) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var _existing3 = useFiber(child, element.props);\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n return _existing3;\n }\n break;\n }\n }\n // Didn't match.\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n }\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n }\n }\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error((getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");\n }\n }\n }\n }\n }\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current$$1 = newFiber.alternate;\n\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && (current$$1.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current$$1, element))) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n (function () {\n if (!(typeof iteratorFn === 'function')) {\n {\n throw ReactError(Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\"));\n }\n }\n })();\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n (function () {\n if (!(newChildren != null)) {\n {\n throw ReactError(Error(\"An iterable object provided no iterator.\"));\n }\n }\n })();\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element)) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n (function () {\n {\n {\n throw ReactError(Error((Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\"));\n }\n }\n })();\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error( (getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error( (getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error( (getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error( (getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error( (getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error( (getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error( (getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error( (getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error( (getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error( (getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error( (getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error( (getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error( (getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error( (getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error( (getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error( (getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current = newFiber.alternate;\n if (current !== null) {\n var oldIndex = current.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null && current.type === element.type) {\n // Move based on index\n var existing = useFiber(current, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$7());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // Warn about using Maps as children\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$7()) : void 0;\n didWarnAboutMaps = true;\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionalComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current = newFiber.alternate;\n if (current !== null) {\n var oldIndex = current.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null && current.type === element.type) {\n // Move based on index\n var existing = useFiber(current, element.props, expirationTime);\n existing.ref = coerceRef(current, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n created.ref = coerceRef(current, element);\n created['return'] = returnFiber;\n return created;\n }\n }\n\n function updateCall(returnFiber, current, call, expirationTime) {\n // TODO: Should this also compare handler to determine whether to reuse?\n if (current === null || current.tag !== CallComponent) {\n // Insert\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateReturn(returnFiber, current, returnNode, expirationTime) {\n if (current === null || current.tag !== ReturnComponent) {\n // Insert\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.internalContextTag, expirationTime, key);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n var _created = createFiberFromFragment(newChild.props.children, returnFiber.internalContextTag, expirationTime, newChild.key);\n _created['return'] = returnFiber;\n return _created;\n } else {\n var _created2 = createFiberFromElement(newChild, returnFiber.internalContextTag, expirationTime);\n _created2.ref = coerceRef(null, newChild);\n _created2['return'] = returnFiber;\n return _created2;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n var _created3 = createFiberFromCall(newChild, returnFiber.internalContextTag, expirationTime);\n _created3['return'] = returnFiber;\n return _created3;\n }\n\n case REACT_RETURN_TYPE:\n {\n var _created4 = createFiberFromReturn(newChild, returnFiber.internalContextTag, expirationTime);\n _created4.type = newChild.value;\n _created4['return'] = returnFiber;\n return _created4;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created5 = createFiberFromPortal(newChild, returnFiber.internalContextTag, expirationTime);\n _created5['return'] = returnFiber;\n return _created5;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created6 = createFiberFromFragment(newChild, returnFiber.internalContextTag, expirationTime, null);\n _created6['return'] = returnFiber;\n return _created6;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n if (newChild.key === key) {\n return updateCall(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a\n // yield.\n if (key === null) {\n return updateReturn(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_CALL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updateCall(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys, so we neither have to check the old nor\n // new node for the key. If both are returns, they match.\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateReturn(returnFiber, _matchedFiber3, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber4 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber4, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber5 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber5, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // Warn about using Maps as children\n if (typeof newChildrenIterable.entries === 'function') {\n var possibleMap = newChildrenIterable;\n if (possibleMap.entries === iteratorFn) {\n warning(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$1());\n didWarnAboutMaps = true;\n }\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(child, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.internalContextTag, expirationTime, element.key);\n created['return'] = returnFiber;\n return created;\n } else {\n var _created7 = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n _created7.ref = coerceRef(currentFirstChild, element);\n _created7['return'] = returnFiber;\n return _created7;\n }\n }\n\n function reconcileSingleCall(returnFiber, currentFirstChild, call, expirationTime) {\n var key = call.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === CallComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleReturn(returnFiber, currentFirstChild, returnNode, expirationTime) {\n // There's no need to check for keys on yields since they're stateless.\n var child = currentFirstChild;\n if (child !== null) {\n if (child.tag === ReturnComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n }\n }\n\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n if (typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_CALL_TYPE:\n return placeSingleChild(reconcileSingleCall(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_RETURN_TYPE:\n return placeSingleChild(reconcileSingleReturn(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined') {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionalComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current = newFiber.alternate;\n if (current !== null) {\n var oldIndex = current.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null && current.type === element.type) {\n // Move based on index\n var existing = useFiber(current, element.props, expirationTime);\n existing.ref = coerceRef(current, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n created.ref = coerceRef(current, element);\n created['return'] = returnFiber;\n return created;\n }\n }\n\n function updateCall(returnFiber, current, call, expirationTime) {\n // TODO: Should this also compare handler to determine whether to reuse?\n if (current === null || current.tag !== CallComponent) {\n // Insert\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateReturn(returnFiber, current, returnNode, expirationTime) {\n if (current === null || current.tag !== ReturnComponent) {\n // Insert\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.internalContextTag, expirationTime, key);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n var _created = createFiberFromFragment(newChild.props.children, returnFiber.internalContextTag, expirationTime, newChild.key);\n _created['return'] = returnFiber;\n return _created;\n } else {\n var _created2 = createFiberFromElement(newChild, returnFiber.internalContextTag, expirationTime);\n _created2.ref = coerceRef(null, newChild);\n _created2['return'] = returnFiber;\n return _created2;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n var _created3 = createFiberFromCall(newChild, returnFiber.internalContextTag, expirationTime);\n _created3['return'] = returnFiber;\n return _created3;\n }\n\n case REACT_RETURN_TYPE:\n {\n var _created4 = createFiberFromReturn(newChild, returnFiber.internalContextTag, expirationTime);\n _created4.type = newChild.value;\n _created4['return'] = returnFiber;\n return _created4;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created5 = createFiberFromPortal(newChild, returnFiber.internalContextTag, expirationTime);\n _created5['return'] = returnFiber;\n return _created5;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created6 = createFiberFromFragment(newChild, returnFiber.internalContextTag, expirationTime, null);\n _created6['return'] = returnFiber;\n return _created6;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n if (newChild.key === key) {\n return updateCall(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a\n // yield.\n if (key === null) {\n return updateReturn(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_CALL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updateCall(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys, so we neither have to check the old nor\n // new node for the key. If both are returns, they match.\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateReturn(returnFiber, _matchedFiber3, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber4 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber4, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber5 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber5, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // Warn about using Maps as children\n if (typeof newChildrenIterable.entries === 'function') {\n var possibleMap = newChildrenIterable;\n if (possibleMap.entries === iteratorFn) {\n warning(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$1());\n didWarnAboutMaps = true;\n }\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(child, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.internalContextTag, expirationTime, element.key);\n created['return'] = returnFiber;\n return created;\n } else {\n var _created7 = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n _created7.ref = coerceRef(currentFirstChild, element);\n _created7['return'] = returnFiber;\n return _created7;\n }\n }\n\n function reconcileSingleCall(returnFiber, currentFirstChild, call, expirationTime) {\n var key = call.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === CallComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleReturn(returnFiber, currentFirstChild, returnNode, expirationTime) {\n // There's no need to check for keys on yields since they're stateless.\n var child = currentFirstChild;\n if (child !== null) {\n if (child.tag === ReturnComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n }\n }\n\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n if (typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_CALL_TYPE:\n return placeSingleChild(reconcileSingleCall(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_RETURN_TYPE:\n return placeSingleChild(reconcileSingleReturn(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined') {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionalComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n hotCompareElements(current.elementType, element.type, hotUpdateChild(current), current.type) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n hotCompareElements(child.elementType, element.type, hotUpdateChild(child), child.type) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current$$1 = newFiber.alternate;\n\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && (current$$1.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current$$1, element)))) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n\n default:\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error(\"An iterable object provided no iterator.\");\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element))) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error((Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current$$1 = newFiber.alternate;\n\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && (current$$1.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current$$1, element)))) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n\n default:\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error(\"An iterable object provided no iterator.\");\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element))) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error((Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current$$1 = newFiber.alternate;\n\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && (current$$1.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current$$1, element)))) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n\n default:\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error(\"An iterable object provided no iterator.\");\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element))) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error((Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current$$1 = newFiber.alternate;\n\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && (current$$1.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current$$1, element)))) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n\n default:\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n (function () {\n if (!(typeof iteratorFn === 'function')) {\n {\n throw ReactError(Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\"));\n }\n }\n })();\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n (function () {\n if (!(newChildren != null)) {\n {\n throw ReactError(Error(\"An iterable object provided no iterator.\"));\n }\n }\n })();\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element))) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n (function () {\n {\n {\n throw ReactError(Error((Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\"));\n }\n }\n })();\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current$$1 = newFiber.alternate;\n\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && (current$$1.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current$$1, element)))) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n\n default:\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error(\"An iterable object provided no iterator.\");\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element))) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error((Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current$$1 = newFiber.alternate;\n\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && (current$$1.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current$$1, element)))) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n\n default:\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n (function () {\n if (!(typeof iteratorFn === 'function')) {\n {\n throw ReactError(Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\"));\n }\n }\n })();\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n (function () {\n if (!(newChildren != null)) {\n {\n throw ReactError(Error(\"An iterable object provided no iterator.\"));\n }\n }\n })();\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element))) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n (function () {\n {\n {\n throw ReactError(Error((Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\"));\n }\n }\n })();\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current = newFiber.alternate;\n if (current !== null) {\n var oldIndex = current.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null && current.type === element.type) {\n // Move based on index\n var existing = useFiber(current, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created['return'] = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created['return'] = returnFiber;\n return _created;\n }\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n _created2['return'] = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n _created3['return'] = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // Warn about using Maps as children\n if (typeof newChildrenIterable.entries === 'function') {\n var possibleMap = newChildrenIterable;\n if (possibleMap.entries === iteratorFn) {\n warning(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$1());\n didWarnAboutMaps = true;\n }\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created['return'] = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4['return'] = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n if (typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined') {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionalComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current = newFiber.alternate;\n if (current !== null) {\n var oldIndex = current.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null && current.type === element.type) {\n // Move based on index\n var existing = useFiber(current, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created['return'] = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created['return'] = returnFiber;\n return _created;\n }\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n _created2['return'] = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n _created3['return'] = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$2());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // Warn about using Maps as children\n if (typeof newChildrenIterable.entries === 'function') {\n var possibleMap = newChildrenIterable;\n if (possibleMap.entries === iteratorFn) {\n !didWarnAboutMaps ? warning(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$2()) : void 0;\n didWarnAboutMaps = true;\n }\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created['return'] = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4['return'] = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n if (typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined') {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionalComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current$$1 = newFiber.alternate;\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && current$$1.elementType === element.type) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' &&\n // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n }\n\n // Warn about using Maps as children\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.elementType === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current = newFiber.alternate;\n if (current !== null) {\n var oldIndex = current.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null && current.type === element.type) {\n // Move based on index\n var existing = useFiber(current, element.props, expirationTime);\n existing.ref = coerceRef(current, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n created.ref = coerceRef(current, element);\n created['return'] = returnFiber;\n return created;\n }\n }\n\n function updateCall(returnFiber, current, call, expirationTime) {\n // TODO: Should this also compare handler to determine whether to reuse?\n if (current === null || current.tag !== CallComponent) {\n // Insert\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateReturn(returnFiber, current, returnNode, expirationTime) {\n if (current === null || current.tag !== ReturnComponent) {\n // Insert\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.internalContextTag, expirationTime, key);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n var _created = createFiberFromFragment(newChild.props.children, returnFiber.internalContextTag, expirationTime, newChild.key);\n _created['return'] = returnFiber;\n return _created;\n } else {\n var _created2 = createFiberFromElement(newChild, returnFiber.internalContextTag, expirationTime);\n _created2.ref = coerceRef(null, newChild);\n _created2['return'] = returnFiber;\n return _created2;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n var _created3 = createFiberFromCall(newChild, returnFiber.internalContextTag, expirationTime);\n _created3['return'] = returnFiber;\n return _created3;\n }\n\n case REACT_RETURN_TYPE:\n {\n var _created4 = createFiberFromReturn(newChild, returnFiber.internalContextTag, expirationTime);\n _created4.type = newChild.value;\n _created4['return'] = returnFiber;\n return _created4;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created5 = createFiberFromPortal(newChild, returnFiber.internalContextTag, expirationTime);\n _created5['return'] = returnFiber;\n return _created5;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created6 = createFiberFromFragment(newChild, returnFiber.internalContextTag, expirationTime, null);\n _created6['return'] = returnFiber;\n return _created6;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n if (newChild.key === key) {\n return updateCall(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a\n // yield.\n if (key === null) {\n return updateReturn(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_CALL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updateCall(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys, so we neither have to check the old nor\n // new node for the key. If both are returns, they match.\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateReturn(returnFiber, _matchedFiber3, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber4 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber4, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber5 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber5, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // Warn about using Maps as children\n if (typeof newChildrenIterable.entries === 'function') {\n var possibleMap = newChildrenIterable;\n if (possibleMap.entries === iteratorFn) {\n warning(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$1());\n didWarnAboutMaps = true;\n }\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(child, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.internalContextTag, expirationTime, element.key);\n created['return'] = returnFiber;\n return created;\n } else {\n var _created7 = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n _created7.ref = coerceRef(currentFirstChild, element);\n _created7['return'] = returnFiber;\n return _created7;\n }\n }\n\n function reconcileSingleCall(returnFiber, currentFirstChild, call, expirationTime) {\n var key = call.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === CallComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleReturn(returnFiber, currentFirstChild, returnNode, expirationTime) {\n // There's no need to check for keys on yields since they're stateless.\n var child = currentFirstChild;\n if (child !== null) {\n if (child.tag === ReturnComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n }\n }\n\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n if (typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_CALL_TYPE:\n return placeSingleChild(reconcileSingleCall(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_RETURN_TYPE:\n return placeSingleChild(reconcileSingleReturn(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined') {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionalComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current$$1 = newFiber.alternate;\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && current$$1.type === element.type) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' &&\n // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n }\n\n // Warn about using Maps as children\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n case ClassComponentLazy:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionalComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current = newFiber.alternate;\n if (current !== null) {\n var oldIndex = current.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null && current.type === element.type) {\n // Move based on index\n var existing = useFiber(current, element.props, expirationTime);\n existing.ref = coerceRef(current, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n created.ref = coerceRef(current, element);\n created['return'] = returnFiber;\n return created;\n }\n }\n\n function updateCall(returnFiber, current, call, expirationTime) {\n // TODO: Should this also compare handler to determine whether to reuse?\n if (current === null || current.tag !== CallComponent) {\n // Insert\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateReturn(returnFiber, current, returnNode, expirationTime) {\n if (current === null || current.tag !== ReturnComponent) {\n // Insert\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.internalContextTag, expirationTime, key);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n var _created = createFiberFromFragment(newChild.props.children, returnFiber.internalContextTag, expirationTime, newChild.key);\n _created['return'] = returnFiber;\n return _created;\n } else {\n var _created2 = createFiberFromElement(newChild, returnFiber.internalContextTag, expirationTime);\n _created2.ref = coerceRef(null, newChild);\n _created2['return'] = returnFiber;\n return _created2;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n var _created3 = createFiberFromCall(newChild, returnFiber.internalContextTag, expirationTime);\n _created3['return'] = returnFiber;\n return _created3;\n }\n\n case REACT_RETURN_TYPE:\n {\n var _created4 = createFiberFromReturn(newChild, returnFiber.internalContextTag, expirationTime);\n _created4.type = newChild.value;\n _created4['return'] = returnFiber;\n return _created4;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created5 = createFiberFromPortal(newChild, returnFiber.internalContextTag, expirationTime);\n _created5['return'] = returnFiber;\n return _created5;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created6 = createFiberFromFragment(newChild, returnFiber.internalContextTag, expirationTime, null);\n _created6['return'] = returnFiber;\n return _created6;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n if (newChild.key === key) {\n return updateCall(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a\n // yield.\n if (key === null) {\n return updateReturn(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_CALL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updateCall(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys, so we neither have to check the old nor\n // new node for the key. If both are returns, they match.\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateReturn(returnFiber, _matchedFiber3, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber4 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber4, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber5 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber5, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // Warn about using Maps as children\n if (typeof newChildrenIterable.entries === 'function') {\n var possibleMap = newChildrenIterable;\n if (possibleMap.entries === iteratorFn) {\n warning(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$1());\n didWarnAboutMaps = true;\n }\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(child, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.internalContextTag, expirationTime, element.key);\n created['return'] = returnFiber;\n return created;\n } else {\n var _created7 = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n _created7.ref = coerceRef(currentFirstChild, element);\n _created7['return'] = returnFiber;\n return _created7;\n }\n }\n\n function reconcileSingleCall(returnFiber, currentFirstChild, call, expirationTime) {\n var key = call.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === CallComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleReturn(returnFiber, currentFirstChild, returnNode, expirationTime) {\n // There's no need to check for keys on yields since they're stateless.\n var child = currentFirstChild;\n if (child !== null) {\n if (child.tag === ReturnComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n }\n }\n\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n if (typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_CALL_TYPE:\n return placeSingleChild(reconcileSingleCall(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_RETURN_TYPE:\n return placeSingleChild(reconcileSingleReturn(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined') {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionalComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current$$1 = newFiber.alternate;\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && current$$1.elementType === element.type) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' &&\n // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n }\n\n // Warn about using Maps as children\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.elementType === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current = newFiber.alternate;\n if (current !== null) {\n var oldIndex = current.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null && current.type === element.type) {\n // Move based on index\n var existing = useFiber(current, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$7());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // Warn about using Maps as children\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$7()) : void 0;\n didWarnAboutMaps = true;\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n if (typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined') {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionalComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current = newFiber.alternate;\n if (current !== null) {\n var oldIndex = current.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null && current.type === element.type) {\n // Move based on index\n var existing = useFiber(current, element.props, expirationTime);\n existing.ref = coerceRef(current, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n created.ref = coerceRef(current, element);\n created['return'] = returnFiber;\n return created;\n }\n }\n\n function updateCall(returnFiber, current, call, expirationTime) {\n // TODO: Should this also compare handler to determine whether to reuse?\n if (current === null || current.tag !== CallComponent) {\n // Insert\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateReturn(returnFiber, current, returnNode, expirationTime) {\n if (current === null || current.tag !== ReturnComponent) {\n // Insert\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.internalContextTag, expirationTime, key);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n var _created = createFiberFromFragment(newChild.props.children, returnFiber.internalContextTag, expirationTime, newChild.key);\n _created['return'] = returnFiber;\n return _created;\n } else {\n var _created2 = createFiberFromElement(newChild, returnFiber.internalContextTag, expirationTime);\n _created2.ref = coerceRef(null, newChild);\n _created2['return'] = returnFiber;\n return _created2;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n var _created3 = createFiberFromCall(newChild, returnFiber.internalContextTag, expirationTime);\n _created3['return'] = returnFiber;\n return _created3;\n }\n\n case REACT_RETURN_TYPE:\n {\n var _created4 = createFiberFromReturn(newChild, returnFiber.internalContextTag, expirationTime);\n _created4.type = newChild.value;\n _created4['return'] = returnFiber;\n return _created4;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created5 = createFiberFromPortal(newChild, returnFiber.internalContextTag, expirationTime);\n _created5['return'] = returnFiber;\n return _created5;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created6 = createFiberFromFragment(newChild, returnFiber.internalContextTag, expirationTime, null);\n _created6['return'] = returnFiber;\n return _created6;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n if (newChild.key === key) {\n return updateCall(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a\n // yield.\n if (key === null) {\n return updateReturn(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_CALL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updateCall(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys, so we neither have to check the old nor\n // new node for the key. If both are returns, they match.\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateReturn(returnFiber, _matchedFiber3, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber4 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber4, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber5 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber5, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // Warn about using Maps as children\n if (typeof newChildrenIterable.entries === 'function') {\n var possibleMap = newChildrenIterable;\n if (possibleMap.entries === iteratorFn) {\n warning(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$1());\n didWarnAboutMaps = true;\n }\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(child, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.internalContextTag, expirationTime, element.key);\n created['return'] = returnFiber;\n return created;\n } else {\n var _created7 = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n _created7.ref = coerceRef(currentFirstChild, element);\n _created7['return'] = returnFiber;\n return _created7;\n }\n }\n\n function reconcileSingleCall(returnFiber, currentFirstChild, call, expirationTime) {\n var key = call.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === CallComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleReturn(returnFiber, currentFirstChild, returnNode, expirationTime) {\n // There's no need to check for keys on yields since they're stateless.\n var child = currentFirstChild;\n if (child !== null) {\n if (child.tag === ReturnComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n }\n }\n\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n if (typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_CALL_TYPE:\n return placeSingleChild(reconcileSingleCall(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_RETURN_TYPE:\n return placeSingleChild(reconcileSingleReturn(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined') {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionalComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current = newFiber.alternate;\n if (current !== null) {\n var oldIndex = current.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null && current.type === element.type) {\n // Move based on index\n var existing = useFiber(current, element.props, expirationTime);\n existing.ref = coerceRef(current, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n created.ref = coerceRef(current, element);\n created['return'] = returnFiber;\n return created;\n }\n }\n\n function updateCall(returnFiber, current, call, expirationTime) {\n // TODO: Should this also compare handler to determine whether to reuse?\n if (current === null || current.tag !== CallComponent) {\n // Insert\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateReturn(returnFiber, current, returnNode, expirationTime) {\n if (current === null || current.tag !== ReturnComponent) {\n // Insert\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.internalContextTag, expirationTime, key);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n var _created = createFiberFromFragment(newChild.props.children, returnFiber.internalContextTag, expirationTime, newChild.key);\n _created['return'] = returnFiber;\n return _created;\n } else {\n var _created2 = createFiberFromElement(newChild, returnFiber.internalContextTag, expirationTime);\n _created2.ref = coerceRef(null, newChild);\n _created2['return'] = returnFiber;\n return _created2;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n var _created3 = createFiberFromCall(newChild, returnFiber.internalContextTag, expirationTime);\n _created3['return'] = returnFiber;\n return _created3;\n }\n\n case REACT_RETURN_TYPE:\n {\n var _created4 = createFiberFromReturn(newChild, returnFiber.internalContextTag, expirationTime);\n _created4.type = newChild.value;\n _created4['return'] = returnFiber;\n return _created4;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created5 = createFiberFromPortal(newChild, returnFiber.internalContextTag, expirationTime);\n _created5['return'] = returnFiber;\n return _created5;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created6 = createFiberFromFragment(newChild, returnFiber.internalContextTag, expirationTime, null);\n _created6['return'] = returnFiber;\n return _created6;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n if (newChild.key === key) {\n return updateCall(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a\n // yield.\n if (key === null) {\n return updateReturn(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_CALL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updateCall(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys, so we neither have to check the old nor\n // new node for the key. If both are returns, they match.\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateReturn(returnFiber, _matchedFiber3, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber4 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber4, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber5 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber5, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // Warn about using Maps as children\n if (typeof newChildrenIterable.entries === 'function') {\n var possibleMap = newChildrenIterable;\n if (possibleMap.entries === iteratorFn) {\n warning(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$1());\n didWarnAboutMaps = true;\n }\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(child, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.internalContextTag, expirationTime, element.key);\n created['return'] = returnFiber;\n return created;\n } else {\n var _created7 = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n _created7.ref = coerceRef(currentFirstChild, element);\n _created7['return'] = returnFiber;\n return _created7;\n }\n }\n\n function reconcileSingleCall(returnFiber, currentFirstChild, call, expirationTime) {\n var key = call.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === CallComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleReturn(returnFiber, currentFirstChild, returnNode, expirationTime) {\n // There's no need to check for keys on yields since they're stateless.\n var child = currentFirstChild;\n if (child !== null) {\n if (child.tag === ReturnComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n }\n }\n\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n if (typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_CALL_TYPE:\n return placeSingleChild(reconcileSingleCall(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_RETURN_TYPE:\n return placeSingleChild(reconcileSingleReturn(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined') {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionalComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current = newFiber.alternate;\n if (current !== null) {\n var oldIndex = current.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null && current.type === element.type) {\n // Move based on index\n var existing = useFiber(current, element.props, expirationTime);\n existing.ref = coerceRef(current, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n created.ref = coerceRef(current, element);\n created['return'] = returnFiber;\n return created;\n }\n }\n\n function updateCall(returnFiber, current, call, expirationTime) {\n // TODO: Should this also compare handler to determine whether to reuse?\n if (current === null || current.tag !== CallComponent) {\n // Insert\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateReturn(returnFiber, current, returnNode, expirationTime) {\n if (current === null || current.tag !== ReturnComponent) {\n // Insert\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.internalContextTag, expirationTime, key);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n var _created = createFiberFromFragment(newChild.props.children, returnFiber.internalContextTag, expirationTime, newChild.key);\n _created['return'] = returnFiber;\n return _created;\n } else {\n var _created2 = createFiberFromElement(newChild, returnFiber.internalContextTag, expirationTime);\n _created2.ref = coerceRef(null, newChild);\n _created2['return'] = returnFiber;\n return _created2;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n var _created3 = createFiberFromCall(newChild, returnFiber.internalContextTag, expirationTime);\n _created3['return'] = returnFiber;\n return _created3;\n }\n\n case REACT_RETURN_TYPE:\n {\n var _created4 = createFiberFromReturn(newChild, returnFiber.internalContextTag, expirationTime);\n _created4.type = newChild.value;\n _created4['return'] = returnFiber;\n return _created4;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created5 = createFiberFromPortal(newChild, returnFiber.internalContextTag, expirationTime);\n _created5['return'] = returnFiber;\n return _created5;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created6 = createFiberFromFragment(newChild, returnFiber.internalContextTag, expirationTime, null);\n _created6['return'] = returnFiber;\n return _created6;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n if (newChild.key === key) {\n return updateCall(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a\n // yield.\n if (key === null) {\n return updateReturn(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_CALL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updateCall(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys, so we neither have to check the old nor\n // new node for the key. If both are returns, they match.\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateReturn(returnFiber, _matchedFiber3, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber4 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber4, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber5 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber5, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // Warn about using Maps as children\n if (typeof newChildrenIterable.entries === 'function') {\n var possibleMap = newChildrenIterable;\n if (possibleMap.entries === iteratorFn) {\n warning(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$1());\n didWarnAboutMaps = true;\n }\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(child, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.internalContextTag, expirationTime, element.key);\n created['return'] = returnFiber;\n return created;\n } else {\n var _created7 = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n _created7.ref = coerceRef(currentFirstChild, element);\n _created7['return'] = returnFiber;\n return _created7;\n }\n }\n\n function reconcileSingleCall(returnFiber, currentFirstChild, call, expirationTime) {\n var key = call.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === CallComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleReturn(returnFiber, currentFirstChild, returnNode, expirationTime) {\n // There's no need to check for keys on yields since they're stateless.\n var child = currentFirstChild;\n if (child !== null) {\n if (child.tag === ReturnComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n }\n }\n\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n if (typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_CALL_TYPE:\n return placeSingleChild(reconcileSingleCall(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_RETURN_TYPE:\n return placeSingleChild(reconcileSingleReturn(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined') {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionalComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current$$1 = newFiber.alternate;\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && current$$1.elementType === element.type) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' &&\n // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n }\n\n // Warn about using Maps as children\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.elementType === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current$$1 = newFiber.alternate;\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && current$$1.elementType === element.type) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' &&\n // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n }\n\n // Warn about using Maps as children\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.elementType === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current$$1 = newFiber.alternate;\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && current$$1.elementType === element.type) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' &&\n // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n }\n\n // Warn about using Maps as children\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.elementType === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current$$1 = newFiber.alternate;\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && current$$1.elementType === element.type) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' &&\n // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n }\n\n // Warn about using Maps as children\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.elementType === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current$$1 = newFiber.alternate;\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && current$$1.type === element.type) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' &&\n // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n }\n\n // Warn about using Maps as children\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n case ClassComponentLazy:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionalComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current = newFiber.alternate;\n if (current !== null) {\n var oldIndex = current.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null && current.type === element.type) {\n // Move based on index\n var existing = useFiber(current, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created['return'] = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created['return'] = returnFiber;\n return _created;\n }\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n _created2['return'] = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n _created3['return'] = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$2());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // Warn about using Maps as children\n if (typeof newChildrenIterable.entries === 'function') {\n var possibleMap = newChildrenIterable;\n if (possibleMap.entries === iteratorFn) {\n !didWarnAboutMaps ? warning(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$2()) : void 0;\n didWarnAboutMaps = true;\n }\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created['return'] = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4['return'] = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n if (typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined') {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionalComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current = newFiber.alternate;\n if (current !== null) {\n var oldIndex = current.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null && current.type === element.type) {\n // Move based on index\n var existing = useFiber(current, element.props, expirationTime);\n existing.ref = coerceRef(current, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n created.ref = coerceRef(current, element);\n created['return'] = returnFiber;\n return created;\n }\n }\n\n function updateCall(returnFiber, current, call, expirationTime) {\n // TODO: Should this also compare handler to determine whether to reuse?\n if (current === null || current.tag !== CallComponent) {\n // Insert\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateReturn(returnFiber, current, returnNode, expirationTime) {\n if (current === null || current.tag !== ReturnComponent) {\n // Insert\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.internalContextTag, expirationTime, key);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n var _created = createFiberFromFragment(newChild.props.children, returnFiber.internalContextTag, expirationTime, newChild.key);\n _created['return'] = returnFiber;\n return _created;\n } else {\n var _created2 = createFiberFromElement(newChild, returnFiber.internalContextTag, expirationTime);\n _created2.ref = coerceRef(null, newChild);\n _created2['return'] = returnFiber;\n return _created2;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n var _created3 = createFiberFromCall(newChild, returnFiber.internalContextTag, expirationTime);\n _created3['return'] = returnFiber;\n return _created3;\n }\n\n case REACT_RETURN_TYPE:\n {\n var _created4 = createFiberFromReturn(newChild, returnFiber.internalContextTag, expirationTime);\n _created4.type = newChild.value;\n _created4['return'] = returnFiber;\n return _created4;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created5 = createFiberFromPortal(newChild, returnFiber.internalContextTag, expirationTime);\n _created5['return'] = returnFiber;\n return _created5;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created6 = createFiberFromFragment(newChild, returnFiber.internalContextTag, expirationTime, null);\n _created6['return'] = returnFiber;\n return _created6;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n if (newChild.key === key) {\n return updateCall(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a\n // yield.\n if (key === null) {\n return updateReturn(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_CALL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updateCall(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys, so we neither have to check the old nor\n // new node for the key. If both are returns, they match.\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateReturn(returnFiber, _matchedFiber3, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber4 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber4, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber5 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber5, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // Warn about using Maps as children\n if (typeof newChildrenIterable.entries === 'function') {\n var possibleMap = newChildrenIterable;\n if (possibleMap.entries === iteratorFn) {\n warning(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$1());\n didWarnAboutMaps = true;\n }\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(child, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.internalContextTag, expirationTime, element.key);\n created['return'] = returnFiber;\n return created;\n } else {\n var _created7 = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n _created7.ref = coerceRef(currentFirstChild, element);\n _created7['return'] = returnFiber;\n return _created7;\n }\n }\n\n function reconcileSingleCall(returnFiber, currentFirstChild, call, expirationTime) {\n var key = call.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === CallComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleReturn(returnFiber, currentFirstChild, returnNode, expirationTime) {\n // There's no need to check for keys on yields since they're stateless.\n var child = currentFirstChild;\n if (child !== null) {\n if (child.tag === ReturnComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n }\n }\n\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n if (typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_CALL_TYPE:\n return placeSingleChild(reconcileSingleCall(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_RETURN_TYPE:\n return placeSingleChild(reconcileSingleReturn(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined') {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionalComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current$$1 = newFiber.alternate;\n if (current$$1 !== null) {\n var oldIndex = current$$1.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current$$1, element, expirationTime) {\n if (current$$1 !== null && current$$1.elementType === element.type) {\n // Move based on index\n var existing = useFiber(current$$1, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current$$1, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current$$1, element);\n created.return = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current$$1, portal, expirationTime) {\n if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {\n if (current$$1 === null || current$$1.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current$$1, fragment, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' &&\n // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;\n didWarnAboutGenerators = true;\n }\n\n // Warn about using Maps as children\n if (newChildrenIterable.entries === iteratorFn) {\n !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;\n didWarnAboutMaps = true;\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing.return = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.elementType === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current = newFiber.alternate;\n if (current !== null) {\n var oldIndex = current.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null && current.type === element.type) {\n // Move based on index\n var existing = useFiber(current, element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, current, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created['return'] = returnFiber;\n return created;\n }\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created['return'] = returnFiber;\n return _created;\n }\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n _created2['return'] = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n _created3['return'] = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$2());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // Warn about using Maps as children\n if (typeof newChildrenIterable.entries === 'function') {\n var possibleMap = newChildrenIterable;\n if (possibleMap.entries === iteratorFn) {\n warning(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$2());\n didWarnAboutMaps = true;\n }\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(returnFiber, child, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created['return'] = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4['return'] = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n if (typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined') {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionalComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}", "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current = newFiber.alternate;\n if (current !== null) {\n var oldIndex = current.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null && current.type === element.type) {\n // Move based on index\n var existing = useFiber(current, element.props, expirationTime);\n existing.ref = coerceRef(current, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n created.ref = coerceRef(current, element);\n created['return'] = returnFiber;\n return created;\n }\n }\n\n function updateCall(returnFiber, current, call, expirationTime) {\n // TODO: Should this also compare handler to determine whether to reuse?\n if (current === null || current.tag !== CallComponent) {\n // Insert\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateReturn(returnFiber, current, returnNode, expirationTime) {\n if (current === null || current.tag !== ReturnComponent) {\n // Insert\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.internalContextTag, expirationTime, key);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n var _created = createFiberFromFragment(newChild.props.children, returnFiber.internalContextTag, expirationTime, newChild.key);\n _created['return'] = returnFiber;\n return _created;\n } else {\n var _created2 = createFiberFromElement(newChild, returnFiber.internalContextTag, expirationTime);\n _created2.ref = coerceRef(null, newChild);\n _created2['return'] = returnFiber;\n return _created2;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n var _created3 = createFiberFromCall(newChild, returnFiber.internalContextTag, expirationTime);\n _created3['return'] = returnFiber;\n return _created3;\n }\n\n case REACT_RETURN_TYPE:\n {\n var _created4 = createFiberFromReturn(newChild, returnFiber.internalContextTag, expirationTime);\n _created4.type = newChild.value;\n _created4['return'] = returnFiber;\n return _created4;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created5 = createFiberFromPortal(newChild, returnFiber.internalContextTag, expirationTime);\n _created5['return'] = returnFiber;\n return _created5;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created6 = createFiberFromFragment(newChild, returnFiber.internalContextTag, expirationTime, null);\n _created6['return'] = returnFiber;\n return _created6;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n if (newChild.key === key) {\n return updateCall(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a\n // yield.\n if (key === null) {\n return updateReturn(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_CALL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updateCall(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys, so we neither have to check the old nor\n // new node for the key. If both are returns, they match.\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateReturn(returnFiber, _matchedFiber3, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber4 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber4, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber5 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber5, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // Warn about using Maps as children\n if (typeof newChildrenIterable.entries === 'function') {\n var possibleMap = newChildrenIterable;\n if (possibleMap.entries === iteratorFn) {\n warning(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$1());\n didWarnAboutMaps = true;\n }\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(child, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.internalContextTag, expirationTime, element.key);\n created['return'] = returnFiber;\n return created;\n } else {\n var _created7 = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n _created7.ref = coerceRef(currentFirstChild, element);\n _created7['return'] = returnFiber;\n return _created7;\n }\n }\n\n function reconcileSingleCall(returnFiber, currentFirstChild, call, expirationTime) {\n var key = call.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === CallComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleReturn(returnFiber, currentFirstChild, returnNode, expirationTime) {\n // There's no need to check for keys on yields since they're stateless.\n var child = currentFirstChild;\n if (child !== null) {\n if (child.tag === ReturnComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n }\n }\n\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n if (typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_CALL_TYPE:\n return placeSingleChild(reconcileSingleCall(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_RETURN_TYPE:\n return placeSingleChild(reconcileSingleReturn(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined') {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionalComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}" ]
[ "0.6270072", "0.6207316", "0.6141961", "0.6140538", "0.614019", "0.614019", "0.614019", "0.6132489", "0.6132489", "0.6132489", "0.6132489", "0.61272436", "0.61272436", "0.61138624", "0.60833305", "0.60557294", "0.60557294", "0.60557294", "0.60557294", "0.60511166", "0.60397935", "0.60385126", "0.60385126", "0.60385126", "0.60385126", "0.60385126", "0.60385126", "0.602915", "0.602915", "0.602915", "0.60196716", "0.60033804", "0.5994971", "0.5994971", "0.5994971", "0.5994971", "0.5994971", "0.5994971", "0.5994971", "0.5994971", "0.5994971", "0.5994971", "0.5994971", "0.5994971", "0.5994971", "0.5994971", "0.5994971", "0.5994971", "0.59888756", "0.59888756", "0.59888756", "0.5983923", "0.5983923", "0.5983923", "0.5983923", "0.5983923", "0.5983923", "0.5983923", "0.5983923", "0.5983923", "0.5983923", "0.5983923", "0.5983923", "0.5983923", "0.5983923", "0.5983923", "0.5983923", "0.5983923", "0.5983923", "0.5983923", "0.5983923", "0.5983923", "0.5983923", "0.5983923", "0.59263396", "0.59263396", "0.59263396", "0.59263396", "0.59263396", "0.59263396", "0.5919329", "0.5919329", "0.5919329", "0.5919329", "0.5919329", "0.5919329", "0.5919329", "0.5919329", "0.5919329", "0.5919329", "0.5919329", "0.5919329", "0.5919329", "0.5919329", "0.5919329", "0.5919329", "0.5919329", "0.5919329", "0.5919329", "0.5919329", "0.5919329" ]
0.0
-1
The first pass splits the children fibers into two sets. A head and tail. We first render the head. If anything is in fallback state, we do another pass through beginWork to rerender all children (including the tail) with the force suspend context. If the first render didn't have anything in in fallback state. Then we render each row in the tail onebyone. That happens in the completeWork phase without going back to beginWork.
function updateSuspenseListComponent(current, workInProgress, renderExpirationTime) { var nextProps = workInProgress.pendingProps; var revealOrder = nextProps.revealOrder; var tailMode = nextProps.tail; var newChildren = nextProps.children; validateRevealOrder(revealOrder); validateTailOptions(tailMode, revealOrder); validateSuspenseListChildren(newChildren, revealOrder); reconcileChildren(current, workInProgress, newChildren, renderExpirationTime); var suspenseContext = suspenseStackCursor.current; var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback); if (shouldForceFallback) { suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback); workInProgress.effectTag |= DidCapture; } else { var didSuspendBefore = current !== null && (current.effectTag & DidCapture) !== NoEffect; if (didSuspendBefore) { // If we previously forced a fallback, we need to schedule work // on any nested boundaries to let them know to try to render // again. This is the same as context updating. propagateSuspenseContextChange(workInProgress, workInProgress.child, renderExpirationTime); } suspenseContext = setDefaultShallowSuspenseContext(suspenseContext); } pushSuspenseContext(workInProgress, suspenseContext); if ((workInProgress.mode & BlockingMode) === NoMode) { // Outside of blocking mode, SuspenseList doesn't work so we just // use make it a noop by treating it as the default revealOrder. workInProgress.memoizedState = null; } else { switch (revealOrder) { case 'forwards': { var lastContentRow = findLastContentRow(workInProgress.child); var tail; if (lastContentRow === null) { // The whole list is part of the tail. // TODO: We could fast path by just rendering the tail now. tail = workInProgress.child; workInProgress.child = null; } else { // Disconnect the tail rows after the content row. // We're going to render them separately later. tail = lastContentRow.sibling; lastContentRow.sibling = null; } initSuspenseListRenderState(workInProgress, false, // isBackwards tail, lastContentRow, tailMode, workInProgress.lastEffect); break; } case 'backwards': { // We're going to find the first row that has existing content. // At the same time we're going to reverse the list of everything // we pass in the meantime. That's going to be our tail in reverse // order. var _tail = null; var row = workInProgress.child; workInProgress.child = null; while (row !== null) { var currentRow = row.alternate; // New rows can't be content rows. if (currentRow !== null && findFirstSuspended(currentRow) === null) { // This is the beginning of the main content. workInProgress.child = row; break; } var nextRow = row.sibling; row.sibling = _tail; _tail = row; row = nextRow; } // TODO: If workInProgress.child is null, we can continue on the tail immediately. initSuspenseListRenderState(workInProgress, true, // isBackwards _tail, null, // last tailMode, workInProgress.lastEffect); break; } case 'together': { initSuspenseListRenderState(workInProgress, false, // isBackwards null, // tail null, // last undefined, workInProgress.lastEffect); break; } default: { // The default reveal order is the same as not having // a boundary. workInProgress.memoizedState = null; } } } return workInProgress.child; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateSuspenseListComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.flags |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // In legacy mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n }", "function updateSuspenseListComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.flags |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // In legacy mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n }", "function updateSuspenseListComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.flags |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // In legacy mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n }", "function updateSuspenseListComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.flags |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // In legacy mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n }", "function updateSuspenseListComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.flags |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);\n }\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n pushSuspenseContext(workInProgress, suspenseContext);\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // In legacy mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n while (row !== null) {\n var currentRow = row.alternate;\n // New rows can't be content rows.\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n }\n // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n return workInProgress.child;\n }", "function updateSuspenseListComponent(current$$1, workInProgress, renderExpirationTime) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.effectTag |= DidCapture;\n } else {\n var didSuspendBefore = current$$1 !== null && (current$$1.effectTag & DidCapture) !== NoEffect;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderExpirationTime);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BatchedMode) === NoMode) {\n // Outside of batched mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n }", "function updateSuspenseListComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.flags |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // In legacy mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}", "function updateSuspenseListComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.flags |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // In legacy mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}", "function updateSuspenseListComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.flags |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // In legacy mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}", "function updateSuspenseListComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.flags |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // In legacy mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}", "function updateSuspenseListComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.flags |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // In legacy mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}", "function updateSuspenseListComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.flags |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // In legacy mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}", "function updateSuspenseListComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.flags |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // In legacy mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}", "function updateSuspenseListComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.flags |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // In legacy mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}", "function updateSuspenseListComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.flags |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // In legacy mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}", "function updateSuspenseListComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.flags |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // In legacy mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}", "function updateSuspenseListComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.flags |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // In legacy mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}", "function updateSuspenseListComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.flags |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // In legacy mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}", "function updateSuspenseListComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.flags |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // In legacy mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}", "function updateSuspenseListComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.flags |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // In legacy mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}", "function updateSuspenseListComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.flags |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // In legacy mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}", "function updateSuspenseListComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.flags |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // In legacy mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}", "function updateSuspenseListComponent(current$$1, workInProgress, renderExpirationTime) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.effectTag |= DidCapture;\n } else {\n var didSuspendBefore = current$$1 !== null && (current$$1.effectTag & DidCapture) !== NoEffect;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderExpirationTime);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BatchedMode) === NoMode) {\n // Outside of batched mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}", "function updateSuspenseListComponent(current$$1, workInProgress, renderExpirationTime) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.effectTag |= DidCapture;\n } else {\n var didSuspendBefore = current$$1 !== null && (current$$1.effectTag & DidCapture) !== NoEffect;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderExpirationTime);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BatchedMode) === NoMode) {\n // Outside of batched mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}", "function updateSuspenseListComponent(current$$1, workInProgress, renderExpirationTime) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.effectTag |= DidCapture;\n } else {\n var didSuspendBefore = current$$1 !== null && (current$$1.effectTag & DidCapture) !== NoEffect;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderExpirationTime);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BatchedMode) === NoMode) {\n // Outside of batched mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}", "function updateSuspenseListComponent(current$$1, workInProgress, renderExpirationTime) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n\n reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime);\n\n var suspenseContext = suspenseStackCursor.current;\n\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.effectTag |= DidCapture;\n } else {\n var didSuspendBefore = current$$1 !== null && (current$$1.effectTag & DidCapture) !== NoEffect;\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderExpirationTime);\n }\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BatchedMode) === NoMode) {\n // Outside of batched mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail = void 0;\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode);\n break;\n }\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n while (row !== null) {\n var currentRow = row.alternate;\n // New rows can't be content rows.\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n }\n // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode);\n break;\n }\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined);\n break;\n }\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n return workInProgress.child;\n}", "function updateSuspenseListComponent(current$$1, workInProgress, renderExpirationTime) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n\n reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime);\n\n var suspenseContext = suspenseStackCursor.current;\n\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.effectTag |= DidCapture;\n } else {\n var didSuspendBefore = current$$1 !== null && (current$$1.effectTag & DidCapture) !== NoEffect;\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderExpirationTime);\n }\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BatchedMode) === NoMode) {\n // Outside of batched mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail = void 0;\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode);\n break;\n }\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n while (row !== null) {\n var currentRow = row.alternate;\n // New rows can't be content rows.\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n }\n // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode);\n break;\n }\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined);\n break;\n }\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n return workInProgress.child;\n}", "function updateSuspenseListComponent(current$$1, workInProgress, renderExpirationTime) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.effectTag |= DidCapture;\n } else {\n var didSuspendBefore = current$$1 !== null && (current$$1.effectTag & DidCapture) !== NoEffect;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderExpirationTime);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // Outside of blocking mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}", "function updateSuspenseListComponent(current$$1, workInProgress, renderExpirationTime) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.effectTag |= DidCapture;\n } else {\n var didSuspendBefore = current$$1 !== null && (current$$1.effectTag & DidCapture) !== NoEffect;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderExpirationTime);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // Outside of blocking mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}", "function updateSuspenseListComponent(current$$1, workInProgress, renderExpirationTime) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.effectTag |= DidCapture;\n } else {\n var didSuspendBefore = current$$1 !== null && (current$$1.effectTag & DidCapture) !== NoEffect;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderExpirationTime);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // Outside of blocking mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}", "function updateSuspenseListComponent(current4, workInProgress, renderLanes1) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current4, workInProgress, newChildren, renderLanes1);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.flags |= DidCapture;\n } else {\n var didSuspendBefore = current4 !== null && (current4.flags & DidCapture) !== NoFlags;\n if (didSuspendBefore) // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes1);\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n pushSuspenseContext(workInProgress, suspenseContext);\n if ((workInProgress.mode & BlockingMode) === NoMode) // In legacy mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n else switch(revealOrder){\n case 'forwards':\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n initSuspenseListRenderState(workInProgress, false, tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n case 'backwards':\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n while(row !== null){\n var currentRow = row.alternate; // New rows can't be content rows.\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n initSuspenseListRenderState(workInProgress, true, _tail, null, tailMode, workInProgress.lastEffect);\n break;\n case 'together':\n initSuspenseListRenderState(workInProgress, false, null, null, undefined, workInProgress.lastEffect);\n break;\n default:\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n return workInProgress.child;\n }", "function updateSuspenseListComponent(current, workInProgress, renderExpirationTime) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderExpirationTime);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.effectTag |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.effectTag & DidCapture) !== NoEffect;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderExpirationTime);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // Outside of blocking mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n }", "function updateSuspenseListComponent(current, workInProgress, renderExpirationTime) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderExpirationTime);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.effectTag |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.effectTag & DidCapture) !== NoEffect;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderExpirationTime);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // Outside of blocking mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n }", "function updateSuspenseListComponent(current, workInProgress, renderExpirationTime) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderExpirationTime);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.effectTag |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.effectTag & DidCapture) !== NoEffect;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderExpirationTime);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // Outside of blocking mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n }", "function updateSuspenseListComponent(current, workInProgress, renderExpirationTime) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderExpirationTime);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.effectTag |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.effectTag & DidCapture) !== NoEffect;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderExpirationTime);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // Outside of blocking mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n }", "function updateSuspenseListComponent(current, workInProgress, renderExpirationTime) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderExpirationTime);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.effectTag |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.effectTag & DidCapture) !== NoEffect;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderExpirationTime);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // Outside of blocking mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n }", "function updateSuspenseListComponent(current, workInProgress, renderExpirationTime) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderExpirationTime);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.effectTag |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.effectTag & DidCapture) !== NoEffect;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderExpirationTime);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // Outside of blocking mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n }", "function resetChildFibers(workInProgress, renderExpirationTime) {\n var child = workInProgress.child;\n while (child !== null) {\n resetWorkInProgress(child, renderExpirationTime);\n child = child.sibling;\n }\n}", "function resetChildFibers(workInProgress, renderExpirationTime) {\n var child = workInProgress.child;\n while (child !== null) {\n resetWorkInProgress(child, renderExpirationTime);\n child = child.sibling;\n }\n}", "function updateSuspenseListComponent(current,workInProgress,renderLanes){var nextProps=workInProgress.pendingProps;var revealOrder=nextProps.revealOrder;var tailMode=nextProps.tail;var newChildren=nextProps.children;validateRevealOrder(revealOrder);validateTailOptions(tailMode,revealOrder);validateSuspenseListChildren(newChildren,revealOrder);reconcileChildren(current,workInProgress,newChildren,renderLanes);var suspenseContext=suspenseStackCursor.current;var shouldForceFallback=hasSuspenseContext(suspenseContext,ForceSuspenseFallback);if(shouldForceFallback){suspenseContext=setShallowSuspenseContext(suspenseContext,ForceSuspenseFallback);workInProgress.flags|=DidCapture;}else{var didSuspendBefore=current!==null&&(current.flags&DidCapture)!==NoFlags;if(didSuspendBefore){// If we previously forced a fallback, we need to schedule work\n// on any nested boundaries to let them know to try to render\n// again. This is the same as context updating.\npropagateSuspenseContextChange(workInProgress,workInProgress.child,renderLanes);}suspenseContext=setDefaultShallowSuspenseContext(suspenseContext);}pushSuspenseContext(workInProgress,suspenseContext);if((workInProgress.mode&BlockingMode)===NoMode){// In legacy mode, SuspenseList doesn't work so we just\n// use make it a noop by treating it as the default revealOrder.\nworkInProgress.memoizedState=null;}else{switch(revealOrder){case'forwards':{var lastContentRow=findLastContentRow(workInProgress.child);var tail;if(lastContentRow===null){// The whole list is part of the tail.\n// TODO: We could fast path by just rendering the tail now.\ntail=workInProgress.child;workInProgress.child=null;}else{// Disconnect the tail rows after the content row.\n// We're going to render them separately later.\ntail=lastContentRow.sibling;lastContentRow.sibling=null;}initSuspenseListRenderState(workInProgress,false,// isBackwards\ntail,lastContentRow,tailMode,workInProgress.lastEffect);break;}case'backwards':{// We're going to find the first row that has existing content.\n// At the same time we're going to reverse the list of everything\n// we pass in the meantime. That's going to be our tail in reverse\n// order.\nvar _tail=null;var row=workInProgress.child;workInProgress.child=null;while(row!==null){var currentRow=row.alternate;// New rows can't be content rows.\nif(currentRow!==null&&findFirstSuspended(currentRow)===null){// This is the beginning of the main content.\nworkInProgress.child=row;break;}var nextRow=row.sibling;row.sibling=_tail;_tail=row;row=nextRow;}// TODO: If workInProgress.child is null, we can continue on the tail immediately.\ninitSuspenseListRenderState(workInProgress,true,// isBackwards\n_tail,null,// last\ntailMode,workInProgress.lastEffect);break;}case'together':{initSuspenseListRenderState(workInProgress,false,// isBackwards\nnull,// tail\nnull,// last\nundefined,workInProgress.lastEffect);break;}default:{// The default reveal order is the same as not having\n// a boundary.\nworkInProgress.memoizedState=null;}}}return workInProgress.child;}", "function updateSuspenseListComponent(current,workInProgress,renderLanes){var nextProps=workInProgress.pendingProps;var revealOrder=nextProps.revealOrder;var tailMode=nextProps.tail;var newChildren=nextProps.children;validateRevealOrder(revealOrder);validateTailOptions(tailMode,revealOrder);validateSuspenseListChildren(newChildren,revealOrder);reconcileChildren(current,workInProgress,newChildren,renderLanes);var suspenseContext=suspenseStackCursor.current;var shouldForceFallback=hasSuspenseContext(suspenseContext,ForceSuspenseFallback);if(shouldForceFallback){suspenseContext=setShallowSuspenseContext(suspenseContext,ForceSuspenseFallback);workInProgress.flags|=DidCapture;}else {var didSuspendBefore=current!==null&&(current.flags&DidCapture)!==NoFlags;if(didSuspendBefore){// If we previously forced a fallback, we need to schedule work\n// on any nested boundaries to let them know to try to render\n// again. This is the same as context updating.\npropagateSuspenseContextChange(workInProgress,workInProgress.child,renderLanes);}suspenseContext=setDefaultShallowSuspenseContext(suspenseContext);}pushSuspenseContext(workInProgress,suspenseContext);if((workInProgress.mode&BlockingMode)===NoMode){// In legacy mode, SuspenseList doesn't work so we just\n// use make it a noop by treating it as the default revealOrder.\nworkInProgress.memoizedState=null;}else {switch(revealOrder){case'forwards':{var lastContentRow=findLastContentRow(workInProgress.child);var tail;if(lastContentRow===null){// The whole list is part of the tail.\n// TODO: We could fast path by just rendering the tail now.\ntail=workInProgress.child;workInProgress.child=null;}else {// Disconnect the tail rows after the content row.\n// We're going to render them separately later.\ntail=lastContentRow.sibling;lastContentRow.sibling=null;}initSuspenseListRenderState(workInProgress,false,// isBackwards\ntail,lastContentRow,tailMode,workInProgress.lastEffect);break;}case'backwards':{// We're going to find the first row that has existing content.\n// At the same time we're going to reverse the list of everything\n// we pass in the meantime. That's going to be our tail in reverse\n// order.\nvar _tail=null;var row=workInProgress.child;workInProgress.child=null;while(row!==null){var currentRow=row.alternate;// New rows can't be content rows.\nif(currentRow!==null&&findFirstSuspended(currentRow)===null){// This is the beginning of the main content.\nworkInProgress.child=row;break;}var nextRow=row.sibling;row.sibling=_tail;_tail=row;row=nextRow;}// TODO: If workInProgress.child is null, we can continue on the tail immediately.\ninitSuspenseListRenderState(workInProgress,true,// isBackwards\n_tail,null,// last\ntailMode,workInProgress.lastEffect);break;}case'together':{initSuspenseListRenderState(workInProgress,false,// isBackwards\nnull,// tail\nnull,// last\nundefined,workInProgress.lastEffect);break;}default:{// The default reveal order is the same as not having\n// a boundary.\nworkInProgress.memoizedState=null;}}}return workInProgress.child;}", "function reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nif((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null){newChild=newChild.props.children;}// Handle object types\nvar isObject=(typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_CALL_TYPE:return placeSingleChild(reconcileSingleCall(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_RETURN_TYPE:return placeSingleChild(reconcileSingleReturn(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionalComponent:{var Component=returnFiber.type;invariant(false,'%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.',Component.displayName||Component.name||'Component');}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}", "function reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nif((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null){newChild=newChild.props.children;}// Handle object types\nvar isObject=(typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_CALL_TYPE:return placeSingleChild(reconcileSingleCall(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_RETURN_TYPE:return placeSingleChild(reconcileSingleReturn(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionalComponent:{var Component=returnFiber.type;invariant(false,'%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.',Component.displayName||Component.name||'Component');}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}", "function createBatcher() {\n var queue = new Set();\n return {\n add: function (child) { return queue.add(child); },\n flush: function (_a) {\n var _b = _a === void 0 ? defaultHandler : _a, layoutReady = _b.layoutReady, parent = _b.parent;\n (0,_render_dom_utils_batch_layout_js__WEBPACK_IMPORTED_MODULE_1__.batchLayout)(function (read, write) {\n var order = Array.from(queue).sort(_render_utils_compare_by_depth_js__WEBPACK_IMPORTED_MODULE_2__.compareByDepth);\n var ancestors = parent\n ? (0,_render_dom_projection_utils_js__WEBPACK_IMPORTED_MODULE_3__.collectProjectingAncestors)(parent)\n : [];\n write(function () {\n var allElements = (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__spreadArray)((0,tslib__WEBPACK_IMPORTED_MODULE_4__.__spreadArray)([], (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__read)(ancestors)), (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__read)(order));\n allElements.forEach(function (element) { return element.resetTransform(); });\n });\n read(function () {\n order.forEach(_render_dom_projection_utils_js__WEBPACK_IMPORTED_MODULE_3__.updateLayoutMeasurement);\n });\n write(function () {\n ancestors.forEach(function (element) { return element.restoreTransform(); });\n order.forEach(layoutReady);\n });\n read(function () {\n /**\n * After all children have started animating, ensure any Entering components are set to Present.\n * If we add deferred animations (set up all animations and then start them in two loops) this\n * could be moved to the start loop. But it needs to happen after all the animations configs\n * are generated in AnimateSharedLayout as this relies on presence data\n */\n order.forEach(function (child) {\n if (child.isPresent)\n child.presence = _types_js__WEBPACK_IMPORTED_MODULE_5__.Presence.Present;\n });\n });\n write(function () {\n /**\n * Starting these animations will have queued jobs on the frame loop. In some situations,\n * like when removing an element, these will be processed too late after the DOM is manipulated,\n * leaving a flash of incorrectly-projected content. By manually flushing these jobs\n * we ensure there's no flash.\n */\n framesync__WEBPACK_IMPORTED_MODULE_0__.flushSync.preRender();\n framesync__WEBPACK_IMPORTED_MODULE_0__.flushSync.render();\n });\n read(function () {\n /**\n * Schedule a callback at the end of the following frame to assign the latest projection\n * box to the prevViewportBox snapshot. Once global batching is in place this could be run\n * synchronously. But for now it ensures that if any nested `AnimateSharedLayout` top-level\n * child attempts to calculate its previous relative position against a prevViewportBox\n * it will be against its latest projection box instead, as the snapshot is useless beyond this\n * render.\n */\n framesync__WEBPACK_IMPORTED_MODULE_0__.default.postRender(function () {\n return order.forEach(assignProjectionToSnapshot);\n });\n queue.clear();\n });\n });\n // TODO: Need to find a layout-synchronous way of flushing this\n (0,_render_dom_utils_batch_layout_js__WEBPACK_IMPORTED_MODULE_1__.flushLayout)();\n },\n };\n}", "function createBatcher() {\n var queue = new Set();\n return {\n add: function (child) { return queue.add(child); },\n flush: function (_a) {\n var _b = _a === void 0 ? defaultHandler : _a, layoutReady = _b.layoutReady, parent = _b.parent;\n (0,_render_dom_utils_batch_layout_js__WEBPACK_IMPORTED_MODULE_1__.batchLayout)(function (read, write) {\n var order = Array.from(queue).sort(_render_utils_compare_by_depth_js__WEBPACK_IMPORTED_MODULE_2__.compareByDepth);\n var ancestors = parent\n ? (0,_render_dom_projection_utils_js__WEBPACK_IMPORTED_MODULE_3__.collectProjectingAncestors)(parent)\n : [];\n write(function () {\n var allElements = (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__spreadArray)((0,tslib__WEBPACK_IMPORTED_MODULE_4__.__spreadArray)([], (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__read)(ancestors)), (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__read)(order));\n allElements.forEach(function (element) { return element.resetTransform(); });\n });\n read(function () {\n order.forEach(_render_dom_projection_utils_js__WEBPACK_IMPORTED_MODULE_3__.updateLayoutMeasurement);\n });\n write(function () {\n ancestors.forEach(function (element) { return element.restoreTransform(); });\n order.forEach(layoutReady);\n });\n read(function () {\n /**\n * After all children have started animating, ensure any Entering components are set to Present.\n * If we add deferred animations (set up all animations and then start them in two loops) this\n * could be moved to the start loop. But it needs to happen after all the animations configs\n * are generated in AnimateSharedLayout as this relies on presence data\n */\n order.forEach(function (child) {\n if (child.isPresent)\n child.presence = _types_js__WEBPACK_IMPORTED_MODULE_5__.Presence.Present;\n });\n });\n write(function () {\n /**\n * Starting these animations will have queued jobs on the frame loop. In some situations,\n * like when removing an element, these will be processed too late after the DOM is manipulated,\n * leaving a flash of incorrectly-projected content. By manually flushing these jobs\n * we ensure there's no flash.\n */\n framesync__WEBPACK_IMPORTED_MODULE_0__.flushSync.preRender();\n framesync__WEBPACK_IMPORTED_MODULE_0__.flushSync.render();\n });\n read(function () {\n /**\n * Schedule a callback at the end of the following frame to assign the latest projection\n * box to the prevViewportBox snapshot. Once global batching is in place this could be run\n * synchronously. But for now it ensures that if any nested `AnimateSharedLayout` top-level\n * child attempts to calculate its previous relative position against a prevViewportBox\n * it will be against its latest projection box instead, as the snapshot is useless beyond this\n * render.\n */\n framesync__WEBPACK_IMPORTED_MODULE_0__.default.postRender(function () {\n return order.forEach(assignProjectionToSnapshot);\n });\n queue.clear();\n });\n });\n // TODO: Need to find a layout-synchronous way of flushing this\n (0,_render_dom_utils_batch_layout_js__WEBPACK_IMPORTED_MODULE_1__.flushLayout)();\n },\n };\n}", "function reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=(typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=(typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionComponent:{var Component=returnFiber.type;invariant(false,'%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.',Component.displayName||Component.name||'Component');}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}", "function reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=(typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=(typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionalComponent:{var Component=returnFiber.type;invariant(false,'%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.',Component.displayName||Component.name||'Component');}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}", "function reconcileChildFibers(returnFiber,currentFirstChild,newChild,lanes){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=_typeof(newChild)==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=_typeof(newChild)==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,lanes));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,lanes));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,lanes));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,lanes);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,lanes);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType(returnFiber);}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase Block:case FunctionComponent:case ForwardRef:case SimpleMemoComponent:{{{throw Error((getComponentName(returnFiber.type)||'Component')+\"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");}}}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}", "function reconcileChildFibers(returnFiber,currentFirstChild,newChild,lanes){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=typeof newChild==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=typeof newChild==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,lanes));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,lanes));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,lanes));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,lanes);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,lanes);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType(returnFiber);}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase Block:case FunctionComponent:case ForwardRef:case SimpleMemoComponent:{{{throw Error((getComponentName(returnFiber.type)||'Component')+\"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");}}}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}", "function reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=typeof newChild==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=typeof newChild==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionComponent:{var Component=returnFiber.type;invariant(false,'%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.',Component.displayName||Component.name||'Component');}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}", "render(context) {\n this.rows.forEach(row => \n row.forEach(cell => {\n if (cell.filled) {\n cell.block.render(context);\n }\n }));\n }", "function reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=_typeof(newChild)==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=_typeof(newChild)==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionComponent:{var Component=returnFiber.type;invariant(false,'%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.',Component.displayName||Component.name||'Component');}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}", "function reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=typeof newChild==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=typeof newChild==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionComponent:{var Component=returnFiber.type;{{throw Error((Component.displayName||Component.name||'Component')+\"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");}}}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}", "function reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=typeof newChild==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=typeof newChild==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionComponent:{var Component=returnFiber.type;{{throw Error((Component.displayName||Component.name||'Component')+\"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");}}}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}", "function reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=typeof newChild==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=typeof newChild==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionalComponent:{var Component=returnFiber.type;invariant(false,'%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.',Component.displayName||Component.name||'Component');}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}", "function reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n// If the top level item is an array, we treat it as a set of children,\n// not as a fragment. Nested arrays on the other hand will be treated as\n// fragment nodes. Recursion happens at the normal flow.\n// Handle top level unkeyed fragments as if they were arrays.\n// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n// We treat the ambiguous cases above the same.\nvar isUnkeyedTopLevelFragment=_typeof(newChild)==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null;if(isUnkeyedTopLevelFragment){newChild=newChild.props.children;}// Handle object types\nvar isObject=_typeof(newChild)==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'&&!isUnkeyedTopLevelFragment){// If the new child is undefined, and the return fiber is a composite\n// component, throw an error. If Fiber return types are disabled,\n// we already threw above.\nswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\nbreak;}}}// Intentionally fall through to the next case, which handles both\n// functions and classes\n// eslint-disable-next-lined no-fallthrough\ncase FunctionComponent:{var Component=returnFiber.type;{{throw Error((Component.displayName||Component.name||'Component')+\"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");}}}}}// Remaining cases are all treated as empty.\nreturn deleteRemainingChildren(returnFiber,currentFirstChild);}", "function recursivelyCallNextOnIterator(data) {\n var yielded = iterator.next.apply(iterator, arguments);\n // yielded = { value: Any, done: Boolean }\n\n if (yielded.done) {\n taskInstance.isIdle = true;\n taskInstance.isRunning = false;\n // call setState with the same state to trigger another render\n // so that you can use task properties like isIdle directly\n // in your render function\n component.setState(component.state);\n return;\n }\n\n if (isPromise(yielded.value)) {\n yielded.value.then(function (data) {\n if (component._isMounted) {\n recursivelyCallNextOnIterator(data);\n }\n }, function (e) {\n if (component._isMounted) {\n iterator.throw(e);\n }\n });\n }\n }", "function updateSuspenseListComponent(\n current,\n workInProgress,\n renderExpirationTime,\n ) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(\n current,\n workInProgress,\n newChildren,\n renderExpirationTime,\n );\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(\n suspenseContext,\n ForceSuspenseFallback,\n );\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(\n suspenseContext,\n ForceSuspenseFallback,\n );\n workInProgress.effectTag |= DidCapture;\n } else {\n var didSuspendBefore =\n current !== null &&\n (current.effectTag & DidCapture) !== NoEffect;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(\n workInProgress,\n workInProgress.child,\n renderExpirationTime,\n );\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(\n suspenseContext,\n );\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // Outside of blocking mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards': {\n var lastContentRow = findLastContentRow(\n workInProgress.child,\n );\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(\n workInProgress,\n false, // isBackwards\n tail,\n lastContentRow,\n tailMode,\n workInProgress.lastEffect,\n );\n break;\n }\n\n case 'backwards': {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (\n currentRow !== null &&\n findFirstSuspended(currentRow) === null\n ) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n initSuspenseListRenderState(\n workInProgress,\n true, // isBackwards\n _tail,\n null, // last\n tailMode,\n workInProgress.lastEffect,\n );\n break;\n }\n\n case 'together': {\n initSuspenseListRenderState(\n workInProgress,\n false, // isBackwards\n null, // tail\n null, // last\n undefined,\n workInProgress.lastEffect,\n );\n break;\n }\n\n default: {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n }", "function renderAll(){\n renderHead();\n renderBody();\n renderFoot();\n}", "function render() {\n for (let i = 0; i < storedCreatedObj.length; i++) {\n storedCreatedObj[i].render_for_body();\n }\n storedCreatedObj[0].render_for_head();\n storedCreatedObj[0].render_for_foot();\n}", "function updateSuspenseListComponent(current,workInProgress,renderExpirationTime){var nextProps=workInProgress.pendingProps;var revealOrder=nextProps.revealOrder;var tailMode=nextProps.tail;var newChildren=nextProps.children;validateRevealOrder(revealOrder);validateTailOptions(tailMode,revealOrder);validateSuspenseListChildren(newChildren,revealOrder);reconcileChildren(current,workInProgress,newChildren,renderExpirationTime);var suspenseContext=suspenseStackCursor.current;var shouldForceFallback=hasSuspenseContext(suspenseContext,ForceSuspenseFallback);if(shouldForceFallback){suspenseContext=setShallowSuspenseContext(suspenseContext,ForceSuspenseFallback);workInProgress.effectTag|=DidCapture;}else{var didSuspendBefore=current!==null&&(current.effectTag&DidCapture)!==NoEffect;if(didSuspendBefore){// If we previously forced a fallback, we need to schedule work\n// on any nested boundaries to let them know to try to render\n// again. This is the same as context updating.\npropagateSuspenseContextChange(workInProgress,workInProgress.child,renderExpirationTime);}suspenseContext=setDefaultShallowSuspenseContext(suspenseContext);}pushSuspenseContext(workInProgress,suspenseContext);if((workInProgress.mode&BlockingMode)===NoMode){// Outside of blocking mode, SuspenseList doesn't work so we just\n// use make it a noop by treating it as the default revealOrder.\nworkInProgress.memoizedState=null;}else{switch(revealOrder){case'forwards':{var lastContentRow=findLastContentRow(workInProgress.child);var tail;if(lastContentRow===null){// The whole list is part of the tail.\n// TODO: We could fast path by just rendering the tail now.\ntail=workInProgress.child;workInProgress.child=null;}else{// Disconnect the tail rows after the content row.\n// We're going to render them separately later.\ntail=lastContentRow.sibling;lastContentRow.sibling=null;}initSuspenseListRenderState(workInProgress,false,// isBackwards\ntail,lastContentRow,tailMode,workInProgress.lastEffect);break;}case'backwards':{// We're going to find the first row that has existing content.\n// At the same time we're going to reverse the list of everything\n// we pass in the meantime. That's going to be our tail in reverse\n// order.\nvar _tail=null;var row=workInProgress.child;workInProgress.child=null;while(row!==null){var currentRow=row.alternate;// New rows can't be content rows.\nif(currentRow!==null&&findFirstSuspended(currentRow)===null){// This is the beginning of the main content.\nworkInProgress.child=row;break;}var nextRow=row.sibling;row.sibling=_tail;_tail=row;row=nextRow;}// TODO: If workInProgress.child is null, we can continue on the tail immediately.\ninitSuspenseListRenderState(workInProgress,true,// isBackwards\n_tail,null,// last\ntailMode,workInProgress.lastEffect);break;}case'together':{initSuspenseListRenderState(workInProgress,false,// isBackwards\nnull,// tail\nnull,// last\nundefined,workInProgress.lastEffect);break;}default:{// The default reveal order is the same as not having\n// a boundary.\nworkInProgress.memoizedState=null;}}}return workInProgress.child;}", "function updateSuspenseListComponent(current,workInProgress,renderExpirationTime){var nextProps=workInProgress.pendingProps;var revealOrder=nextProps.revealOrder;var tailMode=nextProps.tail;var newChildren=nextProps.children;validateRevealOrder(revealOrder);validateTailOptions(tailMode,revealOrder);validateSuspenseListChildren(newChildren,revealOrder);reconcileChildren(current,workInProgress,newChildren,renderExpirationTime);var suspenseContext=suspenseStackCursor.current;var shouldForceFallback=hasSuspenseContext(suspenseContext,ForceSuspenseFallback);if(shouldForceFallback){suspenseContext=setShallowSuspenseContext(suspenseContext,ForceSuspenseFallback);workInProgress.effectTag|=DidCapture;}else{var didSuspendBefore=current!==null&&(current.effectTag&DidCapture)!==NoEffect;if(didSuspendBefore){// If we previously forced a fallback, we need to schedule work\n// on any nested boundaries to let them know to try to render\n// again. This is the same as context updating.\npropagateSuspenseContextChange(workInProgress,workInProgress.child,renderExpirationTime);}suspenseContext=setDefaultShallowSuspenseContext(suspenseContext);}pushSuspenseContext(workInProgress,suspenseContext);if((workInProgress.mode&BlockingMode)===NoMode){// Outside of blocking mode, SuspenseList doesn't work so we just\n// use make it a noop by treating it as the default revealOrder.\nworkInProgress.memoizedState=null;}else{switch(revealOrder){case'forwards':{var lastContentRow=findLastContentRow(workInProgress.child);var tail;if(lastContentRow===null){// The whole list is part of the tail.\n// TODO: We could fast path by just rendering the tail now.\ntail=workInProgress.child;workInProgress.child=null;}else{// Disconnect the tail rows after the content row.\n// We're going to render them separately later.\ntail=lastContentRow.sibling;lastContentRow.sibling=null;}initSuspenseListRenderState(workInProgress,false,// isBackwards\ntail,lastContentRow,tailMode,workInProgress.lastEffect);break;}case'backwards':{// We're going to find the first row that has existing content.\n// At the same time we're going to reverse the list of everything\n// we pass in the meantime. That's going to be our tail in reverse\n// order.\nvar _tail=null;var row=workInProgress.child;workInProgress.child=null;while(row!==null){var currentRow=row.alternate;// New rows can't be content rows.\nif(currentRow!==null&&findFirstSuspended(currentRow)===null){// This is the beginning of the main content.\nworkInProgress.child=row;break;}var nextRow=row.sibling;row.sibling=_tail;_tail=row;row=nextRow;}// TODO: If workInProgress.child is null, we can continue on the tail immediately.\ninitSuspenseListRenderState(workInProgress,true,// isBackwards\n_tail,null,// last\ntailMode,workInProgress.lastEffect);break;}case'together':{initSuspenseListRenderState(workInProgress,false,// isBackwards\nnull,// tail\nnull,// last\nundefined,workInProgress.lastEffect);break;}default:{// The default reveal order is the same as not having\n// a boundary.\nworkInProgress.memoizedState=null;}}}return workInProgress.child;}", "function updateSuspenseListComponent(current,workInProgress,renderExpirationTime){var nextProps=workInProgress.pendingProps;var revealOrder=nextProps.revealOrder;var tailMode=nextProps.tail;var newChildren=nextProps.children;validateRevealOrder(revealOrder);validateTailOptions(tailMode,revealOrder);validateSuspenseListChildren(newChildren,revealOrder);reconcileChildren(current,workInProgress,newChildren,renderExpirationTime);var suspenseContext=suspenseStackCursor.current;var shouldForceFallback=hasSuspenseContext(suspenseContext,ForceSuspenseFallback);if(shouldForceFallback){suspenseContext=setShallowSuspenseContext(suspenseContext,ForceSuspenseFallback);workInProgress.effectTag|=DidCapture;}else{var didSuspendBefore=current!==null&&(current.effectTag&DidCapture)!==NoEffect;if(didSuspendBefore){// If we previously forced a fallback, we need to schedule work\n// on any nested boundaries to let them know to try to render\n// again. This is the same as context updating.\npropagateSuspenseContextChange(workInProgress,workInProgress.child,renderExpirationTime);}suspenseContext=setDefaultShallowSuspenseContext(suspenseContext);}pushSuspenseContext(workInProgress,suspenseContext);if((workInProgress.mode&BlockingMode)===NoMode){// Outside of blocking mode, SuspenseList doesn't work so we just\n// use make it a noop by treating it as the default revealOrder.\nworkInProgress.memoizedState=null;}else{switch(revealOrder){case'forwards':{var lastContentRow=findLastContentRow(workInProgress.child);var tail;if(lastContentRow===null){// The whole list is part of the tail.\n// TODO: We could fast path by just rendering the tail now.\ntail=workInProgress.child;workInProgress.child=null;}else{// Disconnect the tail rows after the content row.\n// We're going to render them separately later.\ntail=lastContentRow.sibling;lastContentRow.sibling=null;}initSuspenseListRenderState(workInProgress,false,// isBackwards\ntail,lastContentRow,tailMode,workInProgress.lastEffect);break;}case'backwards':{// We're going to find the first row that has existing content.\n// At the same time we're going to reverse the list of everything\n// we pass in the meantime. That's going to be our tail in reverse\n// order.\nvar _tail=null;var row=workInProgress.child;workInProgress.child=null;while(row!==null){var currentRow=row.alternate;// New rows can't be content rows.\nif(currentRow!==null&&findFirstSuspended(currentRow)===null){// This is the beginning of the main content.\nworkInProgress.child=row;break;}var nextRow=row.sibling;row.sibling=_tail;_tail=row;row=nextRow;}// TODO: If workInProgress.child is null, we can continue on the tail immediately.\ninitSuspenseListRenderState(workInProgress,true,// isBackwards\n_tail,null,// last\ntailMode,workInProgress.lastEffect);break;}case'together':{initSuspenseListRenderState(workInProgress,false,// isBackwards\nnull,// tail\nnull,// last\nundefined,workInProgress.lastEffect);break;}default:{// The default reveal order is the same as not having\n// a boundary.\nworkInProgress.memoizedState=null;}}}return workInProgress.child;}", "[_virtualRender]() {\n let contents = this.render() || [];\n let items = this[_items];\n let childContext = this.getChildContext();\n\n if (!(contents instanceof Array)) {\n contents = [ contents ];\n }\n\n // Sometimes the array can contain other arrays, so we need to flatten it out\n // (this also strips out any null elements)\n contents = flatten(contents, isNullOrWhitespace);\n\n for (let i = 0; i < contents.length; i++) {\n let content = contents[i];\n let item = items[i];\n\n if (item && !(item instanceof content.type)) {\n item.componentWillUnmount && item.componentWillUnmount();\n this.unlink(item);\n item = undefined;\n }\n if (item && (propsDiffer(content.props, item.props) || propsDiffer(childContext, item.context))) {\n item.componentWillUpdate(content.props, childContext);\n item.props = content.props;\n item.context = childContext;\n }\n if (!item) {\n items[i] = this.link(instantiateContent(content, childContext));\n items[i]._parent = this;\n items[i][_virtualRender]();\n items[i].componentDidMount && items[i].componentDidMount();\n }\n }\n for (let i = contents.length; i < items.length; i++) {\n let item = items[i];\n if (item) {\n item.componentWillUnmount && item.componentWillUnmount();\n this.unlink(item);\n }\n }\n items.length = contents.length;\n\n BinderRecordChange(this, 'virtual.children');\n }", "function renderOnce(){\n let backlogFragment = document.createDocumentFragment();\n let progressFragment = document.createDocumentFragment();\n let completeFragment = document.createDocumentFragment();\n let onHoldFragment = document.createDocumentFragment();\n\n if(Array.isArray(backlog) && backlog.length > 0){\n backlog.forEach(item => backlogFragment.appendChild(createLiElement(item)));\n backLogUl.appendChild(backlogFragment);\n }\n if(Array.isArray(progress) && progress.length > 0){\n progress.forEach(item => progressFragment.appendChild(createLiElement(item)));\n progressUl.appendChild(progressFragment);\n }\n if(Array.isArray(complete) && complete.length > 0){\n complete.forEach(item => completeFragment.appendChild(createLiElement(item)));\n completeUl.appendChild(completeFragment);\n }\n if(Array.isArray(onHold) && onHold.length > 0){\n onHold.forEach(item => onHoldFragment.appendChild(createLiElement(item)));\n onHoldUl.appendChild(onHoldFragment);\n }\n\n}", "function flush() {\n // Do not reenter flush while dirty components are updated, as this can\n // result in an infinite loop. Instead, let the inner flush handle it.\n // Reentrancy is ok afterwards for bindings etc.\n if (flushidx !== 0) {\n return;\n }\n const saved_component = current_component;\n do {\n // first, call beforeUpdate functions\n // and update components\n try {\n while (flushidx < dirty_components.length) {\n const component = dirty_components[flushidx];\n flushidx++;\n set_current_component(component);\n update(component.$$);\n }\n }\n catch (e) {\n // reset dirty state to not end up in a deadlocked state and then rethrow\n dirty_components.length = 0;\n flushidx = 0;\n throw e;\n }\n set_current_component(null);\n dirty_components.length = 0;\n flushidx = 0;\n while (binding_callbacks.length)\n binding_callbacks.pop()();\n // then, once components are updated, call\n // afterUpdate functions. This may cause\n // subsequent updates...\n for (let i = 0; i < render_callbacks.length; i += 1) {\n const callback = render_callbacks[i];\n if (!seen_callbacks.has(callback)) {\n // ...so guard against infinite loops\n seen_callbacks.add(callback);\n callback();\n }\n }\n render_callbacks.length = 0;\n } while (dirty_components.length);\n while (flush_callbacks.length) {\n flush_callbacks.pop()();\n }\n update_scheduled = false;\n seen_callbacks.clear();\n set_current_component(saved_component);\n}", "function join(result, head, tail) {\n var fail, step, lhs, rhs, tmp, kid;\n\n if (util.isLeft(result)) {\n fail = result;\n step = null;\n } else {\n step = result;\n fail = null;\n }\n\n loop: while (true) {\n lhs = null;\n rhs = null;\n tmp = null;\n kid = null; // We should never continue if the entire tree has been interrupted.\n\n if (interrupt !== null) {\n return;\n } // We've made it all the way to the root of the tree, which means\n // the tree has fully evaluated.\n\n\n if (head === null) {\n cb(fail || step)();\n return;\n } // The tree has already been computed, so we shouldn't try to do it\n // again. This should never happen.\n // TODO: Remove this?\n\n\n if (head._3 !== EMPTY) {\n return;\n }\n\n switch (head.tag) {\n case MAP:\n if (fail === null) {\n head._3 = util.right(head._1(util.fromRight(step)));\n step = head._3;\n } else {\n head._3 = fail;\n }\n\n break;\n\n case APPLY:\n lhs = head._1._3;\n rhs = head._2._3; // If we have a failure we should kill the other side because we\n // can't possible yield a result anymore.\n\n if (fail) {\n head._3 = fail;\n tmp = true;\n kid = killId++;\n kills[kid] = kill(early, fail === lhs ? head._2 : head._1, function ()\n /* unused */\n {\n return function () {\n delete kills[kid];\n\n if (tmp) {\n tmp = false;\n } else if (tail === null) {\n join(fail, null, null);\n } else {\n join(fail, tail._1, tail._2);\n }\n };\n });\n\n if (tmp) {\n tmp = false;\n return;\n }\n } else if (lhs === EMPTY || rhs === EMPTY) {\n // We can only proceed if both sides have resolved.\n return;\n } else {\n step = util.right(util.fromRight(lhs)(util.fromRight(rhs)));\n head._3 = step;\n }\n\n break;\n\n case ALT:\n lhs = head._1._3;\n rhs = head._2._3; // We can only proceed if both have resolved or we have a success\n\n if (lhs === EMPTY && util.isLeft(rhs) || rhs === EMPTY && util.isLeft(lhs)) {\n return;\n } // If both sides resolve with an error, we should continue with the\n // first error\n\n\n if (lhs !== EMPTY && util.isLeft(lhs) && rhs !== EMPTY && util.isLeft(rhs)) {\n fail = step === lhs ? rhs : lhs;\n step = null;\n head._3 = fail;\n } else {\n head._3 = step;\n tmp = true;\n kid = killId++; // Once a side has resolved, we need to cancel the side that is still\n // pending before we can continue.\n\n kills[kid] = kill(early, step === lhs ? head._2 : head._1, function ()\n /* unused */\n {\n return function () {\n delete kills[kid];\n\n if (tmp) {\n tmp = false;\n } else if (tail === null) {\n join(step, null, null);\n } else {\n join(step, tail._1, tail._2);\n }\n };\n });\n\n if (tmp) {\n tmp = false;\n return;\n }\n }\n\n break;\n }\n\n if (tail === null) {\n head = null;\n } else {\n head = tail._1;\n tail = tail._2;\n }\n }\n }", "function run() {\n var status = CONTINUE;\n var step = par;\n var head = null;\n var tail = null;\n var tmp, fid;\n\n loop: while (true) {\n tmp = null;\n fid = null;\n\n switch (status) {\n case CONTINUE:\n switch (step.tag) {\n case MAP:\n if (head) {\n tail = new Aff(CONS, head, tail);\n }\n\n head = new Aff(MAP, step._1, EMPTY, EMPTY);\n step = step._2;\n break;\n\n case APPLY:\n if (head) {\n tail = new Aff(CONS, head, tail);\n }\n\n head = new Aff(APPLY, EMPTY, step._2, EMPTY);\n step = step._1;\n break;\n\n case ALT:\n if (head) {\n tail = new Aff(CONS, head, tail);\n }\n\n head = new Aff(ALT, EMPTY, step._2, EMPTY);\n step = step._1;\n break;\n\n default:\n // When we hit a leaf value, we suspend the stack in the `FORKED`.\n // When the fiber resolves, it can bubble back up the tree.\n fid = fiberId++;\n status = RETURN;\n tmp = step;\n step = new Aff(FORKED, fid, new Aff(CONS, head, tail), EMPTY);\n tmp = Fiber(util, supervisor, tmp);\n tmp.onComplete({\n rethrow: false,\n handler: resolve(step)\n })();\n fibers[fid] = tmp;\n\n if (supervisor) {\n supervisor.register(tmp);\n }\n\n }\n\n break;\n\n case RETURN:\n // Terminal case, we are back at the root.\n if (head === null) {\n break loop;\n } // If we are done with the right side, we need to continue down the\n // left. Otherwise we should continue up the stack.\n\n\n if (head._1 === EMPTY) {\n head._1 = step;\n status = CONTINUE;\n step = head._2;\n head._2 = EMPTY;\n } else {\n head._2 = step;\n step = head;\n\n if (tail === null) {\n head = null;\n } else {\n head = tail._1;\n tail = tail._2;\n }\n }\n\n }\n } // Keep a reference to the tree root so it can be cancelled.\n\n\n root = step;\n\n for (fid = 0; fid < fiberId; fid++) {\n fibers[fid].run();\n }\n } // Cancels the entire tree. If there are already subtrees being canceled,", "function reconcileChildFibers(returnFiber,currentFirstChild,newChild,expirationTime){// This function is not recursive.\n\t// If the top level item is an array, we treat it as a set of children,\n\t// not as a fragment. Nested arrays on the other hand will be treated as\n\t// fragment nodes. Recursion happens at the normal flow.\n\t// Handle top level unkeyed fragments as if they were arrays.\n\t// This leads to an ambiguity between <>{[...]}</> and <>...</>.\n\t// We treat the ambiguous cases above the same.\n\tif((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null&&newChild.type===REACT_FRAGMENT_TYPE&&newChild.key===null){newChild=newChild.props.children;}// Handle object types\n\tvar isObject=(typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null;if(isObject){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:return placeSingleChild(reconcileSingleElement(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_CALL_TYPE:return placeSingleChild(reconcileSingleCall(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_RETURN_TYPE:return placeSingleChild(reconcileSingleReturn(returnFiber,currentFirstChild,newChild,expirationTime));case REACT_PORTAL_TYPE:return placeSingleChild(reconcileSinglePortal(returnFiber,currentFirstChild,newChild,expirationTime));}}if(typeof newChild==='string'||typeof newChild==='number'){return placeSingleChild(reconcileSingleTextNode(returnFiber,currentFirstChild,''+newChild,expirationTime));}if(isArray$1(newChild)){return reconcileChildrenArray(returnFiber,currentFirstChild,newChild,expirationTime);}if(getIteratorFn(newChild)){return reconcileChildrenIterator(returnFiber,currentFirstChild,newChild,expirationTime);}if(isObject){throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}if(typeof newChild==='undefined'){// If the new child is undefined, and the return fiber is a composite\n\t// component, throw an error. If Fiber return types are disabled,\n\t// we already threw above.\n\tswitch(returnFiber.tag){case ClassComponent:{{var instance=returnFiber.stateNode;if(instance.render._isMockFunction){// We allow auto-mocks to proceed as if they're returning null.\n\tbreak;}}}// Intentionally fall through to the next case, which handles both\n\t// functions and classes\n\t// eslint-disable-next-lined no-fallthrough\n\tcase FunctionalComponent:{var Component=returnFiber.type;invariant(false,'%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.',Component.displayName||Component.name||'Component');}}}// Remaining cases are all treated as empty.\n\treturn deleteRemainingChildren(returnFiber,currentFirstChild);}", "function join(result, head, tail) {\n var fail, step, lhs, rhs, tmp, kid;\n\n if (util.isLeft(result)) {\n fail = result;\n step = null;\n } else {\n step = result;\n fail = null;\n }\n\n loop: while (true) {\n lhs = null;\n rhs = null;\n tmp = null;\n kid = null;\n\n // We should never continue if the entire tree has been interrupted.\n if (interrupt !== null) {\n return;\n }\n\n // We've made it all the way to the root of the tree, which means\n // the tree has fully evaluated.\n if (head === null) {\n cb(fail || step)();\n return;\n }\n\n // The tree has already been computed, so we shouldn't try to do it\n // again. This should never happen.\n // TODO: Remove this?\n if (head._3 !== EMPTY) {\n return;\n }\n\n switch (head.tag) {\n case MAP:\n if (fail === null) {\n head._3 = util.right(head._1(util.fromRight(step)));\n step = head._3;\n } else {\n head._3 = fail;\n }\n break;\n case APPLY:\n lhs = head._1._3;\n rhs = head._2._3;\n // If we have a failure we should kill the other side because we\n // can't possible yield a result anymore.\n if (fail) {\n head._3 = fail;\n tmp = true;\n kid = killId++;\n\n kills[kid] = kill(early, fail === lhs ? head._2 : head._1, function (/* unused */) {\n return function () {\n delete kills[kid];\n if (tmp) {\n tmp = false;\n } else if (tail === null) {\n join(fail, null, null);\n } else {\n join(fail, tail._1, tail._2);\n }\n };\n });\n\n if (tmp) {\n tmp = false;\n return;\n }\n } else if (lhs === EMPTY || rhs === EMPTY) {\n // We can only proceed if both sides have resolved.\n return;\n } else {\n step = util.right(util.fromRight(lhs)(util.fromRight(rhs)));\n head._3 = step;\n }\n break;\n case ALT:\n lhs = head._1._3;\n rhs = head._2._3;\n // We can only proceed if both have resolved or we have a success\n if (lhs === EMPTY && util.isLeft(rhs) || rhs === EMPTY && util.isLeft(lhs)) {\n return;\n }\n // If both sides resolve with an error, we should continue with the\n // first error\n if (lhs !== EMPTY && util.isLeft(lhs) && rhs !== EMPTY && util.isLeft(rhs)) {\n fail = step === lhs ? rhs : lhs;\n step = null;\n head._3 = fail;\n } else {\n head._3 = step;\n tmp = true;\n kid = killId++;\n // Once a side has resolved, we need to cancel the side that is still\n // pending before we can continue.\n kills[kid] = kill(early, step === lhs ? head._2 : head._1, function (/* unused */) {\n return function () {\n delete kills[kid];\n if (tmp) {\n tmp = false;\n } else if (tail === null) {\n join(step, null, null);\n } else {\n join(step, tail._1, tail._2);\n }\n };\n });\n\n if (tmp) {\n tmp = false;\n return;\n }\n }\n break;\n }\n\n if (tail === null) {\n head = null;\n } else {\n head = tail._1;\n tail = tail._2;\n }\n }\n }", "function join(result, head, tail) {\n var fail, step, lhs, rhs, tmp, kid;\n\n if (util.isLeft(result)) {\n fail = result;\n step = null;\n } else {\n step = result;\n fail = null;\n }\n\n loop: while (true) {\n lhs = null;\n rhs = null;\n tmp = null;\n kid = null;\n\n // We should never continue if the entire tree has been interrupted.\n if (interrupt !== null) {\n return;\n }\n\n // We've made it all the way to the root of the tree, which means\n // the tree has fully evaluated.\n if (head === null) {\n cb(fail || step)();\n return;\n }\n\n // The tree has already been computed, so we shouldn't try to do it\n // again. This should never happen.\n // TODO: Remove this?\n if (head._3 !== EMPTY) {\n return;\n }\n\n switch (head.tag) {\n case MAP:\n if (fail === null) {\n head._3 = util.right(head._1(util.fromRight(step)));\n step = head._3;\n } else {\n head._3 = fail;\n }\n break;\n case APPLY:\n lhs = head._1._3;\n rhs = head._2._3;\n // If we have a failure we should kill the other side because we\n // can't possible yield a result anymore.\n if (fail) {\n head._3 = fail;\n tmp = true;\n kid = killId++;\n\n kills[kid] = kill(early, fail === lhs ? head._2 : head._1, function (/* unused */) {\n return function () {\n delete kills[kid];\n if (tmp) {\n tmp = false;\n } else if (tail === null) {\n join(fail, null, null);\n } else {\n join(fail, tail._1, tail._2);\n }\n };\n });\n\n if (tmp) {\n tmp = false;\n return;\n }\n } else if (lhs === EMPTY || rhs === EMPTY) {\n // We can only proceed if both sides have resolved.\n return;\n } else {\n step = util.right(util.fromRight(lhs)(util.fromRight(rhs)));\n head._3 = step;\n }\n break;\n case ALT:\n lhs = head._1._3;\n rhs = head._2._3;\n // We can only proceed if both have resolved or we have a success\n if (lhs === EMPTY && util.isLeft(rhs) || rhs === EMPTY && util.isLeft(lhs)) {\n return;\n }\n // If both sides resolve with an error, we should continue with the\n // first error\n if (lhs !== EMPTY && util.isLeft(lhs) && rhs !== EMPTY && util.isLeft(rhs)) {\n fail = step === lhs ? rhs : lhs;\n step = null;\n head._3 = fail;\n } else {\n head._3 = step;\n tmp = true;\n kid = killId++;\n // Once a side has resolved, we need to cancel the side that is still\n // pending before we can continue.\n kills[kid] = kill(early, step === lhs ? head._2 : head._1, function (/* unused */) {\n return function () {\n delete kills[kid];\n if (tmp) {\n tmp = false;\n } else if (tail === null) {\n join(step, null, null);\n } else {\n join(step, tail._1, tail._2);\n }\n };\n });\n\n if (tmp) {\n tmp = false;\n return;\n }\n }\n break;\n }\n\n if (tail === null) {\n head = null;\n } else {\n head = tail._1;\n tail = tail._2;\n }\n }\n }", "function join(result, head, tail) {\n var fail, step, lhs, rhs, tmp, kid;\n\n if (util.isLeft(result)) {\n fail = result;\n step = null;\n } else {\n step = result;\n fail = null;\n }\n\n loop: while (true) {\n lhs = null;\n rhs = null;\n tmp = null;\n kid = null;\n\n // We should never continue if the entire tree has been interrupted.\n if (interrupt !== null) {\n return;\n }\n\n // We've made it all the way to the root of the tree, which means\n // the tree has fully evaluated.\n if (head === null) {\n cb(fail || step)();\n return;\n }\n\n // The tree has already been computed, so we shouldn't try to do it\n // again. This should never happen.\n // TODO: Remove this?\n if (head._3 !== EMPTY) {\n return;\n }\n\n switch (head.tag) {\n case MAP:\n if (fail === null) {\n head._3 = util.right(head._1(util.fromRight(step)));\n step = head._3;\n } else {\n head._3 = fail;\n }\n break;\n case APPLY:\n lhs = head._1._3;\n rhs = head._2._3;\n // If we have a failure we should kill the other side because we\n // can't possible yield a result anymore.\n if (fail) {\n head._3 = fail;\n tmp = true;\n kid = killId++;\n\n kills[kid] = kill(early, fail === lhs ? head._2 : head._1, function (/* unused */) {\n return function () {\n delete kills[kid];\n if (tmp) {\n tmp = false;\n } else if (tail === null) {\n join(fail, null, null);\n } else {\n join(fail, tail._1, tail._2);\n }\n };\n });\n\n if (tmp) {\n tmp = false;\n return;\n }\n } else if (lhs === EMPTY || rhs === EMPTY) {\n // We can only proceed if both sides have resolved.\n return;\n } else {\n step = util.right(util.fromRight(lhs)(util.fromRight(rhs)));\n head._3 = step;\n }\n break;\n case ALT:\n lhs = head._1._3;\n rhs = head._2._3;\n // We can only proceed if both have resolved or we have a success\n if (lhs === EMPTY && util.isLeft(rhs) || rhs === EMPTY && util.isLeft(lhs)) {\n return;\n }\n // If both sides resolve with an error, we should continue with the\n // first error\n if (lhs !== EMPTY && util.isLeft(lhs) && rhs !== EMPTY && util.isLeft(rhs)) {\n fail = step === lhs ? rhs : lhs;\n step = null;\n head._3 = fail;\n } else {\n head._3 = step;\n tmp = true;\n kid = killId++;\n // Once a side has resolved, we need to cancel the side that is still\n // pending before we can continue.\n kills[kid] = kill(early, step === lhs ? head._2 : head._1, function (/* unused */) {\n return function () {\n delete kills[kid];\n if (tmp) {\n tmp = false;\n } else if (tail === null) {\n join(step, null, null);\n } else {\n join(step, tail._1, tail._2);\n }\n };\n });\n\n if (tmp) {\n tmp = false;\n return;\n }\n }\n break;\n }\n\n if (tail === null) {\n head = null;\n } else {\n head = tail._1;\n tail = tail._2;\n }\n }\n }", "function join(result, head, tail) {\n var fail, step, lhs, rhs, tmp, kid;\n\n if (util.isLeft(result)) {\n fail = result;\n step = null;\n } else {\n step = result;\n fail = null;\n }\n\n loop: while (true) {\n lhs = null;\n rhs = null;\n tmp = null;\n kid = null;\n\n // We should never continue if the entire tree has been interrupted.\n if (interrupt !== null) {\n return;\n }\n\n // We've made it all the way to the root of the tree, which means\n // the tree has fully evaluated.\n if (head === null) {\n cb(fail || step)();\n return;\n }\n\n // The tree has already been computed, so we shouldn't try to do it\n // again. This should never happen.\n // TODO: Remove this?\n if (head._3 !== EMPTY) {\n return;\n }\n\n switch (head.tag) {\n case MAP:\n if (fail === null) {\n head._3 = util.right(head._1(util.fromRight(step)));\n step = head._3;\n } else {\n head._3 = fail;\n }\n break;\n case APPLY:\n lhs = head._1._3;\n rhs = head._2._3;\n // If we have a failure we should kill the other side because we\n // can't possible yield a result anymore.\n if (fail) {\n head._3 = fail;\n tmp = true;\n kid = killId++;\n\n kills[kid] = kill(early, fail === lhs ? head._2 : head._1, function (/* unused */) {\n return function () {\n delete kills[kid];\n if (tmp) {\n tmp = false;\n } else if (tail === null) {\n join(fail, null, null);\n } else {\n join(fail, tail._1, tail._2);\n }\n };\n });\n\n if (tmp) {\n tmp = false;\n return;\n }\n } else if (lhs === EMPTY || rhs === EMPTY) {\n // We can only proceed if both sides have resolved.\n return;\n } else {\n step = util.right(util.fromRight(lhs)(util.fromRight(rhs)));\n head._3 = step;\n }\n break;\n case ALT:\n lhs = head._1._3;\n rhs = head._2._3;\n // We can only proceed if both have resolved or we have a success\n if (lhs === EMPTY && util.isLeft(rhs) || rhs === EMPTY && util.isLeft(lhs)) {\n return;\n }\n // If both sides resolve with an error, we should continue with the\n // first error\n if (lhs !== EMPTY && util.isLeft(lhs) && rhs !== EMPTY && util.isLeft(rhs)) {\n fail = step === lhs ? rhs : lhs;\n step = null;\n head._3 = fail;\n } else {\n head._3 = step;\n tmp = true;\n kid = killId++;\n // Once a side has resolved, we need to cancel the side that is still\n // pending before we can continue.\n kills[kid] = kill(early, step === lhs ? head._2 : head._1, function (/* unused */) {\n return function () {\n delete kills[kid];\n if (tmp) {\n tmp = false;\n } else if (tail === null) {\n join(step, null, null);\n } else {\n join(step, tail._1, tail._2);\n }\n };\n });\n\n if (tmp) {\n tmp = false;\n return;\n }\n }\n break;\n }\n\n if (tail === null) {\n head = null;\n } else {\n head = tail._1;\n tail = tail._2;\n }\n }\n }", "function join(result, head, tail) {\n var fail, step, lhs, rhs, tmp, kid;\n\n if (util.isLeft(result)) {\n fail = result;\n step = null;\n } else {\n step = result;\n fail = null;\n }\n\n loop: while (true) {\n lhs = null;\n rhs = null;\n tmp = null;\n kid = null;\n\n // We should never continue if the entire tree has been interrupted.\n if (interrupt !== null) {\n return;\n }\n\n // We've made it all the way to the root of the tree, which means\n // the tree has fully evaluated.\n if (head === null) {\n cb(fail || step)();\n return;\n }\n\n // The tree has already been computed, so we shouldn't try to do it\n // again. This should never happen.\n // TODO: Remove this?\n if (head._3 !== EMPTY) {\n return;\n }\n\n switch (head.tag) {\n case MAP:\n if (fail === null) {\n head._3 = util.right(head._1(util.fromRight(step)));\n step = head._3;\n } else {\n head._3 = fail;\n }\n break;\n case APPLY:\n lhs = head._1._3;\n rhs = head._2._3;\n // If we have a failure we should kill the other side because we\n // can't possible yield a result anymore.\n if (fail) {\n head._3 = fail;\n tmp = true;\n kid = killId++;\n\n kills[kid] = kill(early, fail === lhs ? head._2 : head._1, function (/* unused */) {\n return function () {\n delete kills[kid];\n if (tmp) {\n tmp = false;\n } else if (tail === null) {\n join(fail, null, null);\n } else {\n join(fail, tail._1, tail._2);\n }\n };\n });\n\n if (tmp) {\n tmp = false;\n return;\n }\n } else if (lhs === EMPTY || rhs === EMPTY) {\n // We can only proceed if both sides have resolved.\n return;\n } else {\n step = util.right(util.fromRight(lhs)(util.fromRight(rhs)));\n head._3 = step;\n }\n break;\n case ALT:\n lhs = head._1._3;\n rhs = head._2._3;\n // We can only proceed if both have resolved or we have a success\n if (lhs === EMPTY && util.isLeft(rhs) || rhs === EMPTY && util.isLeft(lhs)) {\n return;\n }\n // If both sides resolve with an error, we should continue with the\n // first error\n if (lhs !== EMPTY && util.isLeft(lhs) && rhs !== EMPTY && util.isLeft(rhs)) {\n fail = step === lhs ? rhs : lhs;\n step = null;\n head._3 = fail;\n } else {\n head._3 = step;\n tmp = true;\n kid = killId++;\n // Once a side has resolved, we need to cancel the side that is still\n // pending before we can continue.\n kills[kid] = kill(early, step === lhs ? head._2 : head._1, function (/* unused */) {\n return function () {\n delete kills[kid];\n if (tmp) {\n tmp = false;\n } else if (tail === null) {\n join(step, null, null);\n } else {\n join(step, tail._1, tail._2);\n }\n };\n });\n\n if (tmp) {\n tmp = false;\n return;\n }\n }\n break;\n }\n\n if (tail === null) {\n head = null;\n } else {\n head = tail._1;\n tail = tail._2;\n }\n }\n }", "function join(result, head, tail) {\n var fail, step, lhs, rhs, tmp, kid;\n\n if (util.isLeft(result)) {\n fail = result;\n step = null;\n } else {\n step = result;\n fail = null;\n }\n\n loop: while (true) {\n lhs = null;\n rhs = null;\n tmp = null;\n kid = null;\n\n // We should never continue if the entire tree has been interrupted.\n if (interrupt !== null) {\n return;\n }\n\n // We've made it all the way to the root of the tree, which means\n // the tree has fully evaluated.\n if (head === null) {\n cb(fail || step)();\n return;\n }\n\n // The tree has already been computed, so we shouldn't try to do it\n // again. This should never happen.\n // TODO: Remove this?\n if (head._3 !== EMPTY) {\n return;\n }\n\n switch (head.tag) {\n case MAP:\n if (fail === null) {\n head._3 = util.right(head._1(util.fromRight(step)));\n step = head._3;\n } else {\n head._3 = fail;\n }\n break;\n case APPLY:\n lhs = head._1._3;\n rhs = head._2._3;\n // If we have a failure we should kill the other side because we\n // can't possible yield a result anymore.\n if (fail) {\n head._3 = fail;\n tmp = true;\n kid = killId++;\n\n kills[kid] = kill(early, fail === lhs ? head._2 : head._1, function (/* unused */) {\n return function () {\n delete kills[kid];\n if (tmp) {\n tmp = false;\n } else if (tail === null) {\n join(fail, null, null);\n } else {\n join(fail, tail._1, tail._2);\n }\n };\n });\n\n if (tmp) {\n tmp = false;\n return;\n }\n } else if (lhs === EMPTY || rhs === EMPTY) {\n // We can only proceed if both sides have resolved.\n return;\n } else {\n step = util.right(util.fromRight(lhs)(util.fromRight(rhs)));\n head._3 = step;\n }\n break;\n case ALT:\n lhs = head._1._3;\n rhs = head._2._3;\n // We can only proceed if both have resolved or we have a success\n if (lhs === EMPTY && util.isLeft(rhs) || rhs === EMPTY && util.isLeft(lhs)) {\n return;\n }\n // If both sides resolve with an error, we should continue with the\n // first error\n if (lhs !== EMPTY && util.isLeft(lhs) && rhs !== EMPTY && util.isLeft(rhs)) {\n fail = step === lhs ? rhs : lhs;\n step = null;\n head._3 = fail;\n } else {\n head._3 = step;\n tmp = true;\n kid = killId++;\n // Once a side has resolved, we need to cancel the side that is still\n // pending before we can continue.\n kills[kid] = kill(early, step === lhs ? head._2 : head._1, function (/* unused */) {\n return function () {\n delete kills[kid];\n if (tmp) {\n tmp = false;\n } else if (tail === null) {\n join(step, null, null);\n } else {\n join(step, tail._1, tail._2);\n }\n };\n });\n\n if (tmp) {\n tmp = false;\n return;\n }\n }\n break;\n }\n\n if (tail === null) {\n head = null;\n } else {\n head = tail._1;\n tail = tail._2;\n }\n }\n }", "function join(result, head, tail) {\n var fail, step, lhs, rhs, tmp, kid;\n\n if (util.isLeft(result)) {\n fail = result;\n step = null;\n } else {\n step = result;\n fail = null;\n }\n\n loop: while (true) {\n lhs = null;\n rhs = null;\n tmp = null;\n kid = null;\n\n // We should never continue if the entire tree has been interrupted.\n if (interrupt !== null) {\n return;\n }\n\n // We've made it all the way to the root of the tree, which means\n // the tree has fully evaluated.\n if (head === null) {\n cb(fail || step)();\n return;\n }\n\n // The tree has already been computed, so we shouldn't try to do it\n // again. This should never happen.\n // TODO: Remove this?\n if (head._3 !== EMPTY) {\n return;\n }\n\n switch (head.tag) {\n case MAP:\n if (fail === null) {\n head._3 = util.right(head._1(util.fromRight(step)));\n step = head._3;\n } else {\n head._3 = fail;\n }\n break;\n case APPLY:\n lhs = head._1._3;\n rhs = head._2._3;\n // If we have a failure we should kill the other side because we\n // can't possible yield a result anymore.\n if (fail) {\n head._3 = fail;\n tmp = true;\n kid = killId++;\n\n kills[kid] = kill(early, fail === lhs ? head._2 : head._1, function (/* unused */) {\n return function () {\n delete kills[kid];\n if (tmp) {\n tmp = false;\n } else if (tail === null) {\n join(fail, null, null);\n } else {\n join(fail, tail._1, tail._2);\n }\n };\n });\n\n if (tmp) {\n tmp = false;\n return;\n }\n } else if (lhs === EMPTY || rhs === EMPTY) {\n // We can only proceed if both sides have resolved.\n return;\n } else {\n step = util.right(util.fromRight(lhs)(util.fromRight(rhs)));\n head._3 = step;\n }\n break;\n case ALT:\n lhs = head._1._3;\n rhs = head._2._3;\n // We can only proceed if both have resolved or we have a success\n if (lhs === EMPTY && util.isLeft(rhs) || rhs === EMPTY && util.isLeft(lhs)) {\n return;\n }\n // If both sides resolve with an error, we should continue with the\n // first error\n if (lhs !== EMPTY && util.isLeft(lhs) && rhs !== EMPTY && util.isLeft(rhs)) {\n fail = step === lhs ? rhs : lhs;\n step = null;\n head._3 = fail;\n } else {\n head._3 = step;\n tmp = true;\n kid = killId++;\n // Once a side has resolved, we need to cancel the side that is still\n // pending before we can continue.\n kills[kid] = kill(early, step === lhs ? head._2 : head._1, function (/* unused */) {\n return function () {\n delete kills[kid];\n if (tmp) {\n tmp = false;\n } else if (tail === null) {\n join(step, null, null);\n } else {\n join(step, tail._1, tail._2);\n }\n };\n });\n\n if (tmp) {\n tmp = false;\n return;\n }\n }\n break;\n }\n\n if (tail === null) {\n head = null;\n } else {\n head = tail._1;\n tail = tail._2;\n }\n }\n }", "function join(result, head, tail) {\n var fail, step, lhs, rhs, tmp, kid;\n\n if (util.isLeft(result)) {\n fail = result;\n step = null;\n } else {\n step = result;\n fail = null;\n }\n\n loop: while (true) {\n lhs = null;\n rhs = null;\n tmp = null;\n kid = null;\n\n // We should never continue if the entire tree has been interrupted.\n if (interrupt !== null) {\n return;\n }\n\n // We've made it all the way to the root of the tree, which means\n // the tree has fully evaluated.\n if (head === null) {\n cb(fail || step)();\n return;\n }\n\n // The tree has already been computed, so we shouldn't try to do it\n // again. This should never happen.\n // TODO: Remove this?\n if (head._3 !== EMPTY) {\n return;\n }\n\n switch (head.tag) {\n case MAP:\n if (fail === null) {\n head._3 = util.right(head._1(util.fromRight(step)));\n step = head._3;\n } else {\n head._3 = fail;\n }\n break;\n case APPLY:\n lhs = head._1._3;\n rhs = head._2._3;\n // If we have a failure we should kill the other side because we\n // can't possible yield a result anymore.\n if (fail) {\n head._3 = fail;\n tmp = true;\n kid = killId++;\n\n kills[kid] = kill(early, fail === lhs ? head._2 : head._1, function (/* unused */) {\n return function () {\n delete kills[kid];\n if (tmp) {\n tmp = false;\n } else if (tail === null) {\n join(fail, null, null);\n } else {\n join(fail, tail._1, tail._2);\n }\n };\n });\n\n if (tmp) {\n tmp = false;\n return;\n }\n } else if (lhs === EMPTY || rhs === EMPTY) {\n // We can only proceed if both sides have resolved.\n return;\n } else {\n step = util.right(util.fromRight(lhs)(util.fromRight(rhs)));\n head._3 = step;\n }\n break;\n case ALT:\n lhs = head._1._3;\n rhs = head._2._3;\n // We can only proceed if both have resolved or we have a success\n if (lhs === EMPTY && util.isLeft(rhs) || rhs === EMPTY && util.isLeft(lhs)) {\n return;\n }\n // If both sides resolve with an error, we should continue with the\n // first error\n if (lhs !== EMPTY && util.isLeft(lhs) && rhs !== EMPTY && util.isLeft(rhs)) {\n fail = step === lhs ? rhs : lhs;\n step = null;\n head._3 = fail;\n } else {\n head._3 = step;\n tmp = true;\n kid = killId++;\n // Once a side has resolved, we need to cancel the side that is still\n // pending before we can continue.\n kills[kid] = kill(early, step === lhs ? head._2 : head._1, function (/* unused */) {\n return function () {\n delete kills[kid];\n if (tmp) {\n tmp = false;\n } else if (tail === null) {\n join(step, null, null);\n } else {\n join(step, tail._1, tail._2);\n }\n };\n });\n\n if (tmp) {\n tmp = false;\n return;\n }\n }\n break;\n }\n\n if (tail === null) {\n head = null;\n } else {\n head = tail._1;\n tail = tail._2;\n }\n }\n }", "function batchRenderer(itemPromise, recycled) {\n var element, label, item, img;\n if (!recycled) {\n // create a basic template for the item which doesn't depend on the data\n element = document.createElement(\"div\");\n element.className = \"itemTempl\";\n element.innerHTML = \"<div class='content'>...</div>\";\n }\n else {\n // clean up the recycled element so that we can re-use it rather than having\n // to create the html from scratch\n element = recycled;\n label = element.querySelector(\".content\");\n label.innerHTML = \"...\";\n // remove the image if its arealy there\n img = element.querySelector(\"img\");\n if (img) { element.removeChild(img); }\n }\n // return the element as the placeholder, and a callback to update it when data is available\n return {\n element: element,\n // specifies a promise that will be completed when rendering is complete\n // itemPromise will complete when the data is available\n renderComplete: itemPromise.then(function (i) {\n item = i;\n // mutate the element to update only the title\n if (!label) { label = element.querySelector(\".content\"); }\n label.innerText = item.data.title;\n // use the item.ready promise to delay the more expensive work\n return item.ready;\n // use the ability to chain promises, to enable work to be cancelled\n }).then(function () {\n //use the image loader to queue the loading of the image\n return item.loadImage(item.data.thumbnail);\n }).then(thumbnailBatch()\n ).then(function (newimg) {\n img = newimg;\n element.insertBefore(img, element.firstElementChild);\n return item.isOnScreen();\n }).then(function (onscreen) {\n if (!onscreen) {\n //if the item is not visible, then don't animate its opacity\n img.style.opacity = 1;\n } else {\n //if the item is visible then animate the opacity of the image\n WinJS.UI.Animation.fadeIn(img);\n }\n }).then(null, function (err) {\n //if an error occurs, and its not a cancellation, then show a placeholder\n if (err.name === \"Canceled\") {\n return WinJS.Promise.wrapError(err);\n } else {\n img = element.querySelector(\"img\");\n if (img) {\n img.src = \"/images/placeholder-sdk.png\";\n img.style.opacity = 1;\n }\n return;\n }\n })\n };\n }" ]
[ "0.5607003", "0.5607003", "0.5607003", "0.5607003", "0.5572906", "0.55432487", "0.553137", "0.553137", "0.553137", "0.553137", "0.553137", "0.553137", "0.553137", "0.553137", "0.553137", "0.553137", "0.553137", "0.553137", "0.553137", "0.553137", "0.553137", "0.553137", "0.54887205", "0.54887205", "0.54887205", "0.5439277", "0.5439277", "0.54330254", "0.54330254", "0.54330254", "0.54156244", "0.5383443", "0.5383443", "0.5383443", "0.5383443", "0.5383443", "0.5383443", "0.5303577", "0.5303577", "0.52377987", "0.5227712", "0.52193904", "0.52193904", "0.5213213", "0.5213213", "0.5177503", "0.51697874", "0.51592374", "0.51572114", "0.51481664", "0.5144779", "0.51353115", "0.5134253", "0.5134253", "0.5134253", "0.51272416", "0.5120097", "0.511894", "0.51113063", "0.51060283", "0.50772667", "0.50772667", "0.50772667", "0.5076149", "0.5073211", "0.5064307", "0.5052832", "0.50360864", "0.5033758", "0.5018245", "0.5018245", "0.5018245", "0.5018245", "0.5018245", "0.5018245", "0.5001882", "0.5001882", "0.49944878" ]
0.529154
58
Capture errors so they don't interrupt unmounting.
function safelyCallComponentWillUnmount(current, instance) { { invokeGuardedCallback(null, callComponentWillUnmountWithTimer, null, current, instance); if (hasCaughtError()) { var unmountError = clearCaughtError(); captureCommitPhaseError(current, unmountError); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "simulateUnmount() {\n this.volumeUnmountListener(this.volumeInfo_.volumeId);\n }", "function onerror(er){debug('onerror',er);unpipe();dest.removeListener('error',onerror);if(EElistenerCount(dest,'error')===0)errorOrDestroy(dest,er);}// Make sure our error handler is attached before userland ones.", "function safelyCallComponentWillUnmount(current,instance){{invokeGuardedCallback$2(null,callComponentWillUnmountWithTimer,null,current,instance);if(hasCaughtError$1()){var unmountError=clearCaughtError$1();captureError(current,unmountError);}}}", "function safelyCallComponentWillUnmount(current,instance){{invokeGuardedCallback$2(null,callComponentWillUnmountWithTimer,null,current,instance);if(hasCaughtError$1()){var unmountError=clearCaughtError$1();captureError(current,unmountError);}}}", "function safelyCallComponentWillUnmount(current,instance){{invokeGuardedCallback$2(null,callComponentWillUnmountWithTimer,null,current,instance);if(hasCaughtError$1()){var unmountError=clearCaughtError$1();captureError(current,unmountError);}}}", "componentWillUnmount() {\n window.removeEventListener(\"unhandledrejection\", this.handleAllUncaughtErrors)\n }", "function onerror(er){debug('onerror',er);unpipe();dest.removeListener('error',onerror);if(EElistenerCount(dest,'error')===0)dest.emit('error',er);}// Make sure our error handler is attached before userland ones.", "function onerror(er){debug('onerror',er);unpipe();dest.removeListener('error',onerror);if(EElistenerCount(dest,'error')===0)dest.emit('error',er);}// Make sure our error handler is attached before userland ones.", "function onerror(er){debug('onerror',er);unpipe();dest.removeListener('error',onerror);if(EElistenerCount(dest,'error')===0)dest.emit('error',er);}// Make sure our error handler is attached before userland ones.", "componentWillUnmount() {\n if (this.props.error) {\n this.props.removeError();\n }\n }", "function safelyCallComponentWillUnmount(current,instance){{invokeGuardedCallback(null,callComponentWillUnmountWithTimer,null,current,instance);if(hasCaughtError()){var unmountError=clearCaughtError();captureCommitPhaseError(current,unmountError);}}}", "function safelyCallComponentWillUnmount(current,instance){{invokeGuardedCallback(null,callComponentWillUnmountWithTimer,null,current,instance);if(hasCaughtError()){var unmountError=clearCaughtError();captureCommitPhaseError(current,unmountError);}}}", "function safelyCallComponentWillUnmount(current,instance){{invokeGuardedCallback(null,callComponentWillUnmountWithTimer,null,current,instance);if(hasCaughtError()){var unmountError=clearCaughtError();captureCommitPhaseError(current,unmountError);}}}", "function safelyCallComponentWillUnmount(current,instance){{invokeGuardedCallback(null,callComponentWillUnmountWithTimer,null,current,instance);if(hasCaughtError()){var unmountError=clearCaughtError();captureCommitPhaseError(current,unmountError);}}}", "function safelyCallComponentWillUnmount(current,instance){{invokeGuardedCallback(null,callComponentWillUnmountWithTimer,null,current,instance);if(hasCaughtError()){var unmountError=clearCaughtError();captureCommitPhaseError(current,unmountError);}}}", "function safelyCallComponentWillUnmount(current$$1,instance){{invokeGuardedCallback(null,callComponentWillUnmountWithTimer,null,current$$1,instance);if(hasCaughtError()){var unmountError=clearCaughtError();captureCommitPhaseError(current$$1,unmountError);}}}", "function safelyCallComponentWillUnmount(current$$1,instance){{invokeGuardedCallback(null,callComponentWillUnmountWithTimer,null,current$$1,instance);if(hasCaughtError()){var unmountError=clearCaughtError();captureCommitPhaseError(current$$1,unmountError);}}}", "function safelyCallComponentWillUnmount(current$$1,instance){{invokeGuardedCallback(null,callComponentWillUnmountWithTimer,null,current$$1,instance);if(hasCaughtError()){var unmountError=clearCaughtError();captureCommitPhaseError(current$$1,unmountError);}}}", "function safelyCallComponentWillUnmount(current,instance){{invokeGuardedCallback$3(null,callComponentWillUnmountWithTimer,null,current,instance);if(hasCaughtError$1()){var unmountError=clearCaughtError$1();captureCommitPhaseError(current,unmountError);}}}", "function safelyCallComponentWillUnmount(current,instance){{invokeGuardedCallback$3(null,callComponentWillUnmountWithTimer,null,current,instance);if(hasCaughtError$1()){var unmountError=clearCaughtError$1();captureCommitPhaseError(current,unmountError);}}}", "_onError(e) {\n console.log(`Filer filesystem error: ${e}`);\n }", "function flushMounts() {\n\tvar c;\n\twhile (c = mounts.pop()) {\n\t\tif (options.afterMount) options.afterMount(c);\n\t\tif (c.componentDidMount) c.componentDidMount();\n\t}\n}", "function flushMounts() {\n\tvar c;\n\twhile (c = mounts.pop()) {\n\t\tif (options.afterMount) options.afterMount(c);\n\t\tif (c.componentDidMount) c.componentDidMount();\n\t}\n}", "function flushMounts() {\n\tvar c;\n\twhile (c = mounts.pop()) {\n\t\tif (options.afterMount) options.afterMount(c);\n\t\tif (c.componentDidMount) c.componentDidMount();\n\t}\n}", "function flushMounts() {\n\tvar c;\n\twhile (c = mounts.pop()) {\n\t\tif (options.afterMount) options.afterMount(c);\n\t\tif (c.componentDidMount) c.componentDidMount();\n\t}\n}", "function flushMounts() {\n\tvar c;\n\twhile (c = mounts.pop()) {\n\t\tif (options.afterMount) options.afterMount(c);\n\t\tif (c.componentDidMount) c.componentDidMount();\n\t}\n}", "function flushMounts() {\n\tvar c;\n\twhile (c = mounts.pop()) {\n\t\tif (options.afterMount) options.afterMount(c);\n\t\tif (c.componentDidMount) c.componentDidMount();\n\t}\n}", "_onError(error) {\n values(this._watcherMap).forEach(watcherInfo =>\n watcherInfo.watchmanWatcher.handleErrorEvent(error)\n );\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n } // Make sure our error handler is attached before userland ones.", "onError_() {\n this.switchScreen_(Screens.ERROR);\n getParentAccessUIHandler().onParentAccessDone(ParentAccessResult.kError);\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n\t {\n\t invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n\t if (hasCaughtError$1()) {\n\t var unmountError = clearCaughtError$1();\n\t captureError(current, unmountError);\n\t }\n\t }\n\t }", "function safelyCallComponentWillUnmount(current$$1, instance) {\n {\n invokeGuardedCallback(null, callComponentWillUnmountWithTimer, null, current$$1, instance);\n\n if (hasCaughtError()) {\n var unmountError = clearCaughtError();\n captureCommitPhaseError(current$$1, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current$$1, instance) {\n {\n invokeGuardedCallback(null, callComponentWillUnmountWithTimer, null, current$$1, instance);\n\n if (hasCaughtError()) {\n var unmountError = clearCaughtError();\n captureCommitPhaseError(current$$1, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current$$1, instance) {\n {\n invokeGuardedCallback(null, callComponentWillUnmountWithTimer, null, current$$1, instance);\n\n if (hasCaughtError()) {\n var unmountError = clearCaughtError();\n captureCommitPhaseError(current$$1, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current$$1, instance) {\n {\n invokeGuardedCallback(null, callComponentWillUnmountWithTimer, null, current$$1, instance);\n\n if (hasCaughtError()) {\n var unmountError = clearCaughtError();\n captureCommitPhaseError(current$$1, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimerInDev, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimerInDev, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimerInDev, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimerInDev, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimerInDev, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimerInDev, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (dest.listenerCount('error') === 0) {\n const s = dest._writableState || dest._readableState;\n if (s && !s.errorEmitted) {\n // User incorrectly emitted 'error' directly on the stream.\n errorOrDestroy(dest, er);\n } else {\n dest.emit('error', er);\n }\n }\n } // Make sure our error handler is attached before userland ones.", "function onerror(er) {\n\t debug$2('onerror', er);\n\t unpipe();\n\t dest.removeListener('error', onerror);\n\t if (EElistenerCount(dest, 'error') === 0) errorOrDestroy$2(dest, er);\n\t } // Make sure our error handler is attached before userland ones.", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }", "function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }" ]
[ "0.6385105", "0.5921357", "0.5853079", "0.5853079", "0.5853079", "0.58470565", "0.58197415", "0.58197415", "0.58197415", "0.57672554", "0.5742686", "0.5742686", "0.5742686", "0.5742686", "0.5742686", "0.57321393", "0.57321393", "0.57321393", "0.5689659", "0.5689659", "0.5657255", "0.56402457", "0.56402457", "0.56402457", "0.56402457", "0.56402457", "0.56402457", "0.56064075", "0.55910873", "0.5590156", "0.5590156", "0.5590156", "0.5590156", "0.5590156", "0.5590156", "0.5590156", "0.5590156", "0.5590156", "0.5590156", "0.5590156", "0.5590156", "0.5590156", "0.5590156", "0.5590156", "0.5590156", "0.5590156", "0.5590156", "0.5590156", "0.5590156", "0.5590156", "0.5590156", "0.5590156", "0.5590156", "0.5590156", "0.5590156", "0.5590156", "0.5590156", "0.5590156", "0.5590156", "0.5590156", "0.5590156", "0.5590156", "0.5590156", "0.5590156", "0.5590156", "0.5590156", "0.5589521", "0.55695796", "0.55695796", "0.5558446", "0.55567133", "0.55567133", "0.55567133", "0.55567133", "0.55494034", "0.55494034", "0.55494034", "0.55494034", "0.55494034", "0.55494034", "0.55478126", "0.55453753", "0.5536225", "0.5536225", "0.5536225", "0.5536225", "0.5536225", "0.5536225", "0.5536225", "0.5536225", "0.5536225", "0.5536225", "0.5536225", "0.5536225", "0.5536225", "0.5536225", "0.5536225", "0.5536225", "0.5536225", "0.5536225", "0.5536225" ]
0.0
-1
deletion, so don't let them throw. Hostoriginating errors should interrupt deletion, so it's okay
function commitUnmount(finishedRoot, current, renderPriorityLevel) { onCommitUnmount(current); switch (current.tag) { case FunctionComponent: case ForwardRef: case MemoComponent: case SimpleMemoComponent: case Block: { var updateQueue = current.updateQueue; if (updateQueue !== null) { var lastEffect = updateQueue.lastEffect; if (lastEffect !== null) { var firstEffect = lastEffect.next; { // When the owner fiber is deleted, the destroy function of a passive // effect hook is called during the synchronous commit phase. This is // a concession to implementation complexity. Calling it in the // passive effect phase (like they usually are, when dependencies // change during an update) would require either traversing the // children of the deleted fiber again, or including unmount effects // as part of the fiber effect list. // // Because this is during the sync commit phase, we need to change // the priority. // // TODO: Reconsider this implementation trade off. var priorityLevel = renderPriorityLevel > NormalPriority ? NormalPriority : renderPriorityLevel; runWithPriority$1(priorityLevel, function () { var effect = firstEffect; do { var _destroy = effect.destroy; if (_destroy !== undefined) { safelyCallDestroy(current, _destroy); } effect = effect.next; } while (effect !== firstEffect); }); } } } return; } case ClassComponent: { safelyDetachRef(current); var instance = current.stateNode; if (typeof instance.componentWillUnmount === 'function') { safelyCallComponentWillUnmount(current, instance); } return; } case HostComponent: { safelyDetachRef(current); return; } case HostPortal: { // TODO: this is recursive. // We are also not using this parent because // the portal will get pushed immediately. { unmountHostComponents(finishedRoot, current, renderPriorityLevel); } return; } case FundamentalComponent: { return; } case DehydratedFragment: { return; } case ScopeComponent: { return; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteErrHandler(error, result) {\n\tif (error) {\n\t\tlog(\"cannot delete data\")\n\t\tthrow error\n\t} else {\n\t\tlog(\"Delete Success\") \n\t}\n}", "remove () {\n // cleanup\n }", "delete() {}", "detach() {\n throw new Error('Not Implemented');\n }", "detach() {\n throw new Error('Not Implemented');\n }", "cleanup() {}", "cleanup() {}", "function _handleRemove() {\n Promise.all(deletePromises).catch(error => console.log(error));\n next(err);\n }", "removed() {}", "removed() {}", "disconnectedCallback() {\r\n\t\t\tconsole.log(\"deleted\");\r\n\t\t}", "async cleanup() {\n // The cleanup logic is as follows:\n // - We first try to delete the resource using the delete() method\n // - However, it is possible that the user that created the resource does not have permission\n // to delete the resource or the user might have become inactive. Because of this we will\n // also try to perform the same delete() method but with default admin credentials\n\n try {\n await this.delete();\n } catch (error) {\n // Now we try with default admin credentials\n const adminSession = await this.setup.defaultAdminSession();\n this.axiosClient = adminSession.axiosClient;\n await this.delete();\n }\n }", "cleanUpDeadCreeps () {\n }", "disconnected() {\n this.unsubscribe?.();\n delete this.unsubscribe;\n delete this.baseObject;\n delete this.property;\n delete this.replica;\n delete this.path;\n }", "function linkCleanup() {\n\t\tvar links = new DBRow(lit.tables.LINK);\n\t\tlinks.query().then(function() {\n\t\t\tvar href = \"\";\n\n\t\t\twhile(links.next()){\n\t\t\t\thref = links.getValue(lit.LINK);\n\t\t\t\tvar isValid = true;//test link using something\n\t\t\t\tif (isValid)\n\t\t\t\t\tcontinue;\n\t\t\t\telse\n\t\t\t\t\tlinks.delete().then(function() { //if it's not valid delete the current link\n\n\t\t\t\t\t}, function() {\n\t\t\t\t\t\tlog.warn(\"The link \" + href + \" was unable to be deleted but is invalid, consider manually deleting the link.\")\n\t\t\t\t\t})\n\t\t\t}\n\n\t\t}, function(err) {\n\n\t\t});\n\t}", "function exit(code) { \n debug(\"caught exit\");\n console.log(\"Trying to remove hosts from manage-hosts\");\n self.remove(hostMap, function() {\n process.exit(); \n });\n }", "cleanup() {\n\n\t}", "function stoogeDeleted(model, error) {\n if (typeof error != 'undefined') {\n callback(error);\n return;\n }\n // model parameter is what was deleted\n self.shouldBeTrue(undefined === model.get('id')); // ID removed\n self.shouldBeTrue(model.get('name') == 'Curly'); // the rest remains\n // Is it really dead?\n var curly = new self.Stooge();\n curly.set('id', self.deletedModelId);\n spec.integrationStore.getModel(curly, hesDeadJim);\n }", "die() {\n let entry;\n while (entry = this._queue.pop()) {\n entry.reject();\n }\n this._queue = null;\n }", "delete() {\n this.items().then(instances => {\n instances.forEach(instance => {\n instance.delete();\n })\n }).catch(error => {\n debugger;\n throw error;\n })\n }", "delete() {\n\n }", "detach() {\n throw new Error('incompatible reuse strategy');\n }", "function cleanup(){\n\t\t\tdelete pending[ serial]\n\t\t}", "function somethingBad() {\n nock.cleanAll()\n }", "function _remove() {\n return;\n }", "async function cleanOrigin( origin ) {\n const fdb = await origin.fdb;\n // Iterate over deleted records, build lists of items to delete by category.\n const deleted = {};\n await fdb.forEach('status','deleted', record => {\n // Read values from the record.\n const { path, category } = record;\n // Construct a request URL.\n const url = origin.url+path;\n // Construct an deletion item.\n const item = { path, url };\n // Record the fileset category.\n const list = deleted[category];\n if( list ) {\n list.push( item );\n }\n else {\n deleted[category] = [ item ];\n }\n });\n // Iterate over each fileset category and remove deleted files from its cache.\n for( const category in deleted ) {\n // Get the fileset cache name..\n const { cacheName } = getFileset( origin, category );\n // Open the cache.\n const cache = await caches.open( cacheName );\n // Get the list of deleted items.\n const items = deleted[category];\n log('debug','%s Deleting %d files from fileset %s...', IconDelete, items.length, category );\n // Iterate over the deleted items.\n for( const { path, url } of items ) {\n const request = new Request( url );\n // Delete from the cache.\n cache.delete( request );\n // Delete the object store record.\n await fdb.remove( path );\n }\n }\n // Prune commit records - delete any commit record with no active file records.\n await fdb.forEach('category', '$commit', async ( record ) => {\n const { path, info: { commit } } = record;\n const count = await fdb.indexCount('commit', commit );\n log('debug','commit %s count %d', commit, count );\n if( count == 0 ) {\n log('debug','%s Deleting commit record for %s...', IconDelete, commit );\n await fdb.remove( path );\n }\n });\n}", "delete() {\n if (!this.msg) throw new Error(\"Tried to delete embed pages but they havn't even been created yet.\");\n this.msg.delete().catch(() => null);\n }", "destroy() { /* There are no resources to clean up on MySQL server */ }", "delete(element) {\n return Promise.reject('not implement');\n }", "deleteRecord() {\n this._super(...arguments);\n const gist = this.gist;\n if(gist) {\n gist.registerDeletedFile(this.id);\n\n // Following try/catch should not be necessary. Bug in ember data?\n try {\n gist.get('files').removeObject(this);\n } catch(e) {\n /* squash */\n }\n }\n }", "delete() {\r\n return super.deleteCore();\r\n }", "delete() {\r\n return super.deleteCore();\r\n }", "delete() {\r\n return super.deleteCore();\r\n }", "async onDeleted() {\n this.log('device deleted', this.getName(), this.settings.serialNumber);\n this.client && this.client.end();\n this.timeout && clearTimeout(this.timeout);\n this.shouldSync = false;\n this.setUnavailable();\n }", "function destroyed() {\n throw new Error('Call made to destroyed method');\n}", "_destroy() {}", "function deleteMovieError() {\n console.log('Unble to delete movie...');\n}", "async function cleanup() {\n const packageResponse = await client.getPackage(packagePayload.Name, { resolveWithFullResponse: true });\n const propertySetTypeResponse = await client.getPropertySetType(\n propertySetTypePayload.Name,\n null,\n { resolveWithFullResponse: true },\n );\n const thingTypeResponse = await client.getThingType(thingTypePayload.Name, null, { resolveWithFullResponse: true });\n\n const things = await client.getThingsByThingType(thingTypePayload.Name);\n things.value.forEach(async (thing) => {\n await client.deleteThing(thing._id);\n console.log(`Thing deleted: ${thing._id}`);\n });\n\n await client.deleteThingType(thingTypePayload.Name, thingTypeResponse.headers.etag);\n console.log(`Thing type deleted: ${thingTypePayload.Name}`);\n await client.deletePropertySetType(propertySetTypePayload.Name, propertySetTypeResponse.headers.etag);\n console.log(`Property set type deleted: ${propertySetTypePayload.Name}`);\n await client.deletePackage(packagePayload.Name, packageResponse.headers.etag);\n console.log(`Package deleted: ${packagePayload.Name}`);\n}", "function socketError() {\n this.destroy();\n}", "destroy (err) {\n this._destroy(err, () => {})\n }", "destroy (err) {\n this._destroy(err, () => {})\n }", "destroy (err) {\n this._destroy(err, () => {})\n }", "destroy (err) {\n this._destroy(err, () => {})\n }", "destroy (err) {\n this._destroy(err, () => {})\n }", "destroy (err) {\n this._destroy(err, () => {})\n }", "softDrop() {\r\n if (this.actual.softDrop()) {\r\n this.crashed();\r\n }\r\n }", "function socketError () {\n this.destroy();\n}", "function socketError () {\n this.destroy();\n}", "function erasereinforce(){\n\tdelete Reinforce;\n}", "async handleDeletions(keysToDelete) {\n if (this.parent) {\n await this.ensureIndexLoaded()\n }\n let condemned = this.index.getNodesByType(keysToDelete)\n if (Object.keys(condemned.local).length) {\n await this.dynamoClient.deleteAttributes({\n tableName: this.tableName,\n key: this.key,\n attributes: Object.keys(condemned.local)\n }).catch((err) => {u.error('failure in DBObject.handleDeletions', err)})\n }\n \n // Lateral\n let idsToDelete = []\n Object.keys(condemned.lateral).forEach((path) => {\n let node = condemned.lateral[path]\n idsToDelete = idsToDelete.concat(node.getLateralPointers())\n })\n await this._deleteLateral(idsToDelete)\n \n // Elsewhere\n let childNodesWithShitToDelete = {}\n Object.keys(condemned.elsewhere).forEach((path) => {\n let node = condemned.elsewhere[path]\n let pointer = node.getVerticalPointer()\n childNodesWithShitToDelete[pointer] = childNodesWithShitToDelete[pointer] || [] \n childNodesWithShitToDelete[pointer].push(path)\n })\n let pointers = Object.keys(childNodesWithShitToDelete)\n for (let i = 0; i < pointers.length; i++) {\n let pointer = pointers[i]\n let paths = childNodesWithShitToDelete[pointer]\n await this.cachedDirectChildren[pointer].handleDeletions(paths)\n }\n\n // If this is subordinate and we've deleted the last entry, delete the entire node\n if (this.parent) {\n keysToDelete.forEach((path) => {\n delete this.index.i[path]\n })\n this.index.updateMetaNodes()\n let allKeysInIndex = this.index.getChildren()\n if (!allKeysInIndex.length) {await this.destroy()}\n }\n\n // TODO: COLLECTION, FILE, REF\n }", "handleFailure (error_)\n\t{\n\t\t// todo: Undo all actions\n\t\tthis.cleanup ();\n\t\tthrow error_;\n\t}", "Remove() {}", "function cleanupInvalid() {\n //Check for invalid Droplets\n for(var i=droplets.length-1;i >= 0;i--) {\n if(!droplets[i].valid) {\n droplets.splice(i,1);\n }\n }\n\n //Check for invalid Flowers\n for(var i=flowers.length-1;i >= 0;i--) {\n if(!flowers[i].valid) {\n flowers.splice(i,1);\n }\n } \n}", "destroy() {}", "destroy() {}", "destroy() {}", "destroy() {}", "destroy() {}", "destroy() {}", "destroy() {}", "destroy() {}", "destroy() {}", "destroy() {}", "destroy() {}", "static cleanup() {\n return connect(DB_NAME).then(db => {\n const transaction = db.transaction([STORE_NAME], 'readwrite');\n const store = transaction.objectStore(STORE_NAME);\n const request = store.index('expires').openCursor(IDBKeyRange.upperBound(Date.now()));\n return new Promise((resolve, reject) => {\n request.onsuccess = event => {\n const cursor = event.target.result;\n\n if (cursor) {\n cursor.delete(); // Ignoring return value … it's not terrible if this goes wrong.\n\n cursor.continue();\n } else {\n resolve(db);\n }\n };\n\n request.onerror = reject;\n });\n }).then(db => {\n db.close();\n });\n }", "function socketError () {\n\t this.destroy();\n\t}", "function socketError () {\n\t this.destroy();\n\t}", "function socketOnError() {\n this.destroy();\n}", "function socketOnError() {\n this.destroy();\n}", "function socketOnError() {\n this.destroy();\n}", "internalCleanup() {\n\n }", "static actualize() {\n for (let i = 0; i < refs.length ; ++i) {\n const ref = refs[i];\n if (ref.isOutdated()) {\n ref.remove();\n refs.splice(i--, 1);\n }\n }\n }", "detach() {}", "static async _delete() {\n\t\tconst serviceName = Config.str(\"serviceName\");\n\n\t\tconsole.log(\"DELETE 1) Find Target Group Arn\");\n\n\t\tconst targetGroup = await ELBManager.describeTargetGroup(serviceName);\n\t\tconst targetGroupArn = targetGroup.TargetGroupArn;\n\t\tif (!targetGroupArn) {\n\t\t\tthrow new Error(\"Could not find target group associated with service: \" + serviceName);\n\t\t}\n\n\t\tconsole.log(\"DELETE 2) Find ELB Rule for Target Group\");\n\n\t\t// List the rules for our core listener\n\t\t// Find the one that refers to our target group from the previous step\n\t\tconst rules = await ELBManager.describeRules(Config.str(\"listenerArn\"));\n\t\tlet ruleArn;\n\t\tfor (const rule of rules) {\n\t\t\tfor (const action of rule.Actions) {\n\t\t\t\tif (action.TargetGroupArn === targetGroupArn) {\n\t\t\t\t\truleArn = rule.RuleArn;\n\t\t\t\t\tconsole.log(\"FOUND RULE: \" + ruleArn);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (ruleArn) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// If we found the rule delete - this should always happen, but we do as an if statement for safety\n\t\tif (ruleArn) {\n\t\t\tconsole.log(\"DELETE 3) Delete Rule\");\n\t\t\tawait ELBManager.deleteRule(ruleArn);\n\t\t}\n\n\t\t// Sleep for a little bit - otherwise we get a message saying the rule still exists\n\t\tawait Util.sleep(10000);\n\n\t\tconsole.log(\"DELETE 4) Delete Target Group\");\n\t\tawait ELBManager.deleteTargetGroup(targetGroupArn);\n\n\t\tconsole.log(\"DELETE 5) Delete Service\");\n\t\tawait ECSManager.deleteService();\n\t}", "delete() {\n this.afterDelete();\n Fiber.yield(true)\n }", "function testExec_ThrowsMissingFrom() {\n asyncTestCase.waitForAsync('testExec_ThrowsMissingFrom');\n var query = new lf.query.DeleteBuilder(hr.db.getGlobal());\n query.exec().then(\n fail,\n function(e) {\n asyncTestCase.continueTesting();\n });\n}", "delete() {\n this.deleted = true;\n }", "disconnectedCallback() {\n this.repository.delete();\n }", "function socketOnError () {\n this.destroy();\n}", "function socketOnError () {\n this.destroy();\n}", "function socketOnError () {\n this.destroy();\n}", "function terminateOngoingUpload(key) {\n db.getTasks(\"owner_id\", key).then((rows) => {\n if (!rows)\n return;\n\n rows.forEach(row => {\n // file upload ongoing\n if (rows.status == constants.UPLOADING) {\n // file can be removed because the upload was approved\n // (ie the server didn't have the file before upload)\n let promises = [\n db.removeTask(row.taskID),\n db.removeFile(row.file_id)\n ];\n\n Promise.all(promises).then(() => {\n removeChunks(row.file_id);\n })\n .catch(function(err) {\n console.log(err);\n });\n }\n });\n });\n}", "function onFileSystemFail(err) {\n console.log('deleteFileFromPersistentStorage file system fail: ' + fileName);\n console.log('error code = ' + err.code);\n }", "[_delistFromMeta] () {\n const root = this.root\n if (!root.realpath || !this.path)\n return\n root.inventory.delete(this)\n root.tops.delete(this)\n if (root.meta)\n root.meta.delete(this.path)\n /* istanbul ignore next - should be impossible */\n debug(() => {\n if ([...root.inventory.values()].includes(this))\n throw new Error('failed to delist')\n })\n }", "async cleanup() {\n\n }", "die() {\n this.views.forEach(_view => {\n _view.setValueObj(HDummyValue.new());\n });\n this.views = [];\n if (this.id) {\n require('comm/values').del(this.id);\n }\n }", "die() {\n this.views.forEach(_view => {\n _view.setValueObj(HDummyValue.new());\n });\n this.views = [];\n if (this.id) {\n require('comm/values').del(this.id);\n }\n }", "receivedOp (op) {\n if (this.awaiting <= 0) {\n this.onevent(op)\n } else if (op.struct === 'Delete') {\n var self = this\n var checkDelete = function checkDelete (d) {\n if (d.length == null) {\n throw new Error('This shouldn\\'t happen! d.length must be defined!')\n }\n // we check if o deletes something in self.waiting\n // if so, we remove the deleted operation\n for (var w = 0; w < self.waiting.length; w++) {\n var i = self.waiting[w]\n if (i.struct === 'Insert' && i.id[0] === d.target[0]) {\n var iLength = i.hasOwnProperty('content') ? i.content.length : 1\n var dStart = d.target[1]\n var dEnd = d.target[1] + (d.length || 1)\n var iStart = i.id[1]\n var iEnd = i.id[1] + iLength\n // Check if they don't overlap\n if (iEnd <= dStart || dEnd <= iStart) {\n // no overlapping\n continue\n }\n // we check all overlapping cases. All cases:\n /*\n 1) iiiii\n ddddd\n --> modify i and d\n 2) iiiiiii\n ddddd\n --> modify i, remove d\n 3) iiiiiii\n ddd\n --> remove d, modify i, and create another i (for the right hand side)\n 4) iiiii\n ddddddd\n --> remove i, modify d\n 5) iiiiiii\n ddddddd\n --> remove both i and d (**)\n 6) iiiiiii\n ddddd\n --> modify i, remove d\n 7) iii\n ddddddd\n --> remove i, create and apply two d with checkDelete(d) (**)\n 8) iiiii\n ddddddd\n --> remove i, modify d (**)\n 9) iiiii\n ddddd\n --> modify i and d\n (**) (also check if i contains content or type)\n */\n // TODO: I left some debugger statements, because I want to debug all cases once in production. REMEMBER END TODO\n if (iStart < dStart) {\n if (dStart < iEnd) {\n if (iEnd < dEnd) {\n // Case 1\n // remove the right part of i's content\n i.content.splice(dStart - iStart)\n // remove the start of d's deletion\n d.length = dEnd - iEnd\n d.target = [d.target[0], iEnd]\n continue\n } else if (iEnd === dEnd) {\n // Case 2\n i.content.splice(dStart - iStart)\n // remove d, we do that by simply ending this function\n return\n } else { // (dEnd < iEnd)\n // Case 3\n var newI = {\n id: [i.id[0], dEnd],\n content: i.content.slice(dEnd - iStart),\n struct: 'Insert'\n }\n self.waiting.push(newI)\n i.content.splice(dStart - iStart)\n return\n }\n }\n } else if (dStart === iStart) {\n if (iEnd < dEnd) {\n // Case 4\n d.length = dEnd - iEnd\n d.target = [d.target[0], iEnd]\n i.content = []\n continue\n } else if (iEnd === dEnd) {\n // Case 5\n self.waiting.splice(w, 1)\n return\n } else { // (dEnd < iEnd)\n // Case 6\n i.content = i.content.slice(dEnd - iStart)\n i.id = [i.id[0], dEnd]\n return\n }\n } else { // (dStart < iStart)\n if (iStart < dEnd) {\n // they overlap\n /*\n 7) iii\n ddddddd\n --> remove i, create and apply two d with checkDelete(d) (**)\n 8) iiiii\n ddddddd\n --> remove i, modify d (**)\n 9) iiiii\n ddddd\n --> modify i and d\n */\n if (iEnd < dEnd) {\n // Case 7\n // debugger // TODO: You did not test this case yet!!!! (add the debugger here)\n self.waiting.splice(w, 1)\n checkDelete({\n target: [d.target[0], dStart],\n length: iStart - dStart,\n struct: 'Delete'\n })\n checkDelete({\n target: [d.target[0], iEnd],\n length: iEnd - dEnd,\n struct: 'Delete'\n })\n return\n } else if (iEnd === dEnd) {\n // Case 8\n self.waiting.splice(w, 1)\n w--\n d.length -= iLength\n continue\n } else { // dEnd < iEnd\n // Case 9\n d.length = iStart - dStart\n i.content.splice(0, dEnd - iStart)\n i.id = [i.id[0], dEnd]\n continue\n }\n }\n }\n }\n }\n // finished with remaining operations\n self.waiting.push(d)\n }\n if (op.key == null) {\n // deletes in list\n checkDelete(op)\n } else {\n // deletes in map\n this.waiting.push(op)\n }\n } else {\n this.waiting.push(op)\n }\n }", "remove() {\n // alert(\"DEAD ok !\");\n }", "destructor() {\n\t\tObject.keys(this.clients).forEach((hash) => {\n\t\t\tthis.removeClient(hash);\n\t\t});\n\t}", "onDeleted() {\n\t\tthis.isDeleted = true;\n\t\tthis.getDriver().removeListener('nodes_changed', this.onNodesChanged);\n\t}", "doDestroy() {}", "function postMortem() {\n throw new Error('This method cannot be called because this Handsontable instance has been destroyed');\n }", "handleDelete() {\n API.deleteNode(this.props.node).then(() => {\n this.props.node.remove();\n this.props.engine.repaintCanvas();\n }).catch(err => console.log(err));\n }", "ondelete(deltas) { /* ?? */}", "function checkDeleting(v, name) {\n if (v === undefined) {\n throw new Sk.builtin.TypeError(`${name} may not be deleted`);\n }\n}", "function checkDeleting(v, name) {\n if (v === undefined) {\n throw new Sk.builtin.TypeError(`${name} may not be deleted`);\n }\n}", "function deleteShelterError(error) {\n vm.error = \"Could not delete shelter at this time. Please try again later.\";\n scrollToError();\n }", "cleanupDeps() {\n // 源码有更多\n this.depIds = this.newDepIds;\n this.newDepIds.clear(); // 清除最新记录 depIds 集合\n this.deps = this.newDeps;\n this.newDeps.length = 0; // 清除最新记录 dep 集合\n }", "function notifydeleted(){\n\tdpost(\"notifydeleted function called\\n\");\n// \tcpost(\"ABOUT to got deleted\\n\");\n\tdeletenodeFromDB(myNodeName);\n\n\t// call all nodes inside the same nodespace and tell them\n\t// to remove connections to this node from the database\n\tmessnamed(myNodeSpace + \"::vpl::nodespace\", \"removeConnection\", myNodeName);\n messnamed(myNodeID + \"::props\", \"close\");\n// \tcpost(myNodeName + \" got deleted\\n\");\n myIOlets.freepeer();\n}", "async abort() {\n return;\n }" ]
[ "0.6554796", "0.63948", "0.6280085", "0.61541724", "0.61541724", "0.60908973", "0.60908973", "0.60649216", "0.6064013", "0.6064013", "0.59525937", "0.5948963", "0.5911195", "0.58756423", "0.58555824", "0.5828496", "0.58240736", "0.58115464", "0.58091253", "0.57978076", "0.5780683", "0.5771829", "0.5750801", "0.5731023", "0.5725229", "0.57196105", "0.5717835", "0.57114756", "0.5686066", "0.5677487", "0.56719005", "0.56719005", "0.56719005", "0.56701154", "0.56690925", "0.56614614", "0.5656201", "0.56475365", "0.56226736", "0.5615743", "0.5615743", "0.5615743", "0.5615743", "0.5615743", "0.5615743", "0.55842674", "0.5575119", "0.5575119", "0.553058", "0.55212635", "0.5514539", "0.5508628", "0.54975235", "0.5495914", "0.5495914", "0.5495914", "0.5495914", "0.5495914", "0.5495914", "0.5495914", "0.5495914", "0.5495914", "0.5495914", "0.5495914", "0.5495659", "0.54915446", "0.54915446", "0.54757833", "0.54757833", "0.54757833", "0.5471334", "0.54548776", "0.5453754", "0.5437723", "0.54373205", "0.5431057", "0.5425789", "0.5422721", "0.5422617", "0.5422617", "0.5422617", "0.5422604", "0.54212207", "0.5414047", "0.53997344", "0.5399238", "0.5399238", "0.53983307", "0.5395613", "0.5394061", "0.53929687", "0.5387591", "0.53857607", "0.53793466", "0.5376532", "0.537067", "0.537067", "0.5350092", "0.5339792", "0.5336826", "0.53360856" ]
0.0
-1
This is split into a separate function so we can mark a fiber with pending work without treating it as a typical update that originates from an event; e.g. retrying a Suspense boundary isn't an update, but it does schedule work on a fiber.
function markUpdateTimeFromFiberToRoot(fiber, expirationTime) { // Update the source fiber's expiration time if (fiber.expirationTime < expirationTime) { fiber.expirationTime = expirationTime; } var alternate = fiber.alternate; if (alternate !== null && alternate.expirationTime < expirationTime) { alternate.expirationTime = expirationTime; } // Walk the parent path to the root and update the child expiration time. var node = fiber.return; var root = null; if (node === null && fiber.tag === HostRoot) { root = fiber.stateNode; } else { while (node !== null) { alternate = node.alternate; if (node.childExpirationTime < expirationTime) { node.childExpirationTime = expirationTime; if (alternate !== null && alternate.childExpirationTime < expirationTime) { alternate.childExpirationTime = expirationTime; } } else if (alternate !== null && alternate.childExpirationTime < expirationTime) { alternate.childExpirationTime = expirationTime; } if (node.return === null && node.tag === HostRoot) { root = node.stateNode; break; } node = node.return; } } if (root !== null) { if (workInProgressRoot === root) { // Received an update to a tree that's in the middle of rendering. Mark // that's unprocessed work on this root. markUnprocessedUpdateTime(expirationTime); if (workInProgressRootExitStatus === RootSuspendedWithDelay) { // The root already suspended with a delay, which means this render // definitely won't finish. Since we have a new update, let's mark it as // suspended now, right before marking the incoming update. This has the // effect of interrupting the current render and switching to the update. // TODO: This happens to work when receiving an update during the render // phase, because of the trick inside computeExpirationForFiber to // subtract 1 from `renderExpirationTime` to move it into a // separate bucket. But we should probably model it with an exception, // using the same mechanism we use to force hydration of a subtree. // TODO: This does not account for low pri updates that were already // scheduled before the root started rendering. Need to track the next // pending expiration time (perhaps by backtracking the return path) and // then trigger a restart in the `renderDidSuspendDelayIfPossible` path. markRootSuspendedAtTime(root, renderExpirationTime$1); } } // Mark that the root has a pending update. markRootUpdatedAtTime(root, expirationTime); } return root; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inc_busy()\n{\n background_jobs++;\n update_busy_indicator();\n}", "if (\n workInProgressSuspendedReason === SuspendedOnData &&\n workInProgressRoot === root\n ) {\n // Mark the root as ready to continue rendering.\n workInProgressSuspendedReason = SuspendedAndReadyToContinue;\n }", "async update_() {\n if (this.lockingUpdate_) {\n if (this.pendingUpdate_) {\n return;\n }\n this.pendingUpdate_ = (async () => {\n while (this.lockingUpdate_) {\n try {\n await this.lockingUpdate_;\n } catch (e) {\n // Ignore exception from waiting for existing update.\n }\n }\n this.lockingUpdate_ = this.pendingUpdate_;\n this.pendingUpdate_ = null;\n await this.doUpdate_();\n this.lockingUpdate_ = null;\n })();\n } else {\n this.lockingUpdate_ = (async () => {\n await this.doUpdate_();\n this.lockingUpdate_ = null;\n })();\n }\n }", "function markUpdateTimeFromFiberToRoot(fiber,expirationTime){// Update the source fiber's expiration time\nif(fiber.expirationTime<expirationTime){fiber.expirationTime=expirationTime;}var alternate=fiber.alternate;if(alternate!==null&&alternate.expirationTime<expirationTime){alternate.expirationTime=expirationTime;}// Walk the parent path to the root and update the child expiration time.\nvar node=fiber[\"return\"];var root=null;if(node===null&&fiber.tag===HostRoot){root=fiber.stateNode;}else{while(node!==null){alternate=node.alternate;if(node.childExpirationTime<expirationTime){node.childExpirationTime=expirationTime;if(alternate!==null&&alternate.childExpirationTime<expirationTime){alternate.childExpirationTime=expirationTime;}}else if(alternate!==null&&alternate.childExpirationTime<expirationTime){alternate.childExpirationTime=expirationTime;}if(node[\"return\"]===null&&node.tag===HostRoot){root=node.stateNode;break;}node=node[\"return\"];}}if(root!==null){if(workInProgressRoot===root){// Received an update to a tree that's in the middle of rendering. Mark\n// that's unprocessed work on this root.\nmarkUnprocessedUpdateTime(expirationTime);if(workInProgressRootExitStatus===RootSuspendedWithDelay){// The root already suspended with a delay, which means this render\n// definitely won't finish. Since we have a new update, let's mark it as\n// suspended now, right before marking the incoming update. This has the\n// effect of interrupting the current render and switching to the update.\n// TODO: This happens to work when receiving an update during the render\n// phase, because of the trick inside computeExpirationForFiber to\n// subtract 1 from `renderExpirationTime` to move it into a\n// separate bucket. But we should probably model it with an exception,\n// using the same mechanism we use to force hydration of a subtree.\n// TODO: This does not account for low pri updates that were already\n// scheduled before the root started rendering. Need to track the next\n// pending expiration time (perhaps by backtracking the return path) and\n// then trigger a restart in the `renderDidSuspendDelayIfPossible` path.\nmarkRootSuspendedAtTime(root,renderExpirationTime$1);}}// Mark that the root has a pending update.\nmarkRootUpdatedAtTime(root,expirationTime);}return root;}", "function markUpdateTimeFromFiberToRoot(fiber,expirationTime){// Update the source fiber's expiration time\nif(fiber.expirationTime<expirationTime){fiber.expirationTime=expirationTime;}var alternate=fiber.alternate;if(alternate!==null&&alternate.expirationTime<expirationTime){alternate.expirationTime=expirationTime;}// Walk the parent path to the root and update the child expiration time.\nvar node=fiber.return;var root=null;if(node===null&&fiber.tag===HostRoot){root=fiber.stateNode;}else{while(node!==null){alternate=node.alternate;if(node.childExpirationTime<expirationTime){node.childExpirationTime=expirationTime;if(alternate!==null&&alternate.childExpirationTime<expirationTime){alternate.childExpirationTime=expirationTime;}}else if(alternate!==null&&alternate.childExpirationTime<expirationTime){alternate.childExpirationTime=expirationTime;}if(node.return===null&&node.tag===HostRoot){root=node.stateNode;break;}node=node.return;}}if(root!==null){if(workInProgressRoot===root){// Received an update to a tree that's in the middle of rendering. Mark\n// that's unprocessed work on this root.\nmarkUnprocessedUpdateTime(expirationTime);if(workInProgressRootExitStatus===RootSuspendedWithDelay){// The root already suspended with a delay, which means this render\n// definitely won't finish. Since we have a new update, let's mark it as\n// suspended now, right before marking the incoming update. This has the\n// effect of interrupting the current render and switching to the update.\n// TODO: This happens to work when receiving an update during the render\n// phase, because of the trick inside computeExpirationForFiber to\n// subtract 1 from `renderExpirationTime` to move it into a\n// separate bucket. But we should probably model it with an exception,\n// using the same mechanism we use to force hydration of a subtree.\n// TODO: This does not account for low pri updates that were already\n// scheduled before the root started rendering. Need to track the next\n// pending expiration time (perhaps by backtracking the return path) and\n// then trigger a restart in the `renderDidSuspendDelayIfPossible` path.\nmarkRootSuspendedAtTime(root,renderExpirationTime$1);}}// Mark that the root has a pending update.\nmarkRootUpdatedAtTime(root,expirationTime);}return root;}", "function markUpdateTimeFromFiberToRoot(fiber,expirationTime){// Update the source fiber's expiration time\nif(fiber.expirationTime<expirationTime){fiber.expirationTime=expirationTime;}var alternate=fiber.alternate;if(alternate!==null&&alternate.expirationTime<expirationTime){alternate.expirationTime=expirationTime;}// Walk the parent path to the root and update the child expiration time.\nvar node=fiber.return;var root=null;if(node===null&&fiber.tag===HostRoot){root=fiber.stateNode;}else{while(node!==null){alternate=node.alternate;if(node.childExpirationTime<expirationTime){node.childExpirationTime=expirationTime;if(alternate!==null&&alternate.childExpirationTime<expirationTime){alternate.childExpirationTime=expirationTime;}}else if(alternate!==null&&alternate.childExpirationTime<expirationTime){alternate.childExpirationTime=expirationTime;}if(node.return===null&&node.tag===HostRoot){root=node.stateNode;break;}node=node.return;}}if(root!==null){if(workInProgressRoot===root){// Received an update to a tree that's in the middle of rendering. Mark\n// that's unprocessed work on this root.\nmarkUnprocessedUpdateTime(expirationTime);if(workInProgressRootExitStatus===RootSuspendedWithDelay){// The root already suspended with a delay, which means this render\n// definitely won't finish. Since we have a new update, let's mark it as\n// suspended now, right before marking the incoming update. This has the\n// effect of interrupting the current render and switching to the update.\n// TODO: This happens to work when receiving an update during the render\n// phase, because of the trick inside computeExpirationForFiber to\n// subtract 1 from `renderExpirationTime` to move it into a\n// separate bucket. But we should probably model it with an exception,\n// using the same mechanism we use to force hydration of a subtree.\n// TODO: This does not account for low pri updates that were already\n// scheduled before the root started rendering. Need to track the next\n// pending expiration time (perhaps by backtracking the return path) and\n// then trigger a restart in the `renderDidSuspendDelayIfPossible` path.\nmarkRootSuspendedAtTime(root,renderExpirationTime$1);}}// Mark that the root has a pending update.\nmarkRootUpdatedAtTime(root,expirationTime);}return root;}", "function requestWork(root,expirationTime){addRootToSchedule(root,expirationTime);if(isRendering){// Prevent reentrancy. Remaining work will be scheduled at the end of\n// the currently rendering batch.\nreturn;}if(isBatchingUpdates){// Flush work at the end of the batch.\nif(isUnbatchingUpdates){// ...unless we're inside unbatchedUpdates, in which case we should\n// flush it now.\nnextFlushedRoot=root;nextFlushedExpirationTime=Sync;performWorkOnRoot(root,Sync,false);}return;}// TODO: Get rid of Sync and use current time?\nif(expirationTime===Sync){performSyncWork();}else{scheduleCallbackWithExpiration(expirationTime);}}", "function requestWork(root,expirationTime){addRootToSchedule(root,expirationTime);if(isRendering){// Prevent reentrancy. Remaining work will be scheduled at the end of\n// the currently rendering batch.\nreturn;}if(isBatchingUpdates){// Flush work at the end of the batch.\nif(isUnbatchingUpdates){// ...unless we're inside unbatchedUpdates, in which case we should\n// flush it now.\nnextFlushedRoot=root;nextFlushedExpirationTime=Sync;performWorkOnRoot(root,Sync,false);}return;}// TODO: Get rid of Sync and use current time?\nif(expirationTime===Sync){performSyncWork();}else{scheduleCallbackWithExpiration(expirationTime);}}", "function requestWork(root,expirationTime){addRootToSchedule(root,expirationTime);if(isRendering){// Prevent reentrancy. Remaining work will be scheduled at the end of\n// the currently rendering batch.\nreturn;}if(isBatchingUpdates){// Flush work at the end of the batch.\nif(isUnbatchingUpdates){// ...unless we're inside unbatchedUpdates, in which case we should\n// flush it now.\nnextFlushedRoot=root;nextFlushedExpirationTime=Sync;performWorkOnRoot(root,Sync,false);}return;}// TODO: Get rid of Sync and use current time?\nif(expirationTime===Sync){performSyncWork();}else{scheduleCallbackWithExpirationTime(root,expirationTime);}}", "function requestWork(root,expirationTime){addRootToSchedule(root,expirationTime);if(isRendering){// Prevent reentrancy. Remaining work will be scheduled at the end of\n// the currently rendering batch.\nreturn;}if(isBatchingUpdates){// Flush work at the end of the batch.\nif(isUnbatchingUpdates){// ...unless we're inside unbatchedUpdates, in which case we should\n// flush it now.\nnextFlushedRoot=root;nextFlushedExpirationTime=Sync;performWorkOnRoot(root,Sync,false);}return;}// TODO: Get rid of Sync and use current time?\nif(expirationTime===Sync){performSyncWork();}else{scheduleCallbackWithExpirationTime(root,expirationTime);}}", "function requestWork(root,expirationTime){addRootToSchedule(root,expirationTime);if(isRendering){// Prevent reentrancy. Remaining work will be scheduled at the end of\n// the currently rendering batch.\nreturn;}if(isBatchingUpdates){// Flush work at the end of the batch.\nif(isUnbatchingUpdates){// ...unless we're inside unbatchedUpdates, in which case we should\n// flush it now.\nnextFlushedRoot=root;nextFlushedExpirationTime=Sync;performWorkOnRoot(root,Sync,false);}return;}// TODO: Get rid of Sync and use current time?\nif(expirationTime===Sync){performSyncWork();}else{scheduleCallbackWithExpirationTime(root,expirationTime);}}", "function markForPostEffect(workInProgress) {\n // Schedule a side-effect on this fiber, AFTER the children's side-effects.\n if (workInProgress.lastEffect) {\n workInProgress.lastEffect.nextEffect = workInProgress;\n } else {\n workInProgress.firstEffect = workInProgress;\n }\n workInProgress.lastEffect = workInProgress;\n }", "function rescheduleBlockingWork() {\n var handle = setTimeout(rescheduleWork, 0);\n if (processTasksUntilComplete()) {\n clearTimeout(handle);\n performance.measure(\"scheduleBlockingWork\", \"scheduleBlockingWork\");\n }\n}", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n // Don't touching the subtree's expiration time, which has not changed.\n workInProgress.childExpirationTime = current.childExpirationTime;\n if (pendingProps !== current.pendingProps) {\n // This fiber has new props.\n workInProgress.expirationTime = expirationTime;\n } else {\n // This fiber's props have not changed.\n workInProgress.expirationTime = current.expirationTime;\n }\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.firstContextDependency = current.firstContextDependency;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n return workInProgress;\n}", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n // Don't touching the subtree's expiration time, which has not changed.\n workInProgress.childExpirationTime = current.childExpirationTime;\n if (pendingProps !== current.pendingProps) {\n // This fiber has new props.\n workInProgress.expirationTime = expirationTime;\n } else {\n // This fiber's props have not changed.\n workInProgress.expirationTime = current.expirationTime;\n }\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.firstContextDependency = current.firstContextDependency;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n return workInProgress;\n}", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n // Don't touching the subtree's expiration time, which has not changed.\n workInProgress.childExpirationTime = current.childExpirationTime;\n if (pendingProps !== current.pendingProps) {\n // This fiber has new props.\n workInProgress.expirationTime = expirationTime;\n } else {\n // This fiber's props have not changed.\n workInProgress.expirationTime = current.expirationTime;\n }\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.firstContextDependency = current.firstContextDependency;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n return workInProgress;\n}", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n // Don't touching the subtree's expiration time, which has not changed.\n workInProgress.childExpirationTime = current.childExpirationTime;\n if (pendingProps !== current.pendingProps) {\n // This fiber has new props.\n workInProgress.expirationTime = expirationTime;\n } else {\n // This fiber's props have not changed.\n workInProgress.expirationTime = current.expirationTime;\n }\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.firstContextDependency = current.firstContextDependency;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n return workInProgress;\n}", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n // Don't touching the subtree's expiration time, which has not changed.\n workInProgress.childExpirationTime = current.childExpirationTime;\n if (pendingProps !== current.pendingProps) {\n // This fiber has new props.\n workInProgress.expirationTime = expirationTime;\n } else {\n // This fiber's props have not changed.\n workInProgress.expirationTime = current.expirationTime;\n }\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.firstContextDependency = current.firstContextDependency;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n return workInProgress;\n}", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n // Don't touching the subtree's expiration time, which has not changed.\n workInProgress.childExpirationTime = current.childExpirationTime;\n if (pendingProps !== current.pendingProps) {\n // This fiber has new props.\n workInProgress.expirationTime = expirationTime;\n } else {\n // This fiber's props have not changed.\n workInProgress.expirationTime = current.expirationTime;\n }\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.firstContextDependency = current.firstContextDependency;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n return workInProgress;\n}", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n // Don't touching the subtree's expiration time, which has not changed.\n workInProgress.childExpirationTime = current.childExpirationTime;\n if (pendingProps !== current.pendingProps) {\n // This fiber has new props.\n workInProgress.expirationTime = expirationTime;\n } else {\n // This fiber's props have not changed.\n workInProgress.expirationTime = current.expirationTime;\n }\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.firstContextDependency = current.firstContextDependency;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n return workInProgress;\n}", "function createWorkInProgress(current, pendingProps) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.elementType = current.elementType;\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n workInProgress._debugHookTypes = current._debugHookTypes;\n }\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n // Needed because Blocks store data on type.\n workInProgress.type = current.type;\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.flags = NoFlags;\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n workInProgress.childLanes = current.childLanes;\n workInProgress.lanes = current.lanes;\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n // Clone the dependencies object. This is mutated during the render phase, so\n // it cannot be shared with the current fiber.\n var currentDependencies = current.dependencies;\n workInProgress.dependencies = currentDependencies === null ? null : {\n lanes: currentDependencies.lanes,\n firstContext: currentDependencies.firstContext\n };\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n {\n workInProgress._debugNeedsRemount = current._debugNeedsRemount;\n switch (workInProgress.tag) {\n case IndeterminateComponent:\n case FunctionComponent:\n case SimpleMemoComponent:\n workInProgress.type = resolveFunctionForHotReloading(current.type);\n break;\n case ClassComponent:\n workInProgress.type = resolveClassForHotReloading(current.type);\n break;\n case ForwardRef:\n workInProgress.type = resolveForwardRefForHotReloading(current.type);\n break;\n }\n }\n return workInProgress;\n }", "_firePendingState () {\n const promise = new Promise((resolve, reject) => {\n setTimeout(() => {\n resolve()\n }, 2000)\n })\n const event = new CustomEvent('pending-state', {\n detail: {\n title: 'Async task',\n promise\n }\n })\n this.dispatchEvent(event)\n }", "function scheduleWork() {\n performance.mark(\"scheduleWork\");\n setTimeout(rescheduleWork, 0);\n}", "function requestWork(root,expirationTime){if(nestedUpdateCount>NESTED_UPDATE_LIMIT){invariant(false,'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');}// Add the root to the schedule.\n// Check if this root is already part of the schedule.\nif(root.nextScheduledRoot===null){// This root is not already scheduled. Add it.\nroot.remainingExpirationTime=expirationTime;if(lastScheduledRoot===null){firstScheduledRoot=lastScheduledRoot=root;root.nextScheduledRoot=root;}else{lastScheduledRoot.nextScheduledRoot=root;lastScheduledRoot=root;lastScheduledRoot.nextScheduledRoot=firstScheduledRoot;}}else{// This root is already scheduled, but its priority may have increased.\nvar remainingExpirationTime=root.remainingExpirationTime;if(remainingExpirationTime===NoWork||expirationTime<remainingExpirationTime){// Update the priority.\nroot.remainingExpirationTime=expirationTime;}}if(isRendering){// Prevent reentrancy. Remaining work will be scheduled at the end of\n// the currently rendering batch.\nreturn;}if(isBatchingUpdates){// Flush work at the end of the batch.\nif(isUnbatchingUpdates){// ...unless we're inside unbatchedUpdates, in which case we should\n// flush it now.\nnextFlushedRoot=root;nextFlushedExpirationTime=Sync;performWorkOnRoot(nextFlushedRoot,nextFlushedExpirationTime);}return;}// TODO: Get rid of Sync and use current time?\nif(expirationTime===Sync){performWork(Sync,null);}else{scheduleCallbackWithExpiration(expirationTime);}}", "function requestWork(root,expirationTime){if(nestedUpdateCount>NESTED_UPDATE_LIMIT){invariant(false,'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');}// Add the root to the schedule.\n// Check if this root is already part of the schedule.\nif(root.nextScheduledRoot===null){// This root is not already scheduled. Add it.\nroot.remainingExpirationTime=expirationTime;if(lastScheduledRoot===null){firstScheduledRoot=lastScheduledRoot=root;root.nextScheduledRoot=root;}else{lastScheduledRoot.nextScheduledRoot=root;lastScheduledRoot=root;lastScheduledRoot.nextScheduledRoot=firstScheduledRoot;}}else{// This root is already scheduled, but its priority may have increased.\nvar remainingExpirationTime=root.remainingExpirationTime;if(remainingExpirationTime===NoWork||expirationTime<remainingExpirationTime){// Update the priority.\nroot.remainingExpirationTime=expirationTime;}}if(isRendering){// Prevent reentrancy. Remaining work will be scheduled at the end of\n// the currently rendering batch.\nreturn;}if(isBatchingUpdates){// Flush work at the end of the batch.\nif(isUnbatchingUpdates){// ...unless we're inside unbatchedUpdates, in which case we should\n// flush it now.\nnextFlushedRoot=root;nextFlushedExpirationTime=Sync;performWorkOnRoot(nextFlushedRoot,nextFlushedExpirationTime);}return;}// TODO: Get rid of Sync and use current time?\nif(expirationTime===Sync){performWork(Sync,null);}else{scheduleCallbackWithExpiration(expirationTime);}}", "async __enqueueUpdate() {\n this.isUpdatePending = true;\n try {\n await this.__updatePromise;\n } catch (e) {\n Promise.reject(e);\n }\n const result2 = this.scheduleUpdate();\n if (result2 != null) {\n await result2;\n }\n return !this.isUpdatePending;\n }", "async function queueUpdate(p) {\n queued.push(p);\n if (!pending) {\n pending = true;\n await Promise.resolve();\n pending = false;\n const loading = [...queued];\n queued = [];\n (await Promise.all(loading)).forEach((fn) => fn && fn());\n }\n}", "async _enqueueUpdate(){this._updateState=this._updateState|STATE_UPDATE_REQUESTED;try{// Ensure any previous update has resolved before updating.\n// This `await` also ensures that property changes are batched.\nawait this._updatePromise;}catch(e){// Ignore any previous errors. We only care that the previous cycle is\n// done. Any error should have been handled in the previous update.\n}const result=this.performUpdate();// If `performUpdate` returns a Promise, we await it. This is done to\n// enable coordinating updates with a scheduler. Note, the result is\n// checked to avoid delaying an additional microtask unless we need to.\nif(result!=null){await result;}return !this._hasRequestedUpdate;}", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = 0;\n }\n }\n\n workInProgress.expirationTime = expirationTime;\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseTime = current.selfBaseTime;\n workInProgress.treeBaseTime = current.treeBaseTime;\n }\n\n return workInProgress;\n }", "statusPending() {\n this.setState({pending: !this.state.pending});\n }", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = 0;\n }\n }\n\n workInProgress.expirationTime = expirationTime;\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseTime = current.selfBaseTime;\n workInProgress.treeBaseTime = current.treeBaseTime;\n }\n\n return workInProgress;\n}", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = 0;\n }\n }\n\n workInProgress.expirationTime = expirationTime;\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseTime = current.selfBaseTime;\n workInProgress.treeBaseTime = current.treeBaseTime;\n }\n\n return workInProgress;\n}", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = 0;\n }\n }\n\n workInProgress.expirationTime = expirationTime;\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseTime = current.selfBaseTime;\n workInProgress.treeBaseTime = current.treeBaseTime;\n }\n\n return workInProgress;\n}", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = 0;\n }\n }\n\n workInProgress.expirationTime = expirationTime;\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseTime = current.selfBaseTime;\n workInProgress.treeBaseTime = current.treeBaseTime;\n }\n\n return workInProgress;\n}", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = 0;\n }\n }\n\n workInProgress.expirationTime = expirationTime;\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseTime = current.selfBaseTime;\n workInProgress.treeBaseTime = current.treeBaseTime;\n }\n\n return workInProgress;\n}", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.elementType = current.elementType;\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n workInProgress._debugHookTypes = current._debugHookTypes;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n workInProgress.childExpirationTime = current.childExpirationTime;\n workInProgress.expirationTime = current.expirationTime;\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.contextDependencies = current.contextDependencies;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n return workInProgress;\n}", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.elementType = current.elementType;\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n workInProgress._debugHookTypes = current._debugHookTypes;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n workInProgress.childExpirationTime = current.childExpirationTime;\n workInProgress.expirationTime = current.expirationTime;\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.contextDependencies = current.contextDependencies;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n return workInProgress;\n}", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.elementType = current.elementType;\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n workInProgress._debugHookTypes = current._debugHookTypes;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n workInProgress.childExpirationTime = current.childExpirationTime;\n workInProgress.expirationTime = current.expirationTime;\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.contextDependencies = current.contextDependencies;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n return workInProgress;\n}", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.elementType = current.elementType;\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n workInProgress._debugHookTypes = current._debugHookTypes;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n workInProgress.childExpirationTime = current.childExpirationTime;\n workInProgress.expirationTime = current.expirationTime;\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.contextDependencies = current.contextDependencies;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n return workInProgress;\n}", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.elementType = current.elementType;\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n workInProgress._debugHookTypes = current._debugHookTypes;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n workInProgress.childExpirationTime = current.childExpirationTime;\n workInProgress.expirationTime = current.expirationTime;\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.contextDependencies = current.contextDependencies;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n return workInProgress;\n}", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.elementType = current.elementType;\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n workInProgress._debugHookTypes = current._debugHookTypes;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n workInProgress.childExpirationTime = current.childExpirationTime;\n workInProgress.expirationTime = current.expirationTime;\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.contextDependencies = current.contextDependencies;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n return workInProgress;\n}", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.elementType = current.elementType;\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n workInProgress._debugHookTypes = current._debugHookTypes;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n workInProgress.childExpirationTime = current.childExpirationTime;\n workInProgress.expirationTime = current.expirationTime;\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.contextDependencies = current.contextDependencies;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n return workInProgress;\n}", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.elementType = current.elementType;\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n workInProgress._debugHookTypes = current._debugHookTypes;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n workInProgress.childExpirationTime = current.childExpirationTime;\n workInProgress.expirationTime = current.expirationTime;\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.contextDependencies = current.contextDependencies;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n return workInProgress;\n}", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.elementType = current.elementType;\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n workInProgress._debugHookTypes = current._debugHookTypes;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n workInProgress.childExpirationTime = current.childExpirationTime;\n workInProgress.expirationTime = current.expirationTime;\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.contextDependencies = current.contextDependencies;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n return workInProgress;\n}", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.elementType = current.elementType;\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n workInProgress._debugHookTypes = current._debugHookTypes;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n workInProgress.childExpirationTime = current.childExpirationTime;\n workInProgress.expirationTime = current.expirationTime;\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.contextDependencies = current.contextDependencies;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n return workInProgress;\n}", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.elementType = current.elementType;\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n workInProgress._debugHookTypes = current._debugHookTypes;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n workInProgress.childExpirationTime = current.childExpirationTime;\n workInProgress.expirationTime = current.expirationTime;\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.contextDependencies = current.contextDependencies;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n return workInProgress;\n}", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.elementType = current.elementType;\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n workInProgress._debugHookTypes = current._debugHookTypes;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n workInProgress.childExpirationTime = current.childExpirationTime;\n workInProgress.expirationTime = current.expirationTime;\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.contextDependencies = current.contextDependencies;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n return workInProgress;\n}", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.elementType = current.elementType;\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n workInProgress._debugHookTypes = current._debugHookTypes;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n workInProgress.childExpirationTime = current.childExpirationTime;\n workInProgress.expirationTime = current.expirationTime;\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.contextDependencies = current.contextDependencies;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n return workInProgress;\n}", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.elementType = current.elementType;\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n workInProgress._debugHookTypes = current._debugHookTypes;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n workInProgress.childExpirationTime = current.childExpirationTime;\n workInProgress.expirationTime = current.expirationTime;\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.contextDependencies = current.contextDependencies;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n return workInProgress;\n}", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.elementType = current.elementType;\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n workInProgress._debugHookTypes = current._debugHookTypes;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n workInProgress.childExpirationTime = current.childExpirationTime;\n workInProgress.expirationTime = current.expirationTime;\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.contextDependencies = current.contextDependencies;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n return workInProgress;\n}", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.elementType = current.elementType;\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n workInProgress._debugHookTypes = current._debugHookTypes;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n workInProgress.childExpirationTime = current.childExpirationTime;\n workInProgress.expirationTime = current.expirationTime;\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.contextDependencies = current.contextDependencies;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n return workInProgress;\n}", "static tickFullUpdate() {\n let updateParcel = {\n text: \"\",\n color: \"#d352ad\",\n tooltip: \"\"\n };\n\n this.refreshState()\n .then((timerState) => {\n console.debug('[Net]', '(API status result)', timerState);\n\n this.handleTimerState(timerState, updateParcel);\n this.networkOk = true;\n })\n .catch((err) => {\n console.warn('[Net]', '(API status fetch failed)', err);\n\n updateParcel.text = \"!\";\n updateParcel.color = \"#e74c3c\";\n updateParcel.tooltip = \"Communication error\";\n\n this.networkOk = false;\n })\n .then(() => {\n this.applyBadgeConfig(updateParcel);\n });\n }", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.elementType = current.elementType;\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n workInProgress.childExpirationTime = current.childExpirationTime;\n workInProgress.expirationTime = current.expirationTime;\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.firstContextDependency = current.firstContextDependency;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n return workInProgress;\n}", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.elementType = current.elementType;\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n workInProgress.childExpirationTime = current.childExpirationTime;\n workInProgress.expirationTime = current.expirationTime;\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.firstContextDependency = current.firstContextDependency;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n return workInProgress;\n}", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.elementType = current.elementType;\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n workInProgress.childExpirationTime = current.childExpirationTime;\n workInProgress.expirationTime = current.expirationTime;\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.firstContextDependency = current.firstContextDependency;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n return workInProgress;\n}", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.elementType = current.elementType;\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n workInProgress.childExpirationTime = current.childExpirationTime;\n workInProgress.expirationTime = current.expirationTime;\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.firstContextDependency = current.firstContextDependency;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n return workInProgress;\n}", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.elementType = current.elementType;\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n workInProgress.childExpirationTime = current.childExpirationTime;\n workInProgress.expirationTime = current.expirationTime;\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.firstContextDependency = current.firstContextDependency;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n return workInProgress;\n}", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.elementType = current.elementType;\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n workInProgress.childExpirationTime = current.childExpirationTime;\n workInProgress.expirationTime = current.expirationTime;\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.firstContextDependency = current.firstContextDependency;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n return workInProgress;\n}", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.elementType = current.elementType;\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n workInProgress.childExpirationTime = current.childExpirationTime;\n workInProgress.expirationTime = current.expirationTime;\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.firstContextDependency = current.firstContextDependency;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n return workInProgress;\n}", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.elementType = current.elementType;\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n workInProgress.childExpirationTime = current.childExpirationTime;\n workInProgress.expirationTime = current.expirationTime;\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.firstContextDependency = current.firstContextDependency;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n return workInProgress;\n}", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.elementType = current.elementType;\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n workInProgress.childExpirationTime = current.childExpirationTime;\n workInProgress.expirationTime = current.expirationTime;\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.firstContextDependency = current.firstContextDependency;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n return workInProgress;\n}", "updatePendingStatus(txCount, block, hash){\n // pending status for spiner\n this.props.pending(true, txCount+1)\n // pending status for DB\n setPending(this.props.smartFundAddress, 1, this.props.accounts[0], block, hash, \"Withdraw\")\n // close modal\n this.modalClose()\n }", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.elementType = current.elementType;\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n workInProgress._debugHookTypes = current._debugHookTypes;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n workInProgress.childExpirationTime = current.childExpirationTime;\n workInProgress.expirationTime = current.expirationTime;\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n\n // Clone the dependencies object. This is mutated during the render phase, so\n // it cannot be shared with the current fiber.\n var currentDependencies = current.dependencies;\n workInProgress.dependencies = currentDependencies === null ? null : {\n expirationTime: currentDependencies.expirationTime,\n firstContext: currentDependencies.firstContext,\n responders: currentDependencies.responders\n };\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n {\n workInProgress._debugNeedsRemount = current._debugNeedsRemount;\n switch (workInProgress.tag) {\n case IndeterminateComponent:\n case FunctionComponent:\n case SimpleMemoComponent:\n workInProgress.type = resolveFunctionForHotReloading(current.type);\n break;\n case ClassComponent:\n workInProgress.type = resolveClassForHotReloading(current.type);\n break;\n case ForwardRef:\n workInProgress.type = resolveForwardRefForHotReloading(current.type);\n break;\n default:\n break;\n }\n }\n\n return workInProgress;\n}", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.elementType = current.elementType;\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n workInProgress._debugHookTypes = current._debugHookTypes;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps;\n\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n if (enableProfilerTimer) {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n workInProgress.childExpirationTime = current.childExpirationTime;\n workInProgress.expirationTime = current.expirationTime;\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n\n // Clone the dependencies object. This is mutated during the render phase, so\n // it cannot be shared with the current fiber.\n var currentDependencies = current.dependencies;\n workInProgress.dependencies = currentDependencies === null ? null : {\n expirationTime: currentDependencies.expirationTime,\n firstContext: currentDependencies.firstContext,\n responders: currentDependencies.responders\n };\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n if (enableProfilerTimer) {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n {\n workInProgress._debugNeedsRemount = current._debugNeedsRemount;\n switch (workInProgress.tag) {\n case IndeterminateComponent:\n case FunctionComponent:\n case SimpleMemoComponent:\n workInProgress.type = resolveFunctionForHotReloading(current.type);\n break;\n case ClassComponent:\n workInProgress.type = resolveClassForHotReloading(current.type);\n break;\n case ForwardRef:\n workInProgress.type = resolveForwardRefForHotReloading(current.type);\n break;\n default:\n break;\n }\n }\n\n return workInProgress;\n}", "if (queue === current.updateQueue) {\n queue = workInProgress.updateQueue = cloneUpdateQueue(queue);\n }", "function markUpdateTimeFromFiberToRoot(fiber, expirationTime) {\n // Update the source fiber's expiration time\n if (fiber.expirationTime < expirationTime) {\n fiber.expirationTime = expirationTime;\n }\n\n var alternate = fiber.alternate;\n\n if (\n alternate !== null &&\n alternate.expirationTime < expirationTime\n ) {\n alternate.expirationTime = expirationTime;\n } // Walk the parent path to the root and update the child expiration time.\n\n var node = fiber.return;\n var root = null;\n\n if (node === null && fiber.tag === HostRoot) {\n root = fiber.stateNode;\n } else {\n while (node !== null) {\n alternate = node.alternate;\n\n if (node.childExpirationTime < expirationTime) {\n node.childExpirationTime = expirationTime;\n\n if (\n alternate !== null &&\n alternate.childExpirationTime < expirationTime\n ) {\n alternate.childExpirationTime = expirationTime;\n }\n } else if (\n alternate !== null &&\n alternate.childExpirationTime < expirationTime\n ) {\n alternate.childExpirationTime = expirationTime;\n }\n\n if (node.return === null && node.tag === HostRoot) {\n root = node.stateNode;\n break;\n }\n\n node = node.return;\n }\n }\n\n if (root !== null) {\n if (workInProgressRoot === root) {\n // Received an update to a tree that's in the middle of rendering. Mark\n // that's unprocessed work on this root.\n markUnprocessedUpdateTime(expirationTime);\n\n if (workInProgressRootExitStatus === RootSuspendedWithDelay) {\n // The root already suspended with a delay, which means this render\n // definitely won't finish. Since we have a new update, let's mark it as\n // suspended now, right before marking the incoming update. This has the\n // effect of interrupting the current render and switching to the update.\n // TODO: This happens to work when receiving an update during the render\n // phase, because of the trick inside computeExpirationForFiber to\n // subtract 1 from `renderExpirationTime` to move it into a\n // separate bucket. But we should probably model it with an exception,\n // using the same mechanism we use to force hydration of a subtree.\n // TODO: This does not account for low pri updates that were already\n // scheduled before the root started rendering. Need to track the next\n // pending expiration time (perhaps by backtracking the return path) and\n // then trigger a restart in the `renderDidSuspendDelayIfPossible` path.\n markRootSuspendedAtTime(root, renderExpirationTime$1);\n }\n } // Mark that the root has a pending update.\n\n markRootUpdatedAtTime(root, expirationTime);\n }\n\n return root;\n }", "_issueNewRequests() {\n this._updateNeeded = true;\n setTimeout(() => this._issueNewRequestsAsync(), 0);\n }", "function requestWork(root, expirationTime) {\n\t if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n\t invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');\n\t }\n\t\n\t // Add the root to the schedule.\n\t // Check if this root is already part of the schedule.\n\t if (root.nextScheduledRoot === null) {\n\t // This root is not already scheduled. Add it.\n\t root.remainingExpirationTime = expirationTime;\n\t if (lastScheduledRoot === null) {\n\t firstScheduledRoot = lastScheduledRoot = root;\n\t root.nextScheduledRoot = root;\n\t } else {\n\t lastScheduledRoot.nextScheduledRoot = root;\n\t lastScheduledRoot = root;\n\t lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;\n\t }\n\t } else {\n\t // This root is already scheduled, but its priority may have increased.\n\t var remainingExpirationTime = root.remainingExpirationTime;\n\t if (remainingExpirationTime === NoWork || expirationTime < remainingExpirationTime) {\n\t // Update the priority.\n\t root.remainingExpirationTime = expirationTime;\n\t }\n\t }\n\t\n\t if (isRendering) {\n\t // Prevent reentrancy. Remaining work will be scheduled at the end of\n\t // the currently rendering batch.\n\t return;\n\t }\n\t\n\t if (isBatchingUpdates) {\n\t // Flush work at the end of the batch.\n\t if (isUnbatchingUpdates) {\n\t // ...unless we're inside unbatchedUpdates, in which case we should\n\t // flush it now.\n\t nextFlushedRoot = root;\n\t nextFlushedExpirationTime = Sync;\n\t performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime);\n\t }\n\t return;\n\t }\n\t\n\t // TODO: Get rid of Sync and use current time?\n\t if (expirationTime === Sync) {\n\t performWork(Sync, null);\n\t } else {\n\t scheduleCallbackWithExpiration(expirationTime);\n\t }\n\t }", "function markUpdateTimeFromFiberToRoot(fiber, expirationTime) {\n // Update the source fiber's expiration time\n if (fiber.expirationTime < expirationTime) {\n fiber.expirationTime = expirationTime;\n }\n\n var alternate = fiber.alternate;\n\n if (alternate !== null && alternate.expirationTime < expirationTime) {\n alternate.expirationTime = expirationTime;\n } // Walk the parent path to the root and update the child expiration time.\n\n\n var node = fiber.return;\n var root = null;\n\n if (node === null && fiber.tag === HostRoot) {\n root = fiber.stateNode;\n } else {\n while (node !== null) {\n alternate = node.alternate;\n\n if (node.childExpirationTime < expirationTime) {\n node.childExpirationTime = expirationTime;\n\n if (alternate !== null && alternate.childExpirationTime < expirationTime) {\n alternate.childExpirationTime = expirationTime;\n }\n } else if (alternate !== null && alternate.childExpirationTime < expirationTime) {\n alternate.childExpirationTime = expirationTime;\n }\n\n if (node.return === null && node.tag === HostRoot) {\n root = node.stateNode;\n break;\n }\n\n node = node.return;\n }\n }\n\n if (root !== null) {\n if (workInProgressRoot === root) {\n // Received an update to a tree that's in the middle of rendering. Mark\n // that's unprocessed work on this root.\n markUnprocessedUpdateTime(expirationTime);\n\n if (workInProgressRootExitStatus === RootSuspendedWithDelay) {\n // The root already suspended with a delay, which means this render\n // definitely won't finish. Since we have a new update, let's mark it as\n // suspended now, right before marking the incoming update. This has the\n // effect of interrupting the current render and switching to the update.\n // TODO: This happens to work when receiving an update during the render\n // phase, because of the trick inside computeExpirationForFiber to\n // subtract 1 from `renderExpirationTime` to move it into a\n // separate bucket. But we should probably model it with an exception,\n // using the same mechanism we use to force hydration of a subtree.\n // TODO: This does not account for low pri updates that were already\n // scheduled before the root started rendering. Need to track the next\n // pending expiration time (perhaps by backtracking the return path) and\n // then trigger a restart in the `renderDidSuspendDelayIfPossible` path.\n markRootSuspendedAtTime(root, renderExpirationTime);\n }\n } // Mark that the root has a pending update.\n\n\n markRootUpdatedAtTime(root, expirationTime);\n }\n\n return root;\n}", "function markUpdateTimeFromFiberToRoot(fiber, expirationTime) {\n // Update the source fiber's expiration time\n if (fiber.expirationTime < expirationTime) {\n fiber.expirationTime = expirationTime;\n }\n\n var alternate = fiber.alternate;\n\n if (alternate !== null && alternate.expirationTime < expirationTime) {\n alternate.expirationTime = expirationTime;\n } // Walk the parent path to the root and update the child expiration time.\n\n\n var node = fiber.return;\n var root = null;\n\n if (node === null && fiber.tag === HostRoot) {\n root = fiber.stateNode;\n } else {\n while (node !== null) {\n alternate = node.alternate;\n\n if (node.childExpirationTime < expirationTime) {\n node.childExpirationTime = expirationTime;\n\n if (alternate !== null && alternate.childExpirationTime < expirationTime) {\n alternate.childExpirationTime = expirationTime;\n }\n } else if (alternate !== null && alternate.childExpirationTime < expirationTime) {\n alternate.childExpirationTime = expirationTime;\n }\n\n if (node.return === null && node.tag === HostRoot) {\n root = node.stateNode;\n break;\n }\n\n node = node.return;\n }\n }\n\n if (root !== null) {\n if (workInProgressRoot === root) {\n // Received an update to a tree that's in the middle of rendering. Mark\n // that's unprocessed work on this root.\n markUnprocessedUpdateTime(expirationTime);\n\n if (workInProgressRootExitStatus === RootSuspendedWithDelay) {\n // The root already suspended with a delay, which means this render\n // definitely won't finish. Since we have a new update, let's mark it as\n // suspended now, right before marking the incoming update. This has the\n // effect of interrupting the current render and switching to the update.\n // TODO: This happens to work when receiving an update during the render\n // phase, because of the trick inside computeExpirationForFiber to\n // subtract 1 from `renderExpirationTime` to move it into a\n // separate bucket. But we should probably model it with an exception,\n // using the same mechanism we use to force hydration of a subtree.\n // TODO: This does not account for low pri updates that were already\n // scheduled before the root started rendering. Need to track the next\n // pending expiration time (perhaps by backtracking the return path) and\n // then trigger a restart in the `renderDidSuspendDelayIfPossible` path.\n markRootSuspendedAtTime(root, renderExpirationTime);\n }\n } // Mark that the root has a pending update.\n\n\n markRootUpdatedAtTime(root, expirationTime);\n }\n\n return root;\n}", "function markUpdateTimeFromFiberToRoot(fiber, expirationTime) {\n // Update the source fiber's expiration time\n if (fiber.expirationTime < expirationTime) {\n fiber.expirationTime = expirationTime;\n }\n\n var alternate = fiber.alternate;\n\n if (alternate !== null && alternate.expirationTime < expirationTime) {\n alternate.expirationTime = expirationTime;\n } // Walk the parent path to the root and update the child expiration time.\n\n\n var node = fiber.return;\n var root = null;\n\n if (node === null && fiber.tag === HostRoot) {\n root = fiber.stateNode;\n } else {\n while (node !== null) {\n alternate = node.alternate;\n\n if (node.childExpirationTime < expirationTime) {\n node.childExpirationTime = expirationTime;\n\n if (alternate !== null && alternate.childExpirationTime < expirationTime) {\n alternate.childExpirationTime = expirationTime;\n }\n } else if (alternate !== null && alternate.childExpirationTime < expirationTime) {\n alternate.childExpirationTime = expirationTime;\n }\n\n if (node.return === null && node.tag === HostRoot) {\n root = node.stateNode;\n break;\n }\n\n node = node.return;\n }\n }\n\n if (root !== null) {\n if (workInProgressRoot === root) {\n // Received an update to a tree that's in the middle of rendering. Mark\n // that's unprocessed work on this root.\n markUnprocessedUpdateTime(expirationTime);\n\n if (workInProgressRootExitStatus === RootSuspendedWithDelay) {\n // The root already suspended with a delay, which means this render\n // definitely won't finish. Since we have a new update, let's mark it as\n // suspended now, right before marking the incoming update. This has the\n // effect of interrupting the current render and switching to the update.\n // TODO: This happens to work when receiving an update during the render\n // phase, because of the trick inside computeExpirationForFiber to\n // subtract 1 from `renderExpirationTime` to move it into a\n // separate bucket. But we should probably model it with an exception,\n // using the same mechanism we use to force hydration of a subtree.\n // TODO: This does not account for low pri updates that were already\n // scheduled before the root started rendering. Need to track the next\n // pending expiration time (perhaps by backtracking the return path) and\n // then trigger a restart in the `renderDidSuspendDelayIfPossible` path.\n markRootSuspendedAtTime(root, renderExpirationTime);\n }\n } // Mark that the root has a pending update.\n\n\n markRootUpdatedAtTime(root, expirationTime);\n }\n\n return root;\n}", "function markUpdateTimeFromFiberToRoot(fiber, expirationTime) {\n // Update the source fiber's expiration time\n if (fiber.expirationTime < expirationTime) {\n fiber.expirationTime = expirationTime;\n }\n\n var alternate = fiber.alternate;\n\n if (alternate !== null && alternate.expirationTime < expirationTime) {\n alternate.expirationTime = expirationTime;\n } // Walk the parent path to the root and update the child expiration time.\n\n\n var node = fiber.return;\n var root = null;\n\n if (node === null && fiber.tag === HostRoot) {\n root = fiber.stateNode;\n } else {\n while (node !== null) {\n alternate = node.alternate;\n\n if (node.childExpirationTime < expirationTime) {\n node.childExpirationTime = expirationTime;\n\n if (alternate !== null && alternate.childExpirationTime < expirationTime) {\n alternate.childExpirationTime = expirationTime;\n }\n } else if (alternate !== null && alternate.childExpirationTime < expirationTime) {\n alternate.childExpirationTime = expirationTime;\n }\n\n if (node.return === null && node.tag === HostRoot) {\n root = node.stateNode;\n break;\n }\n\n node = node.return;\n }\n }\n\n if (root !== null) {\n if (workInProgressRoot === root) {\n // Received an update to a tree that's in the middle of rendering. Mark\n // that's unprocessed work on this root.\n markUnprocessedUpdateTime(expirationTime);\n\n if (workInProgressRootExitStatus === RootSuspendedWithDelay) {\n // The root already suspended with a delay, which means this render\n // definitely won't finish. Since we have a new update, let's mark it as\n // suspended now, right before marking the incoming update. This has the\n // effect of interrupting the current render and switching to the update.\n // TODO: This happens to work when receiving an update during the render\n // phase, because of the trick inside computeExpirationForFiber to\n // subtract 1 from `renderExpirationTime` to move it into a\n // separate bucket. But we should probably model it with an exception,\n // using the same mechanism we use to force hydration of a subtree.\n // TODO: This does not account for low pri updates that were already\n // scheduled before the root started rendering. Need to track the next\n // pending expiration time (perhaps by backtracking the return path) and\n // then trigger a restart in the `renderDidSuspendDelayIfPossible` path.\n markRootSuspendedAtTime(root, renderExpirationTime);\n }\n } // Mark that the root has a pending update.\n\n\n markRootUpdatedAtTime(root, expirationTime);\n }\n\n return root;\n}", "function markUpdateTimeFromFiberToRoot(fiber, expirationTime) {\n // Update the source fiber's expiration time\n if (fiber.expirationTime < expirationTime) {\n fiber.expirationTime = expirationTime;\n }\n\n var alternate = fiber.alternate;\n\n if (alternate !== null && alternate.expirationTime < expirationTime) {\n alternate.expirationTime = expirationTime;\n } // Walk the parent path to the root and update the child expiration time.\n\n\n var node = fiber.return;\n var root = null;\n\n if (node === null && fiber.tag === HostRoot) {\n root = fiber.stateNode;\n } else {\n while (node !== null) {\n alternate = node.alternate;\n\n if (node.childExpirationTime < expirationTime) {\n node.childExpirationTime = expirationTime;\n\n if (alternate !== null && alternate.childExpirationTime < expirationTime) {\n alternate.childExpirationTime = expirationTime;\n }\n } else if (alternate !== null && alternate.childExpirationTime < expirationTime) {\n alternate.childExpirationTime = expirationTime;\n }\n\n if (node.return === null && node.tag === HostRoot) {\n root = node.stateNode;\n break;\n }\n\n node = node.return;\n }\n }\n\n if (root !== null) {\n if (workInProgressRoot === root) {\n // Received an update to a tree that's in the middle of rendering. Mark\n // that's unprocessed work on this root.\n markUnprocessedUpdateTime(expirationTime);\n\n if (workInProgressRootExitStatus === RootSuspendedWithDelay) {\n // The root already suspended with a delay, which means this render\n // definitely won't finish. Since we have a new update, let's mark it as\n // suspended now, right before marking the incoming update. This has the\n // effect of interrupting the current render and switching to the update.\n // TODO: This happens to work when receiving an update during the render\n // phase, because of the trick inside computeExpirationForFiber to\n // subtract 1 from `renderExpirationTime` to move it into a\n // separate bucket. But we should probably model it with an exception,\n // using the same mechanism we use to force hydration of a subtree.\n // TODO: This does not account for low pri updates that were already\n // scheduled before the root started rendering. Need to track the next\n // pending expiration time (perhaps by backtracking the return path) and\n // then trigger a restart in the `renderDidSuspendDelayIfPossible` path.\n markRootSuspendedAtTime(root, renderExpirationTime);\n }\n } // Mark that the root has a pending update.\n\n\n markRootUpdatedAtTime(root, expirationTime);\n }\n\n return root;\n}", "function markUpdateTimeFromFiberToRoot(fiber, expirationTime) {\n // Update the source fiber's expiration time\n if (fiber.expirationTime < expirationTime) {\n fiber.expirationTime = expirationTime;\n }\n\n var alternate = fiber.alternate;\n\n if (alternate !== null && alternate.expirationTime < expirationTime) {\n alternate.expirationTime = expirationTime;\n } // Walk the parent path to the root and update the child expiration time.\n\n\n var node = fiber.return;\n var root = null;\n\n if (node === null && fiber.tag === HostRoot) {\n root = fiber.stateNode;\n } else {\n while (node !== null) {\n alternate = node.alternate;\n\n if (node.childExpirationTime < expirationTime) {\n node.childExpirationTime = expirationTime;\n\n if (alternate !== null && alternate.childExpirationTime < expirationTime) {\n alternate.childExpirationTime = expirationTime;\n }\n } else if (alternate !== null && alternate.childExpirationTime < expirationTime) {\n alternate.childExpirationTime = expirationTime;\n }\n\n if (node.return === null && node.tag === HostRoot) {\n root = node.stateNode;\n break;\n }\n\n node = node.return;\n }\n }\n\n if (root !== null) {\n if (workInProgressRoot === root) {\n // Received an update to a tree that's in the middle of rendering. Mark\n // that's unprocessed work on this root.\n markUnprocessedUpdateTime(expirationTime);\n\n if (workInProgressRootExitStatus === RootSuspendedWithDelay) {\n // The root already suspended with a delay, which means this render\n // definitely won't finish. Since we have a new update, let's mark it as\n // suspended now, right before marking the incoming update. This has the\n // effect of interrupting the current render and switching to the update.\n // TODO: This happens to work when receiving an update during the render\n // phase, because of the trick inside computeExpirationForFiber to\n // subtract 1 from `renderExpirationTime` to move it into a\n // separate bucket. But we should probably model it with an exception,\n // using the same mechanism we use to force hydration of a subtree.\n // TODO: This does not account for low pri updates that were already\n // scheduled before the root started rendering. Need to track the next\n // pending expiration time (perhaps by backtracking the return path) and\n // then trigger a restart in the `renderDidSuspendDelayIfPossible` path.\n markRootSuspendedAtTime(root, renderExpirationTime);\n }\n } // Mark that the root has a pending update.\n\n\n markRootUpdatedAtTime(root, expirationTime);\n }\n\n return root;\n}", "function isPending(fcEvent)\n{\n return fcEvent.extendedProps.status == 'pending';\n}", "function markUpdateTimeFromFiberToRoot(fiber, expirationTime) {\n // Update the source fiber's expiration time\n if (fiber.expirationTime < expirationTime) {\n fiber.expirationTime = expirationTime;\n }\n\n var alternate = fiber.alternate;\n\n if (alternate !== null && alternate.expirationTime < expirationTime) {\n alternate.expirationTime = expirationTime;\n } // Walk the parent path to the root and update the child expiration time.\n\n\n var node = fiber.return;\n var root = null;\n\n if (node === null && fiber.tag === HostRoot) {\n root = fiber.stateNode;\n } else {\n while (node !== null) {\n alternate = node.alternate;\n\n if (node.childExpirationTime < expirationTime) {\n node.childExpirationTime = expirationTime;\n\n if (alternate !== null && alternate.childExpirationTime < expirationTime) {\n alternate.childExpirationTime = expirationTime;\n }\n } else if (alternate !== null && alternate.childExpirationTime < expirationTime) {\n alternate.childExpirationTime = expirationTime;\n }\n\n if (node.return === null && node.tag === HostRoot) {\n root = node.stateNode;\n break;\n }\n\n node = node.return;\n }\n }\n\n if (root !== null) {\n if (workInProgressRoot === root) {\n // Received an update to a tree that's in the middle of rendering. Mark\n // that's unprocessed work on this root.\n markUnprocessedUpdateTime(expirationTime);\n\n if (workInProgressRootExitStatus === RootSuspendedWithDelay) {\n // The root already suspended with a delay, which means this render\n // definitely won't finish. Since we have a new update, let's mark it as\n // suspended now, right before marking the incoming update. This has the\n // effect of interrupting the current render and switching to the update.\n // TODO: This happens to work when receiving an update during the render\n // phase, because of the trick inside computeExpirationForFiber to\n // subtract 1 from `renderExpirationTime` to move it into a\n // separate bucket. But we should probably model it with an exception,\n // using the same mechanism we use to force hydration of a subtree.\n // TODO: This does not account for low pri updates that were already\n // scheduled before the root started rendering. Need to track the next\n // pending expiration time (perhaps by backtracking the return path) and\n // then trigger a restart in the `renderDidSuspendDelayIfPossible` path.\n markRootSuspendedAtTime(root, renderExpirationTime$1);\n }\n } // Mark that the root has a pending update.\n\n\n markRootUpdatedAtTime(root, expirationTime);\n }\n\n return root;\n }", "function markUpdateTimeFromFiberToRoot(fiber, expirationTime) {\n // Update the source fiber's expiration time\n if (fiber.expirationTime < expirationTime) {\n fiber.expirationTime = expirationTime;\n }\n\n var alternate = fiber.alternate;\n\n if (alternate !== null && alternate.expirationTime < expirationTime) {\n alternate.expirationTime = expirationTime;\n } // Walk the parent path to the root and update the child expiration time.\n\n\n var node = fiber.return;\n var root = null;\n\n if (node === null && fiber.tag === HostRoot) {\n root = fiber.stateNode;\n } else {\n while (node !== null) {\n alternate = node.alternate;\n\n if (node.childExpirationTime < expirationTime) {\n node.childExpirationTime = expirationTime;\n\n if (alternate !== null && alternate.childExpirationTime < expirationTime) {\n alternate.childExpirationTime = expirationTime;\n }\n } else if (alternate !== null && alternate.childExpirationTime < expirationTime) {\n alternate.childExpirationTime = expirationTime;\n }\n\n if (node.return === null && node.tag === HostRoot) {\n root = node.stateNode;\n break;\n }\n\n node = node.return;\n }\n }\n\n if (root !== null) {\n if (workInProgressRoot === root) {\n // Received an update to a tree that's in the middle of rendering. Mark\n // that's unprocessed work on this root.\n markUnprocessedUpdateTime(expirationTime);\n\n if (workInProgressRootExitStatus === RootSuspendedWithDelay) {\n // The root already suspended with a delay, which means this render\n // definitely won't finish. Since we have a new update, let's mark it as\n // suspended now, right before marking the incoming update. This has the\n // effect of interrupting the current render and switching to the update.\n // TODO: This happens to work when receiving an update during the render\n // phase, because of the trick inside computeExpirationForFiber to\n // subtract 1 from `renderExpirationTime` to move it into a\n // separate bucket. But we should probably model it with an exception,\n // using the same mechanism we use to force hydration of a subtree.\n // TODO: This does not account for low pri updates that were already\n // scheduled before the root started rendering. Need to track the next\n // pending expiration time (perhaps by backtracking the return path) and\n // then trigger a restart in the `renderDidSuspendDelayIfPossible` path.\n markRootSuspendedAtTime(root, renderExpirationTime$1);\n }\n } // Mark that the root has a pending update.\n\n\n markRootUpdatedAtTime(root, expirationTime);\n }\n\n return root;\n }", "function markUpdateTimeFromFiberToRoot(fiber, expirationTime) {\n // Update the source fiber's expiration time\n if (fiber.expirationTime < expirationTime) {\n fiber.expirationTime = expirationTime;\n }\n\n var alternate = fiber.alternate;\n\n if (alternate !== null && alternate.expirationTime < expirationTime) {\n alternate.expirationTime = expirationTime;\n } // Walk the parent path to the root and update the child expiration time.\n\n\n var node = fiber.return;\n var root = null;\n\n if (node === null && fiber.tag === HostRoot) {\n root = fiber.stateNode;\n } else {\n while (node !== null) {\n alternate = node.alternate;\n\n if (node.childExpirationTime < expirationTime) {\n node.childExpirationTime = expirationTime;\n\n if (alternate !== null && alternate.childExpirationTime < expirationTime) {\n alternate.childExpirationTime = expirationTime;\n }\n } else if (alternate !== null && alternate.childExpirationTime < expirationTime) {\n alternate.childExpirationTime = expirationTime;\n }\n\n if (node.return === null && node.tag === HostRoot) {\n root = node.stateNode;\n break;\n }\n\n node = node.return;\n }\n }\n\n if (root !== null) {\n if (workInProgressRoot === root) {\n // Received an update to a tree that's in the middle of rendering. Mark\n // that's unprocessed work on this root.\n markUnprocessedUpdateTime(expirationTime);\n\n if (workInProgressRootExitStatus === RootSuspendedWithDelay) {\n // The root already suspended with a delay, which means this render\n // definitely won't finish. Since we have a new update, let's mark it as\n // suspended now, right before marking the incoming update. This has the\n // effect of interrupting the current render and switching to the update.\n // TODO: This happens to work when receiving an update during the render\n // phase, because of the trick inside computeExpirationForFiber to\n // subtract 1 from `renderExpirationTime` to move it into a\n // separate bucket. But we should probably model it with an exception,\n // using the same mechanism we use to force hydration of a subtree.\n // TODO: This does not account for low pri updates that were already\n // scheduled before the root started rendering. Need to track the next\n // pending expiration time (perhaps by backtracking the return path) and\n // then trigger a restart in the `renderDidSuspendDelayIfPossible` path.\n markRootSuspendedAtTime(root, renderExpirationTime$1);\n }\n } // Mark that the root has a pending update.\n\n\n markRootUpdatedAtTime(root, expirationTime);\n }\n\n return root;\n }" ]
[ "0.59601957", "0.59122163", "0.5761843", "0.5743674", "0.57292473", "0.57292473", "0.5722173", "0.5722173", "0.56988746", "0.56988746", "0.56988746", "0.56653714", "0.56488705", "0.5599025", "0.5599025", "0.5599025", "0.5599025", "0.5599025", "0.5599025", "0.5599025", "0.5596216", "0.5551127", "0.55081666", "0.5495733", "0.5495733", "0.54954094", "0.54561245", "0.5423516", "0.5422828", "0.5409881", "0.5407529", "0.5407529", "0.5407529", "0.5407529", "0.5407529", "0.54061437", "0.54061437", "0.54061437", "0.54061437", "0.54061437", "0.54061437", "0.54061437", "0.54061437", "0.54061437", "0.54061437", "0.54061437", "0.54061437", "0.54061437", "0.54061437", "0.54061437", "0.54061437", "0.53964573", "0.53853333", "0.53853333", "0.53853333", "0.53853333", "0.53853333", "0.53853333", "0.53853333", "0.53853333", "0.53853333", "0.53825015", "0.5330342", "0.5330342", "0.53210545", "0.53143275", "0.5310335", "0.5295263", "0.5294241", "0.5294241", "0.5294241", "0.5294241", "0.5294241", "0.5294241", "0.5268859", "0.52594596", "0.52594596", "0.52594596" ]
0.5294241
89
root; if a task was already scheduled, we'll check to make sure the expiration time of the existing task is the same as the expiration time of the next level that the root has work on. This function is called on every update, and right before exiting a task.
function ensureRootIsScheduled(root) { var lastExpiredTime = root.lastExpiredTime; if (lastExpiredTime !== NoWork) { // Special case: Expired work should flush synchronously. root.callbackExpirationTime = Sync; root.callbackPriority = ImmediatePriority; root.callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root)); return; } var expirationTime = getNextRootExpirationTimeToWorkOn(root); var existingCallbackNode = root.callbackNode; if (expirationTime === NoWork) { // There's nothing to work on. if (existingCallbackNode !== null) { root.callbackNode = null; root.callbackExpirationTime = NoWork; root.callbackPriority = NoPriority; } return; } // TODO: If this is an update, we already read the current time. Pass the // time as an argument. var currentTime = requestCurrentTimeForUpdate(); var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime); // If there's an existing render task, confirm it has the correct priority and // expiration time. Otherwise, we'll cancel it and schedule a new one. if (existingCallbackNode !== null) { var existingCallbackPriority = root.callbackPriority; var existingCallbackExpirationTime = root.callbackExpirationTime; if ( // Callback must have the exact same expiration time. existingCallbackExpirationTime === expirationTime && // Callback must have greater or equal priority. existingCallbackPriority >= priorityLevel) { // Existing callback is sufficient. return; } // Need to schedule a new task. // TODO: Instead of scheduling a new task, we should be able to change the // priority of the existing one. cancelCallback(existingCallbackNode); } root.callbackExpirationTime = expirationTime; root.callbackPriority = priorityLevel; var callbackNode; if (expirationTime === Sync) { // Sync React callbacks are scheduled on a special internal queue callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root)); } else { callbackNode = scheduleCallback(priorityLevel, performConcurrentWorkOnRoot.bind(null, root), // Compute a task timeout based on the expiration time. This also affects // ordering because tasks are processed in timeout order. { timeout: expirationTimeToMs(expirationTime) - now() }); } root.callbackNode = callbackNode; } // This is the entry point for every concurrent task, i.e. anything that
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ensureRootIsScheduled(root) {\n var lastExpiredTime = root.lastExpiredTime;\n\n if (lastExpiredTime !== NoWork) {\n // Special case: Expired work should flush synchronously.\n root.callbackExpirationTime = Sync;\n root.callbackPriority = ImmediatePriority;\n root.callbackNode = scheduleSyncCallback(\n performSyncWorkOnRoot.bind(null, root),\n );\n return;\n }\n\n var expirationTime = getNextRootExpirationTimeToWorkOn(root);\n var existingCallbackNode = root.callbackNode;\n\n if (expirationTime === NoWork) {\n // There's nothing to work on.\n if (existingCallbackNode !== null) {\n root.callbackNode = null;\n root.callbackExpirationTime = NoWork;\n root.callbackPriority = NoPriority;\n }\n\n return;\n } // TODO: If this is an update, we already read the current time. Pass the\n // time as an argument.\n\n var currentTime = requestCurrentTimeForUpdate();\n var priorityLevel = inferPriorityFromExpirationTime(\n currentTime,\n expirationTime,\n ); // If there's an existing render task, confirm it has the correct priority and\n // expiration time. Otherwise, we'll cancel it and schedule a new one.\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n var existingCallbackExpirationTime =\n root.callbackExpirationTime;\n\n if (\n // Callback must have the exact same expiration time.\n existingCallbackExpirationTime === expirationTime && // Callback must have greater or equal priority.\n existingCallbackPriority >= priorityLevel\n ) {\n // Existing callback is sufficient.\n return;\n } // Need to schedule a new task.\n // TODO: Instead of scheduling a new task, we should be able to change the\n // priority of the existing one.\n\n cancelCallback(existingCallbackNode);\n }\n\n root.callbackExpirationTime = expirationTime;\n root.callbackPriority = priorityLevel;\n var callbackNode;\n\n if (expirationTime === Sync) {\n // Sync React callbacks are scheduled on a special internal queue\n callbackNode = scheduleSyncCallback(\n performSyncWorkOnRoot.bind(null, root),\n );\n } else {\n callbackNode = scheduleCallback(\n priorityLevel,\n performConcurrentWorkOnRoot.bind(null, root), // Compute a task timeout based on the expiration time. This also affects\n // ordering because tasks are processed in timeout order.\n {\n timeout: expirationTimeToMs(expirationTime) - now(),\n },\n );\n }\n\n root.callbackNode = callbackNode;\n } // This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root) {\n var lastExpiredTime = root.lastExpiredTime;\n\n if (lastExpiredTime !== NoWork) {\n // Special case: Expired work should flush synchronously.\n root.callbackExpirationTime = Sync;\n root.callbackPriority = ImmediatePriority;\n root.callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n return;\n }\n\n var expirationTime = getNextRootExpirationTimeToWorkOn(root);\n var existingCallbackNode = root.callbackNode;\n\n if (expirationTime === NoWork) {\n // There's nothing to work on.\n if (existingCallbackNode !== null) {\n root.callbackNode = null;\n root.callbackExpirationTime = NoWork;\n root.callbackPriority = NoPriority;\n }\n\n return;\n } // TODO: If this is an update, we already read the current time. Pass the\n // time as an argument.\n\n\n var currentTime = requestCurrentTime();\n var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime); // If there's an existing render task, confirm it has the correct priority and\n // expiration time. Otherwise, we'll cancel it and schedule a new one.\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n var existingCallbackExpirationTime = root.callbackExpirationTime;\n\n if ( // Callback must have the exact same expiration time.\n existingCallbackExpirationTime === expirationTime && // Callback must have greater or equal priority.\n existingCallbackPriority >= priorityLevel) {\n // Existing callback is sufficient.\n return;\n } // Need to schedule a new task.\n // TODO: Instead of scheduling a new task, we should be able to change the\n // priority of the existing one.\n\n\n cancelCallback(existingCallbackNode);\n }\n\n root.callbackExpirationTime = expirationTime;\n root.callbackPriority = priorityLevel;\n var callbackNode;\n\n if (expirationTime === Sync) {\n // Sync React callbacks are scheduled on a special internal queue\n callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else if (disableSchedulerTimeoutBasedOnReactExpirationTime) {\n callbackNode = scheduleCallback(priorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n } else {\n callbackNode = scheduleCallback(priorityLevel, performConcurrentWorkOnRoot.bind(null, root), // Compute a task timeout based on the expiration time. This also affects\n // ordering because tasks are processed in timeout order.\n {\n timeout: expirationTimeToMs(expirationTime) - now()\n });\n }\n\n root.callbackNode = callbackNode;\n } // This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root) {\n var lastExpiredTime = root.lastExpiredTime;\n\n if (lastExpiredTime !== NoWork) {\n // Special case: Expired work should flush synchronously.\n root.callbackExpirationTime = Sync;\n root.callbackPriority = ImmediatePriority;\n root.callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n return;\n }\n\n var expirationTime = getNextRootExpirationTimeToWorkOn(root);\n var existingCallbackNode = root.callbackNode;\n\n if (expirationTime === NoWork) {\n // There's nothing to work on.\n if (existingCallbackNode !== null) {\n root.callbackNode = null;\n root.callbackExpirationTime = NoWork;\n root.callbackPriority = NoPriority;\n }\n\n return;\n } // TODO: If this is an update, we already read the current time. Pass the\n // time as an argument.\n\n\n var currentTime = requestCurrentTimeForUpdate();\n var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime); // If there's an existing render task, confirm it has the correct priority and\n // expiration time. Otherwise, we'll cancel it and schedule a new one.\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n var existingCallbackExpirationTime = root.callbackExpirationTime;\n\n if ( // Callback must have the exact same expiration time.\n existingCallbackExpirationTime === expirationTime && // Callback must have greater or equal priority.\n existingCallbackPriority >= priorityLevel) {\n // Existing callback is sufficient.\n return;\n } // Need to schedule a new task.\n // TODO: Instead of scheduling a new task, we should be able to change the\n // priority of the existing one.\n\n\n cancelCallback(existingCallbackNode);\n }\n\n root.callbackExpirationTime = expirationTime;\n root.callbackPriority = priorityLevel;\n var callbackNode;\n\n if (expirationTime === Sync) {\n // Sync React callbacks are scheduled on a special internal queue\n callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else {\n callbackNode = scheduleCallback(priorityLevel, performConcurrentWorkOnRoot.bind(null, root), // Compute a task timeout based on the expiration time. This also affects\n // ordering because tasks are processed in timeout order.\n {\n timeout: expirationTimeToMs(expirationTime) - now()\n });\n }\n\n root.callbackNode = callbackNode;\n } // This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root) {\n var lastExpiredTime = root.lastExpiredTime;\n\n if (lastExpiredTime !== NoWork) {\n // Special case: Expired work should flush synchronously.\n root.callbackExpirationTime = Sync;\n root.callbackPriority = ImmediatePriority;\n root.callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n return;\n }\n\n var expirationTime = getNextRootExpirationTimeToWorkOn(root);\n var existingCallbackNode = root.callbackNode;\n\n if (expirationTime === NoWork) {\n // There's nothing to work on.\n if (existingCallbackNode !== null) {\n root.callbackNode = null;\n root.callbackExpirationTime = NoWork;\n root.callbackPriority = NoPriority;\n }\n\n return;\n } // TODO: If this is an update, we already read the current time. Pass the\n // time as an argument.\n\n\n var currentTime = requestCurrentTimeForUpdate();\n var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime); // If there's an existing render task, confirm it has the correct priority and\n // expiration time. Otherwise, we'll cancel it and schedule a new one.\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n var existingCallbackExpirationTime = root.callbackExpirationTime;\n\n if ( // Callback must have the exact same expiration time.\n existingCallbackExpirationTime === expirationTime && // Callback must have greater or equal priority.\n existingCallbackPriority >= priorityLevel) {\n // Existing callback is sufficient.\n return;\n } // Need to schedule a new task.\n // TODO: Instead of scheduling a new task, we should be able to change the\n // priority of the existing one.\n\n\n cancelCallback(existingCallbackNode);\n }\n\n root.callbackExpirationTime = expirationTime;\n root.callbackPriority = priorityLevel;\n var callbackNode;\n\n if (expirationTime === Sync) {\n // Sync React callbacks are scheduled on a special internal queue\n callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else {\n callbackNode = scheduleCallback(priorityLevel, performConcurrentWorkOnRoot.bind(null, root), // Compute a task timeout based on the expiration time. This also affects\n // ordering because tasks are processed in timeout order.\n {\n timeout: expirationTimeToMs(expirationTime) - now$1()\n });\n }\n\n root.callbackNode = callbackNode;\n } // This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root) {\n var lastExpiredTime = root.lastExpiredTime;\n\n if (lastExpiredTime !== NoWork) {\n // Special case: Expired work should flush synchronously.\n root.callbackExpirationTime = Sync;\n root.callbackPriority = ImmediatePriority;\n root.callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n return;\n }\n\n var expirationTime = getNextRootExpirationTimeToWorkOn(root);\n var existingCallbackNode = root.callbackNode;\n\n if (expirationTime === NoWork) {\n // There's nothing to work on.\n if (existingCallbackNode !== null) {\n root.callbackNode = null;\n root.callbackExpirationTime = NoWork;\n root.callbackPriority = NoPriority;\n }\n\n return;\n } // TODO: If this is an update, we already read the current time. Pass the\n // time as an argument.\n\n\n var currentTime = requestCurrentTimeForUpdate();\n var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime); // If there's an existing render task, confirm it has the correct priority and\n // expiration time. Otherwise, we'll cancel it and schedule a new one.\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n var existingCallbackExpirationTime = root.callbackExpirationTime;\n\n if ( // Callback must have the exact same expiration time.\n existingCallbackExpirationTime === expirationTime && // Callback must have greater or equal priority.\n existingCallbackPriority >= priorityLevel) {\n // Existing callback is sufficient.\n return;\n } // Need to schedule a new task.\n // TODO: Instead of scheduling a new task, we should be able to change the\n // priority of the existing one.\n\n\n cancelCallback(existingCallbackNode);\n }\n\n root.callbackExpirationTime = expirationTime;\n root.callbackPriority = priorityLevel;\n var callbackNode;\n\n if (expirationTime === Sync) {\n // Sync React callbacks are scheduled on a special internal queue\n callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else {\n callbackNode = scheduleCallback(priorityLevel, performConcurrentWorkOnRoot.bind(null, root), // Compute a task timeout based on the expiration time. This also affects\n // ordering because tasks are processed in timeout order.\n {\n timeout: expirationTimeToMs(expirationTime) - now()\n });\n }\n\n root.callbackNode = callbackNode;\n } // This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root) {\n var lastExpiredTime = root.lastExpiredTime;\n\n if (lastExpiredTime !== NoWork) {\n // Special case: Expired work should flush synchronously.\n root.callbackExpirationTime = Sync;\n root.callbackPriority = ImmediatePriority;\n root.callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n return;\n }\n\n var expirationTime = getNextRootExpirationTimeToWorkOn(root);\n var existingCallbackNode = root.callbackNode;\n\n if (expirationTime === NoWork) {\n // There's nothing to work on.\n if (existingCallbackNode !== null) {\n root.callbackNode = null;\n root.callbackExpirationTime = NoWork;\n root.callbackPriority = NoPriority;\n }\n\n return;\n } // TODO: If this is an update, we already read the current time. Pass the\n // time as an argument.\n\n\n var currentTime = requestCurrentTimeForUpdate();\n var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime); // If there's an existing render task, confirm it has the correct priority and\n // expiration time. Otherwise, we'll cancel it and schedule a new one.\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n var existingCallbackExpirationTime = root.callbackExpirationTime;\n\n if ( // Callback must have the exact same expiration time.\n existingCallbackExpirationTime === expirationTime && // Callback must have greater or equal priority.\n existingCallbackPriority >= priorityLevel) {\n // Existing callback is sufficient.\n return;\n } // Need to schedule a new task.\n // TODO: Instead of scheduling a new task, we should be able to change the\n // priority of the existing one.\n\n\n cancelCallback(existingCallbackNode);\n }\n\n root.callbackExpirationTime = expirationTime;\n root.callbackPriority = priorityLevel;\n var callbackNode;\n\n if (expirationTime === Sync) {\n // Sync React callbacks are scheduled on a special internal queue\n callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else {\n callbackNode = scheduleCallback(priorityLevel, performConcurrentWorkOnRoot.bind(null, root), // Compute a task timeout based on the expiration time. This also affects\n // ordering because tasks are processed in timeout order.\n {\n timeout: expirationTimeToMs(expirationTime) - now()\n });\n }\n\n root.callbackNode = callbackNode;\n } // This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root) {\n var lastExpiredTime = root.lastExpiredTime;\n\n if (lastExpiredTime !== NoWork) {\n // Special case: Expired work should flush synchronously.\n root.callbackExpirationTime = Sync;\n root.callbackPriority = ImmediatePriority;\n root.callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n return;\n }\n\n var expirationTime = getNextRootExpirationTimeToWorkOn(root);\n var existingCallbackNode = root.callbackNode;\n\n if (expirationTime === NoWork) {\n // There's nothing to work on.\n if (existingCallbackNode !== null) {\n root.callbackNode = null;\n root.callbackExpirationTime = NoWork;\n root.callbackPriority = NoPriority;\n }\n\n return;\n } // TODO: If this is an update, we already read the current time. Pass the\n // time as an argument.\n\n\n var currentTime = requestCurrentTimeForUpdate();\n var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime); // If there's an existing render task, confirm it has the correct priority and\n // expiration time. Otherwise, we'll cancel it and schedule a new one.\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n var existingCallbackExpirationTime = root.callbackExpirationTime;\n\n if ( // Callback must have the exact same expiration time.\n existingCallbackExpirationTime === expirationTime && // Callback must have greater or equal priority.\n existingCallbackPriority >= priorityLevel) {\n // Existing callback is sufficient.\n return;\n } // Need to schedule a new task.\n // TODO: Instead of scheduling a new task, we should be able to change the\n // priority of the existing one.\n\n\n cancelCallback(existingCallbackNode);\n }\n\n root.callbackExpirationTime = expirationTime;\n root.callbackPriority = priorityLevel;\n var callbackNode;\n\n if (expirationTime === Sync) {\n // Sync React callbacks are scheduled on a special internal queue\n callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else {\n callbackNode = scheduleCallback(priorityLevel, performConcurrentWorkOnRoot.bind(null, root), // Compute a task timeout based on the expiration time. This also affects\n // ordering because tasks are processed in timeout order.\n {\n timeout: expirationTimeToMs(expirationTime) - now()\n });\n }\n\n root.callbackNode = callbackNode;\n } // This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root) {\n var lastExpiredTime = root.lastExpiredTime;\n\n if (lastExpiredTime !== NoWork) {\n // Special case: Expired work should flush synchronously.\n root.callbackExpirationTime = Sync;\n root.callbackPriority = ImmediatePriority;\n root.callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n return;\n }\n\n var expirationTime = getNextRootExpirationTimeToWorkOn(root);\n var existingCallbackNode = root.callbackNode;\n\n if (expirationTime === NoWork) {\n // There's nothing to work on.\n if (existingCallbackNode !== null) {\n root.callbackNode = null;\n root.callbackExpirationTime = NoWork;\n root.callbackPriority = NoPriority;\n }\n\n return;\n } // TODO: If this is an update, we already read the current time. Pass the\n // time as an argument.\n\n\n var currentTime = requestCurrentTimeForUpdate();\n var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime); // If there's an existing render task, confirm it has the correct priority and\n // expiration time. Otherwise, we'll cancel it and schedule a new one.\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n var existingCallbackExpirationTime = root.callbackExpirationTime;\n\n if ( // Callback must have the exact same expiration time.\n existingCallbackExpirationTime === expirationTime && // Callback must have greater or equal priority.\n existingCallbackPriority >= priorityLevel) {\n // Existing callback is sufficient.\n return;\n } // Need to schedule a new task.\n // TODO: Instead of scheduling a new task, we should be able to change the\n // priority of the existing one.\n\n\n cancelCallback(existingCallbackNode);\n }\n\n root.callbackExpirationTime = expirationTime;\n root.callbackPriority = priorityLevel;\n var callbackNode;\n\n if (expirationTime === Sync) {\n // Sync React callbacks are scheduled on a special internal queue\n callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else {\n callbackNode = scheduleCallback(priorityLevel, performConcurrentWorkOnRoot.bind(null, root), // Compute a task timeout based on the expiration time. This also affects\n // ordering because tasks are processed in timeout order.\n {\n timeout: expirationTimeToMs(expirationTime) - now()\n });\n }\n\n root.callbackNode = callbackNode;\n } // This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root){var lastExpiredTime=root.lastExpiredTime;if(lastExpiredTime!==NoWork){// Special case: Expired work should flush synchronously.\nroot.callbackExpirationTime=Sync;root.callbackPriority=ImmediatePriority;root.callbackNode=scheduleSyncCallback(performSyncWorkOnRoot.bind(null,root));return;}var expirationTime=getNextRootExpirationTimeToWorkOn(root);var existingCallbackNode=root.callbackNode;if(expirationTime===NoWork){// There's nothing to work on.\nif(existingCallbackNode!==null){root.callbackNode=null;root.callbackExpirationTime=NoWork;root.callbackPriority=NoPriority;}return;}// TODO: If this is an update, we already read the current time. Pass the\n// time as an argument.\nvar currentTime=requestCurrentTimeForUpdate();var priorityLevel=inferPriorityFromExpirationTime(currentTime,expirationTime);// If there's an existing render task, confirm it has the correct priority and\n// expiration time. Otherwise, we'll cancel it and schedule a new one.\nif(existingCallbackNode!==null){var existingCallbackPriority=root.callbackPriority;var existingCallbackExpirationTime=root.callbackExpirationTime;if(// Callback must have the exact same expiration time.\nexistingCallbackExpirationTime===expirationTime&&// Callback must have greater or equal priority.\nexistingCallbackPriority>=priorityLevel){// Existing callback is sufficient.\nreturn;}// Need to schedule a new task.\n// TODO: Instead of scheduling a new task, we should be able to change the\n// priority of the existing one.\ncancelCallback(existingCallbackNode);}root.callbackExpirationTime=expirationTime;root.callbackPriority=priorityLevel;var callbackNode;if(expirationTime===Sync){// Sync React callbacks are scheduled on a special internal queue\ncallbackNode=scheduleSyncCallback(performSyncWorkOnRoot.bind(null,root));}else{callbackNode=scheduleCallback(priorityLevel,performConcurrentWorkOnRoot.bind(null,root),// Compute a task timeout based on the expiration time. This also affects\n// ordering because tasks are processed in timeout order.\n{timeout:expirationTimeToMs(expirationTime)-now()});}root.callbackNode=callbackNode;}// This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root){var lastExpiredTime=root.lastExpiredTime;if(lastExpiredTime!==NoWork){// Special case: Expired work should flush synchronously.\nroot.callbackExpirationTime=Sync;root.callbackPriority=ImmediatePriority;root.callbackNode=scheduleSyncCallback(performSyncWorkOnRoot.bind(null,root));return;}var expirationTime=getNextRootExpirationTimeToWorkOn(root);var existingCallbackNode=root.callbackNode;if(expirationTime===NoWork){// There's nothing to work on.\nif(existingCallbackNode!==null){root.callbackNode=null;root.callbackExpirationTime=NoWork;root.callbackPriority=NoPriority;}return;}// TODO: If this is an update, we already read the current time. Pass the\n// time as an argument.\nvar currentTime=requestCurrentTimeForUpdate();var priorityLevel=inferPriorityFromExpirationTime(currentTime,expirationTime);// If there's an existing render task, confirm it has the correct priority and\n// expiration time. Otherwise, we'll cancel it and schedule a new one.\nif(existingCallbackNode!==null){var existingCallbackPriority=root.callbackPriority;var existingCallbackExpirationTime=root.callbackExpirationTime;if(// Callback must have the exact same expiration time.\nexistingCallbackExpirationTime===expirationTime&&// Callback must have greater or equal priority.\nexistingCallbackPriority>=priorityLevel){// Existing callback is sufficient.\nreturn;}// Need to schedule a new task.\n// TODO: Instead of scheduling a new task, we should be able to change the\n// priority of the existing one.\ncancelCallback(existingCallbackNode);}root.callbackExpirationTime=expirationTime;root.callbackPriority=priorityLevel;var callbackNode;if(expirationTime===Sync){// Sync React callbacks are scheduled on a special internal queue\ncallbackNode=scheduleSyncCallback(performSyncWorkOnRoot.bind(null,root));}else{callbackNode=scheduleCallback(priorityLevel,performConcurrentWorkOnRoot.bind(null,root),// Compute a task timeout based on the expiration time. This also affects\n// ordering because tasks are processed in timeout order.\n{timeout:expirationTimeToMs(expirationTime)-now()});}root.callbackNode=callbackNode;}// This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root){var lastExpiredTime=root.lastExpiredTime;if(lastExpiredTime!==NoWork){// Special case: Expired work should flush synchronously.\nroot.callbackExpirationTime=Sync;root.callbackPriority=ImmediatePriority;root.callbackNode=scheduleSyncCallback(performSyncWorkOnRoot.bind(null,root));return;}var expirationTime=getNextRootExpirationTimeToWorkOn(root);var existingCallbackNode=root.callbackNode;if(expirationTime===NoWork){// There's nothing to work on.\nif(existingCallbackNode!==null){root.callbackNode=null;root.callbackExpirationTime=NoWork;root.callbackPriority=NoPriority;}return;}// TODO: If this is an update, we already read the current time. Pass the\n// time as an argument.\nvar currentTime=requestCurrentTimeForUpdate();var priorityLevel=inferPriorityFromExpirationTime(currentTime,expirationTime);// If there's an existing render task, confirm it has the correct priority and\n// expiration time. Otherwise, we'll cancel it and schedule a new one.\nif(existingCallbackNode!==null){var existingCallbackPriority=root.callbackPriority;var existingCallbackExpirationTime=root.callbackExpirationTime;if(// Callback must have the exact same expiration time.\nexistingCallbackExpirationTime===expirationTime&&// Callback must have greater or equal priority.\nexistingCallbackPriority>=priorityLevel){// Existing callback is sufficient.\nreturn;}// Need to schedule a new task.\n// TODO: Instead of scheduling a new task, we should be able to change the\n// priority of the existing one.\ncancelCallback(existingCallbackNode);}root.callbackExpirationTime=expirationTime;root.callbackPriority=priorityLevel;var callbackNode;if(expirationTime===Sync){// Sync React callbacks are scheduled on a special internal queue\ncallbackNode=scheduleSyncCallback(performSyncWorkOnRoot.bind(null,root));}else{callbackNode=scheduleCallback(priorityLevel,performConcurrentWorkOnRoot.bind(null,root),// Compute a task timeout based on the expiration time. This also affects\n// ordering because tasks are processed in timeout order.\n{timeout:expirationTimeToMs(expirationTime)-now()});}root.callbackNode=callbackNode;}// This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root) {\n var lastExpiredTime = root.lastExpiredTime;\n\n if (lastExpiredTime !== NoWork) {\n // Special case: Expired work should flush synchronously.\n root.callbackExpirationTime = Sync;\n root.callbackPriority = ImmediatePriority;\n root.callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n return;\n }\n\n var expirationTime = getNextRootExpirationTimeToWorkOn(root);\n var existingCallbackNode = root.callbackNode;\n\n if (expirationTime === NoWork) {\n // There's nothing to work on.\n if (existingCallbackNode !== null) {\n root.callbackNode = null;\n root.callbackExpirationTime = NoWork;\n root.callbackPriority = NoPriority;\n }\n\n return;\n } // TODO: If this is an update, we already read the current time. Pass the\n // time as an argument.\n\n\n var currentTime = requestCurrentTime();\n var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime); // If there's an existing render task, confirm it has the correct priority and\n // expiration time. Otherwise, we'll cancel it and schedule a new one.\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n var existingCallbackExpirationTime = root.callbackExpirationTime;\n\n if ( // Callback must have the exact same expiration time.\n existingCallbackExpirationTime === expirationTime && // Callback must have greater or equal priority.\n existingCallbackPriority >= priorityLevel) {\n // Existing callback is sufficient.\n return;\n } // Need to schedule a new task.\n // TODO: Instead of scheduling a new task, we should be able to change the\n // priority of the existing one.\n\n\n cancelCallback(existingCallbackNode);\n }\n\n root.callbackExpirationTime = expirationTime;\n root.callbackPriority = priorityLevel;\n var callbackNode;\n\n if (expirationTime === Sync) {\n // Sync React callbacks are scheduled on a special internal queue\n callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else if (disableSchedulerTimeoutBasedOnReactExpirationTime) {\n callbackNode = scheduleCallback(priorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n } else {\n callbackNode = scheduleCallback(priorityLevel, performConcurrentWorkOnRoot.bind(null, root), // Compute a task timeout based on the expiration time. This also affects\n // ordering because tasks are processed in timeout order.\n {\n timeout: expirationTimeToMs(expirationTime) - now()\n });\n }\n\n root.callbackNode = callbackNode;\n} // This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root) {\n var lastExpiredTime = root.lastExpiredTime;\n\n if (lastExpiredTime !== NoWork) {\n // Special case: Expired work should flush synchronously.\n root.callbackExpirationTime = Sync;\n root.callbackPriority = ImmediatePriority;\n root.callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n return;\n }\n\n var expirationTime = getNextRootExpirationTimeToWorkOn(root);\n var existingCallbackNode = root.callbackNode;\n\n if (expirationTime === NoWork) {\n // There's nothing to work on.\n if (existingCallbackNode !== null) {\n root.callbackNode = null;\n root.callbackExpirationTime = NoWork;\n root.callbackPriority = NoPriority;\n }\n\n return;\n } // TODO: If this is an update, we already read the current time. Pass the\n // time as an argument.\n\n\n var currentTime = requestCurrentTime();\n var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime); // If there's an existing render task, confirm it has the correct priority and\n // expiration time. Otherwise, we'll cancel it and schedule a new one.\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n var existingCallbackExpirationTime = root.callbackExpirationTime;\n\n if ( // Callback must have the exact same expiration time.\n existingCallbackExpirationTime === expirationTime && // Callback must have greater or equal priority.\n existingCallbackPriority >= priorityLevel) {\n // Existing callback is sufficient.\n return;\n } // Need to schedule a new task.\n // TODO: Instead of scheduling a new task, we should be able to change the\n // priority of the existing one.\n\n\n cancelCallback(existingCallbackNode);\n }\n\n root.callbackExpirationTime = expirationTime;\n root.callbackPriority = priorityLevel;\n var callbackNode;\n\n if (expirationTime === Sync) {\n // Sync React callbacks are scheduled on a special internal queue\n callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else if (disableSchedulerTimeoutBasedOnReactExpirationTime) {\n callbackNode = scheduleCallback(priorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n } else {\n callbackNode = scheduleCallback(priorityLevel, performConcurrentWorkOnRoot.bind(null, root), // Compute a task timeout based on the expiration time. This also affects\n // ordering because tasks are processed in timeout order.\n {\n timeout: expirationTimeToMs(expirationTime) - now()\n });\n }\n\n root.callbackNode = callbackNode;\n} // This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root) {\n var lastExpiredTime = root.lastExpiredTime;\n\n if (lastExpiredTime !== NoWork) {\n // Special case: Expired work should flush synchronously.\n root.callbackExpirationTime = Sync;\n root.callbackPriority = ImmediatePriority;\n root.callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n return;\n }\n\n var expirationTime = getNextRootExpirationTimeToWorkOn(root);\n var existingCallbackNode = root.callbackNode;\n\n if (expirationTime === NoWork) {\n // There's nothing to work on.\n if (existingCallbackNode !== null) {\n root.callbackNode = null;\n root.callbackExpirationTime = NoWork;\n root.callbackPriority = NoPriority;\n }\n\n return;\n } // TODO: If this is an update, we already read the current time. Pass the\n // time as an argument.\n\n\n var currentTime = requestCurrentTimeForUpdate();\n var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime); // If there's an existing render task, confirm it has the correct priority and\n // expiration time. Otherwise, we'll cancel it and schedule a new one.\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n var existingCallbackExpirationTime = root.callbackExpirationTime;\n\n if ( // Callback must have the exact same expiration time.\n existingCallbackExpirationTime === expirationTime && // Callback must have greater or equal priority.\n existingCallbackPriority >= priorityLevel) {\n // Existing callback is sufficient.\n return;\n } // Need to schedule a new task.\n // TODO: Instead of scheduling a new task, we should be able to change the\n // priority of the existing one.\n\n\n cancelCallback(existingCallbackNode);\n }\n\n root.callbackExpirationTime = expirationTime;\n root.callbackPriority = priorityLevel;\n var callbackNode;\n\n if (expirationTime === Sync) {\n // Sync React callbacks are scheduled on a special internal queue\n callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else if (disableSchedulerTimeoutBasedOnReactExpirationTime) {\n callbackNode = scheduleCallback(priorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n } else {\n callbackNode = scheduleCallback(priorityLevel, performConcurrentWorkOnRoot.bind(null, root), // Compute a task timeout based on the expiration time. This also affects\n // ordering because tasks are processed in timeout order.\n {\n timeout: expirationTimeToMs(expirationTime) - now()\n });\n }\n\n root.callbackNode = callbackNode;\n} // This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root) {\n var lastExpiredTime = root.lastExpiredTime;\n\n if (lastExpiredTime !== NoWork) {\n // Special case: Expired work should flush synchronously.\n root.callbackExpirationTime = Sync;\n root.callbackPriority = ImmediatePriority;\n root.callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n return;\n }\n\n var expirationTime = getNextRootExpirationTimeToWorkOn(root);\n var existingCallbackNode = root.callbackNode;\n\n if (expirationTime === NoWork) {\n // There's nothing to work on.\n if (existingCallbackNode !== null) {\n root.callbackNode = null;\n root.callbackExpirationTime = NoWork;\n root.callbackPriority = NoPriority;\n }\n\n return;\n } // TODO: If this is an update, we already read the current time. Pass the\n // time as an argument.\n\n\n var currentTime = requestCurrentTimeForUpdate();\n var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime); // If there's an existing render task, confirm it has the correct priority and\n // expiration time. Otherwise, we'll cancel it and schedule a new one.\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n var existingCallbackExpirationTime = root.callbackExpirationTime;\n\n if ( // Callback must have the exact same expiration time.\n existingCallbackExpirationTime === expirationTime && // Callback must have greater or equal priority.\n existingCallbackPriority >= priorityLevel) {\n // Existing callback is sufficient.\n return;\n } // Need to schedule a new task.\n // TODO: Instead of scheduling a new task, we should be able to change the\n // priority of the existing one.\n\n\n cancelCallback(existingCallbackNode);\n }\n\n root.callbackExpirationTime = expirationTime;\n root.callbackPriority = priorityLevel;\n var callbackNode;\n\n if (expirationTime === Sync) {\n // Sync React callbacks are scheduled on a special internal queue\n callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else if (disableSchedulerTimeoutBasedOnReactExpirationTime) {\n callbackNode = scheduleCallback(priorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n } else {\n callbackNode = scheduleCallback(priorityLevel, performConcurrentWorkOnRoot.bind(null, root), // Compute a task timeout based on the expiration time. This also affects\n // ordering because tasks are processed in timeout order.\n {\n timeout: expirationTimeToMs(expirationTime) - now()\n });\n }\n\n root.callbackNode = callbackNode;\n} // This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root) {\n var lastExpiredTime = root.lastExpiredTime;\n\n if (lastExpiredTime !== NoWork) {\n // Special case: Expired work should flush synchronously.\n root.callbackExpirationTime = Sync;\n root.callbackPriority = ImmediatePriority;\n root.callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n return;\n }\n\n var expirationTime = getNextRootExpirationTimeToWorkOn(root);\n var existingCallbackNode = root.callbackNode;\n\n if (expirationTime === NoWork) {\n // There's nothing to work on.\n if (existingCallbackNode !== null) {\n root.callbackNode = null;\n root.callbackExpirationTime = NoWork;\n root.callbackPriority = NoPriority;\n }\n\n return;\n } // TODO: If this is an update, we already read the current time. Pass the\n // time as an argument.\n\n\n var currentTime = requestCurrentTimeForUpdate();\n var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime); // If there's an existing render task, confirm it has the correct priority and\n // expiration time. Otherwise, we'll cancel it and schedule a new one.\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n var existingCallbackExpirationTime = root.callbackExpirationTime;\n\n if ( // Callback must have the exact same expiration time.\n existingCallbackExpirationTime === expirationTime && // Callback must have greater or equal priority.\n existingCallbackPriority >= priorityLevel) {\n // Existing callback is sufficient.\n return;\n } // Need to schedule a new task.\n // TODO: Instead of scheduling a new task, we should be able to change the\n // priority of the existing one.\n\n\n cancelCallback(existingCallbackNode);\n }\n\n root.callbackExpirationTime = expirationTime;\n root.callbackPriority = priorityLevel;\n var callbackNode;\n\n if (expirationTime === Sync) {\n // Sync React callbacks are scheduled on a special internal queue\n callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else if (disableSchedulerTimeoutBasedOnReactExpirationTime) {\n callbackNode = scheduleCallback(priorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n } else {\n callbackNode = scheduleCallback(priorityLevel, performConcurrentWorkOnRoot.bind(null, root), // Compute a task timeout based on the expiration time. This also affects\n // ordering because tasks are processed in timeout order.\n {\n timeout: expirationTimeToMs(expirationTime) - now()\n });\n }\n\n root.callbackNode = callbackNode;\n} // This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root) {\n var lastExpiredTime = root.lastExpiredTime;\n\n if (lastExpiredTime !== NoWork) {\n // Special case: Expired work should flush synchronously.\n root.callbackExpirationTime = Sync;\n root.callbackPriority = ImmediatePriority;\n root.callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n return;\n }\n\n var expirationTime = getNextRootExpirationTimeToWorkOn(root);\n var existingCallbackNode = root.callbackNode;\n\n if (expirationTime === NoWork) {\n // There's nothing to work on.\n if (existingCallbackNode !== null) {\n root.callbackNode = null;\n root.callbackExpirationTime = NoWork;\n root.callbackPriority = NoPriority;\n }\n\n return;\n } // TODO: If this is an update, we already read the current time. Pass the\n // time as an argument.\n\n\n var currentTime = requestCurrentTimeForUpdate();\n var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime); // If there's an existing render task, confirm it has the correct priority and\n // expiration time. Otherwise, we'll cancel it and schedule a new one.\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n var existingCallbackExpirationTime = root.callbackExpirationTime;\n\n if ( // Callback must have the exact same expiration time.\n existingCallbackExpirationTime === expirationTime && // Callback must have greater or equal priority.\n existingCallbackPriority >= priorityLevel) {\n // Existing callback is sufficient.\n return;\n } // Need to schedule a new task.\n // TODO: Instead of scheduling a new task, we should be able to change the\n // priority of the existing one.\n\n\n cancelCallback(existingCallbackNode);\n }\n\n root.callbackExpirationTime = expirationTime;\n root.callbackPriority = priorityLevel;\n var callbackNode;\n\n if (expirationTime === Sync) {\n // Sync React callbacks are scheduled on a special internal queue\n callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else if (disableSchedulerTimeoutBasedOnReactExpirationTime) {\n callbackNode = scheduleCallback(priorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n } else {\n callbackNode = scheduleCallback(priorityLevel, performConcurrentWorkOnRoot.bind(null, root), // Compute a task timeout based on the expiration time. This also affects\n // ordering because tasks are processed in timeout order.\n {\n timeout: expirationTimeToMs(expirationTime) - now()\n });\n }\n\n root.callbackNode = callbackNode;\n} // This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root, currentTime) {\n var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as\n // expired so we know to work on those next.\n\n markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.\n\n var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes); // This returns the priority level computed during the `getNextLanes` call.\n\n var newCallbackPriority = returnNextLanesPriority();\n\n if (nextLanes === NoLanes) {\n // Special case: There's nothing to work on.\n if (existingCallbackNode !== null) {\n cancelCallback(existingCallbackNode);\n root.callbackNode = null;\n root.callbackPriority = NoLanePriority;\n }\n\n return;\n } // Check if there's an existing task. We may be able to reuse it.\n\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n\n if (existingCallbackPriority === newCallbackPriority) {\n // The priority hasn't changed. We can reuse the existing task. Exit.\n return;\n } // The priority changed. Cancel the existing callback. We'll schedule a new\n // one below.\n\n\n cancelCallback(existingCallbackNode);\n } // Schedule a new callback.\n\n\n var newCallbackNode;\n\n if (newCallbackPriority === SyncLanePriority) {\n // Special case: Sync React callbacks are scheduled on a special\n // internal queue\n newCallbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else if (newCallbackPriority === SyncBatchedLanePriority) {\n newCallbackNode = scheduleCallback(ImmediatePriority$1, performSyncWorkOnRoot.bind(null, root));\n } else {\n var schedulerPriorityLevel = lanePriorityToSchedulerPriority(newCallbackPriority);\n newCallbackNode = scheduleCallback(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n }\n\n root.callbackPriority = newCallbackPriority;\n root.callbackNode = newCallbackNode;\n } // This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root, currentTime) {\n var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as\n // expired so we know to work on those next.\n\n markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.\n\n var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes); // This returns the priority level computed during the `getNextLanes` call.\n\n var newCallbackPriority = returnNextLanesPriority();\n\n if (nextLanes === NoLanes) {\n // Special case: There's nothing to work on.\n if (existingCallbackNode !== null) {\n cancelCallback(existingCallbackNode);\n root.callbackNode = null;\n root.callbackPriority = NoLanePriority;\n }\n\n return;\n } // Check if there's an existing task. We may be able to reuse it.\n\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n\n if (existingCallbackPriority === newCallbackPriority) {\n // The priority hasn't changed. We can reuse the existing task. Exit.\n return;\n } // The priority changed. Cancel the existing callback. We'll schedule a new\n // one below.\n\n\n cancelCallback(existingCallbackNode);\n } // Schedule a new callback.\n\n\n var newCallbackNode;\n\n if (newCallbackPriority === SyncLanePriority) {\n // Special case: Sync React callbacks are scheduled on a special\n // internal queue\n newCallbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else if (newCallbackPriority === SyncBatchedLanePriority) {\n newCallbackNode = scheduleCallback(ImmediatePriority$1, performSyncWorkOnRoot.bind(null, root));\n } else {\n var schedulerPriorityLevel = lanePriorityToSchedulerPriority(newCallbackPriority);\n newCallbackNode = scheduleCallback(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n }\n\n root.callbackPriority = newCallbackPriority;\n root.callbackNode = newCallbackNode;\n } // This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root, currentTime) {\n var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as\n // expired so we know to work on those next.\n\n markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.\n\n var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes); // This returns the priority level computed during the `getNextLanes` call.\n\n var newCallbackPriority = returnNextLanesPriority();\n\n if (nextLanes === NoLanes) {\n // Special case: There's nothing to work on.\n if (existingCallbackNode !== null) {\n cancelCallback(existingCallbackNode);\n root.callbackNode = null;\n root.callbackPriority = NoLanePriority;\n }\n\n return;\n } // Check if there's an existing task. We may be able to reuse it.\n\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n\n if (existingCallbackPriority === newCallbackPriority) {\n // The priority hasn't changed. We can reuse the existing task. Exit.\n return;\n } // The priority changed. Cancel the existing callback. We'll schedule a new\n // one below.\n\n\n cancelCallback(existingCallbackNode);\n } // Schedule a new callback.\n\n\n var newCallbackNode;\n\n if (newCallbackPriority === SyncLanePriority) {\n // Special case: Sync React callbacks are scheduled on a special\n // internal queue\n newCallbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else if (newCallbackPriority === SyncBatchedLanePriority) {\n newCallbackNode = scheduleCallback(ImmediatePriority$1, performSyncWorkOnRoot.bind(null, root));\n } else {\n var schedulerPriorityLevel = lanePriorityToSchedulerPriority(newCallbackPriority);\n newCallbackNode = scheduleCallback(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n }\n\n root.callbackPriority = newCallbackPriority;\n root.callbackNode = newCallbackNode;\n } // This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root, currentTime) {\n var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as\n // expired so we know to work on those next.\n\n markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.\n\n var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes); // This returns the priority level computed during the `getNextLanes` call.\n\n var newCallbackPriority = returnNextLanesPriority();\n\n if (nextLanes === NoLanes) {\n // Special case: There's nothing to work on.\n if (existingCallbackNode !== null) {\n cancelCallback(existingCallbackNode);\n root.callbackNode = null;\n root.callbackPriority = NoLanePriority;\n }\n\n return;\n } // Check if there's an existing task. We may be able to reuse it.\n\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n\n if (existingCallbackPriority === newCallbackPriority) {\n // The priority hasn't changed. We can reuse the existing task. Exit.\n return;\n } // The priority changed. Cancel the existing callback. We'll schedule a new\n // one below.\n\n\n cancelCallback(existingCallbackNode);\n } // Schedule a new callback.\n\n\n var newCallbackNode;\n\n if (newCallbackPriority === SyncLanePriority) {\n // Special case: Sync React callbacks are scheduled on a special\n // internal queue\n newCallbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else if (newCallbackPriority === SyncBatchedLanePriority) {\n newCallbackNode = scheduleCallback(ImmediatePriority$1, performSyncWorkOnRoot.bind(null, root));\n } else {\n var schedulerPriorityLevel = lanePriorityToSchedulerPriority(newCallbackPriority);\n newCallbackNode = scheduleCallback(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n }\n\n root.callbackPriority = newCallbackPriority;\n root.callbackNode = newCallbackNode;\n } // This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root, currentTime) {\n var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as\n // expired so we know to work on those next.\n\n markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.\n\n var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes); // This returns the priority level computed during the `getNextLanes` call.\n\n var newCallbackPriority = returnNextLanesPriority();\n\n if (nextLanes === NoLanes) {\n // Special case: There's nothing to work on.\n if (existingCallbackNode !== null) {\n cancelCallback(existingCallbackNode);\n root.callbackNode = null;\n root.callbackPriority = NoLanePriority;\n }\n\n return;\n } // Check if there's an existing task. We may be able to reuse it.\n\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n\n if (existingCallbackPriority === newCallbackPriority) {\n // The priority hasn't changed. We can reuse the existing task. Exit.\n return;\n } // The priority changed. Cancel the existing callback. We'll schedule a new\n // one below.\n\n\n cancelCallback(existingCallbackNode);\n } // Schedule a new callback.\n\n\n var newCallbackNode;\n\n if (newCallbackPriority === SyncLanePriority) {\n // Special case: Sync React callbacks are scheduled on a special\n // internal queue\n newCallbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else if (newCallbackPriority === SyncBatchedLanePriority) {\n newCallbackNode = scheduleCallback(ImmediatePriority$1, performSyncWorkOnRoot.bind(null, root));\n } else {\n var schedulerPriorityLevel = lanePriorityToSchedulerPriority(newCallbackPriority);\n newCallbackNode = scheduleCallback(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n }\n\n root.callbackPriority = newCallbackPriority;\n root.callbackNode = newCallbackNode;\n} // This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root, currentTime) {\n var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as\n // expired so we know to work on those next.\n\n markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.\n\n var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes); // This returns the priority level computed during the `getNextLanes` call.\n\n var newCallbackPriority = returnNextLanesPriority();\n\n if (nextLanes === NoLanes) {\n // Special case: There's nothing to work on.\n if (existingCallbackNode !== null) {\n cancelCallback(existingCallbackNode);\n root.callbackNode = null;\n root.callbackPriority = NoLanePriority;\n }\n\n return;\n } // Check if there's an existing task. We may be able to reuse it.\n\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n\n if (existingCallbackPriority === newCallbackPriority) {\n // The priority hasn't changed. We can reuse the existing task. Exit.\n return;\n } // The priority changed. Cancel the existing callback. We'll schedule a new\n // one below.\n\n\n cancelCallback(existingCallbackNode);\n } // Schedule a new callback.\n\n\n var newCallbackNode;\n\n if (newCallbackPriority === SyncLanePriority) {\n // Special case: Sync React callbacks are scheduled on a special\n // internal queue\n newCallbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else if (newCallbackPriority === SyncBatchedLanePriority) {\n newCallbackNode = scheduleCallback(ImmediatePriority$1, performSyncWorkOnRoot.bind(null, root));\n } else {\n var schedulerPriorityLevel = lanePriorityToSchedulerPriority(newCallbackPriority);\n newCallbackNode = scheduleCallback(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n }\n\n root.callbackPriority = newCallbackPriority;\n root.callbackNode = newCallbackNode;\n} // This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root, currentTime) {\n var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as\n // expired so we know to work on those next.\n\n markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.\n\n var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes); // This returns the priority level computed during the `getNextLanes` call.\n\n var newCallbackPriority = returnNextLanesPriority();\n\n if (nextLanes === NoLanes) {\n // Special case: There's nothing to work on.\n if (existingCallbackNode !== null) {\n cancelCallback(existingCallbackNode);\n root.callbackNode = null;\n root.callbackPriority = NoLanePriority;\n }\n\n return;\n } // Check if there's an existing task. We may be able to reuse it.\n\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n\n if (existingCallbackPriority === newCallbackPriority) {\n // The priority hasn't changed. We can reuse the existing task. Exit.\n return;\n } // The priority changed. Cancel the existing callback. We'll schedule a new\n // one below.\n\n\n cancelCallback(existingCallbackNode);\n } // Schedule a new callback.\n\n\n var newCallbackNode;\n\n if (newCallbackPriority === SyncLanePriority) {\n // Special case: Sync React callbacks are scheduled on a special\n // internal queue\n newCallbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else if (newCallbackPriority === SyncBatchedLanePriority) {\n newCallbackNode = scheduleCallback(ImmediatePriority$1, performSyncWorkOnRoot.bind(null, root));\n } else {\n var schedulerPriorityLevel = lanePriorityToSchedulerPriority(newCallbackPriority);\n newCallbackNode = scheduleCallback(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n }\n\n root.callbackPriority = newCallbackPriority;\n root.callbackNode = newCallbackNode;\n} // This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root, currentTime) {\n var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as\n // expired so we know to work on those next.\n\n markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.\n\n var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes); // This returns the priority level computed during the `getNextLanes` call.\n\n var newCallbackPriority = returnNextLanesPriority();\n\n if (nextLanes === NoLanes) {\n // Special case: There's nothing to work on.\n if (existingCallbackNode !== null) {\n cancelCallback(existingCallbackNode);\n root.callbackNode = null;\n root.callbackPriority = NoLanePriority;\n }\n\n return;\n } // Check if there's an existing task. We may be able to reuse it.\n\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n\n if (existingCallbackPriority === newCallbackPriority) {\n // The priority hasn't changed. We can reuse the existing task. Exit.\n return;\n } // The priority changed. Cancel the existing callback. We'll schedule a new\n // one below.\n\n\n cancelCallback(existingCallbackNode);\n } // Schedule a new callback.\n\n\n var newCallbackNode;\n\n if (newCallbackPriority === SyncLanePriority) {\n // Special case: Sync React callbacks are scheduled on a special\n // internal queue\n newCallbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else if (newCallbackPriority === SyncBatchedLanePriority) {\n newCallbackNode = scheduleCallback(ImmediatePriority$1, performSyncWorkOnRoot.bind(null, root));\n } else {\n var schedulerPriorityLevel = lanePriorityToSchedulerPriority(newCallbackPriority);\n newCallbackNode = scheduleCallback(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n }\n\n root.callbackPriority = newCallbackPriority;\n root.callbackNode = newCallbackNode;\n} // This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root, currentTime) {\n var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as\n // expired so we know to work on those next.\n\n markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.\n\n var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes); // This returns the priority level computed during the `getNextLanes` call.\n\n var newCallbackPriority = returnNextLanesPriority();\n\n if (nextLanes === NoLanes) {\n // Special case: There's nothing to work on.\n if (existingCallbackNode !== null) {\n cancelCallback(existingCallbackNode);\n root.callbackNode = null;\n root.callbackPriority = NoLanePriority;\n }\n\n return;\n } // Check if there's an existing task. We may be able to reuse it.\n\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n\n if (existingCallbackPriority === newCallbackPriority) {\n // The priority hasn't changed. We can reuse the existing task. Exit.\n return;\n } // The priority changed. Cancel the existing callback. We'll schedule a new\n // one below.\n\n\n cancelCallback(existingCallbackNode);\n } // Schedule a new callback.\n\n\n var newCallbackNode;\n\n if (newCallbackPriority === SyncLanePriority) {\n // Special case: Sync React callbacks are scheduled on a special\n // internal queue\n newCallbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else if (newCallbackPriority === SyncBatchedLanePriority) {\n newCallbackNode = scheduleCallback(ImmediatePriority$1, performSyncWorkOnRoot.bind(null, root));\n } else {\n var schedulerPriorityLevel = lanePriorityToSchedulerPriority(newCallbackPriority);\n newCallbackNode = scheduleCallback(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n }\n\n root.callbackPriority = newCallbackPriority;\n root.callbackNode = newCallbackNode;\n} // This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root, currentTime) {\n var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as\n // expired so we know to work on those next.\n\n markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.\n\n var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes); // This returns the priority level computed during the `getNextLanes` call.\n\n var newCallbackPriority = returnNextLanesPriority();\n\n if (nextLanes === NoLanes) {\n // Special case: There's nothing to work on.\n if (existingCallbackNode !== null) {\n cancelCallback(existingCallbackNode);\n root.callbackNode = null;\n root.callbackPriority = NoLanePriority;\n }\n\n return;\n } // Check if there's an existing task. We may be able to reuse it.\n\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n\n if (existingCallbackPriority === newCallbackPriority) {\n // The priority hasn't changed. We can reuse the existing task. Exit.\n return;\n } // The priority changed. Cancel the existing callback. We'll schedule a new\n // one below.\n\n\n cancelCallback(existingCallbackNode);\n } // Schedule a new callback.\n\n\n var newCallbackNode;\n\n if (newCallbackPriority === SyncLanePriority) {\n // Special case: Sync React callbacks are scheduled on a special\n // internal queue\n newCallbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else if (newCallbackPriority === SyncBatchedLanePriority) {\n newCallbackNode = scheduleCallback(ImmediatePriority$1, performSyncWorkOnRoot.bind(null, root));\n } else {\n var schedulerPriorityLevel = lanePriorityToSchedulerPriority(newCallbackPriority);\n newCallbackNode = scheduleCallback(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n }\n\n root.callbackPriority = newCallbackPriority;\n root.callbackNode = newCallbackNode;\n} // This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root, currentTime) {\n var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as\n // expired so we know to work on those next.\n\n markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.\n\n var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes); // This returns the priority level computed during the `getNextLanes` call.\n\n var newCallbackPriority = returnNextLanesPriority();\n\n if (nextLanes === NoLanes) {\n // Special case: There's nothing to work on.\n if (existingCallbackNode !== null) {\n cancelCallback(existingCallbackNode);\n root.callbackNode = null;\n root.callbackPriority = NoLanePriority;\n }\n\n return;\n } // Check if there's an existing task. We may be able to reuse it.\n\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n\n if (existingCallbackPriority === newCallbackPriority) {\n // The priority hasn't changed. We can reuse the existing task. Exit.\n return;\n } // The priority changed. Cancel the existing callback. We'll schedule a new\n // one below.\n\n\n cancelCallback(existingCallbackNode);\n } // Schedule a new callback.\n\n\n var newCallbackNode;\n\n if (newCallbackPriority === SyncLanePriority) {\n // Special case: Sync React callbacks are scheduled on a special\n // internal queue\n newCallbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else if (newCallbackPriority === SyncBatchedLanePriority) {\n newCallbackNode = scheduleCallback(ImmediatePriority$1, performSyncWorkOnRoot.bind(null, root));\n } else {\n var schedulerPriorityLevel = lanePriorityToSchedulerPriority(newCallbackPriority);\n newCallbackNode = scheduleCallback(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n }\n\n root.callbackPriority = newCallbackPriority;\n root.callbackNode = newCallbackNode;\n} // This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root, currentTime) {\n var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as\n // expired so we know to work on those next.\n\n markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.\n\n var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes); // This returns the priority level computed during the `getNextLanes` call.\n\n var newCallbackPriority = returnNextLanesPriority();\n\n if (nextLanes === NoLanes) {\n // Special case: There's nothing to work on.\n if (existingCallbackNode !== null) {\n cancelCallback(existingCallbackNode);\n root.callbackNode = null;\n root.callbackPriority = NoLanePriority;\n }\n\n return;\n } // Check if there's an existing task. We may be able to reuse it.\n\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n\n if (existingCallbackPriority === newCallbackPriority) {\n // The priority hasn't changed. We can reuse the existing task. Exit.\n return;\n } // The priority changed. Cancel the existing callback. We'll schedule a new\n // one below.\n\n\n cancelCallback(existingCallbackNode);\n } // Schedule a new callback.\n\n\n var newCallbackNode;\n\n if (newCallbackPriority === SyncLanePriority) {\n // Special case: Sync React callbacks are scheduled on a special\n // internal queue\n newCallbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else if (newCallbackPriority === SyncBatchedLanePriority) {\n newCallbackNode = scheduleCallback(ImmediatePriority$1, performSyncWorkOnRoot.bind(null, root));\n } else {\n var schedulerPriorityLevel = lanePriorityToSchedulerPriority(newCallbackPriority);\n newCallbackNode = scheduleCallback(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n }\n\n root.callbackPriority = newCallbackPriority;\n root.callbackNode = newCallbackNode;\n} // This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root, currentTime) {\n var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as\n // expired so we know to work on those next.\n\n markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.\n\n var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes); // This returns the priority level computed during the `getNextLanes` call.\n\n var newCallbackPriority = returnNextLanesPriority();\n\n if (nextLanes === NoLanes) {\n // Special case: There's nothing to work on.\n if (existingCallbackNode !== null) {\n cancelCallback(existingCallbackNode);\n root.callbackNode = null;\n root.callbackPriority = NoLanePriority;\n }\n\n return;\n } // Check if there's an existing task. We may be able to reuse it.\n\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n\n if (existingCallbackPriority === newCallbackPriority) {\n // The priority hasn't changed. We can reuse the existing task. Exit.\n return;\n } // The priority changed. Cancel the existing callback. We'll schedule a new\n // one below.\n\n\n cancelCallback(existingCallbackNode);\n } // Schedule a new callback.\n\n\n var newCallbackNode;\n\n if (newCallbackPriority === SyncLanePriority) {\n // Special case: Sync React callbacks are scheduled on a special\n // internal queue\n newCallbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else if (newCallbackPriority === SyncBatchedLanePriority) {\n newCallbackNode = scheduleCallback(ImmediatePriority$1, performSyncWorkOnRoot.bind(null, root));\n } else {\n var schedulerPriorityLevel = lanePriorityToSchedulerPriority(newCallbackPriority);\n newCallbackNode = scheduleCallback(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n }\n\n root.callbackPriority = newCallbackPriority;\n root.callbackNode = newCallbackNode;\n} // This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root, currentTime) {\n var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as\n // expired so we know to work on those next.\n\n markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.\n\n var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes); // This returns the priority level computed during the `getNextLanes` call.\n\n var newCallbackPriority = returnNextLanesPriority();\n\n if (nextLanes === NoLanes) {\n // Special case: There's nothing to work on.\n if (existingCallbackNode !== null) {\n cancelCallback(existingCallbackNode);\n root.callbackNode = null;\n root.callbackPriority = NoLanePriority;\n }\n\n return;\n } // Check if there's an existing task. We may be able to reuse it.\n\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n\n if (existingCallbackPriority === newCallbackPriority) {\n // The priority hasn't changed. We can reuse the existing task. Exit.\n return;\n } // The priority changed. Cancel the existing callback. We'll schedule a new\n // one below.\n\n\n cancelCallback(existingCallbackNode);\n } // Schedule a new callback.\n\n\n var newCallbackNode;\n\n if (newCallbackPriority === SyncLanePriority) {\n // Special case: Sync React callbacks are scheduled on a special\n // internal queue\n newCallbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else if (newCallbackPriority === SyncBatchedLanePriority) {\n newCallbackNode = scheduleCallback(ImmediatePriority$1, performSyncWorkOnRoot.bind(null, root));\n } else {\n var schedulerPriorityLevel = lanePriorityToSchedulerPriority(newCallbackPriority);\n newCallbackNode = scheduleCallback(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n }\n\n root.callbackPriority = newCallbackPriority;\n root.callbackNode = newCallbackNode;\n} // This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root, currentTime) {\n var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as\n // expired so we know to work on those next.\n\n markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.\n\n var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes); // This returns the priority level computed during the `getNextLanes` call.\n\n var newCallbackPriority = returnNextLanesPriority();\n\n if (nextLanes === NoLanes) {\n // Special case: There's nothing to work on.\n if (existingCallbackNode !== null) {\n cancelCallback(existingCallbackNode);\n root.callbackNode = null;\n root.callbackPriority = NoLanePriority;\n }\n\n return;\n } // Check if there's an existing task. We may be able to reuse it.\n\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n\n if (existingCallbackPriority === newCallbackPriority) {\n // The priority hasn't changed. We can reuse the existing task. Exit.\n return;\n } // The priority changed. Cancel the existing callback. We'll schedule a new\n // one below.\n\n\n cancelCallback(existingCallbackNode);\n } // Schedule a new callback.\n\n\n var newCallbackNode;\n\n if (newCallbackPriority === SyncLanePriority) {\n // Special case: Sync React callbacks are scheduled on a special\n // internal queue\n newCallbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else if (newCallbackPriority === SyncBatchedLanePriority) {\n newCallbackNode = scheduleCallback(ImmediatePriority$1, performSyncWorkOnRoot.bind(null, root));\n } else {\n var schedulerPriorityLevel = lanePriorityToSchedulerPriority(newCallbackPriority);\n newCallbackNode = scheduleCallback(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n }\n\n root.callbackPriority = newCallbackPriority;\n root.callbackNode = newCallbackNode;\n} // This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root, currentTime) {\n var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as\n // expired so we know to work on those next.\n\n markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.\n\n var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes); // This returns the priority level computed during the `getNextLanes` call.\n\n var newCallbackPriority = returnNextLanesPriority();\n\n if (nextLanes === NoLanes) {\n // Special case: There's nothing to work on.\n if (existingCallbackNode !== null) {\n cancelCallback(existingCallbackNode);\n root.callbackNode = null;\n root.callbackPriority = NoLanePriority;\n }\n\n return;\n } // Check if there's an existing task. We may be able to reuse it.\n\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n\n if (existingCallbackPriority === newCallbackPriority) {\n // The priority hasn't changed. We can reuse the existing task. Exit.\n return;\n } // The priority changed. Cancel the existing callback. We'll schedule a new\n // one below.\n\n\n cancelCallback(existingCallbackNode);\n } // Schedule a new callback.\n\n\n var newCallbackNode;\n\n if (newCallbackPriority === SyncLanePriority) {\n // Special case: Sync React callbacks are scheduled on a special\n // internal queue\n newCallbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else if (newCallbackPriority === SyncBatchedLanePriority) {\n newCallbackNode = scheduleCallback(ImmediatePriority$1, performSyncWorkOnRoot.bind(null, root));\n } else {\n var schedulerPriorityLevel = lanePriorityToSchedulerPriority(newCallbackPriority);\n newCallbackNode = scheduleCallback(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n }\n\n root.callbackPriority = newCallbackPriority;\n root.callbackNode = newCallbackNode;\n} // This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root, currentTime) {\n var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as\n // expired so we know to work on those next.\n\n markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.\n\n var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes); // This returns the priority level computed during the `getNextLanes` call.\n\n var newCallbackPriority = returnNextLanesPriority();\n\n if (nextLanes === NoLanes) {\n // Special case: There's nothing to work on.\n if (existingCallbackNode !== null) {\n cancelCallback(existingCallbackNode);\n root.callbackNode = null;\n root.callbackPriority = NoLanePriority;\n }\n\n return;\n } // Check if there's an existing task. We may be able to reuse it.\n\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n\n if (existingCallbackPriority === newCallbackPriority) {\n // The priority hasn't changed. We can reuse the existing task. Exit.\n return;\n } // The priority changed. Cancel the existing callback. We'll schedule a new\n // one below.\n\n\n cancelCallback(existingCallbackNode);\n } // Schedule a new callback.\n\n\n var newCallbackNode;\n\n if (newCallbackPriority === SyncLanePriority) {\n // Special case: Sync React callbacks are scheduled on a special\n // internal queue\n newCallbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else if (newCallbackPriority === SyncBatchedLanePriority) {\n newCallbackNode = scheduleCallback(ImmediatePriority$1, performSyncWorkOnRoot.bind(null, root));\n } else {\n var schedulerPriorityLevel = lanePriorityToSchedulerPriority(newCallbackPriority);\n newCallbackNode = scheduleCallback(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n }\n\n root.callbackPriority = newCallbackPriority;\n root.callbackNode = newCallbackNode;\n} // This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root, currentTime) {\n var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as\n // expired so we know to work on those next.\n\n markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.\n\n var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes); // This returns the priority level computed during the `getNextLanes` call.\n\n var newCallbackPriority = returnNextLanesPriority();\n\n if (nextLanes === NoLanes) {\n // Special case: There's nothing to work on.\n if (existingCallbackNode !== null) {\n cancelCallback(existingCallbackNode);\n root.callbackNode = null;\n root.callbackPriority = NoLanePriority;\n }\n\n return;\n } // Check if there's an existing task. We may be able to reuse it.\n\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n\n if (existingCallbackPriority === newCallbackPriority) {\n // The priority hasn't changed. We can reuse the existing task. Exit.\n return;\n } // The priority changed. Cancel the existing callback. We'll schedule a new\n // one below.\n\n\n cancelCallback(existingCallbackNode);\n } // Schedule a new callback.\n\n\n var newCallbackNode;\n\n if (newCallbackPriority === SyncLanePriority) {\n // Special case: Sync React callbacks are scheduled on a special\n // internal queue\n newCallbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else if (newCallbackPriority === SyncBatchedLanePriority) {\n newCallbackNode = scheduleCallback(ImmediatePriority$1, performSyncWorkOnRoot.bind(null, root));\n } else {\n var schedulerPriorityLevel = lanePriorityToSchedulerPriority(newCallbackPriority);\n newCallbackNode = scheduleCallback(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n }\n\n root.callbackPriority = newCallbackPriority;\n root.callbackNode = newCallbackNode;\n} // This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root, currentTime) {\n var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as\n // expired so we know to work on those next.\n\n markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.\n\n var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes); // This returns the priority level computed during the `getNextLanes` call.\n\n var newCallbackPriority = returnNextLanesPriority();\n\n if (nextLanes === NoLanes) {\n // Special case: There's nothing to work on.\n if (existingCallbackNode !== null) {\n cancelCallback(existingCallbackNode);\n root.callbackNode = null;\n root.callbackPriority = NoLanePriority;\n }\n\n return;\n } // Check if there's an existing task. We may be able to reuse it.\n\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n\n if (existingCallbackPriority === newCallbackPriority) {\n // The priority hasn't changed. We can reuse the existing task. Exit.\n return;\n } // The priority changed. Cancel the existing callback. We'll schedule a new\n // one below.\n\n\n cancelCallback(existingCallbackNode);\n } // Schedule a new callback.\n\n\n var newCallbackNode;\n\n if (newCallbackPriority === SyncLanePriority) {\n // Special case: Sync React callbacks are scheduled on a special\n // internal queue\n newCallbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else if (newCallbackPriority === SyncBatchedLanePriority) {\n newCallbackNode = scheduleCallback(ImmediatePriority$1, performSyncWorkOnRoot.bind(null, root));\n } else {\n var schedulerPriorityLevel = lanePriorityToSchedulerPriority(newCallbackPriority);\n newCallbackNode = scheduleCallback(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n }\n\n root.callbackPriority = newCallbackPriority;\n root.callbackNode = newCallbackNode;\n} // This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root, currentTime) {\n var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as\n // expired so we know to work on those next.\n\n markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.\n\n var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes); // This returns the priority level computed during the `getNextLanes` call.\n\n var newCallbackPriority = returnNextLanesPriority();\n\n if (nextLanes === NoLanes) {\n // Special case: There's nothing to work on.\n if (existingCallbackNode !== null) {\n cancelCallback(existingCallbackNode);\n root.callbackNode = null;\n root.callbackPriority = NoLanePriority;\n }\n\n return;\n } // Check if there's an existing task. We may be able to reuse it.\n\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n\n if (existingCallbackPriority === newCallbackPriority) {\n // The priority hasn't changed. We can reuse the existing task. Exit.\n return;\n } // The priority changed. Cancel the existing callback. We'll schedule a new\n // one below.\n\n\n cancelCallback(existingCallbackNode);\n } // Schedule a new callback.\n\n\n var newCallbackNode;\n\n if (newCallbackPriority === SyncLanePriority) {\n // Special case: Sync React callbacks are scheduled on a special\n // internal queue\n newCallbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else if (newCallbackPriority === SyncBatchedLanePriority) {\n newCallbackNode = scheduleCallback(ImmediatePriority$1, performSyncWorkOnRoot.bind(null, root));\n } else {\n var schedulerPriorityLevel = lanePriorityToSchedulerPriority(newCallbackPriority);\n newCallbackNode = scheduleCallback(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n }\n\n root.callbackPriority = newCallbackPriority;\n root.callbackNode = newCallbackNode;\n} // This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root,currentTime){var existingCallbackNode=root.callbackNode;// Check if any lanes are being starved by other work. If so, mark them as\n// expired so we know to work on those next.\nmarkStarvedLanesAsExpired(root,currentTime);// Determine the next lanes to work on, and their priority.\nvar nextLanes=getNextLanes(root,root===workInProgressRoot?workInProgressRootRenderLanes:NoLanes);// This returns the priority level computed during the `getNextLanes` call.\nvar newCallbackPriority=returnNextLanesPriority();if(nextLanes===NoLanes){// Special case: There's nothing to work on.\nif(existingCallbackNode!==null){cancelCallback(existingCallbackNode);root.callbackNode=null;root.callbackPriority=NoLanePriority;}return;}// Check if there's an existing task. We may be able to reuse it.\nif(existingCallbackNode!==null){var existingCallbackPriority=root.callbackPriority;if(existingCallbackPriority===newCallbackPriority){// The priority hasn't changed. We can reuse the existing task. Exit.\nreturn;}// The priority changed. Cancel the existing callback. We'll schedule a new\n// one below.\ncancelCallback(existingCallbackNode);}// Schedule a new callback.\nvar newCallbackNode;if(newCallbackPriority===SyncLanePriority){// Special case: Sync React callbacks are scheduled on a special\n// internal queue\nnewCallbackNode=scheduleSyncCallback(performSyncWorkOnRoot.bind(null,root));}else if(newCallbackPriority===SyncBatchedLanePriority){newCallbackNode=scheduleCallback(ImmediatePriority$1,performSyncWorkOnRoot.bind(null,root));}else{var schedulerPriorityLevel=lanePriorityToSchedulerPriority(newCallbackPriority);newCallbackNode=scheduleCallback(schedulerPriorityLevel,performConcurrentWorkOnRoot.bind(null,root));}root.callbackPriority=newCallbackPriority;root.callbackNode=newCallbackNode;}// This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root, currentTime) {\n var existingCallbackNode = root.callbackNode;\n // Check if any lanes are being starved by other work. If so, mark them as\n // expired so we know to work on those next.\n markStarvedLanesAsExpired(root, currentTime);\n // Determine the next lanes to work on, and their priority.\n var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes);\n // This returns the priority level computed during the `getNextLanes` call.\n var newCallbackPriority = returnNextLanesPriority();\n if (nextLanes === NoLanes) {\n // Special case: There's nothing to work on.\n if (existingCallbackNode !== null) {\n cancelCallback(existingCallbackNode);\n root.callbackNode = null;\n root.callbackPriority = NoLanePriority;\n }\n return;\n }\n // Check if there's an existing task. We may be able to reuse it.\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n if (existingCallbackPriority === newCallbackPriority) {\n // The priority hasn't changed. We can reuse the existing task. Exit.\n return;\n }\n // The priority changed. Cancel the existing callback. We'll schedule a new\n // one below.\n cancelCallback(existingCallbackNode);\n }\n // Schedule a new callback.\n var newCallbackNode;\n if (newCallbackPriority === SyncLanePriority) {\n // Special case: Sync React callbacks are scheduled on a special\n // internal queue\n newCallbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else if (newCallbackPriority === SyncBatchedLanePriority) {\n newCallbackNode = scheduleCallback(ImmediatePriority$1, performSyncWorkOnRoot.bind(null, root));\n } else {\n var schedulerPriorityLevel = lanePriorityToSchedulerPriority(newCallbackPriority);\n newCallbackNode = scheduleCallback(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n }\n root.callbackPriority = newCallbackPriority;\n root.callbackNode = newCallbackNode;\n }", "function ensureRootIsScheduled(root,currentTime){var existingCallbackNode=root.callbackNode;// Check if any lanes are being starved by other work. If so, mark them as\n// expired so we know to work on those next.\nmarkStarvedLanesAsExpired(root,currentTime);// Determine the next lanes to work on, and their priority.\nvar nextLanes=getNextLanes(root,root===workInProgressRoot?workInProgressRootRenderLanes:NoLanes);// This returns the priority level computed during the `getNextLanes` call.\nvar newCallbackPriority=returnNextLanesPriority();if(nextLanes===NoLanes){// Special case: There's nothing to work on.\nif(existingCallbackNode!==null){cancelCallback(existingCallbackNode);root.callbackNode=null;root.callbackPriority=NoLanePriority;}return;}// Check if there's an existing task. We may be able to reuse it.\nif(existingCallbackNode!==null){var existingCallbackPriority=root.callbackPriority;if(existingCallbackPriority===newCallbackPriority){// The priority hasn't changed. We can reuse the existing task. Exit.\nreturn;}// The priority changed. Cancel the existing callback. We'll schedule a new\n// one below.\ncancelCallback(existingCallbackNode);}// Schedule a new callback.\nvar newCallbackNode;if(newCallbackPriority===SyncLanePriority){// Special case: Sync React callbacks are scheduled on a special\n// internal queue\nnewCallbackNode=scheduleSyncCallback(performSyncWorkOnRoot.bind(null,root));}else if(newCallbackPriority===SyncBatchedLanePriority){newCallbackNode=scheduleCallback(ImmediatePriority$1,performSyncWorkOnRoot.bind(null,root));}else {var schedulerPriorityLevel=lanePriorityToSchedulerPriority(newCallbackPriority);newCallbackNode=scheduleCallback(schedulerPriorityLevel,performConcurrentWorkOnRoot.bind(null,root));}root.callbackPriority=newCallbackPriority;root.callbackNode=newCallbackNode;}// This is the entry point for every concurrent task, i.e. anything that", "function markPendingPriorityLevel(root,expirationTime){// If there's a gap between completing a failed root and retrying it,\n// additional updates may be scheduled. Clear `didError`, in case the update\n// is sufficient to fix the error.\nroot.didError=false;// Update the latest and earliest pending times\nvar earliestPendingTime=root.earliestPendingTime;if(earliestPendingTime===NoWork){// No other pending updates.\nroot.earliestPendingTime=root.latestPendingTime=expirationTime;}else{if(earliestPendingTime<expirationTime){// This is the earliest pending update.\nroot.earliestPendingTime=expirationTime;}else{var latestPendingTime=root.latestPendingTime;if(latestPendingTime>expirationTime){// This is the latest pending update\nroot.latestPendingTime=expirationTime;}}}findNextExpirationTimeToWorkOn(expirationTime,root);}", "function markPendingPriorityLevel(root,expirationTime){// If there's a gap between completing a failed root and retrying it,\n// additional updates may be scheduled. Clear `didError`, in case the update\n// is sufficient to fix the error.\nroot.didError=false;// Update the latest and earliest pending times\nvar earliestPendingTime=root.earliestPendingTime;if(earliestPendingTime===NoWork){// No other pending updates.\nroot.earliestPendingTime=root.latestPendingTime=expirationTime;}else{if(earliestPendingTime<expirationTime){// This is the earliest pending update.\nroot.earliestPendingTime=expirationTime;}else{var latestPendingTime=root.latestPendingTime;if(latestPendingTime>expirationTime){// This is the latest pending update\nroot.latestPendingTime=expirationTime;}}}findNextExpirationTimeToWorkOn(expirationTime,root);}", "function markPendingPriorityLevel(root,expirationTime){// If there's a gap between completing a failed root and retrying it,\n// additional updates may be scheduled. Clear `didError`, in case the update\n// is sufficient to fix the error.\nroot.didError=false;// Update the latest and earliest pending times\nvar earliestPendingTime=root.earliestPendingTime;if(earliestPendingTime===NoWork){// No other pending updates.\nroot.earliestPendingTime=root.latestPendingTime=expirationTime;}else{if(earliestPendingTime<expirationTime){// This is the earliest pending update.\nroot.earliestPendingTime=expirationTime;}else{var latestPendingTime=root.latestPendingTime;if(latestPendingTime>expirationTime){// This is the latest pending update\nroot.latestPendingTime=expirationTime;}}}findNextExpirationTimeToWorkOn(expirationTime,root);}", "function ensureRootIsScheduled(root3, currentTime) {\n var existingCallbackNode = root3.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as\n // expired so we know to work on those next.\n markStarvedLanesAsExpired(root3, currentTime); // Determine the next lanes to work on, and their priority.\n var nextLanes = getNextLanes(root3, root3 === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes); // This returns the priority level computed during the `getNextLanes` call.\n var newCallbackPriority = returnNextLanesPriority();\n if (nextLanes === NoLanes) {\n // Special case: There's nothing to work on.\n if (existingCallbackNode !== null) {\n cancelCallback(existingCallbackNode);\n root3.callbackNode = null;\n root3.callbackPriority = NoLanePriority;\n }\n return;\n } // Check if there's an existing task. We may be able to reuse it.\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root3.callbackPriority;\n if (existingCallbackPriority === newCallbackPriority) // The priority hasn't changed. We can reuse the existing task. Exit.\n return;\n // The priority changed. Cancel the existing callback. We'll schedule a new\n // one below.\n cancelCallback(existingCallbackNode);\n } // Schedule a new callback.\n var newCallbackNode;\n if (newCallbackPriority === SyncLanePriority) // Special case: Sync React callbacks are scheduled on a special\n // internal queue\n newCallbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root3));\n else if (newCallbackPriority === SyncBatchedLanePriority) newCallbackNode = scheduleCallback(ImmediatePriority$1, performSyncWorkOnRoot.bind(null, root3));\n else {\n var schedulerPriorityLevel = lanePriorityToSchedulerPriority(newCallbackPriority);\n newCallbackNode = scheduleCallback(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root3));\n }\n root3.callbackPriority = newCallbackPriority;\n root3.callbackNode = newCallbackNode;\n } // This is the entry point for every concurrent task, i.e. anything that", "function requestWork(root, expirationTime) {\n // Add the root to the schedule.\n // Check if this root is already part of the schedule.\n if (nestedUpdateCount > 1e3 && invariant(!1, \"Maximum update depth exceeded. This can happen when a \" + \"component repeatedly calls setState inside componentWillUpdate or \" + \"componentDidUpdate. React limits the number of nested updates to \" + \"prevent infinite loops.\"), \n null === root.nextScheduledRoot) // This root is not already scheduled. Add it.\n root.remainingExpirationTime = expirationTime, null === lastScheduledRoot ? (firstScheduledRoot = lastScheduledRoot = root, \n root.nextScheduledRoot = root) : (lastScheduledRoot.nextScheduledRoot = root, lastScheduledRoot = root, \n lastScheduledRoot.nextScheduledRoot = firstScheduledRoot); else {\n // This root is already scheduled, but its priority may have increased.\n var remainingExpirationTime = root.remainingExpirationTime;\n (remainingExpirationTime === NoWork$3 || expirationTime < remainingExpirationTime) && (// Update the priority.\n root.remainingExpirationTime = expirationTime);\n }\n if (!isRendering) // Flush work at the end of the batch.\n // ...unless we're inside unbatchedUpdates, in which case we should\n // flush it now.\n // TODO: Get rid of Sync and use current time?\n return isBatchingUpdates ? void (isUnbatchingUpdates && performWorkOnRoot(root, Sync$1)) : void (expirationTime === Sync$1 ? performWork(Sync$1, null) : isCallbackScheduled || (isCallbackScheduled = !0, \n scheduleDeferredCallback(performAsyncWork)));\n }", "function requestWork(root, expirationTime) {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');\n }\n\n // Add the root to the schedule.\n // Check if this root is already part of the schedule.\n if (root.nextScheduledRoot === null) {\n // This root is not already scheduled. Add it.\n root.remainingExpirationTime = expirationTime;\n if (lastScheduledRoot === null) {\n firstScheduledRoot = lastScheduledRoot = root;\n root.nextScheduledRoot = root;\n } else {\n lastScheduledRoot.nextScheduledRoot = root;\n lastScheduledRoot = root;\n lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;\n }\n } else {\n // This root is already scheduled, but its priority may have increased.\n var remainingExpirationTime = root.remainingExpirationTime;\n if (remainingExpirationTime === NoWork || expirationTime < remainingExpirationTime) {\n // Update the priority.\n root.remainingExpirationTime = expirationTime;\n }\n }\n\n if (isRendering) {\n // Prevent reentrancy. Remaining work will be scheduled at the end of\n // the currently rendering batch.\n return;\n }\n\n if (isBatchingUpdates) {\n // Flush work at the end of the batch.\n if (isUnbatchingUpdates) {\n // ...unless we're inside unbatchedUpdates, in which case we should\n // flush it now.\n nextFlushedRoot = root;\n nextFlushedExpirationTime = Sync;\n performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime);\n }\n return;\n }\n\n // TODO: Get rid of Sync and use current time?\n if (expirationTime === Sync) {\n performWork(Sync, null);\n } else {\n scheduleCallbackWithExpiration(expirationTime);\n }\n }", "function requestWork(root, expirationTime) {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');\n }\n\n // Add the root to the schedule.\n // Check if this root is already part of the schedule.\n if (root.nextScheduledRoot === null) {\n // This root is not already scheduled. Add it.\n root.remainingExpirationTime = expirationTime;\n if (lastScheduledRoot === null) {\n firstScheduledRoot = lastScheduledRoot = root;\n root.nextScheduledRoot = root;\n } else {\n lastScheduledRoot.nextScheduledRoot = root;\n lastScheduledRoot = root;\n lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;\n }\n } else {\n // This root is already scheduled, but its priority may have increased.\n var remainingExpirationTime = root.remainingExpirationTime;\n if (remainingExpirationTime === NoWork || expirationTime < remainingExpirationTime) {\n // Update the priority.\n root.remainingExpirationTime = expirationTime;\n }\n }\n\n if (isRendering) {\n // Prevent reentrancy. Remaining work will be scheduled at the end of\n // the currently rendering batch.\n return;\n }\n\n if (isBatchingUpdates) {\n // Flush work at the end of the batch.\n if (isUnbatchingUpdates) {\n // ...unless we're inside unbatchedUpdates, in which case we should\n // flush it now.\n nextFlushedRoot = root;\n nextFlushedExpirationTime = Sync;\n performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime);\n }\n return;\n }\n\n // TODO: Get rid of Sync and use current time?\n if (expirationTime === Sync) {\n performWork(Sync, null);\n } else {\n scheduleCallbackWithExpiration(expirationTime);\n }\n }", "function requestWork(root, expirationTime) {\n\t if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n\t invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');\n\t }\n\t\n\t // Add the root to the schedule.\n\t // Check if this root is already part of the schedule.\n\t if (root.nextScheduledRoot === null) {\n\t // This root is not already scheduled. Add it.\n\t root.remainingExpirationTime = expirationTime;\n\t if (lastScheduledRoot === null) {\n\t firstScheduledRoot = lastScheduledRoot = root;\n\t root.nextScheduledRoot = root;\n\t } else {\n\t lastScheduledRoot.nextScheduledRoot = root;\n\t lastScheduledRoot = root;\n\t lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;\n\t }\n\t } else {\n\t // This root is already scheduled, but its priority may have increased.\n\t var remainingExpirationTime = root.remainingExpirationTime;\n\t if (remainingExpirationTime === NoWork || expirationTime < remainingExpirationTime) {\n\t // Update the priority.\n\t root.remainingExpirationTime = expirationTime;\n\t }\n\t }\n\t\n\t if (isRendering) {\n\t // Prevent reentrancy. Remaining work will be scheduled at the end of\n\t // the currently rendering batch.\n\t return;\n\t }\n\t\n\t if (isBatchingUpdates) {\n\t // Flush work at the end of the batch.\n\t if (isUnbatchingUpdates) {\n\t // ...unless we're inside unbatchedUpdates, in which case we should\n\t // flush it now.\n\t nextFlushedRoot = root;\n\t nextFlushedExpirationTime = Sync;\n\t performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime);\n\t }\n\t return;\n\t }\n\t\n\t // TODO: Get rid of Sync and use current time?\n\t if (expirationTime === Sync) {\n\t performWork(Sync, null);\n\t } else {\n\t scheduleCallbackWithExpiration(expirationTime);\n\t }\n\t }", "function requestWork(root,expirationTime){if(nestedUpdateCount>NESTED_UPDATE_LIMIT){invariant(false,'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');}// Add the root to the schedule.\n\t// Check if this root is already part of the schedule.\n\tif(root.nextScheduledRoot===null){// This root is not already scheduled. Add it.\n\troot.remainingExpirationTime=expirationTime;if(lastScheduledRoot===null){firstScheduledRoot=lastScheduledRoot=root;root.nextScheduledRoot=root;}else{lastScheduledRoot.nextScheduledRoot=root;lastScheduledRoot=root;lastScheduledRoot.nextScheduledRoot=firstScheduledRoot;}}else{// This root is already scheduled, but its priority may have increased.\n\tvar remainingExpirationTime=root.remainingExpirationTime;if(remainingExpirationTime===NoWork||expirationTime<remainingExpirationTime){// Update the priority.\n\troot.remainingExpirationTime=expirationTime;}}if(isRendering){// Prevent reentrancy. Remaining work will be scheduled at the end of\n\t// the currently rendering batch.\n\treturn;}if(isBatchingUpdates){// Flush work at the end of the batch.\n\tif(isUnbatchingUpdates){// ...unless we're inside unbatchedUpdates, in which case we should\n\t// flush it now.\n\tnextFlushedRoot=root;nextFlushedExpirationTime=Sync;performWorkOnRoot(nextFlushedRoot,nextFlushedExpirationTime);}return;}// TODO: Get rid of Sync and use current time?\n\tif(expirationTime===Sync){performWork(Sync,null);}else{scheduleCallbackWithExpiration(expirationTime);}}", "function markPendingPriorityLevel(root, expirationTime) {\n // If there's a gap between completing a failed root and retrying it,\n // additional updates may be scheduled. Clear `didError`, in case the update\n // is sufficient to fix the error.\n root.didError = false; // Update the latest and earliest pending times\n\n var earliestPendingTime = root.earliestPendingTime;\n\n if (earliestPendingTime === NoWork) {\n // No other pending updates.\n root.earliestPendingTime = root.latestPendingTime = expirationTime;\n } else {\n if (earliestPendingTime < expirationTime) {\n // This is the earliest pending update.\n root.earliestPendingTime = expirationTime;\n } else {\n var latestPendingTime = root.latestPendingTime;\n\n if (latestPendingTime > expirationTime) {\n // This is the latest pending update\n root.latestPendingTime = expirationTime;\n }\n }\n }\n\n findNextExpirationTimeToWorkOn(expirationTime, root);\n }", "function markPendingPriorityLevel(root, expirationTime) {\n // If there's a gap between completing a failed root and retrying it,\n // additional updates may be scheduled. Clear `didError`, in case the update\n // is sufficient to fix the error.\n root.didError = false; // Update the latest and earliest pending times\n\n var earliestPendingTime = root.earliestPendingTime;\n\n if (earliestPendingTime === NoWork) {\n // No other pending updates.\n root.earliestPendingTime = root.latestPendingTime = expirationTime;\n } else {\n if (earliestPendingTime < expirationTime) {\n // This is the earliest pending update.\n root.earliestPendingTime = expirationTime;\n } else {\n var latestPendingTime = root.latestPendingTime;\n\n if (latestPendingTime > expirationTime) {\n // This is the latest pending update\n root.latestPendingTime = expirationTime;\n }\n }\n }\n\n findNextExpirationTimeToWorkOn(expirationTime, root);\n }", "function markPendingPriorityLevel(root, expirationTime) {\n // If there's a gap between completing a failed root and retrying it,\n // additional updates may be scheduled. Clear `didError`, in case the update\n // is sufficient to fix the error.\n root.didError = false; // Update the latest and earliest pending times\n\n var earliestPendingTime = root.earliestPendingTime;\n\n if (earliestPendingTime === NoWork) {\n // No other pending updates.\n root.earliestPendingTime = root.latestPendingTime = expirationTime;\n } else {\n if (earliestPendingTime < expirationTime) {\n // This is the earliest pending update.\n root.earliestPendingTime = expirationTime;\n } else {\n var latestPendingTime = root.latestPendingTime;\n\n if (latestPendingTime > expirationTime) {\n // This is the latest pending update\n root.latestPendingTime = expirationTime;\n }\n }\n }\n\n findNextExpirationTimeToWorkOn(expirationTime, root);\n }", "function requestWork(root, expirationTime) {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');\n }\n\n // Add the root to the schedule.\n // Check if this root is already part of the schedule.\n if (root.nextScheduledRoot === null) {\n // This root is not already scheduled. Add it.\n root.remainingExpirationTime = expirationTime;\n if (lastScheduledRoot === null) {\n firstScheduledRoot = lastScheduledRoot = root;\n root.nextScheduledRoot = root;\n } else {\n lastScheduledRoot.nextScheduledRoot = root;\n lastScheduledRoot = root;\n lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;\n }\n } else {\n // This root is already scheduled, but its priority may have increased.\n var remainingExpirationTime = root.remainingExpirationTime;\n if (remainingExpirationTime === NoWork || expirationTime < remainingExpirationTime) {\n // Update the priority.\n root.remainingExpirationTime = expirationTime;\n }\n }\n\n if (isRendering) {\n // Prevent reentrancy. Remaining work will be scheduled at the end of\n // the currently rendering batch.\n return;\n }\n\n if (isBatchingUpdates) {\n // Flush work at the end of the batch.\n if (isUnbatchingUpdates) {\n // ...unless we're inside unbatchedUpdates, in which case we should\n // flush it now.\n nextFlushedRoot = root;\n nextFlushedExpirationTime = Sync;\n performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime);\n }\n return;\n }\n\n // TODO: Get rid of Sync and use current time?\n if (expirationTime === Sync) {\n performWork(Sync, null);\n } else {\n scheduleCallbackWithExpiration(expirationTime);\n }\n }", "function requestWork(root, expirationTime) {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');\n }\n\n // Add the root to the schedule.\n // Check if this root is already part of the schedule.\n if (root.nextScheduledRoot === null) {\n // This root is not already scheduled. Add it.\n root.remainingExpirationTime = expirationTime;\n if (lastScheduledRoot === null) {\n firstScheduledRoot = lastScheduledRoot = root;\n root.nextScheduledRoot = root;\n } else {\n lastScheduledRoot.nextScheduledRoot = root;\n lastScheduledRoot = root;\n lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;\n }\n } else {\n // This root is already scheduled, but its priority may have increased.\n var remainingExpirationTime = root.remainingExpirationTime;\n if (remainingExpirationTime === NoWork || expirationTime < remainingExpirationTime) {\n // Update the priority.\n root.remainingExpirationTime = expirationTime;\n }\n }\n\n if (isRendering) {\n // Prevent reentrancy. Remaining work will be scheduled at the end of\n // the currently rendering batch.\n return;\n }\n\n if (isBatchingUpdates) {\n // Flush work at the end of the batch.\n if (isUnbatchingUpdates) {\n // ...unless we're inside unbatchedUpdates, in which case we should\n // flush it now.\n nextFlushedRoot = root;\n nextFlushedExpirationTime = Sync;\n performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime);\n }\n return;\n }\n\n // TODO: Get rid of Sync and use current time?\n if (expirationTime === Sync) {\n performWork(Sync, null);\n } else {\n scheduleCallbackWithExpiration(expirationTime);\n }\n }", "function requestWork(root, expirationTime) {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');\n }\n\n // Add the root to the schedule.\n // Check if this root is already part of the schedule.\n if (root.nextScheduledRoot === null) {\n // This root is not already scheduled. Add it.\n root.remainingExpirationTime = expirationTime;\n if (lastScheduledRoot === null) {\n firstScheduledRoot = lastScheduledRoot = root;\n root.nextScheduledRoot = root;\n } else {\n lastScheduledRoot.nextScheduledRoot = root;\n lastScheduledRoot = root;\n lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;\n }\n } else {\n // This root is already scheduled, but its priority may have increased.\n var remainingExpirationTime = root.remainingExpirationTime;\n if (remainingExpirationTime === NoWork || expirationTime < remainingExpirationTime) {\n // Update the priority.\n root.remainingExpirationTime = expirationTime;\n }\n }\n\n if (isRendering) {\n // Prevent reentrancy. Remaining work will be scheduled at the end of\n // the currently rendering batch.\n return;\n }\n\n if (isBatchingUpdates) {\n // Flush work at the end of the batch.\n if (isUnbatchingUpdates) {\n // ...unless we're inside unbatchedUpdates, in which case we should\n // flush it now.\n nextFlushedRoot = root;\n nextFlushedExpirationTime = Sync;\n performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime);\n }\n return;\n }\n\n // TODO: Get rid of Sync and use current time?\n if (expirationTime === Sync) {\n performWork(Sync, null);\n } else {\n scheduleCallbackWithExpiration(expirationTime);\n }\n }", "function requestWork(root, expirationTime) {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');\n }\n\n // Add the root to the schedule.\n // Check if this root is already part of the schedule.\n if (root.nextScheduledRoot === null) {\n // This root is not already scheduled. Add it.\n root.remainingExpirationTime = expirationTime;\n if (lastScheduledRoot === null) {\n firstScheduledRoot = lastScheduledRoot = root;\n root.nextScheduledRoot = root;\n } else {\n lastScheduledRoot.nextScheduledRoot = root;\n lastScheduledRoot = root;\n lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;\n }\n } else {\n // This root is already scheduled, but its priority may have increased.\n var remainingExpirationTime = root.remainingExpirationTime;\n if (remainingExpirationTime === NoWork || expirationTime < remainingExpirationTime) {\n // Update the priority.\n root.remainingExpirationTime = expirationTime;\n }\n }\n\n if (isRendering) {\n // Prevent reentrancy. Remaining work will be scheduled at the end of\n // the currently rendering batch.\n return;\n }\n\n if (isBatchingUpdates) {\n // Flush work at the end of the batch.\n if (isUnbatchingUpdates) {\n // ...unless we're inside unbatchedUpdates, in which case we should\n // flush it now.\n nextFlushedRoot = root;\n nextFlushedExpirationTime = Sync;\n performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime);\n }\n return;\n }\n\n // TODO: Get rid of Sync and use current time?\n if (expirationTime === Sync) {\n performWork(Sync, null);\n } else {\n scheduleCallbackWithExpiration(expirationTime);\n }\n }", "function requestWork(root, expirationTime) {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');\n }\n\n // Add the root to the schedule.\n // Check if this root is already part of the schedule.\n if (root.nextScheduledRoot === null) {\n // This root is not already scheduled. Add it.\n root.remainingExpirationTime = expirationTime;\n if (lastScheduledRoot === null) {\n firstScheduledRoot = lastScheduledRoot = root;\n root.nextScheduledRoot = root;\n } else {\n lastScheduledRoot.nextScheduledRoot = root;\n lastScheduledRoot = root;\n lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;\n }\n } else {\n // This root is already scheduled, but its priority may have increased.\n var remainingExpirationTime = root.remainingExpirationTime;\n if (remainingExpirationTime === NoWork || expirationTime < remainingExpirationTime) {\n // Update the priority.\n root.remainingExpirationTime = expirationTime;\n }\n }\n\n if (isRendering) {\n // Prevent reentrancy. Remaining work will be scheduled at the end of\n // the currently rendering batch.\n return;\n }\n\n if (isBatchingUpdates) {\n // Flush work at the end of the batch.\n if (isUnbatchingUpdates) {\n // ...unless we're inside unbatchedUpdates, in which case we should\n // flush it now.\n nextFlushedRoot = root;\n nextFlushedExpirationTime = Sync;\n performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime);\n }\n return;\n }\n\n // TODO: Get rid of Sync and use current time?\n if (expirationTime === Sync) {\n performWork(Sync, null);\n } else {\n scheduleCallbackWithExpiration(expirationTime);\n }\n }", "function requestWork(root, expirationTime) {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');\n }\n\n // Add the root to the schedule.\n // Check if this root is already part of the schedule.\n if (root.nextScheduledRoot === null) {\n // This root is not already scheduled. Add it.\n root.remainingExpirationTime = expirationTime;\n if (lastScheduledRoot === null) {\n firstScheduledRoot = lastScheduledRoot = root;\n root.nextScheduledRoot = root;\n } else {\n lastScheduledRoot.nextScheduledRoot = root;\n lastScheduledRoot = root;\n lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;\n }\n } else {\n // This root is already scheduled, but its priority may have increased.\n var remainingExpirationTime = root.remainingExpirationTime;\n if (remainingExpirationTime === NoWork || expirationTime < remainingExpirationTime) {\n // Update the priority.\n root.remainingExpirationTime = expirationTime;\n }\n }\n\n if (isRendering) {\n // Prevent reentrancy. Remaining work will be scheduled at the end of\n // the currently rendering batch.\n return;\n }\n\n if (isBatchingUpdates) {\n // Flush work at the end of the batch.\n if (isUnbatchingUpdates) {\n // ...unless we're inside unbatchedUpdates, in which case we should\n // flush it now.\n nextFlushedRoot = root;\n nextFlushedExpirationTime = Sync;\n performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime);\n }\n return;\n }\n\n // TODO: Get rid of Sync and use current time?\n if (expirationTime === Sync) {\n performWork(Sync, null);\n } else {\n scheduleCallbackWithExpiration(expirationTime);\n }\n }", "function requestWork(root, expirationTime) {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');\n }\n\n // Add the root to the schedule.\n // Check if this root is already part of the schedule.\n if (root.nextScheduledRoot === null) {\n // This root is not already scheduled. Add it.\n root.remainingExpirationTime = expirationTime;\n if (lastScheduledRoot === null) {\n firstScheduledRoot = lastScheduledRoot = root;\n root.nextScheduledRoot = root;\n } else {\n lastScheduledRoot.nextScheduledRoot = root;\n lastScheduledRoot = root;\n lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;\n }\n } else {\n // This root is already scheduled, but its priority may have increased.\n var remainingExpirationTime = root.remainingExpirationTime;\n if (remainingExpirationTime === NoWork || expirationTime < remainingExpirationTime) {\n // Update the priority.\n root.remainingExpirationTime = expirationTime;\n }\n }\n\n if (isRendering) {\n // Prevent reentrancy. Remaining work will be scheduled at the end of\n // the currently rendering batch.\n return;\n }\n\n if (isBatchingUpdates) {\n // Flush work at the end of the batch.\n if (isUnbatchingUpdates) {\n // ...unless we're inside unbatchedUpdates, in which case we should\n // flush it now.\n nextFlushedRoot = root;\n nextFlushedExpirationTime = Sync;\n performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime);\n }\n return;\n }\n\n // TODO: Get rid of Sync and use current time?\n if (expirationTime === Sync) {\n performWork(Sync, null);\n } else {\n scheduleCallbackWithExpiration(expirationTime);\n }\n }", "function requestWork(root, expirationTime) {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');\n }\n\n // Add the root to the schedule.\n // Check if this root is already part of the schedule.\n if (root.nextScheduledRoot === null) {\n // This root is not already scheduled. Add it.\n root.remainingExpirationTime = expirationTime;\n if (lastScheduledRoot === null) {\n firstScheduledRoot = lastScheduledRoot = root;\n root.nextScheduledRoot = root;\n } else {\n lastScheduledRoot.nextScheduledRoot = root;\n lastScheduledRoot = root;\n lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;\n }\n } else {\n // This root is already scheduled, but its priority may have increased.\n var remainingExpirationTime = root.remainingExpirationTime;\n if (remainingExpirationTime === NoWork || expirationTime < remainingExpirationTime) {\n // Update the priority.\n root.remainingExpirationTime = expirationTime;\n }\n }\n\n if (isRendering) {\n // Prevent reentrancy. Remaining work will be scheduled at the end of\n // the currently rendering batch.\n return;\n }\n\n if (isBatchingUpdates) {\n // Flush work at the end of the batch.\n if (isUnbatchingUpdates) {\n // ...unless we're inside unbatchedUpdates, in which case we should\n // flush it now.\n nextFlushedRoot = root;\n nextFlushedExpirationTime = Sync;\n performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime);\n }\n return;\n }\n\n // TODO: Get rid of Sync and use current time?\n if (expirationTime === Sync) {\n performWork(Sync, null);\n } else {\n scheduleCallbackWithExpiration(expirationTime);\n }\n }", "function requestWork(root, expirationTime) {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');\n }\n\n // Add the root to the schedule.\n // Check if this root is already part of the schedule.\n if (root.nextScheduledRoot === null) {\n // This root is not already scheduled. Add it.\n root.remainingExpirationTime = expirationTime;\n if (lastScheduledRoot === null) {\n firstScheduledRoot = lastScheduledRoot = root;\n root.nextScheduledRoot = root;\n } else {\n lastScheduledRoot.nextScheduledRoot = root;\n lastScheduledRoot = root;\n lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;\n }\n } else {\n // This root is already scheduled, but its priority may have increased.\n var remainingExpirationTime = root.remainingExpirationTime;\n if (remainingExpirationTime === NoWork || expirationTime < remainingExpirationTime) {\n // Update the priority.\n root.remainingExpirationTime = expirationTime;\n }\n }\n\n if (isRendering) {\n // Prevent reentrancy. Remaining work will be scheduled at the end of\n // the currently rendering batch.\n return;\n }\n\n if (isBatchingUpdates) {\n // Flush work at the end of the batch.\n if (isUnbatchingUpdates) {\n // ...unless we're inside unbatchedUpdates, in which case we should\n // flush it now.\n nextFlushedRoot = root;\n nextFlushedExpirationTime = Sync;\n performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime);\n }\n return;\n }\n\n // TODO: Get rid of Sync and use current time?\n if (expirationTime === Sync) {\n performWork(Sync, null);\n } else {\n scheduleCallbackWithExpiration(expirationTime);\n }\n }", "function requestWork(root, expirationTime) {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');\n }\n\n // Add the root to the schedule.\n // Check if this root is already part of the schedule.\n if (root.nextScheduledRoot === null) {\n // This root is not already scheduled. Add it.\n root.remainingExpirationTime = expirationTime;\n if (lastScheduledRoot === null) {\n firstScheduledRoot = lastScheduledRoot = root;\n root.nextScheduledRoot = root;\n } else {\n lastScheduledRoot.nextScheduledRoot = root;\n lastScheduledRoot = root;\n lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;\n }\n } else {\n // This root is already scheduled, but its priority may have increased.\n var remainingExpirationTime = root.remainingExpirationTime;\n if (remainingExpirationTime === NoWork || expirationTime < remainingExpirationTime) {\n // Update the priority.\n root.remainingExpirationTime = expirationTime;\n }\n }\n\n if (isRendering) {\n // Prevent reentrancy. Remaining work will be scheduled at the end of\n // the currently rendering batch.\n return;\n }\n\n if (isBatchingUpdates) {\n // Flush work at the end of the batch.\n if (isUnbatchingUpdates) {\n // ...unless we're inside unbatchedUpdates, in which case we should\n // flush it now.\n nextFlushedRoot = root;\n nextFlushedExpirationTime = Sync;\n performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime);\n }\n return;\n }\n\n // TODO: Get rid of Sync and use current time?\n if (expirationTime === Sync) {\n performWork(Sync, null);\n } else {\n scheduleCallbackWithExpiration(expirationTime);\n }\n }", "function requestWork(root, expirationTime) {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');\n }\n\n // Add the root to the schedule.\n // Check if this root is already part of the schedule.\n if (root.nextScheduledRoot === null) {\n // This root is not already scheduled. Add it.\n root.remainingExpirationTime = expirationTime;\n if (lastScheduledRoot === null) {\n firstScheduledRoot = lastScheduledRoot = root;\n root.nextScheduledRoot = root;\n } else {\n lastScheduledRoot.nextScheduledRoot = root;\n lastScheduledRoot = root;\n lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;\n }\n } else {\n // This root is already scheduled, but its priority may have increased.\n var remainingExpirationTime = root.remainingExpirationTime;\n if (remainingExpirationTime === NoWork || expirationTime < remainingExpirationTime) {\n // Update the priority.\n root.remainingExpirationTime = expirationTime;\n }\n }\n\n if (isRendering) {\n // Prevent reentrancy. Remaining work will be scheduled at the end of\n // the currently rendering batch.\n return;\n }\n\n if (isBatchingUpdates) {\n // Flush work at the end of the batch.\n if (isUnbatchingUpdates) {\n // ...unless we're inside unbatchedUpdates, in which case we should\n // flush it now.\n nextFlushedRoot = root;\n nextFlushedExpirationTime = Sync;\n performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime);\n }\n return;\n }\n\n // TODO: Get rid of Sync and use current time?\n if (expirationTime === Sync) {\n performWork(Sync, null);\n } else {\n scheduleCallbackWithExpiration(expirationTime);\n }\n }", "function requestWork(root, expirationTime) {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');\n }\n\n // Add the root to the schedule.\n // Check if this root is already part of the schedule.\n if (root.nextScheduledRoot === null) {\n // This root is not already scheduled. Add it.\n root.remainingExpirationTime = expirationTime;\n if (lastScheduledRoot === null) {\n firstScheduledRoot = lastScheduledRoot = root;\n root.nextScheduledRoot = root;\n } else {\n lastScheduledRoot.nextScheduledRoot = root;\n lastScheduledRoot = root;\n lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;\n }\n } else {\n // This root is already scheduled, but its priority may have increased.\n var remainingExpirationTime = root.remainingExpirationTime;\n if (remainingExpirationTime === NoWork || expirationTime < remainingExpirationTime) {\n // Update the priority.\n root.remainingExpirationTime = expirationTime;\n }\n }\n\n if (isRendering) {\n // Prevent reentrancy. Remaining work will be scheduled at the end of\n // the currently rendering batch.\n return;\n }\n\n if (isBatchingUpdates) {\n // Flush work at the end of the batch.\n if (isUnbatchingUpdates) {\n // ...unless we're inside unbatchedUpdates, in which case we should\n // flush it now.\n nextFlushedRoot = root;\n nextFlushedExpirationTime = Sync;\n performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime);\n }\n return;\n }\n\n // TODO: Get rid of Sync and use current time?\n if (expirationTime === Sync) {\n performWork(Sync, null);\n } else {\n scheduleCallbackWithExpiration(expirationTime);\n }\n }", "function requestWork(root, expirationTime) {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');\n }\n\n // Add the root to the schedule.\n // Check if this root is already part of the schedule.\n if (root.nextScheduledRoot === null) {\n // This root is not already scheduled. Add it.\n root.remainingExpirationTime = expirationTime;\n if (lastScheduledRoot === null) {\n firstScheduledRoot = lastScheduledRoot = root;\n root.nextScheduledRoot = root;\n } else {\n lastScheduledRoot.nextScheduledRoot = root;\n lastScheduledRoot = root;\n lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;\n }\n } else {\n // This root is already scheduled, but its priority may have increased.\n var remainingExpirationTime = root.remainingExpirationTime;\n if (remainingExpirationTime === NoWork || expirationTime < remainingExpirationTime) {\n // Update the priority.\n root.remainingExpirationTime = expirationTime;\n }\n }\n\n if (isRendering) {\n // Prevent reentrancy. Remaining work will be scheduled at the end of\n // the currently rendering batch.\n return;\n }\n\n if (isBatchingUpdates) {\n // Flush work at the end of the batch.\n if (isUnbatchingUpdates) {\n // ...unless we're inside unbatchedUpdates, in which case we should\n // flush it now.\n nextFlushedRoot = root;\n nextFlushedExpirationTime = Sync;\n performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime);\n }\n return;\n }\n\n // TODO: Get rid of Sync and use current time?\n if (expirationTime === Sync) {\n performWork(Sync, null);\n } else {\n scheduleCallbackWithExpiration(expirationTime);\n }\n }", "function requestWork(root, expirationTime) {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');\n }\n\n // Add the root to the schedule.\n // Check if this root is already part of the schedule.\n if (root.nextScheduledRoot === null) {\n // This root is not already scheduled. Add it.\n root.remainingExpirationTime = expirationTime;\n if (lastScheduledRoot === null) {\n firstScheduledRoot = lastScheduledRoot = root;\n root.nextScheduledRoot = root;\n } else {\n lastScheduledRoot.nextScheduledRoot = root;\n lastScheduledRoot = root;\n lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;\n }\n } else {\n // This root is already scheduled, but its priority may have increased.\n var remainingExpirationTime = root.remainingExpirationTime;\n if (remainingExpirationTime === NoWork || expirationTime < remainingExpirationTime) {\n // Update the priority.\n root.remainingExpirationTime = expirationTime;\n }\n }\n\n if (isRendering) {\n // Prevent reentrancy. Remaining work will be scheduled at the end of\n // the currently rendering batch.\n return;\n }\n\n if (isBatchingUpdates) {\n // Flush work at the end of the batch.\n if (isUnbatchingUpdates) {\n // ...unless we're inside unbatchedUpdates, in which case we should\n // flush it now.\n nextFlushedRoot = root;\n nextFlushedExpirationTime = Sync;\n performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime);\n }\n return;\n }\n\n // TODO: Get rid of Sync and use current time?\n if (expirationTime === Sync) {\n performWork(Sync, null);\n } else {\n scheduleCallbackWithExpiration(expirationTime);\n }\n }", "function requestWork(root, expirationTime) {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');\n }\n\n // Add the root to the schedule.\n // Check if this root is already part of the schedule.\n if (root.nextScheduledRoot === null) {\n // This root is not already scheduled. Add it.\n root.remainingExpirationTime = expirationTime;\n if (lastScheduledRoot === null) {\n firstScheduledRoot = lastScheduledRoot = root;\n root.nextScheduledRoot = root;\n } else {\n lastScheduledRoot.nextScheduledRoot = root;\n lastScheduledRoot = root;\n lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;\n }\n } else {\n // This root is already scheduled, but its priority may have increased.\n var remainingExpirationTime = root.remainingExpirationTime;\n if (remainingExpirationTime === NoWork || expirationTime < remainingExpirationTime) {\n // Update the priority.\n root.remainingExpirationTime = expirationTime;\n }\n }\n\n if (isRendering) {\n // Prevent reentrancy. Remaining work will be scheduled at the end of\n // the currently rendering batch.\n return;\n }\n\n if (isBatchingUpdates) {\n // Flush work at the end of the batch.\n if (isUnbatchingUpdates) {\n // ...unless we're inside unbatchedUpdates, in which case we should\n // flush it now.\n nextFlushedRoot = root;\n nextFlushedExpirationTime = Sync;\n performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime);\n }\n return;\n }\n\n // TODO: Get rid of Sync and use current time?\n if (expirationTime === Sync) {\n performWork(Sync, null);\n } else {\n scheduleCallbackWithExpiration(expirationTime);\n }\n }", "function requestWork(root, expirationTime) {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');\n }\n\n // Add the root to the schedule.\n // Check if this root is already part of the schedule.\n if (root.nextScheduledRoot === null) {\n // This root is not already scheduled. Add it.\n root.remainingExpirationTime = expirationTime;\n if (lastScheduledRoot === null) {\n firstScheduledRoot = lastScheduledRoot = root;\n root.nextScheduledRoot = root;\n } else {\n lastScheduledRoot.nextScheduledRoot = root;\n lastScheduledRoot = root;\n lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;\n }\n } else {\n // This root is already scheduled, but its priority may have increased.\n var remainingExpirationTime = root.remainingExpirationTime;\n if (remainingExpirationTime === NoWork || expirationTime < remainingExpirationTime) {\n // Update the priority.\n root.remainingExpirationTime = expirationTime;\n }\n }\n\n if (isRendering) {\n // Prevent reentrancy. Remaining work will be scheduled at the end of\n // the currently rendering batch.\n return;\n }\n\n if (isBatchingUpdates) {\n // Flush work at the end of the batch.\n if (isUnbatchingUpdates) {\n // ...unless we're inside unbatchedUpdates, in which case we should\n // flush it now.\n nextFlushedRoot = root;\n nextFlushedExpirationTime = Sync;\n performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime);\n }\n return;\n }\n\n // TODO: Get rid of Sync and use current time?\n if (expirationTime === Sync) {\n performWork(Sync, null);\n } else {\n scheduleCallbackWithExpiration(expirationTime);\n }\n }", "function requestWork(root, expirationTime) {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');\n }\n\n // Add the root to the schedule.\n // Check if this root is already part of the schedule.\n if (root.nextScheduledRoot === null) {\n // This root is not already scheduled. Add it.\n root.remainingExpirationTime = expirationTime;\n if (lastScheduledRoot === null) {\n firstScheduledRoot = lastScheduledRoot = root;\n root.nextScheduledRoot = root;\n } else {\n lastScheduledRoot.nextScheduledRoot = root;\n lastScheduledRoot = root;\n lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;\n }\n } else {\n // This root is already scheduled, but its priority may have increased.\n var remainingExpirationTime = root.remainingExpirationTime;\n if (remainingExpirationTime === NoWork || expirationTime < remainingExpirationTime) {\n // Update the priority.\n root.remainingExpirationTime = expirationTime;\n }\n }\n\n if (isRendering) {\n // Prevent reentrancy. Remaining work will be scheduled at the end of\n // the currently rendering batch.\n return;\n }\n\n if (isBatchingUpdates) {\n // Flush work at the end of the batch.\n if (isUnbatchingUpdates) {\n // ...unless we're inside unbatchedUpdates, in which case we should\n // flush it now.\n nextFlushedRoot = root;\n nextFlushedExpirationTime = Sync;\n performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime);\n }\n return;\n }\n\n // TODO: Get rid of Sync and use current time?\n if (expirationTime === Sync) {\n performWork(Sync, null);\n } else {\n scheduleCallbackWithExpiration(expirationTime);\n }\n }", "function requestWork(root, expirationTime) {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');\n }\n\n // Add the root to the schedule.\n // Check if this root is already part of the schedule.\n if (root.nextScheduledRoot === null) {\n // This root is not already scheduled. Add it.\n root.remainingExpirationTime = expirationTime;\n if (lastScheduledRoot === null) {\n firstScheduledRoot = lastScheduledRoot = root;\n root.nextScheduledRoot = root;\n } else {\n lastScheduledRoot.nextScheduledRoot = root;\n lastScheduledRoot = root;\n lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;\n }\n } else {\n // This root is already scheduled, but its priority may have increased.\n var remainingExpirationTime = root.remainingExpirationTime;\n if (remainingExpirationTime === NoWork || expirationTime < remainingExpirationTime) {\n // Update the priority.\n root.remainingExpirationTime = expirationTime;\n }\n }\n\n if (isRendering) {\n // Prevent reentrancy. Remaining work will be scheduled at the end of\n // the currently rendering batch.\n return;\n }\n\n if (isBatchingUpdates) {\n // Flush work at the end of the batch.\n if (isUnbatchingUpdates) {\n // ...unless we're inside unbatchedUpdates, in which case we should\n // flush it now.\n nextFlushedRoot = root;\n nextFlushedExpirationTime = Sync;\n performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime);\n }\n return;\n }\n\n // TODO: Get rid of Sync and use current time?\n if (expirationTime === Sync) {\n performWork(Sync, null);\n } else {\n scheduleCallbackWithExpiration(expirationTime);\n }\n }", "function requestWork(root, expirationTime) {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');\n }\n\n // Add the root to the schedule.\n // Check if this root is already part of the schedule.\n if (root.nextScheduledRoot === null) {\n // This root is not already scheduled. Add it.\n root.remainingExpirationTime = expirationTime;\n if (lastScheduledRoot === null) {\n firstScheduledRoot = lastScheduledRoot = root;\n root.nextScheduledRoot = root;\n } else {\n lastScheduledRoot.nextScheduledRoot = root;\n lastScheduledRoot = root;\n lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;\n }\n } else {\n // This root is already scheduled, but its priority may have increased.\n var remainingExpirationTime = root.remainingExpirationTime;\n if (remainingExpirationTime === NoWork || expirationTime < remainingExpirationTime) {\n // Update the priority.\n root.remainingExpirationTime = expirationTime;\n }\n }\n\n if (isRendering) {\n // Prevent reentrancy. Remaining work will be scheduled at the end of\n // the currently rendering batch.\n return;\n }\n\n if (isBatchingUpdates) {\n // Flush work at the end of the batch.\n if (isUnbatchingUpdates) {\n // ...unless we're inside unbatchedUpdates, in which case we should\n // flush it now.\n nextFlushedRoot = root;\n nextFlushedExpirationTime = Sync;\n performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime);\n }\n return;\n }\n\n // TODO: Get rid of Sync and use current time?\n if (expirationTime === Sync) {\n performWork(Sync, null);\n } else {\n scheduleCallbackWithExpiration(expirationTime);\n }\n }", "function requestWork(root, expirationTime) {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');\n }\n\n // Add the root to the schedule.\n // Check if this root is already part of the schedule.\n if (root.nextScheduledRoot === null) {\n // This root is not already scheduled. Add it.\n root.remainingExpirationTime = expirationTime;\n if (lastScheduledRoot === null) {\n firstScheduledRoot = lastScheduledRoot = root;\n root.nextScheduledRoot = root;\n } else {\n lastScheduledRoot.nextScheduledRoot = root;\n lastScheduledRoot = root;\n lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;\n }\n } else {\n // This root is already scheduled, but its priority may have increased.\n var remainingExpirationTime = root.remainingExpirationTime;\n if (remainingExpirationTime === NoWork || expirationTime < remainingExpirationTime) {\n // Update the priority.\n root.remainingExpirationTime = expirationTime;\n }\n }\n\n if (isRendering) {\n // Prevent reentrancy. Remaining work will be scheduled at the end of\n // the currently rendering batch.\n return;\n }\n\n if (isBatchingUpdates) {\n // Flush work at the end of the batch.\n if (isUnbatchingUpdates) {\n // ...unless we're inside unbatchedUpdates, in which case we should\n // flush it now.\n nextFlushedRoot = root;\n nextFlushedExpirationTime = Sync;\n performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime);\n }\n return;\n }\n\n // TODO: Get rid of Sync and use current time?\n if (expirationTime === Sync) {\n performWork(Sync, null);\n } else {\n scheduleCallbackWithExpiration(expirationTime);\n }\n }", "function requestWork(root, expirationTime) {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');\n }\n\n // Add the root to the schedule.\n // Check if this root is already part of the schedule.\n if (root.nextScheduledRoot === null) {\n // This root is not already scheduled. Add it.\n root.remainingExpirationTime = expirationTime;\n if (lastScheduledRoot === null) {\n firstScheduledRoot = lastScheduledRoot = root;\n root.nextScheduledRoot = root;\n } else {\n lastScheduledRoot.nextScheduledRoot = root;\n lastScheduledRoot = root;\n lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;\n }\n } else {\n // This root is already scheduled, but its priority may have increased.\n var remainingExpirationTime = root.remainingExpirationTime;\n if (remainingExpirationTime === NoWork || expirationTime < remainingExpirationTime) {\n // Update the priority.\n root.remainingExpirationTime = expirationTime;\n }\n }\n\n if (isRendering) {\n // Prevent reentrancy. Remaining work will be scheduled at the end of\n // the currently rendering batch.\n return;\n }\n\n if (isBatchingUpdates) {\n // Flush work at the end of the batch.\n if (isUnbatchingUpdates) {\n // ...unless we're inside unbatchedUpdates, in which case we should\n // flush it now.\n nextFlushedRoot = root;\n nextFlushedExpirationTime = Sync;\n performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime);\n }\n return;\n }\n\n // TODO: Get rid of Sync and use current time?\n if (expirationTime === Sync) {\n performWork(Sync, null);\n } else {\n scheduleCallbackWithExpiration(expirationTime);\n }\n }", "function requestWork(root, expirationTime) {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');\n }\n\n // Add the root to the schedule.\n // Check if this root is already part of the schedule.\n if (root.nextScheduledRoot === null) {\n // This root is not already scheduled. Add it.\n root.remainingExpirationTime = expirationTime;\n if (lastScheduledRoot === null) {\n firstScheduledRoot = lastScheduledRoot = root;\n root.nextScheduledRoot = root;\n } else {\n lastScheduledRoot.nextScheduledRoot = root;\n lastScheduledRoot = root;\n lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;\n }\n } else {\n // This root is already scheduled, but its priority may have increased.\n var remainingExpirationTime = root.remainingExpirationTime;\n if (remainingExpirationTime === NoWork || expirationTime < remainingExpirationTime) {\n // Update the priority.\n root.remainingExpirationTime = expirationTime;\n }\n }\n\n if (isRendering) {\n // Prevent reentrancy. Remaining work will be scheduled at the end of\n // the currently rendering batch.\n return;\n }\n\n if (isBatchingUpdates) {\n // Flush work at the end of the batch.\n if (isUnbatchingUpdates) {\n // ...unless we're inside unbatchedUpdates, in which case we should\n // flush it now.\n nextFlushedRoot = root;\n nextFlushedExpirationTime = Sync;\n performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime);\n }\n return;\n }\n\n // TODO: Get rid of Sync and use current time?\n if (expirationTime === Sync) {\n performWork(Sync, null);\n } else {\n scheduleCallbackWithExpiration(expirationTime);\n }\n }", "function requestWork(root, expirationTime) {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');\n }\n\n // Add the root to the schedule.\n // Check if this root is already part of the schedule.\n if (root.nextScheduledRoot === null) {\n // This root is not already scheduled. Add it.\n root.remainingExpirationTime = expirationTime;\n if (lastScheduledRoot === null) {\n firstScheduledRoot = lastScheduledRoot = root;\n root.nextScheduledRoot = root;\n } else {\n lastScheduledRoot.nextScheduledRoot = root;\n lastScheduledRoot = root;\n lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;\n }\n } else {\n // This root is already scheduled, but its priority may have increased.\n var remainingExpirationTime = root.remainingExpirationTime;\n if (remainingExpirationTime === NoWork || expirationTime < remainingExpirationTime) {\n // Update the priority.\n root.remainingExpirationTime = expirationTime;\n }\n }\n\n if (isRendering) {\n // Prevent reentrancy. Remaining work will be scheduled at the end of\n // the currently rendering batch.\n return;\n }\n\n if (isBatchingUpdates) {\n // Flush work at the end of the batch.\n if (isUnbatchingUpdates) {\n // ...unless we're inside unbatchedUpdates, in which case we should\n // flush it now.\n nextFlushedRoot = root;\n nextFlushedExpirationTime = Sync;\n performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime);\n }\n return;\n }\n\n // TODO: Get rid of Sync and use current time?\n if (expirationTime === Sync) {\n performWork(Sync, null);\n } else {\n scheduleCallbackWithExpiration(expirationTime);\n }\n }", "function requestWork(root, expirationTime) {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');\n }\n\n // Add the root to the schedule.\n // Check if this root is already part of the schedule.\n if (root.nextScheduledRoot === null) {\n // This root is not already scheduled. Add it.\n root.remainingExpirationTime = expirationTime;\n if (lastScheduledRoot === null) {\n firstScheduledRoot = lastScheduledRoot = root;\n root.nextScheduledRoot = root;\n } else {\n lastScheduledRoot.nextScheduledRoot = root;\n lastScheduledRoot = root;\n lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;\n }\n } else {\n // This root is already scheduled, but its priority may have increased.\n var remainingExpirationTime = root.remainingExpirationTime;\n if (remainingExpirationTime === NoWork || expirationTime < remainingExpirationTime) {\n // Update the priority.\n root.remainingExpirationTime = expirationTime;\n }\n }\n\n if (isRendering) {\n // Prevent reentrancy. Remaining work will be scheduled at the end of\n // the currently rendering batch.\n return;\n }\n\n if (isBatchingUpdates) {\n // Flush work at the end of the batch.\n if (isUnbatchingUpdates) {\n // ...unless we're inside unbatchedUpdates, in which case we should\n // flush it now.\n nextFlushedRoot = root;\n nextFlushedExpirationTime = Sync;\n performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime);\n }\n return;\n }\n\n // TODO: Get rid of Sync and use current time?\n if (expirationTime === Sync) {\n performWork(Sync, null);\n } else {\n scheduleCallbackWithExpiration(expirationTime);\n }\n }", "function requestWork(root, expirationTime) {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');\n }\n\n // Add the root to the schedule.\n // Check if this root is already part of the schedule.\n if (root.nextScheduledRoot === null) {\n // This root is not already scheduled. Add it.\n root.remainingExpirationTime = expirationTime;\n if (lastScheduledRoot === null) {\n firstScheduledRoot = lastScheduledRoot = root;\n root.nextScheduledRoot = root;\n } else {\n lastScheduledRoot.nextScheduledRoot = root;\n lastScheduledRoot = root;\n lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;\n }\n } else {\n // This root is already scheduled, but its priority may have increased.\n var remainingExpirationTime = root.remainingExpirationTime;\n if (remainingExpirationTime === NoWork || expirationTime < remainingExpirationTime) {\n // Update the priority.\n root.remainingExpirationTime = expirationTime;\n }\n }\n\n if (isRendering) {\n // Prevent reentrancy. Remaining work will be scheduled at the end of\n // the currently rendering batch.\n return;\n }\n\n if (isBatchingUpdates) {\n // Flush work at the end of the batch.\n if (isUnbatchingUpdates) {\n // ...unless we're inside unbatchedUpdates, in which case we should\n // flush it now.\n nextFlushedRoot = root;\n nextFlushedExpirationTime = Sync;\n performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime);\n }\n return;\n }\n\n // TODO: Get rid of Sync and use current time?\n if (expirationTime === Sync) {\n performWork(Sync, null);\n } else {\n scheduleCallbackWithExpiration(expirationTime);\n }\n }", "function requestWork(root, expirationTime) {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');\n }\n\n // Add the root to the schedule.\n // Check if this root is already part of the schedule.\n if (root.nextScheduledRoot === null) {\n // This root is not already scheduled. Add it.\n root.remainingExpirationTime = expirationTime;\n if (lastScheduledRoot === null) {\n firstScheduledRoot = lastScheduledRoot = root;\n root.nextScheduledRoot = root;\n } else {\n lastScheduledRoot.nextScheduledRoot = root;\n lastScheduledRoot = root;\n lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;\n }\n } else {\n // This root is already scheduled, but its priority may have increased.\n var remainingExpirationTime = root.remainingExpirationTime;\n if (remainingExpirationTime === NoWork || expirationTime < remainingExpirationTime) {\n // Update the priority.\n root.remainingExpirationTime = expirationTime;\n }\n }\n\n if (isRendering) {\n // Prevent reentrancy. Remaining work will be scheduled at the end of\n // the currently rendering batch.\n return;\n }\n\n if (isBatchingUpdates) {\n // Flush work at the end of the batch.\n if (isUnbatchingUpdates) {\n // ...unless we're inside unbatchedUpdates, in which case we should\n // flush it now.\n performWorkOnRoot(root, Sync);\n }\n return;\n }\n\n // TODO: Get rid of Sync and use current time?\n if (expirationTime === Sync) {\n performWork(Sync, null);\n } else if (!isCallbackScheduled) {\n isCallbackScheduled = true;\n scheduleDeferredCallback(performAsyncWork);\n }\n }" ]
[ "0.7648706", "0.762972", "0.7614312", "0.7614312", "0.7614312", "0.7614312", "0.7614312", "0.7614312", "0.7473669", "0.7473669", "0.7473669", "0.7470245", "0.7470245", "0.744669", "0.744669", "0.744669", "0.744669", "0.6881808", "0.6881808", "0.6881808", "0.6881808", "0.6851005", "0.6851005", "0.6851005", "0.6851005", "0.6851005", "0.6851005", "0.6851005", "0.6851005", "0.6851005", "0.6851005", "0.6851005", "0.6851005", "0.6851005", "0.6851005", "0.6851005", "0.6851005", "0.6785899", "0.67850846", "0.67837065", "0.67057735", "0.67057735", "0.67057735", "0.6693232", "0.66277975", "0.6625587", "0.6625587", "0.655993", "0.6556814", "0.6552122", "0.6552122", "0.6552122", "0.6501424", "0.6501424", "0.6501424", "0.6501424", "0.6501424", "0.6501424", "0.6501424", "0.6501424", "0.6501424", "0.6501424", "0.6501424", "0.6501424", "0.6501424", "0.6501424", "0.6501424", "0.6501424", "0.6501424", "0.6501424", "0.6501424", "0.6501424", "0.6501424", "0.6501424", "0.6501424", "0.6501424", "0.6501424", "0.6492003" ]
0.7457669
35
Returns false if we're not sure.
function renderHasNotSuspendedYet() { // If something errored or completed, we can't really be sure, // so those are false. return workInProgressRootExitStatus === RootIncomplete; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isErr() {\n return false;\n }", "isValid() {\n return this.getSize() != 0\n }", "isValid() {\n return true;\n }", "isValid() {\n return true;\n }", "function checkState() {\n if (!this.isInitialized()) {\n this.throwSCORMError(301);\n return false;\n }\n\n return true;\n }", "function canStart() {\n if (_curr.songTitle == null || _curr.songTitle == \"\") return false;\n if (_curr.artistName == null || _curr.artistName == \"\") return false;\n if (_curr.songImage == null) return false;\n if (_curr.songFile == null) return false;\n if (_curr.songLength == null) return false;\n return true;\n }", "puzzleIsValid() {\r\n\t\ttry {\r\n\t\t\tthis.fullHouse(false, false);\r\n\t\t} catch {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "function returnFalse() {\n\t\t\treturn false;\n\t\t}", "function returnFalse() {\n\t\t\treturn false;\n\t\t}", "function returnFalse() {\n\t\t\treturn false;\n\t\t}", "function returnFalse() {\n\t\t\treturn false;\n\t\t}", "isValid() {\n\t\treturn this.ref_id !== 'null' && this.ref_id !== undefined;\n\t}", "function returnFalse() {\n\t\treturn false;\n\t}", "isErr() {\n return true;\n }", "isComplete() {\n try {\n if (!validator.isPositiveNumber(this.cap)) {\n return false;\n } else if (!validator.isPositiveNumber(this.tokenPrice)) {\n return false;\n }\n return true;\n } catch (error) {\n return false;\n }\n }", "checkReadyForSubmit(){\n if(this.checkAnswersReady() && this.checkAddressReady() && this.checkMembership()){\n return true;\n }\n else{\n return false;\n }\n }", "function returnTrue() {\n\t\t\treturn true;\n\t\t}", "function returnTrue() {\n\t\t\treturn true;\n\t\t}", "function returnTrue() {\n\t\t\treturn true;\n\t\t}", "function returnTrue() {\n\t\t\treturn true;\n\t\t}", "isFinished (){\n\t\treturn this.status !== null && this.finishDelay < 0;\n\t}", "get isValid() {\n\t\treturn (this._h != null);\n\t}", "isDone() {\n return this.single.length == 0 ? true : false\n }", "isErr() {\n return !this.isOk()\n }", "function always () { return true }", "isValid(){\n try {\n fs.existsSync(this.websiteFolder) || raise(`Le site à l'adresse ${this.websiteFolder} est introuvable…`)\n this.url || raise(\"Il faut absolument l'URL du site, pour le tester en intégration.\")\n return true\n } catch (e) {\n App.onError(e)\n return false\n }\n }", "function returnFalse() {\n return false;\n }", "function FPFShouldContinue() {\r\n\tif (parseInt(currentSystem.galaxy, 10) > parseInt(searchRequest.rightGalaxy, 10)) { //had to add parseInt for the chrome not to think it's a string...\r\n\t\treturn false;\r\n\t} else if (currentSystem.galaxy == searchRequest.rightGalaxy\r\n\t\t\t\t&& currentSystem.system > searchRequest.rightSystem) {\r\n\t\treturn false;\r\n\t}\r\n\r\n\treturn true;\r\n}", "function returnFalse() {\n return false;\n }", "function shouldContinue() {\n return (\n pendingTimers.length || pendingOSTasks.length || pendingOperations.length\n );\n}", "isValid() {\n // Model III only had Level 2. (I've read that it actually shipped with Level 1, but\n // we don't have that ROM.)\n if (this.modelType === ModelType.MODEL3 && this.basicLevel === BasicLevel.LEVEL1) {\n return false;\n }\n // Model III only had lower case.\n if (this.modelType === ModelType.MODEL3 && this.cgChip === CGChip.ORIGINAL) {\n return false;\n }\n // Rest are okay.\n return true;\n }", "hasInvalidSettings(settings){}", "function returnFalse() {\n return false;\n }", "isValid() {\n if (this.value) {\n return true;\n } else {\n return false;\n }\n }", "function ok() {\n return true\n }", "check_if_passed() {\n const passed = this.node.value === this.correct;\n if (!passed) {\n console.error(this.describe() + \" failed!\");\n }\n return passed;\n }", "isFinished() {\n\n return this.pairsGuessed !== this.cards.length / 2 ? false : true\n\n }", "performed(aOpIndex) {\n\t\treturn (this.ops[aOpIndex]!==undefined);\n\t}", "isValidElement() {\n return !!this.getAdUrl();\n }", "check_if_passed() {\n const passed = this.text_area.value === this.text;\n if (!passed) {\n console.error(this.describe() + \" failed!\");\n }\n return passed;\n }", "check_if_passed() {\n const passed = this.input_area.value === this.text;\n if (!passed) {\n console.error(this.describe() + \" failed!\");\n }\n return passed;\n }", "isValid() {\n if (\n this.state.isDanger ||\n this.state.apiValue === '' ||\n this.state.apiValue === undefined\n )\n return false;\n\n return true;\n }", "_isError () {\n\t\tif ( (this.state.errorEmail != '') || (this.state.errorPassword != '') ){\n\t\t\t// console.log('true')\n\t\t\treturn true\n\t\t} else {\n\t\t\t// console.log('false')\n\t\t\treturn false\n\t\t}\n\t}", "bool() {\n this.throw_if_less_than(1);\n let val = this.buffer[this.pos];\n this.pos += 1;\n return val === 1;\n }", "function checkHasOxen() {\r\n\t\tif(numOxen >= 1){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "isComplete() {\n if (!this.endTime) return false;\n if (this.now() > this.endTime) {\n return true;\n }\n else {\n return false;\n }\n \n }", "function returnFalse() {\n\treturn false;\n}", "function isInappropriateTarget() {\n return false;\n }", "checkRunEntity () {\n if (!this.digest) {\n console.warn('Invalid (empty) model digest')\n this.$q.notify({ type: 'negative', message: this.$t('Invalid (empty) model digest') })\n return false\n }\n if (!this.runDigest) {\n console.warn('Unable to show microdata: run digest is empty')\n this.$q.notify({ type: 'negative', message: this.$t('Unable to show microdata: run digest is empty') })\n return false\n }\n if (!this.entityName) {\n console.warn('Unable to show microdata: entity name is empty')\n this.$q.notify({ type: 'negative', message: this.$t('Unable to show microdata: entity name is empty') })\n return false\n }\n return true\n }", "check(key) {\n //If the object or lockid doesn't even exist yet, then it is unlocked.\n if (!(key in this.state['objects']) || !('lockid' in this.state['objects'][key])) {\n return true;\n }\n\n //Else check to see if lockid is blank.\n return this.state['objects'][key]['lockid'] == '';\n }", "isValid () {\n return this.validHasGamblingDebt() &&\n this.validGamblingDebt()\n }", "function returnFalse(){\n var detectHREF = $(this).attr('href');\n if(detectHREF.match(/.html/)){\n isOffline();\n return false;\n } \n }", "isFinished() {\n if(this.noMoreTurns()||this.getWinner()!==null)\n return true;\n else\n return false;\n\n }", "function isSetUp() {\n return getUserDetails() !== null;\n }", "_hasTable () {\n return 0 < this._tables.length;\n }", "function ok() {\n return true\n }", "function renderHasNotSuspendedYet(){// If something errored or completed, we can't really be sure,\n// so those are false.\nreturn workInProgressRootExitStatus===RootIncomplete;}", "function renderHasNotSuspendedYet(){// If something errored or completed, we can't really be sure,\n// so those are false.\nreturn workInProgressRootExitStatus===RootIncomplete;}", "function renderHasNotSuspendedYet(){// If something errored or completed, we can't really be sure,\n// so those are false.\nreturn workInProgressRootExitStatus===RootIncomplete;}", "function renderHasNotSuspendedYet(){// If something errored or completed, we can't really be sure,\n// so those are false.\nreturn workInProgressRootExitStatus===RootIncomplete;}", "function renderHasNotSuspendedYet(){// If something errored or completed, we can't really be sure,\n// so those are false.\nreturn workInProgressRootExitStatus===RootIncomplete;}", "function checkWinningCondition() {\n\tif (matchedCards.length === 16) {\n\t\tstopTimer();\n\t\toverlay();\n\t} else {\n\t\treturn false;\n\t}\n}", "isValid() {\n return this.hash === this.createHash();\n }", "checkAddressReady(){\n if(this.state.postal===1 && this.checkBAddress() && this.checkPAddress()){\n return true;\n }\n else if(this.state.postal===0 && this.checkBAddress()){\n return true;\n }\n else {\n return false;\n }\n }", "checkTrulyFullTimeWage() {\n return true;\n }", "hasUrl(): boolean {\n return this.url != null;\n }", "function renderHasNotSuspendedYet() {\n // If something errored or completed, we can't really be sure,\n // so those are false.\n return workInProgressRootExitStatus === RootIncomplete;\n }", "function isValid( ) {\n\n\t\t\tif ( _widget[ \"content\" ][ \"impl\" ].value.match(_validPtn) ) {\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "function isPositionNotReached() {\n\tfor(var i=ABSCISSA.length;i--;) {\n\t\tif(!positionReached[i] || !rotationReached[i]) return true;\n\t}\n\treturn false;\n}", "function checkMove() {\n var discToMove = startPeg[startPeg.length - 1];\n var topDisc = endPeg[endPeg.length - 1];\n var moveAvailable = false;\n if (discToMove < topDisc || endPeg.length === 0) {\n moveAvailable = true;\n }\n return moveAvailable;\n }", "satisfied() { return false; }", "function validateForm() {\n return (hash.length > 0);\n }", "function renderHasNotSuspendedYet() {\n // If something errored or completed, we can't really be sure,\n // so those are false.\n return workInProgressRootExitStatus === RootIncomplete;\n }", "function renderHasNotSuspendedYet() {\n // If something errored or completed, we can't really be sure,\n // so those are false.\n return workInProgressRootExitStatus === RootIncomplete;\n }", "function renderHasNotSuspendedYet() {\n // If something errored or completed, we can't really be sure,\n // so those are false.\n return workInProgressRootExitStatus === RootIncomplete;\n }", "function renderHasNotSuspendedYet() {\n // If something errored or completed, we can't really be sure,\n // so those are false.\n return workInProgressRootExitStatus === RootIncomplete;\n }", "function renderHasNotSuspendedYet() {\n // If something errored or completed, we can't really be sure,\n // so those are false.\n return workInProgressRootExitStatus === RootIncomplete;\n }", "function renderHasNotSuspendedYet() {\n // If something errored or completed, we can't really be sure,\n // so those are false.\n return workInProgressRootExitStatus === RootIncomplete;\n }", "function renderHasNotSuspendedYet() {\n // If something errored or completed, we can't really be sure,\n // so those are false.\n return workInProgressRootExitStatus === RootIncomplete;\n }", "function renderHasNotSuspendedYet() {\n // If something errored or completed, we can't really be sure,\n // so those are false.\n return workInProgressRootExitStatus === RootIncomplete;\n }", "function renderHasNotSuspendedYet() {\n // If something errored or completed, we can't really be sure,\n // so those are false.\n return workInProgressRootExitStatus === RootIncomplete;\n }", "function renderHasNotSuspendedYet() {\n // If something errored or completed, we can't really be sure,\n // so those are false.\n return workInProgressRootExitStatus === RootIncomplete;\n }", "function renderHasNotSuspendedYet() {\n // If something errored or completed, we can't really be sure,\n // so those are false.\n return workInProgressRootExitStatus === RootIncomplete;\n }", "function renderHasNotSuspendedYet() {\n // If something errored or completed, we can't really be sure,\n // so those are false.\n return workInProgressRootExitStatus === RootIncomplete;\n }", "function renderHasNotSuspendedYet() {\n // If something errored or completed, we can't really be sure,\n // so those are false.\n return workInProgressRootExitStatus === RootIncomplete;\n }", "other () { return true }", "other () { return true }", "isStatusReady () {\r\n return this._pastPos[0] !== undefined\r\n }", "isOk() {\n return false;\n }", "isDeterministicComplete() {\r\n let isDeterministic = this.isDeterministic();\r\n if (!isDeterministic) return false;\r\n\r\n // Each pair (state, symbol) must have an image by transition function\r\n for (let index = 0; index < this.states.length; index++) {\r\n const state = this.states[index];\r\n for (const symbol of this.alphabet) {\r\n if (this.transition(state, symbol) == null)\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }", "function _checkAi(){return true;}", "isValid() {\n // Mining reward address is null but transaction is\n // still valid\n if(this.fromAddress === null) {\n return true;\n }\n\n // If there is no signature or if signature is empty\n if(!this.signature || this.signature.length === 0){\n throw new Error('No signature in this transaction');\n }\n\n // Verify transaction signed with correct key\n const publicKey = ec.keyFromPublic(this.fromAddress, 'hex');\n return publicKey.verify(this.calculateHash(), this.signature);\n }", "_shallExecute() {\n\t\treturn !_.isEmpty(this.robot);\n\t}", "is_valid() {\n return this.meta !== null;\n }", "function hasTap() {\n\t\t\t//Enure we dont return 0 or null for false values\n\t\t\treturn !!(options.tap) ;\n\t\t}", "function hasTap() {\n\t\t\t//Enure we dont return 0 or null for false values\n\t\t\treturn !!(options.tap) ;\n\t\t}", "function hasTap() {\n\t\t\t//Enure we dont return 0 or null for false values\n\t\t\treturn !!(options.tap) ;\n\t\t}", "testSync(string) {\r\n if ((typeof this.source === 'boolean' || typeof string === 'boolean')) {\r\n return this.source === string;\r\n }\r\n return this.searchSync(string) != null;\r\n }", "hasGeneralHelpCache() {\n\t\treturn !!this._generalHelpCache;\n\t}", "exists() {\n return this.filePointer.exists();\n }", "exists() {\n return this.filePointer.exists();\n }" ]
[ "0.6496123", "0.6381494", "0.63397324", "0.63397324", "0.6336614", "0.63218224", "0.62233114", "0.62097883", "0.62097883", "0.62097883", "0.62097883", "0.6199922", "0.6164317", "0.6131139", "0.61150736", "0.60781837", "0.6050852", "0.6050852", "0.6050852", "0.6050852", "0.604975", "0.6029243", "0.6016531", "0.6013975", "0.60123426", "0.6005672", "0.59962124", "0.59927344", "0.5987426", "0.59754974", "0.59664816", "0.59646106", "0.5962633", "0.5958986", "0.59313214", "0.5929672", "0.591769", "0.59011805", "0.59007776", "0.5885223", "0.5883324", "0.58827424", "0.5880363", "0.5878589", "0.5874457", "0.5870043", "0.58631194", "0.58630294", "0.5855755", "0.5846498", "0.5845659", "0.58409506", "0.5839506", "0.5836874", "0.58329105", "0.5820899", "0.5816621", "0.5816621", "0.5816621", "0.5816621", "0.5816621", "0.58074343", "0.58040565", "0.58027935", "0.58001184", "0.57996106", "0.5798759", "0.57918215", "0.5791737", "0.5787276", "0.5785954", "0.5784902", "0.57837975", "0.57837975", "0.57837975", "0.57837975", "0.57837975", "0.57837975", "0.57837975", "0.57837975", "0.57837975", "0.57837975", "0.57837975", "0.57837975", "0.57777226", "0.57725364", "0.57725364", "0.575696", "0.5755446", "0.5755016", "0.57549584", "0.575455", "0.5750829", "0.57497424", "0.5749209", "0.5749209", "0.5749209", "0.5748852", "0.57390505", "0.5738953", "0.5738953" ]
0.0
-1
The work loop is an extremely hot path. Tell Closure not to inline it.
function workLoopSync() { // Already timed out, so perform work without checking if we need to yield. while (workInProgress !== null) { workInProgress = performUnitOfWork(workInProgress); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "work() {}", "loop() {}", "loop() {}", "function TaskLoop() {\n\t\n}", "function test_infinite_loop() {\n\tfor(var i = 0; i < 10; i++)\n\t\tfoo->();\n\n\ttrace(i);\n}", "function test0() {\n var workItem = {\n increment: 1,\n isDone: false\n };\n\n var func0 = function () {\n workItem = {\n increment: 2,\n isDone: true\n };\n };\n\n while (!workItem.isDone) {\n for (var i = 0; i < 3 && !workItem.isDone; i += workItem.increment) {\n func0(i);\n }\n }\n\n print(\"i = \" + i);\n}", "function loop() {\r\n}", "noLoop() {\r\n\t\t\tthis.looping = false;\r\n\t\t}", "function workLoopSync() {\n // Already timed out, so perform work without checking if we need to yield.\n while (workInProgress !== null) {\n workInProgress = performUnitOfWork(workInProgress);\n }\n }", "work() {\n\n }", "function work() {\n\t\t// Set running to true to prevent more calls until the first one is done\n\t\trunning = true;\n\t\t\n\t\t// Go through the DOM\n\t\twalk(document.body);\n\n\t\t// Set running to false to allow additional calls\n\t\trunning = false;\n\t}", "function workLoopSync() {\n // Already timed out, so perform work without checking if we need to yield.\n while (workInProgress !== null) {\n workInProgress = performUnitOfWork(workInProgress);\n }\n }", "function workLoopSync() {\n // Already timed out, so perform work without checking if we need to yield.\n while (workInProgress !== null) {\n workInProgress = performUnitOfWork(workInProgress);\n }\n }", "function workLoopSync() {\n // Already timed out, so perform work without checking if we need to yield.\n while (workInProgress !== null) {\n workInProgress = performUnitOfWork(workInProgress);\n }\n }", "function workLoopSync() {\n // Already timed out, so perform work without checking if we need to yield.\n while (workInProgress !== null) {\n workInProgress = performUnitOfWork(workInProgress);\n }\n }", "function workLoopSync() {\n // Already timed out, so perform work without checking if we need to yield.\n while (workInProgress !== null) {\n workInProgress = performUnitOfWork(workInProgress);\n }\n }", "function workLoopSync() {\n // Already timed out, so perform work without checking if we need to yield.\n while (workInProgress !== null) {\n workInProgress = performUnitOfWork(workInProgress);\n }\n }", "function workLoopSync() {\n // Already timed out, so perform work without checking if we need to yield.\n while (workInProgress !== null) {\n workInProgress = performUnitOfWork(workInProgress);\n }\n }", "function loopInfinito() {\n while (true) { }\n}", "function workLoopSync() {\n // Already timed out, so perform work without checking if we need to yield.\n while (workInProgress !== null) {\n performUnitOfWork(workInProgress);\n }\n }", "function workLoopSync() {\n // Already timed out, so perform work without checking if we need to yield.\n while (workInProgress !== null) {\n performUnitOfWork(workInProgress);\n }\n }", "function workLoopSync() {\n // Already timed out, so perform work without checking if we need to yield.\n while (workInProgress !== null) {\n performUnitOfWork(workInProgress);\n }\n }", "function workLoopSync() {\n // Already timed out, so perform work without checking if we need to yield.\n while (workInProgress !== null) {\n performUnitOfWork(workInProgress);\n }\n }", "function workLoopSync() {\n // Already timed out, so perform work without checking if we need to yield.\n while (workInProgress !== null) {\n performUnitOfWork(workInProgress);\n }\n }", "function workLoopSync() {\n // Already timed out, so perform work without checking if we need to yield.\n while (workInProgress !== null) {\n performUnitOfWork(workInProgress);\n }\n}", "function workLoopSync() {\n // Already timed out, so perform work without checking if we need to yield.\n while (workInProgress !== null) {\n performUnitOfWork(workInProgress);\n }\n}", "function workLoopSync() {\n // Already timed out, so perform work without checking if we need to yield.\n while (workInProgress !== null) {\n performUnitOfWork(workInProgress);\n }\n}", "function workLoopSync() {\n // Already timed out, so perform work without checking if we need to yield.\n while (workInProgress !== null) {\n performUnitOfWork(workInProgress);\n }\n}", "function workLoopSync() {\n // Already timed out, so perform work without checking if we need to yield.\n while (workInProgress !== null) {\n performUnitOfWork(workInProgress);\n }\n}", "function workLoopSync() {\n // Already timed out, so perform work without checking if we need to yield.\n while (workInProgress !== null) {\n performUnitOfWork(workInProgress);\n }\n}", "function workLoopSync() {\n // Already timed out, so perform work without checking if we need to yield.\n while (workInProgress !== null) {\n performUnitOfWork(workInProgress);\n }\n}", "function workLoopSync() {\n // Already timed out, so perform work without checking if we need to yield.\n while (workInProgress !== null) {\n performUnitOfWork(workInProgress);\n }\n}", "function workLoopSync() {\n // Already timed out, so perform work without checking if we need to yield.\n while (workInProgress !== null) {\n performUnitOfWork(workInProgress);\n }\n}", "function workLoopSync() {\n // Already timed out, so perform work without checking if we need to yield.\n while (workInProgress !== null) {\n performUnitOfWork(workInProgress);\n }\n}", "function workLoopSync() {\n // Already timed out, so perform work without checking if we need to yield.\n while (workInProgress !== null) {\n performUnitOfWork(workInProgress);\n }\n}", "function workLoopSync() {\n // Already timed out, so perform work without checking if we need to yield.\n while (workInProgress !== null) {\n performUnitOfWork(workInProgress);\n }\n}", "function workLoopSync() {\n // Already timed out, so perform work without checking if we need to yield.\n while (workInProgress !== null) {\n performUnitOfWork(workInProgress);\n }\n}", "function workLoopSync() {\n // Already timed out, so perform work without checking if we need to yield.\n while (workInProgress !== null) {\n performUnitOfWork(workInProgress);\n }\n}", "function workLoopSync() {\n // Already timed out, so perform work without checking if we need to yield.\n while (workInProgress !== null) {\n performUnitOfWork(workInProgress);\n }\n}", "function workLoopSync() {\n // Already timed out, so perform work without checking if we need to yield.\n while (workInProgress !== null) {\n performUnitOfWork(workInProgress);\n }\n}", "function infinteLoop() {\n while (true) {\n }\n}", "function main() {\r\n mainLoop()\r\n}", "runWorkers () {\n }", "function f() {\n while (false) {\n return 1;\n }\n }", "function metropolis100Iterations(){\n \tfor (var ii=0; ii<100; ii++) metropolisJump();\n \tredraw();\n }", "*createWorker(): any {\n let close = false;\n while (!close) {\n close = yield this.next && this.next();\n }\n }", "function run() {}", "_stopLoop() { this._isRunning = false; }", "function Closure() {\r\n}", "function mainloop(work, e, arrFactory) {\n\t\"use strict\";\n\t\n\tvar xzm1 = arrFactory.getUint32Array(64)\n\t, xzm = arrFactory.getUint32Array(64)\n\t, xzmb = arrFactory.getUint32Array(64)\n\t, xzm1b = arrFactory.getUint32Array(64)\n\t, xznb = arrFactory.getUint32Array(64)\n\t, xzn1b = arrFactory.getUint32Array(64)\n\t, a0 = arrFactory.getUint32Array(64)\n\t, a1 = arrFactory.getUint32Array(64)\n\t, b0 = arrFactory.getUint32Array(64)\n\t, b1 = arrFactory.getUint32Array(64)\n\t, c1 = arrFactory.getUint32Array(64)\n\t, r = arrFactory.getUint32Array(32)\n\t, s = arrFactory.getUint32Array(32)\n\t, t = arrFactory.getUint32Array(32)\n\t, u = arrFactory.getUint32Array(32)\n\t, b = 0;\n\n\tfor (var j=0; j<32; j+=1) { xzm1[j] = work[j]; }\n\txzm1[32] = 1;\n\tfor (var j=33; j<64; j+=1) { xzm1[j] = 0; }\n\n\txzm[0] = 1;\n\tfor (var j=1; j<64; j+=1) { xzm[j] = 0; }\n\t \n\t// views of last 32 elements of original arrays\n\tvar xzmb_32 = xzmb.subarray(32, 64)\n\t, xzm1b_32 = xzm1b.subarray(32, 64)\n\t, a0_32 = a0.subarray(32, 64)\n\t, a1_32 = a1.subarray(32, 64)\n\t, b0_32 = b0.subarray(32, 64)\n\t, b1_32 = b1.subarray(32, 64)\n\t, c1_32 = c1.subarray(32, 64)\n\t, xznb_32 = xznb.subarray(32, 64)\n\t, xzn1b_32 = xzn1b.subarray(32, 64);\n\n\tfor (var pos=254; pos>=0; pos-=1) {\n\t\tb = e[Math.floor(pos/8)] >>> (pos & 7);\n\t\tb &= 1;\n\t\tselect(xzmb,xzm1b,xzm,xzm1,b);\n\t\tadd(a0,xzmb,xzmb_32);\n\t\tsub(a0_32,xzmb,xzmb_32);\n\t\tadd(a1,xzm1b,xzm1b_32);\n\t\tsub(a1_32,xzm1b,xzm1b_32);\n\t\tsquare(b0,a0);\n\t\tsquare(b0_32,a0_32);\n\t\tmult(b1,a1,a0_32);\n\t\tmult(b1_32,a1_32,a0);\n\t\tadd(c1,b1,b1_32);\n\t\tsub(c1_32,b1,b1_32);\n\t\tsquare(r,c1_32);\n\t\tsub(s,b0,b0_32);\n\t\tmult121665(t,s);\n\t\tadd(u,t,b0);\n\t\tmult(xznb,b0,b0_32);\n\t\tmult(xznb_32,s,u);\n\t\tsquare(xzn1b,c1);\n\t\tmult(xzn1b_32,r,work);\n\t\tselect(xzm,xzm1,xznb,xzn1b,b);\n\t}\n\n\twork.set(xzm);\n\t\n\tarrFactory.recycle(\n\t\t\txzm1, xzm, xzmb, xzm1b, xznb, xzn1b, a0, a1, b0, b1, c1, r, s, t, u);\n}", "function mainloop(work, e, arrFactory) {\n\t\"use strict\";\n\t\n\tvar xzm1 = arrFactory.getUint32Array(64)\n\t, xzm = arrFactory.getUint32Array(64)\n\t, xzmb = arrFactory.getUint32Array(64)\n\t, xzm1b = arrFactory.getUint32Array(64)\n\t, xznb = arrFactory.getUint32Array(64)\n\t, xzn1b = arrFactory.getUint32Array(64)\n\t, a0 = arrFactory.getUint32Array(64)\n\t, a1 = arrFactory.getUint32Array(64)\n\t, b0 = arrFactory.getUint32Array(64)\n\t, b1 = arrFactory.getUint32Array(64)\n\t, c1 = arrFactory.getUint32Array(64)\n\t, r = arrFactory.getUint32Array(32)\n\t, s = arrFactory.getUint32Array(32)\n\t, t = arrFactory.getUint32Array(32)\n\t, u = arrFactory.getUint32Array(32)\n\t, b = 0;\n\n\tfor (var j=0; j<32; j+=1) { xzm1[j] = work[j]; }\n\txzm1[32] = 1;\n\tfor (var j=33; j<64; j+=1) { xzm1[j] = 0; }\n\n\txzm[0] = 1;\n\tfor (var j=1; j<64; j+=1) { xzm[j] = 0; }\n\t \n\t// views of last 32 elements of original arrays\n\tvar xzmb_32 = xzmb.subarray(32, 64)\n\t, xzm1b_32 = xzm1b.subarray(32, 64)\n\t, a0_32 = a0.subarray(32, 64)\n\t, a1_32 = a1.subarray(32, 64)\n\t, b0_32 = b0.subarray(32, 64)\n\t, b1_32 = b1.subarray(32, 64)\n\t, c1_32 = c1.subarray(32, 64)\n\t, xznb_32 = xznb.subarray(32, 64)\n\t, xzn1b_32 = xzn1b.subarray(32, 64);\n\n\tfor (var pos=254; pos>=0; pos-=1) {\n\t\tb = e[Math.floor(pos/8)] >>> (pos & 7);\n\t\tb &= 1;\n\t\tselect(xzmb,xzm1b,xzm,xzm1,b);\n\t\tadd(a0,xzmb,xzmb_32);\n\t\tsub(a0_32,xzmb,xzmb_32);\n\t\tadd(a1,xzm1b,xzm1b_32);\n\t\tsub(a1_32,xzm1b,xzm1b_32);\n\t\tsquare(b0,a0);\n\t\tsquare(b0_32,a0_32);\n\t\tmult(b1,a1,a0_32);\n\t\tmult(b1_32,a1_32,a0);\n\t\tadd(c1,b1,b1_32);\n\t\tsub(c1_32,b1,b1_32);\n\t\tsquare(r,c1_32);\n\t\tsub(s,b0,b0_32);\n\t\tmult121665(t,s);\n\t\tadd(u,t,b0);\n\t\tmult(xznb,b0,b0_32);\n\t\tmult(xznb_32,s,u);\n\t\tsquare(xzn1b,c1);\n\t\tmult(xzn1b_32,r,work);\n\t\tselect(xzm,xzm1,xznb,xzn1b,b);\n\t}\n\n\twork.set(xzm);\n\t\n\tarrFactory.recycle(\n\t\t\txzm1, xzm, xzmb, xzm1b, xznb, xzn1b, a0, a1, b0, b1, c1, r, s, t, u);\n}", "function infiniteLoop() {\r\n while (true) {\r\n }\r\n}", "function metropolis1000Iterations(){\n \tfor (var ii=0; ii<1000; ii++) metropolisJump();\n \tredraw();\n }", "function run() {\n\n}", "function b(e,t){for(var n=0,o=e.length;n<o;n++)Fe.set(e[n],\"globalEval\",!t||Fe.get(t[n],\"globalEval\"))}", "function startWork() {\n working = true;\n}", "function infiniteLoop() {\n while (true) { }\n}", "function bug8() {\n \n for (var i = 1; i < 5; i++) {\n\n (function(i){ \n\n setTimeout(function() { console.log(i) }, 100*i);//the soluation is creating a self-excuted function\n\n })(i);\n\n}\n }", "function startLoop(){\n\n // console.log('[LOOP]');\n\n INGAME = true;\n\n // cancel on late-join\n loop.stop();\n\n loop.resume();\n}", "function startLoop(){\n\n // console.log('[LOOP]');\n\n INGAME = true;\n\n // cancel on late-join\n loop.stop();\n\n loop.resume();\n}", "function foo() {\n return regeneratorRuntime.wrap(function foo$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n case \"end\":\n return _context.stop();\n }\n }\n }, _marked[0], this);\n}", "function infiniteLoop() {\n while (true) {\n }\n}", "function infiniteLoop() {\n while (true) {\n }\n}", "function infiniteLoop() {\n while (true) {\n }\n}", "function infiniteLoop() {\n while (true) {\n }\n}", "function stop(){\n noLoop();\n}", "function g(){return function(){}}", "function mainLoop()\r\n{\r\n\tvar startTime = performance.now();\r\n}", "function mainLoop () {\n // Hard coded insturction count that each loop runs.\n let insCount = 5\n c8.DELAY = Math.max(0, c8.DELAY - 1)\n while (insCount > 0) {\n const { MEM, PC } = c8\n // Move instruction offset.\n const ins = getIns(MEM[PC] << 8 | MEM[PC + 1])\n try {\n // Perform operation according to instruction.\n ops[ins[0]](ins, c8, view)\n } catch (err) { warning(err, ins, c8) }\n insCount--\n }\n window.requestAnimationFrame(mainLoop)\n }", "function run() {\n }", "function runNoWW() {\n triggerNoWW.innerText = `Running the task... UI is not responsive [buttons above won\\'t work until finished].\nWe gave spinner 100ms to appear and start animating.`;\n triggerNoWW.onclick = null;\n\n // const canvas = new OffscreenCanvas(1, 1); // offscreen canvas, need to create it here, because it will be detached after first run\n const size = 1024\n\n document.querySelector('#spinnerNoWW').classList.add('active');\n setTimeout(() => { // 100ms timeout lets spinner some time to appear\n const startTime = performance.now();\n generateMatrices(size);\n const generationTime = performance.now();\n const result = calculateGpuResult(noWWCanvas, size);\n const endTime = performance.now();\n\n const time = {\n generation: generationTime - startTime,\n calculation: endTime - generationTime,\n }\n // console.log({ result, time });\n\n triggerNoWW.innerText = `Result without Web Worker size: ${result.length}.\n Generation took: ${Math.ceil(time.generation)} ms.\n Caculation took: ${Math.ceil(time.calculation)} ms.\n Run again?`;\n triggerNoWW.onclick = runNoWW;\n\n document.querySelector('#spinnerNoWW').classList.remove('active');\n }, 100)\n}", "function run() {\n // do something\n}" ]
[ "0.66703844", "0.6575251", "0.6575251", "0.63850766", "0.6347373", "0.6334354", "0.62879914", "0.62779045", "0.62119734", "0.62117994", "0.6125921", "0.6065775", "0.6065775", "0.6065775", "0.6065775", "0.6065775", "0.6065775", "0.6065775", "0.6057734", "0.6006106", "0.6006106", "0.6006106", "0.6006106", "0.6006106", "0.59113514", "0.59113514", "0.59113514", "0.59113514", "0.59113514", "0.59113514", "0.59113514", "0.59113514", "0.59113514", "0.59113514", "0.59113514", "0.59113514", "0.59113514", "0.59113514", "0.59113514", "0.59113514", "0.5909919", "0.58921915", "0.58658004", "0.58425784", "0.57012033", "0.56616175", "0.5647508", "0.5620905", "0.5599756", "0.55823094", "0.55823094", "0.5558579", "0.5558201", "0.5554008", "0.55205876", "0.54907787", "0.5489921", "0.5485313", "0.54672164", "0.54672164", "0.5456782", "0.5446117", "0.5446117", "0.5446117", "0.5446117", "0.5440903", "0.54244757", "0.54240775", "0.5422555", "0.5405263", "0.5398863", "0.5386894" ]
0.5951011
52
The theory is that a person can't tell the difference between small differences in time. Therefore, if we wait a bit longer than necessary that won't translate to a noticeable difference in the experience. However, waiting for longer might mean that we can avoid showing an intermediate loading state. The longer we have already waited, the harder it is to tell small differences in time. Therefore, the longer we've already waited, the longer we can wait additionally. At some point we have to give up though. We pick a train model where the next boundary commits at a consistent schedule. These particular numbers are vague estimates. We expect to adjust them based on research.
function jnd(timeElapsed) { return timeElapsed < 120 ? 120 : timeElapsed < 480 ? 480 : timeElapsed < 1080 ? 1080 : timeElapsed < 1920 ? 1920 : timeElapsed < 3000 ? 3000 : timeElapsed < 4320 ? 4320 : ceil(timeElapsed / 1960) * 1960; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function estimatedWait(){\n\n // Get a list of the mentors who are online\n var mentors = mentorsOnline();\n\n // Get the currently active tickets\n var tickets = activeTickets();\n\n // Get the currently claimed tickets\n var openTickets = tickets.filter(function(t){return t.status === \"OPEN\"});\n var claimedTickets = tickets.filter(function(t){return t.status === \"CLAIMED\"});\n\n var claimMentors = claimedMentors(claimedTickets);\n\n var unclaimedOnline = mentors.filter(function(m){\n return !claimMentors[m._id];\n });\n\n // Median completion time\n // We use median completion time here because\n // it is more accurate than the mean in practice.\n var completeTickets = completedTickets();\n var estCompletion = stats.median(completeTickets.map(function(t){return t.completeTime - t.claimTime}));\n var estResponse = stats.median(completeTickets.map(function(t){return t.claimTime - t.timestamp}));\n\n if (mentors.length > 0 && openTickets.length >=0){\n if (openTickets.length < unclaimedOnline.length){\n return estResponse;\n } else {\n // There are more open tickets than there are mentors\n // Mentors have to either complete the current tickets\n // or finish up on the tickets they've claimed\n var now = Date.now();\n\n // Find the latest ticket that hasn't been claimed yet.\n var latestOpen = stats.max(openTickets.map(function(t){return t.timestamp})) || now;\n\n if (claimedTickets.length > 0){\n // Find the earliest ticket that was claimed (soonest to completion)\n var earliestClaimed = stats.min(claimedTickets.map(function(t){return t.claimTime})) || now;\n\n // Take the min of the two options (a ticket is claimed and completed vs completed)\n // We use the latest open ticket as an earlier ticket has a higher probability of being\n // chosen soon.\n return Math.min(now - latestOpen + estResponse + estCompletion, now - earliestClaimed + estCompletion + estResponse);\n } else {\n return now - latestOpen + estResponse;\n }\n\n }\n\n }\n\n}", "estimatedTime(peak) {\n // The estimated time depends on the distance in blocks\n // and whether the trip is occurring during peak hours or off peak hours.\n\n if (peak === true) {\n // while during peak hours\n // - two blocks in a minute.\n console.log(this.blocksTravelled()/2)\n let blocksOnPeak = this.blocksTravelled()/ 2;\n return Math.ceil(blocksOnPeak)\n } else {\n // During off peak hours,\n // - three blocks in a minute,\n console.log(this.blocksTravelled()/3)\n let blocksOnPeak = this.blocksTravelled()/ 3;\n return Math.ceil(blocksOnPeak)\n }\n }", "function updateWaiting() {\n var d = new Date();\n var diff = d.getTime() - waitingTime;\n waiting = Math.floor(diff / 1000);\n }", "addLoadingTime(time) {\n this.loadTimes.push(time.totalMilliseconds);\n if (this.loadTimes.length > 100) {\n this.loadTimes.pop();\n }\n let sum = 0;\n this.loadTimes.forEach((t) => sum += t);\n this.nextLoadTimePrediction = Math.round(sum / this.loadTimes.length);\n // log(sprintf(\"New Time: %s \\t Next Prediction: %s\", time.totalMilliseconds, this.nextLoadTimePrediction));\n }", "function model_delay() {\n\t\n\treturn new Promise(resolve => setTimeout(resolve, 200));\n}", "async function timeTravelToTransition() {\n\n\n let startTimeOfNextPhaseTransition = await stakingHbbft.startTimeOfNextPhaseTransition.call();\n\n await validatorSetHbbft.setCurrentTimestamp(startTimeOfNextPhaseTransition);\n const currentTS = await validatorSetHbbft.getCurrentTimestamp.call();\n currentTS.should.be.bignumber.equal(startTimeOfNextPhaseTransition);\n await callReward(false);\n }", "function get_random_wait() {\n\tvar wait = Math.floor(Math.random() * max_wait ) + 100;\n\tconsole.log('Waiting for ' + wait + 'ms before next bet.');\n\treturn wait;\n}", "function createTimeRequirement(count){\n //As previous, converts 36 hour system to work with 24 hour data\n if (count < 0){\n count += scaledBaseLoad.length;\n }\n if (count >= scaledBaseLoad.length){\n count -= scaledBaseLoad.length;;\n }\n //From the PhD data, roughly 50/50 chance of a car being used within a short (1-3 hours) or long (5-24) time after arriving at home\n if (Math.random() < 0.5){\n return gaussianRandom(2, 6); //Short 1-3hour, arrival time independent\n }\n else{\n var distrib = [16,14,12,12,10,10,10,14,48,46,46,44,40,38,36,34,32,30,28,26,24,22,20,18]; //long time, depends on when arrives. Values are MAXIMUM wait time\n count = Math.floor(count/2); //Converts half hour times to the hour before. 16:30 -> 16:00\n maxTime = distrib[count];\n return gaussianRandom(maxTime-8, maxTime); //Avg spread of 4 hours, or 8 periods\n }\n}", "estimatedTime(peak){\n if(peak){\n return (this.blocksTravelled() / 2);\n }\n else{\n return (this.blocksTravelled() / 3);\n }\n }", "function expectedDurationOfState(state, prob){\n\t\treturn 1/(1-prob[state][state]);\n\t}", "function main() {\n var timeCharged = parseFloat(readLine());\n\n const trainingData =\n`2.81,5.62\n7.14,8.00\n2.72,5.44\n3.87,7.74\n1.90,3.80\n7.82,8.00\n7.02,8.00\n5.50,8.00\n9.15,8.00\n4.87,8.00\n8.08,8.00\n5.58,8.00\n9.13,8.00\n0.14,0.28\n2.00,4.00\n5.47,8.00\n0.80,1.60\n4.37,8.00\n5.31,8.00\n0.00,0.00\n1.78,3.56\n3.45,6.90\n6.13,8.00\n3.53,7.06\n4.61,8.00\n1.76,3.52\n6.39,8.00\n0.02,0.04\n9.69,8.00\n5.33,8.00\n6.37,8.00\n5.55,8.00\n7.80,8.00\n2.06,4.12\n7.79,8.00\n2.24,4.48\n9.71,8.00\n1.11,2.22\n8.38,8.00\n2.33,4.66\n1.83,3.66\n5.94,8.00\n9.20,8.00\n1.14,2.28\n4.15,8.00\n8.43,8.00\n5.68,8.00\n8.21,8.00\n1.75,3.50\n2.16,4.32\n4.93,8.00\n5.75,8.00\n1.26,2.52\n3.97,7.94\n4.39,8.00\n7.53,8.00\n1.98,3.96\n1.66,3.32\n2.04,4.08\n11.72,8.00\n4.64,8.00\n4.71,8.00\n3.77,7.54\n9.33,8.00\n1.83,3.66\n2.15,4.30\n1.58,3.16\n9.29,8.00\n1.27,2.54\n8.49,8.00\n5.39,8.00\n3.47,6.94\n6.48,8.00\n4.11,8.00\n1.85,3.70\n8.79,8.00\n0.13,0.26\n1.44,2.88\n5.96,8.00\n3.42,6.84\n1.89,3.78\n1.98,3.96\n5.26,8.00\n0.39,0.78\n6.05,8.00\n1.99,3.98\n1.58,3.16\n3.99,7.98\n4.35,8.00\n6.71,8.00\n2.58,5.16\n7.37,8.00\n5.77,8.00\n3.97,7.94\n3.65,7.30\n4.38,8.00\n8.06,8.00\n8.05,8.00\n1.10,2.20\n6.65,8.00`;\n\n let trainingDataArr = trainingData.split('\\n');\n trainingDataArr = trainingDataArr.map( (v, i) => {\n let temp = trainingDataArr[i].split(',');\n\n return [parseFloat(temp[0]), parseFloat(temp[1])];\n });\n\n let arrX = [];\n let arrY = [];\n\n let maximumBattery = 0;\n\n trainingDataArr.forEach( (v) => {\n if (v[1] > maximumBattery) {\n maximumBattery = v[1];\n }\n });\n\n // Ignore datapoints where maximum battery is achieved\n trainingDataArr = trainingDataArr.filter( (v) => {\n return v[1] !== maximumBattery;\n });\n\n trainingDataArr.forEach( (v) => {\n arrX.push(v[0]);\n arrY.push(v[1]);\n })\n\n // Helper functions from other problems\n function correlationCoefficient(dataArr1, dataArr2) {\n\n if (dataArr1.length !== dataArr2.length) {\n throw new Error('correlationCoefficient: The sets aren\\'t the same size.');\n }\n\n let size = dataArr1.length;\n let dataArr1Total = 0;\n let dataArr2Total = 0;\n let dataArr1SquaredTotal = 0;\n let dataArr2SquaredTotal = 0;\n let dataArr1dataArr2Total = 0;\n\n for (let i = 0; i < size; ++i) {\n dataArr1Total += dataArr1[i];\n dataArr2Total += dataArr2[i];\n dataArr1SquaredTotal += Math.pow(dataArr1[i], 2);\n dataArr2SquaredTotal += Math.pow(dataArr2[i], 2);\n dataArr1dataArr2Total += dataArr1[i] * dataArr2[i];\n }\n\n // Math is hard\n let temp2 = size * dataArr1dataArr2Total;\n let temp3 = dataArr1Total * dataArr2Total;\n let temp4 = temp2 - temp3;\n let temp5 = size * dataArr1SquaredTotal;\n let temp6 = dataArr1Total * dataArr1Total;\n let temp7 = temp5 - temp6;\n let temp8 = size * dataArr2SquaredTotal;\n let temp9 = dataArr2Total * dataArr2Total;\n let temp10 = temp8 - temp9;\n let temp11 = temp7 * temp10;\n let temp11a = Math.sqrt(temp11);\n let temp12 = temp4 / temp11a;\n\n return temp12;\n }\n\n function mean(arr) {\n return arr.reduce( (prev, curr) => {\n return prev + curr;\n }, 0) / arr.length;\n }\n\n function standardDeviation(arr) {\n let arrMean = mean(arr);\n let subtractMeanSquareArr = [];\n\n arr.forEach( (v) => {\n subtractMeanSquareArr.push(Math.pow(v - arrMean, 2));\n });\n\n return Math.sqrt(mean(subtractMeanSquareArr));\n }\n\n function regressionLine(arr1, arr2) {\n let standardDeviationX = standardDeviation(arr1);\n let standardDeviationY = standardDeviation(arr2);\n let correlation = correlationCoefficient(arr1, arr2);\n\n return correlation * (standardDeviationY / standardDeviationX);\n }\n\n let result = regressionLine(arrX, arrY) * timeCharged;\n\n if (result > maximumBattery) {\n result = maximumBattery;\n }\n\n console.log(result)\n}", "function tweakWaitTime(t) {\n t += (t*Math.random()/5*(Math.random()>.5 ? 1 : -1));\n // now we need to tweak the start time to avoid a timing problem in htmlservice \n // .. never start one within 750ms of the last one.\n var now = new Date().getTime();\n startTime_ = Math.max(now + t, startTime_+750);\n return startTime_ - now;\n }", "function compareRobots(robot1, memory1, robot2, memory2) {\n \n let robot1Total = 0;\n let robot2Total = 0;\n let numberOfTasks = 100;\n let numberOfTurns = 0;\n \n for (let i = 0; i < numberOfTasks; i++){\n //console.log(\"Task number: \", i+1)\n let village = VillageState.random();\n //console.log(\"Parcels: \", village.parcels[0])\n numberOfTurns = runTest(village, robot1, []);\n robot1Total += numberOfTurns;\n //console.log(\"Robot 1 tasks: \", numberOfTurns);\n numberOfTurns = runTest(village, robot2, []);\n //console.log(\"Robot 2 tasks: \", numberOfTurns);\n robot2Total += numberOfTurns;\n //console.log(\"Robot 1: \", robot1Total)\n //console.log(\"Robot 2: \", robot2Total)\n }\n\n let r1avg = robot1Total/numberOfTasks;\n let r2avg = robot2Total/numberOfTasks;\n\n console.log(\"Grand totals\");\n console.log(\"Number of tasks: \", numberOfTasks)\n console.log(\"Robot 1 Average: \", r1avg)\n console.log(\"Robot 2 Average: \", r2avg)\n if ( r1avg > r2avg) {\n console.log(\"Robot 2 performed more efficiently\")\n }\n else if (r1avg < r2avg){\n console.log(\"Robot 1 performed more efficiently\")\n }\n else if(r1avg == r2avg){\n console.log(\"The robots were the same efficiency\")\n } \n}", "async function main() {\n console.log(\"main\");\n let eps = 0.02;\n let initial_lr = 1.0;\n let min_lr = 0.001;\n console.log(numStates)\n for (let i = 0; i < episodes; i++) {\n if (TERMINATE) return;\n myGamePiece.totalReward = 0;\n myGamePiece.episode = i+1;\n let eta = Math.max(min_lr, initial_lr * (Math.pow(0.85, Math.floor(i))));\n console.log(eta);\n for (let j = 0; j < iterations; j++) {\n if (TERMINATE) return;\n myGamePiece.iteration = j+1;\n\n switch (speedLearning) {\n case 0: await sleep.pause(200); break;\n case 1: await sleep.pause(20); break;\n case 2: await sleep.pause(0.0001); break;\n }\n\n let stateMap = toState(myGamePiece.deltaTopBar, myGamePiece.deltaBottomBar);\n let a = stateMap.deltaTop;\n let b = stateMap.deltaBottom;\n\n if (key.random() < epsilon) {\n myGamePiece.action = Math.floor(key.random() * 2);\n } else {\n myGamePiece.action = q_table[a][b].indexOf(Math.max(...q_table[a][b]));\n }\n updateGameArea();\n myGamePiece.totalReward += (Math.pow(gamma, j)) * myGamePiece.reward;\n let stateMap_n = toState(myGamePiece.deltaTopBar, myGamePiece.deltaBottomBar);\n let a_n = stateMap_n.deltaTop;\n let b_n = stateMap_n.deltaBottom;\n q_table[a][b][myGamePiece.action] = (1 - eta) * q_table[a][b][myGamePiece.action] + (eta * (myGamePiece.reward + (gamma * Math.max(...q_table[a_n][b_n]))));\n }\n console.log(`Iteration ${i+1} -- Total reward = ${myGamePiece.totalReward} ${eta}`);\n if (speedLearning == 3) {\n await sleep.pause(0.0001);\n }\n\n }\n console.log(`${myGamePiece.totalReward} ${myGamePiece.maxScore}`);\n myGameArea.reset();\n return;\n}", "train(input, desired){\r\n this.trainingRun(input);\r\n\r\n let error = Matrix.substract(Matrix.fromArray(desired), this.output);\r\n\r\n this.error = error;\r\n /* Adjust the hidden to output layer of weights.\r\n * Then adjust the error to make it ready for bacprop. through time.\r\n */\r\n\r\n for(let i = this.weights.length -1; i > 0; i--){\r\n let inT = Matrix.transpose(this.layers[i]);\r\n let wT = Matrix.transpose(this.weights[i]);\r\n\r\n let change = Matrix.product(error, inT);\r\n this.weights[i].add(change);\r\n\r\n error = Matrix.product(wT, error);\r\n }\r\n\r\n /* Now we need to go back through time.\r\n * First of all we need to loop through all the timesteps we have taken.\r\n * T - i can be used. Herein T is the total amount of timesteps counted from 0 and i = timesteps.length.\r\n * In the end we need to multiply by the forget gate\r\n * The error vector carries the derivative back.\r\n * Before backpropagating the cell states we need to pass it through the 'hidden' filter\r\n * and through the derivative of the TANH of the cell state at that moment in time.\r\n * As that is the only time we make use of the hidden state, we only adjust o at that point in time.\r\n */\r\n\r\n //Pass the error through the Fo gate:\r\n error = Matrix.scale(this.po[this.po.length-1], error);\r\n\r\n //Change the o value with the transposed input:\r\n let Ti = Matrix.transpose(this.pInput[this.pInput.length-1]);\r\n let WoC = Matrix.product(error, Ti);\r\n this.Wf.add(WoC);\r\n\r\n //We need to enter the network via the tanH function. This is necessary it\r\n //Will not wor without this unlike the sigmoid derivatives!\r\n error = Matrix.scale(this.pc[this.pc.length-1].func(dtanH), error);\r\n\r\n let t = input.length;\r\n\r\n for(let i = 1; i < input.length; i++){\r\n //console.log(\"in here\");\r\n let Tinput = Matrix.transpose(this.pInput[t-i]);\r\n\r\n // this.WfB += error.getSum();\r\n let WfC = Matrix.product(error, Tinput);\r\n\r\n\r\n this.Wf.add(WfC);\r\n\r\n let WiC = Matrix.scale(error, this.pg[t-i]);\r\n WiC = Matrix.product(error, Tinput);\r\n this.Wi.add(WiC);\r\n\r\n let WgC = Matrix.scale(error, this.pi[t-i]);\r\n WgC = Matrix.product(error, Tinput);\r\n this.Wg.add(WgC);\r\n\r\n // let WoC\r\n\r\n error = Matrix.scale(error, this.pf[t - i]); //The the step where data is and i the amount we have stepped back in time.\r\n }\r\n }", "function calculateNextArrival(trainSeq) {\n\n// Derive the first train time and current date\n var currentDate = moment().format(\"YYYY-MM-DD\");\n var firstTraintoday = currentDate + \"T\" + trainArrayObj[trainSeq].tfirsttrain + \":00\";\n var input_date = new Date(firstTraintoday).getTime();\n var curr_date = new Date().getTime();\n\n// Iterate thru the train array to get the next train past the current time\n expired = false;\n trainNumber = 0;\n while (!expired) {\n nextTrainTime = moment(input_date).add(trainArrayObj[trainSeq].tfreq, \"minutes\")\n trainNumber++\n\n if (input_date > curr_date) {\n expired = true;\n } else {\n input_date = nextTrainTime;\n }\n }\n\n var nextTrainTimeMilitary = moment(input_date).format(\"hh:mm a\");\n\n// Calcualte the minutes away\n var now = moment(new Date(curr_date)); //todays date\n var end = moment(new Date(input_date)); // another date\n var duration = moment.duration(end.diff(now));\n var min = Math.ceil(duration.asMinutes());\n trainArrayObj[trainSeq].tnext = nextTrainTimeMilitary;\n trainArrayObj[trainSeq].tmin = min;\n}", "function estimatedComparisons() {\n\tn = idList.length;\n\tresult = n * Math.log(n) - Math.pow(2, Math.log(n)) + 1;\n\treturn Math.floor(result);\n}", "predict() {\n\n // ---- START ----\n\n console.error(`day : ${this.day}`);\n const first_actions_layer = new RoundAnalyse([0, 0, WAIT, -1, -1, this.trees, this.cells, this.mySun, this.day], 1, this.nutrients).getActionsScore();\n let last_actions_layer = [];\n\n first_actions_layer.forEach(action=>{\n last_actions_layer.push(this.makeAnAction(action));\n });\n\n\n\n // ---- LOOP ----\n\n for (let i=1; i < this.max_rec;i++){\n let is_still_updating = false;\n const new_actions_layer = [];\n last_actions_layer.forEach(action =>{\n if(action[8] > 23){\n new_actions_layer.push(action);\n }else{\n is_still_updating = true;\n new_actions_layer.push(...((new RoundAnalyse(action, i+1, this.nutrients)).getActionsScore()));\n }\n });\n\n\n if(!is_still_updating){\n console.error(`stop at ${i} : no more actions`);\n break;\n }\n\n let sorted_layer = [];\n if (this.randomly_choosed_action_nbr < new_actions_layer.length){\n for (let j = 0; j < this.randomly_choosed_action_nbr; j++) {\n const index = getRandomInt(0, new_actions_layer.length);\n sorted_layer.push(new_actions_layer[index]);\n new_actions_layer.splice(index, 1);\n }\n }else{\n sorted_layer = new_actions_layer;\n }\n\n last_actions_layer = [];\n\n sorted_layer.forEach(action => {\n if (action[8] > 23){\n last_actions_layer.push(action);\n } else {\n last_actions_layer.push(this.makeAnAction(action));\n }\n });\n const time_dif = (new Date().getTime()) - timeChecker;\n if(time_dif > this.time_stop && rounds_played > 1){\n console.error(`stop at ${i} : OUT OF TIME`);\n break;\n }else if(time_dif > this.time_stop*10 && rounds_played === 1){\n console.error(`stop at ${i} : OUT OF TIME`);\n break;\n }\n }\n\n\n // ---- RESULT ----\n\n let to_print;\n let best_action = {\n score:-9999999,\n action:WAIT,\n sourceIndex:-1,\n targetIndex: -1,\n }\n\n last_actions_layer.forEach(action => {\n if ((action[1] / action[8]) > best_action.score){\n best_action.score = action[1] / action[8];\n best_action.action = first_actions_layer[action[0]][2];\n best_action.sourceIndex = first_actions_layer[action[0]][4];\n best_action.targetIndex = first_actions_layer[action[0]][3];\n to_print = action;\n }\n });\n\n console.error(last_actions_layer.length, first_actions_layer.length);\n console.error('BEST ACTION : ');\n console.error(to_print);\n console.error(best_action);\n\n return new Action(best_action.action, best_action.targetIndex, best_action.sourceIndex);\n }", "function compareLastestFn(a, b) {\n const workA = a.deadline;\n const workB = b.deadline;\n\n let comparison = 0;\n if (workA < workB) {\n comparison = 1;\n } else if (workA > workB) {\n comparison = -1;\n }\n return comparison;\n}", "function LowLatencyThroughputModel() {\n var LLTM_MAX_MEASUREMENTS = 10; // factor (<1) is used to reduce the real needed download time when at very bleeding live edge\n\n var LLTM_SEMI_OPTIMISTIC_ESTIMATE_FACTOR = 0.8;\n var LLTM_OPTIMISTIC_ESTIMATE_FACTOR = 0.6;\n var LLTM_SLOW_SEGMENT_DOWNLOAD_TOLERANCE = 1.05;\n var LLTM_MAX_DELAY_MS = 250;\n var context = this.context;\n var instance;\n var logger;\n var measurements = {};\n\n function setup() {\n logger = Object(_core_Debug__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(context).getInstance().getLogger(instance);\n }\n /**\n * Linear regression with least squares method to get a trend function for buffer lavel at chunk receive timestamps\n * @param {*} chunkMeasurements\n * @returns linear trend function\n */\n\n\n function createBufferLevelTrendFunction(chunkMeasurements) {\n var result = {};\n var sumX = 0;\n var sumY = 0;\n var sumXY = 0;\n var sumXSq = 0;\n var N = chunkMeasurements.length;\n\n for (var i = 0; i < N; ++i) {\n sumX += chunkMeasurements[i].chunkDownloadTimeRelativeMS;\n sumY += chunkMeasurements[i].bufferLevel;\n sumXY += chunkMeasurements[i].chunkDownloadTimeRelativeMS * chunkMeasurements[i].bufferLevel;\n sumXSq += chunkMeasurements[i].chunkDownloadTimeRelativeMS * chunkMeasurements[i].chunkDownloadTimeRelativeMS;\n }\n\n result.m = (sumXY - sumX * sumY / N) / (sumXSq - sumX * sumX / N);\n result.b = sumY / N - result.m * sumX / N;\n return function (x) {\n return result.m * x + result.b;\n };\n }\n\n function isBufferSafeAndStable(lastMeasurements) {\n var isBufferSafeAndStable = true;\n var lastBitrate;\n var aveBufferLevelLastSegements = lastMeasurements.reduce(function (prev, curr) {\n return prev + curr.bufferLevelAtSegmentEnd;\n }, 0) / lastMeasurements.length;\n lastMeasurements.forEach(function (m) {\n // inner segment buffer stability\n if (Math.abs(m.bufferLevelAtSegmentEnd / m.bufferLevelAtSegmentStart) < 0.95) {\n isBufferSafeAndStable = false;\n } // inter segment buffer stability\n\n\n if (m.bufferLevelAtSegmentEnd / aveBufferLevelLastSegements < 0.8) {\n isBufferSafeAndStable = false;\n } // representation bitrate remained at least constant\n\n\n if (!lastBitrate) {\n lastBitrate = m.bitrate;\n } else if (lastBitrate > m.bitrate) {\n isBufferSafeAndStable = false;\n }\n });\n return isBufferSafeAndStable;\n }\n /**\n * Based on the MPD, timing and buffer information of the last recent segments and their chunks\n * the most stable download time (in milliseconds) is calculated.\n * @param {*} request HTTPLoader request object\n * @returns download time in milliseconds of last fetched segment\n */\n\n\n function getEstimatedDownloadDurationMS(request) {\n var lastMeasurement = measurements[request.mediaType].slice(-1).pop();\n var lastThreeMeasurements = measurements[request.mediaType].slice(-3); // calculate and remember the buffer level trend during the last fetched segment\n\n var lastChunkRelativeTimeMS = lastMeasurement.chunkMeasurements.slice(-1).pop().chunkDownloadTimeRelativeMS;\n lastMeasurement.bufferLevelAtSegmentStart = lastMeasurement.getEstimatedBufferLevel(lastChunkRelativeTimeMS / 2);\n lastMeasurement.bufferLevelAtSegmentEnd = lastMeasurement.getEstimatedBufferLevel(lastChunkRelativeTimeMS);\n var isBufferStable = isBufferSafeAndStable(lastThreeMeasurements);\n var selectedOptimisticFactor = isBufferStable ? LLTM_OPTIMISTIC_ESTIMATE_FACTOR : LLTM_SEMI_OPTIMISTIC_ESTIMATE_FACTOR; // fetch duration was longer than segment duration, but buffer was stable\n\n if (lastMeasurement.isBufferStable && lastMeasurement.segDurationMS * LLTM_SLOW_SEGMENT_DOWNLOAD_TOLERANCE < lastMeasurement.fetchDownloadDurationMS) {\n return lastMeasurement.fetchDownloadDurationMS;\n } // buffer is drying or fetch took too long\n\n\n if (!isBufferStable || lastMeasurement.segDurationMS < lastMeasurement.fetchDownloadDurationMS) {\n return lastMeasurement.fetchDownloadDurationMS * LLTM_SEMI_OPTIMISTIC_ESTIMATE_FACTOR;\n } // did we requested a fully available segment? -> most accurate throughput calculation\n // we use adjusted availability start time to decide\n // Note: this \"download mode\" usually happens at startup and if requests are delayed artificially\n\n\n if (lastMeasurement.adjustedAvailabilityStartTimeMS <= lastMeasurement.requestTimeMS + lastMeasurement.throughputCapacityDelayMS - lastMeasurement.segDurationMS) {\n return lastMeasurement.fetchDownloadDurationMS * LLTM_SEMI_OPTIMISTIC_ESTIMATE_FACTOR;\n } // get all chunks that have been downloaded before fetch reached bleeding live edge\n // the remaining chunks loaded at production rate we will approximated\n\n\n var chunkAvailablePeriod = lastMeasurement.requestTimeMS + lastMeasurement.throughputCapacityDelayMS - lastMeasurement.adjustedAvailabilityStartTimeMS;\n var chunkBytesBBLE = 0; // BBLE -> Before bleeding live edge\n\n var chunkDownloadtimeMSBBLE = 0;\n var chunkCount = 0;\n\n for (var index = 0; index < lastMeasurement.chunkMeasurements.length; index++) {\n var chunk = lastMeasurement.chunkMeasurements[index];\n\n if (chunkAvailablePeriod < chunkDownloadtimeMSBBLE + chunk.chunkDownloadDurationMS) {\n break;\n }\n\n chunkDownloadtimeMSBBLE += chunk.chunkDownloadDurationMS;\n chunkBytesBBLE += chunk.chunkBytes;\n chunkCount++;\n }\n\n if (chunkAvailablePeriod < 0) {\n logger.warn('request time was before adjusted availibitly start time');\n } // there have to be some chunks available (20% of max count)\n // otherwise we are at bleeding live edge and the few chunks are insufficient to estimate correctly\n\n\n if (chunkBytesBBLE && chunkDownloadtimeMSBBLE && chunkCount > lastMeasurement.chunkMeasurements.length * 0.2) {\n var downloadThroughput = chunkBytesBBLE / chunkDownloadtimeMSBBLE; // bytes per millesecond\n\n var estimatedDownloadtimeMS = lastMeasurement.segmentBytes / downloadThroughput; // if real download was shorter then report this incl. semi optimistical estimate factor\n\n if (lastMeasurement.fetchDownloadDurationMS < estimatedDownloadtimeMS) {\n return lastMeasurement.fetchDownloadDurationMS * selectedOptimisticFactor;\n }\n\n return estimatedDownloadtimeMS * selectedOptimisticFactor;\n } // when we are to tight at live edge and it's stable then\n // we start to optimistically estimate download time\n // in such a way that a switch to next rep will be possible\n // optimistical estimate: assume download was fast enough for next higher rendition\n\n\n var nextHigherBitrate = lastMeasurement.bitrate;\n lastMeasurement.bitrateList.some(function (b) {\n if (b.bandwidth > lastMeasurement.bitrate) {\n nextHigherBitrate = b.bandwidth;\n return true;\n }\n }); // already highest bitrate?\n\n if (nextHigherBitrate === lastMeasurement.bitrate) {\n return lastMeasurement.fetchDownloadDurationMS * selectedOptimisticFactor;\n }\n\n return selectedOptimisticFactor * lastMeasurement.segmentBytes * 8 * 1000 / nextHigherBitrate;\n }\n /**\n * Get calculated value for a safe artificial delay of the next request to allow to accumulate some chunks.\n * This allows better line throughput measurement.\n * @param {*} request\n * @param {*} currentBufferLevel current buffer level in milliseconds\n * @returns delay in milliseconds\n */\n\n\n function getThroughputCapacityDelayMS(request, currentBufferLevelMS) {\n var lastThreeMeasurements = measurements[request.mediaType] && measurements[request.mediaType].slice(-3);\n\n if (!lastThreeMeasurements || lastThreeMeasurements.length < 3) {\n return 0;\n } // in case not stable buffer, no artificially delay for the next request\n\n\n if (!isBufferSafeAndStable(lastThreeMeasurements)) {\n return 0;\n } // allowed artificial delay is the min of quater of buffer level in milliseconds and LLTM_MAX_DELAY_MS\n\n\n return currentBufferLevelMS / 4 > LLTM_MAX_DELAY_MS ? LLTM_MAX_DELAY_MS : currentBufferLevelMS / 4;\n }\n /**\n * Add some measurement data for bookkeeping and being able to derive decisions on estimated throughput.\n * @param {*} request HTTPLoader object to get MPD and media info from\n * @param {*} fetchDownloadDurationMS Duration how long the fetch actually took\n * @param {*} chunkMeasurements Array containing chunk timings and buffer levels\n * @param {*} requestTimeMS Timestamp at which the fetch was initiated\n * @param {*} throughputCapacityDelayMS An artificial delay that was used for this request\n */\n\n\n function addMeasurement(request, fetchDownloadDurationMS, chunkMeasurements, requestTimeMS, throughputCapacityDelayMS) {\n if (request && request.mediaType && !measurements[request.mediaType]) {\n measurements[request.mediaType] = [];\n }\n\n var bitrateEntry = request.mediaInfo.bitrateList.find(function (item) {\n return item.id === request.representationId;\n });\n measurements[request.mediaType].push({\n index: request.index,\n repId: request.representationId,\n mediaType: request.mediaType,\n requestTimeMS: requestTimeMS,\n adjustedAvailabilityStartTimeMS: request.availabilityStartTime.getTime(),\n segDurationMS: request.duration * 1000,\n chunksDurationMS: chunkMeasurements.reduce(function (prev, curr) {\n return prev + curr.chunkDownloadDurationMS;\n }, 0),\n segmentBytes: chunkMeasurements.reduce(function (prev, curr) {\n return prev + curr.chunkBytes;\n }, 0),\n bitrate: bitrateEntry && bitrateEntry.bandwidth,\n bitrateList: request.mediaInfo.bitrateList,\n chunkMeasurements: chunkMeasurements,\n fetchDownloadDurationMS: fetchDownloadDurationMS,\n throughputCapacityDelayMS: throughputCapacityDelayMS,\n getEstimatedBufferLevel: createBufferLevelTrendFunction(chunkMeasurements.slice(1)) // don't use first chunk's buffer level\n\n }); // maintain only a maximum amount of most recent measurements\n\n if (measurements[request.mediaType].length > LLTM_MAX_MEASUREMENTS) {\n measurements[request.mediaType].shift();\n }\n }\n\n instance = {\n setup: setup,\n addMeasurement: addMeasurement,\n getThroughputCapacityDelayMS: getThroughputCapacityDelayMS,\n getEstimatedDownloadDurationMS: getEstimatedDownloadDurationMS\n };\n setup();\n return instance;\n}", "function enough(cap, on, wait){\nif(on+wait>cap){\nreturn (on+wait)-cap\n}else{\nreturn 0\n}\n\n}", "function update_state(model, new_time) {\n var time = new_time - model.start_realtime;\n var match = update_timeactions(model, time);\n var model$1 = match[0];\n var model_start_realtime = model$1.start_realtime;\n var model_msgs = model$1.msgs;\n var model_resource_values = model$1.resource_values;\n var model_bool_flags = model$1.bool_flags;\n var model_int_flags = model$1.int_flags;\n var model_float_flags = model$1.float_flags;\n var model$2 = {\n start_realtime: model_start_realtime,\n current_realtime: new_time,\n gametime: time,\n msgs: model_msgs,\n resource_values: model_resource_values,\n bool_flags: model_bool_flags,\n int_flags: model_int_flags,\n float_flags: model_float_flags\n };\n return [\n model$2,\n batch$1({\n hd: match[1],\n tl: /* [] */0\n })\n ];\n }", "function timeToWait() {\n let timesList = list.filter(times => times.status == \"done\");\n let times = [];\n for (let i = 0; i < timesList.length; i++) {\n times.push(timesList[i].timeServiced);\n }\n if (times.length > 0) {\n let sum = times.reduce((previous, current) => current += previous);\n avg = sum / times.length;\n return avg;\n }\n}", "function updateTrainingPrediction() {\n var trainingType = document.getElementById('trainingSelect').value;\n if (trainingType==TRAININGTYPE.MULTI) {\n var attsToTrain = []\n if (multiTrainSelect1.value != \"\") {\n attsToTrain.push(multiTrainSelect1.value);\n }\n if (multiTrainSelect2.value != \"\") {\n attsToTrain.push(multiTrainSelect2.value);\n }\n if (multiTrainSelect3.value != \"\") {\n attsToTrain.push(multiTrainSelect3.value);\n }\n if (multiTrainSelect4.value != \"\") {\n attsToTrain.push(multiTrainSelect4.value);\n }\n if (attsToTrain.length < 2) {\n trainPredictionSpan.innerHTML = \"Need to choose at least 2 attributes to multi train\";\n return;\n }\n var multiplier = 0;\n if (attsToTrain.length==2) {\n multiplier = 1.05;\n }\n else if (attsToTrain.length==3) {\n multiplier = 1.2;\n }\n else {\n multiplier = 1.3;\n }\n var logMsg = '<b>Multi Train Prediction</b><br/>';\n for (var a=0; a<attsToTrain.length; a++) {\n var gain = calculateTrainingGain(attsToTrain[a], TRAININGTYPE.MULTI, multiplier);\n logMsg += attsToTrain[a]+' : '+gain+'%';\n logMsg += getTrainingWarningMsg(attsToTrain[a], gain);\n }\n trainPredictionSpan.innerHTML = logMsg;\n } else {\n var light = calculateTrainingGain(singleTrainSelect.value, TRAININGTYPE.LIGHT);\n var normal = calculateTrainingGain(singleTrainSelect.value, TRAININGTYPE.NORMAL);\n var intense = calculateTrainingGain(singleTrainSelect.value, TRAININGTYPE.INTENSE);\n var logMsg = '<b>Single Training Prediction</b><br/>'+singleTrainSelect.value+'<br/>';\n logMsg += 'Intense\\t: '+intense+'% ';\n logMsg += getTrainingWarningMsg(singleTrainSelect.value, intense);\n logMsg += 'Normal\\t: '+normal+'% ';\n logMsg += getTrainingWarningMsg(singleTrainSelect.value, normal);\n logMsg += 'Light\\t\\t: '+light+'% ';\n logMsg += getTrainingWarningMsg(singleTrainSelect.value, light);\n trainPredictionSpan.innerHTML = logMsg;\n }\n}", "function logTime() {\n var loadingTimeLabel = document.querySelector('#loading-time-label');\n var interpolationTimeLabel =\n document.querySelector('#interpolation-time-label');\n var fetchingModelTimeLabel = document.querySelector('#fetching-time-label');\n loadingTimeLabel.textContent = (performance.now() - startTime) + ' ms';\n interpolationTimeLabel.textContent = interpolationTime + ' ms';\n fetchingModelTimeLabel.textContent = fetchingModelTime + ' ms';\n}", "function runModel(carsTimeList, capacity, chargeRate, carsList, algorithmType){\n var timeStep;\n var currentCars = [];\n var electricityUsageOverTime = [];\n var car;\n\n for (timeStep = 0; timeStep < numberOfPeriods; timeStep++){\n //Adds cars that should arrive at this time step\n var carsToAdd = carsTimeList[timeStep];\n for (carsToAdd; carsToAdd > 0; carsToAdd--){\n currentCars.push(carsList.shift());\n }\n //Finds the base energy consumption at this time\n var baseLoadUsage = getScaledBaseLoad(timeStep-12); //-12 to allow for the first 6 hours\n var availableElec = maximumCapacity - baseLoadUsage; //Finds all electricity that can be allocated to EVs\n var electricityUsed = 0;\n var carCounter;\n\n //Runs the desired algorith. 0=greedy, 1=fairContention, 2=valueMax\n if (algorithmType == 2){\n\n //calculates value density for all cars\n for (carCounter = currentCars.length-1; carCounter >= 0; carCounter--){\n car = currentCars[carCounter];\n car.density = valueDensity(car.remainingElectricity, car.timeRemaining, chargeRate, car).toFixed(4);\n }\n //Prioritises based on value density, or time remaining if tie.\n currentCars.sort(function (car1, car2) {\n return car1.density < car2.density ? -1 : car1.density == car2.density ? car1.timeRemaining > car2.timeRemaining ? 1 : -1 : 1;\n });\n carCounter = 0;\n //charges each car\n for (carCounter = currentCars.length-1; carCounter >= 0; carCounter--){ //going backwards allows removal of elements mid-loop without affecting index\n car = currentCars[carCounter];\n //console.log(currentCars[carCounter].density + \"t=\"+currentCars[carCounter].timeRemaining); //for verification of correct ordering\n //Gives electricity to the car based on the smallest of the parameters.\n var electricityAllocatedThisCar = Math.min(chargeRate, availableElec, car.remainingElectricity);\n electricityUsed += electricityAllocatedThisCar; //Car only uses electricity up to its capacity\n car.remainingElectricity -= electricityAllocatedThisCar;\n //Reduces remaining electricity available in this time period\n availableElec -= electricityAllocatedThisCar;\n\n //checks if car is fully charged or ran out of time\n if(carLeaving(car)){\n currentCars.splice(carCounter, 1); //removes this car if fuelled or out of time\n }\n }\n //records how much EV electricity has been used at this timestep\n electricityUsageOverTime.push(electricityUsed);\n }\n\n else{ //for greedy or fairContention algorithms\n //All cars get same amount in these algorithms, so can calculate it early\n //Otherwise similar to above\n var electricityPerCar = allocateElectricity(currentCars.length, availableElec, chargeRate, algorithmType);\n for (carCounter = currentCars.length-1; carCounter >= 0; carCounter--){ //allows splicing mid-loop\n car = currentCars[carCounter];\n electricityUsed += Math.min(electricityPerCar, car.remainingElectricity); //Car only uses electricity up to its capacity\n car.remainingElectricity -= electricityPerCar;\n if(carLeaving(car)){\n currentCars.splice(carCounter, 1); //removes this car if fuelled or out of time\n }\n }\n electricityUsageOverTime.push(electricityUsed);\n }\n }\n var carCount;\n //Removes any remaining cars at the end.\n for (carCount = 0; carCount < currentCars.length; carCount++){\n var car = currentCars[carCount];\n car.timeRemaining = 0;\n carLeaving(car);\n }\n outputResults(electricityUsageOverTime);\n}", "infectionByRequestedTime() {\n const factor = this.powerFactor();\n return this.currentlyInfected() * 2 ** factor;\n }", "function compareRobots(robot1, memory1, robot2, memory2) {\n const NUMBER_OF_TASKS = 100;\n const turn_counts = {robot1: 0, robot2: 0};\n let average_robot1 = 0;\n let average_robot2 = 0;\n for(let counter = 0; counter < NUMBER_OF_TASKS; counter++) {\n let villageState = (new classes.VillageState(null, null, roadGraph)).random();\n turn_counts.robot1 += utils.runRobot(villageState, robot1, memory1, roadGraph);\n turn_counts.robot2 += utils.runRobot(villageState, robot2, memory2, roadGraph);\n }\n\n average_robot1 = utils.calculateAverage(turn_counts.robot1, NUMBER_OF_TASKS);\n average_robot2 = utils.calculateAverage(turn_counts.robot2, NUMBER_OF_TASKS);\n\n console.log(\"Robot1: \" + average_robot1);\n console.log(\"Robot2: \" + average_robot2);\n}", "function calcTimeToNextBlink() {\n return randomNormal(SKEW_BLINKS_EARLER) * TIME_BETWEEN_BLINKS_MAX;\n}", "approaches() {\n this._time_until_arrival--;\n }", "function main() {\n let config = {\n \"timeBegin\": new Date(Date.UTC(2016, 8, 17, 0, 0, 0)),\n \"timeEnd\": new Date(Date.UTC(2016, 8, 17, 23, 0, 0)),\n \"goalPattern\": {\n \"metric\": \"invidi.webapp.localhost_localdomain.request.total_response_time.mean\",\n \"timeBegin\": 1474106851,\n \"timeEnd\": 1474153707\n },\n \"iterationCount\": 10000,\n \"initialReward\": -1000.0,\n \"reinforcementLearning\": {\n \"stepSize\": 0.1,\n \"discountRate\": 0.9\n },\n \"resultFile\": \"/tmp/result.json\"\n };\n\n let result = (new RLAdapter).train(config);\n\n // todo: move this job to c++\n result = result.filter(r => r.reward != null);\n result = result.sort((a, b) => {\n return b.reward - a.reward;\n });\n\n result = result.slice(0, 40);\n\n var timeBeginUTC = moment(timeBegin).utc().format('YYYY-MM-DD HH:mm:ss');\n var timeEndUTC = moment(timeEnd).utc().format('YYYY-MM-DD HH:mm:ss');\n let dashboardOptions = {\n title: 'Reinforcement Learning Model for response time',\n from: timeBeginUTC,\n to: timeEndUTC,\n rows: []\n };\n dashboardOptions.rows = result.map(r => {\n return {\n title: `${r.sourcePattern.metric} - ${r.reward}`,\n targetName: r.sourcePattern.metric\n };\n });\n\n dashboardOptions.rows.unshift({\n title: \"invidi.webapp.localhost_localdomain.request.total_response_time.mean\",\n targetName: \"invidi.webapp.localhost_localdomain.request.total_response_time.mean\"\n });\n\n fs.writeFileSync(\n 'dashboard.json',\n JSON.stringify(generateDashboard(dashboardOptions))\n );\n}", "function timeTilNextTrain(trainFrequency, firstTrainTime) {\n // Assumptions\n var tFrequency = trainFrequency;\n\n // Time is 3:30 AM\n var firstTime = firstTrainTime;\n\n // First Time (pushed back 1 year to make sure it comes before current time)\n var firstTimeConverted = moment(firstTime, \"HH:mm\").subtract(1, \"years\");\n console.log(firstTimeConverted);\n\n // Current Time\n var timern = moment();\n console.log(\"CURRENT TIME: \" + moment(timern).format(\"hh:mm\"));\n\n // Difference between the times\n var diffTime = moment().diff(moment(firstTimeConverted), \"minutes\");\n console.log(\"DIFFERENCE IN TIME: \" + diffTime);\n\n // Time apart (remainder)\n var tRemainder = diffTime % tFrequency;\n console.log(tRemainder);\n\n // Minute Until Train\n var tMinutesTillTrain = tFrequency - tRemainder;\n console.log(\"MINUTES TILL TRAIN: \" + tMinutesTillTrain);\n\n // Next Train\n var nextTrain = moment().add(tMinutesTillTrain, \"minutes\");\n console.log(\"ARRIVAL TIME: \" + moment(nextTrain).format(\"hh:mm\"));\n\n return nextTrain;\n}", "function calcMaxPossibleBTGain() {\n var a = getAge();\n var d = getDay();\n var trainingDaysLeft = getTP()/2;\n while (a <= plateau_age) {\n // use constants for the length of the offseason and preseason\n d++;\n if (d>(40+offseasonLength)) {\n d = (0-preseasonLength);\n }\n if (d>0 && d<41) {\n a++;//seasonal day, add age\n }\n trainingDaysLeft++;\n }\n return (trainingDaysLeft-1)*6;\n}", "function toggleTrain() {\n\tif(dead)loop();\n\tstate = TRAINING;\n\tnextGeneration();\n}", "doPass_() {\n const now = Date.now();\n\n // The \"most ready\" recognizer is the youngest in the \"ready\" set.\n // Otherwise we wouldn't wait for it at all.\n let readyIndex = -1;\n for (let i = 0; i < this.recognizers_.length; i++) {\n if (!this.ready_[i]) {\n if (this.pending_[i] && this.pending_[i] < now) {\n // Pending state expired. Reset.\n this.stopTracking_(i);\n }\n continue;\n }\n if (readyIndex == -1 || this.ready_[i] > this.ready_[readyIndex]) {\n readyIndex = i;\n }\n }\n\n if (readyIndex == -1) {\n // Nothing to do.\n return;\n }\n\n // Look for conflicts.\n let waitTime = 0;\n for (let i = 0; i < this.recognizers_.length; i++) {\n if (this.ready_[i] || !this.tracking_[i]) {\n continue;\n }\n waitTime = Math.max(waitTime, this.pending_[i] - now);\n }\n\n if (waitTime < 2) {\n // We waited long enough.\n this.startEventing_(readyIndex);\n return;\n }\n\n // Some conflicts: have to wait to see who wins.\n this.pass_.schedule(waitTime);\n }", "async function predict() {\n // predict can take in an image, video or canvas html element\n const prediction = await model.predict(webcam.canvas);\n for (let i = 0; i < maxPredictions; i++) {\n// console.log(\"am i in?\")\n var p_Bee = prediction[i].probability.toFixed(2);\n var spacies = prediction[i].className;\n \n var currentTime = new Date();\n var timeDiff = currentTime - lastTime;\n if (timeDiff>timegap) {console.log(\"Times up. Good to go!\")}\n \n if (p_Bee>=threshold && spacies ==targetClass && timeDiff>timegap) {\n \n console.log(\"Beeeeee!!!\")\n\n // Run the code below once the probability of a specific spacy (i.e., bee) reaches the threshold\n \n //send the json data back to the server, using ajax\n $.getJSON(window.location.origin + \"/cameradatatransfer/\",//receiving url\n {p_Bee: p_Bee}//data that are sent back to server\n )\n lastTime = currentTime\n\n countB++; // counting bees\n\n };\n const classPrediction =\n prediction[i].className + \": \" + prediction[i].probability.toFixed(2);\n labelContainer.childNodes[i].innerHTML = classPrediction; // display probabilities\n\n // display bee counts\n const countDisplay =\n \"Count Bees: \" + countB;\n// console.log(classPrediction);\n labelContainer.childNodes[1].innerHTML = countDisplay;\n }\n\n}", "function calcNextTrain(p1, p2) {\n\n var tFrequency = p1;\n var firstTime = p2;\n\n // First Time (pushed back 1 year to make sure it comes before current time)\n var firstTimeConverted = moment(firstTime, \"hh:mm\").subtract(1, \"years\");\n\n var currentTime = moment();\n\n var diffTime = moment().diff(moment(firstTimeConverted), \"minutes\");\n\n var tRemainder = diffTime % tFrequency;\n\n tMinutesTillTrain = tFrequency - tRemainder;\n\n nextTrain = moment().add(tMinutesTillTrain, \"minutes\");\n nextTrain = moment(nextTrain).format(\"hh:mm A\");\n\n return [nextTrain, tMinutesTillTrain];\n }", "function WorkerTrained(job, count) {\n\tif (typeof(count)==='undefined') { count = 1; }\n\tif (count > Jobs[job].training) { console.log(\"Worker training - Converting more workers than we have training.\"); }\n\t\n\tJobs[job].training -= count;\n\tJobs[job].working += count;\n}", "function compareRobots(robot1, memory1, robot2, memory2){\n\tlet turns1 = 0, turns2 = 0;\n\tfor (let i=0; i<100; i++){\n\t\tlet task = VillageState.random();\n\t\tturns1 = turns1 + runRobot(task, robot1, memory1);\n\t\tturns2 = turns2 + runRobot(task, robot2, memory2);\n\t}\n\treturn [turns1/100, turns2/100];\n}", "function decisionStumpTest(inst, model) {\n if (!model) {\n // this is a leaf that never received any data... \n return 1;\n }\n return inst[model.ri] < model.thr ? 1 : -1;\n\n }", "compareArrivalTimes(a, b){\n const stationA = a.timeTableRows.find(station => station.stationShortCode === this.state.station.stationShortCode\n && station.type === this.state.stopType);\n const stationB = b.timeTableRows.find(station => station.stationShortCode === this.state.station.stationShortCode\n && station.type === this.state.stopType);\n\n const timeA = new Date(stationA.liveEstimateTime || stationA.scheduledTime);\n const timeB = new Date(stationB.liveEstimateTime || stationB.scheduledTime);\n\n return timeA - timeB;\n }", "function howLongDidItTake() {\n\tvar end, start;\n\t\n\tstart = new Date();\n\t\n\t for(var i = 0; i < 10000; i++) {\n\t console.log(Math.sqrt(i));\n\t }\n\t\n\tend = new Date();\n \n var totalTime = end.getTime() - start.getTime();\n return 'This function took ' + totalTime + ' mseconds';\n\t\n\t// use date object's .getTime() method to get difference in milliseconds\n}", "function work(ms) {\n let now = Date.now();\n while (Date.now() < now + ms) {}\n return now % 3 > 0; // semi-random output\n}", "function calcAwaitingTime(arrMin, depMin, arrHours, depHours) {\n\n\n var awaiting;\n if (depHours > arrHours) {\n if (arrMin > depMin) {\n awaiting = 60 - (arrMin - depMin);\n }\n else {\n awaiting = 60 + (depMin - arrMin);\n\n }\n\n }\n else {\n\n awaiting = depMin - arrMin;\n\n }\n return awaiting;\n\n\n}", "function expectedWaitTimes(lambda, mu, priorResults, results) {\n // For reference:\n // first row of queueStats contains headers\n // queueStats[0] = number of build minions\n // queueStats[1] = avgNumWaiting in queue\n // queueStast[2] = avgWaitDuration in queue\n // queueStats[3] = avgMinionUtilization\n\n var queueStats = priorResults;\n var resultsExpectedWaitAll = [];\n var minuteBuckets = ['Minions', 0.5, 5, 10, 15, 20, 25, 30]; // array of wait values in minutes to calc prob for\n resultsExpectedWaitAll.push(minuteBuckets);\n\n var k = queueStats.length;\n for (var j=1; j<=k-1; j++) {\n var resultsExpectedWaitNumMinions = [];\n var numBuildMinions = queueStats[j][0];\n var avgNumWaiting = queueStats[j][1];\n var avgWaitDuration = queueStats[j][2];\n var avgMinionUtilization = queueStats[j][3];\n\n resultsExpectedWaitNumMinions.push(roundNum(numBuildMinions, 2));\n\n for (var l=1; l<=minuteBuckets.length - 1; l++) {\n resultsExpectedWaitNumMinions.push(\n roundNum((1 - (1 - avgMinionUtilization)/avgMinionUtilization * avgNumWaiting *\n Math.exp((lambda - numBuildMinions * mu) * minuteBuckets[l] / 60)), 2));\n }\n resultsExpectedWaitAll.push(resultsExpectedWaitNumMinions);\n }\n return results(null, [resultsExpectedWaitAll, queueStats]);\n}", "function findNextArrival() {\n let now = moment()\n let currentTime = moment(now).format('hh:mm')\n let firstTrain = moment(firstTrainTime, 'HH:mm')\n // find difference between now and when the first train leaves\n let diff = moment().diff(firstTrain)\n\n let nextTrain, minutesUntilTrain\n\n // train hasn't left yet\n if (diff < 0) {\n nextArrival = moment(firstTrain).format('LT')\n diff = firstTrain.diff(moment(), 'minutes')\n minutesUntilTrain = diff\n }\n // first train has already left\n else {\n diff = moment().diff(firstTrain, 'minutes')\n let remainder = diff % frequency\n minutesUntilTrain = frequency - remainder\n nextTrain = moment().add(minutesUntilTrain, 'minutes')\n nextArrival = moment(nextTrain).format('LT')\n }\n return [nextArrival, minutesUntilTrain]\n}", "setupTimes(){\n\n\n this.fixation_time_1 = 4;\n this.fixation_time_2 = 1;\n\n this.learn_time = 0.4 * this.stimpair.learn.getDifficulty();\n this.test_time = this.learn_time;\n\n this.total_loop_time = this.learn_time+this.fixation_time_1+this.test_time+this.fixation_time_2;\n\n this.t_learn = SchedulerUtils.getStartEndTimes(0,this.learn_time);\n\n this.t_test = SchedulerUtils.getStartEndTimes(this.t_learn.end+this.fixation_time_1,this.test_time);\n\n console.log(\"times: \",\"fixation: \",this.initial_fixation,\" learn: \",this.learn_time,\" total: \",this.total_loop_time);\n\n }", "function singleTrain() {\n var tpCost = 2;\n if (tpCost > getTP()) {\n if (!autoTrain) {\n log('Not enough training points. Need '+tpCost, true);\n }\n } else {\n var trainingType = document.getElementById('trainingSelect').value;\n var btGain = 0;\n if (trainingType==TRAININGTYPE.LIGHT) {\n btGain = 6;\n }\n else if (trainingType==TRAININGTYPE.NORMAL) {\n btGain = 4;\n }\n else if (trainingType==TRAININGTYPE.INTENSE) {\n btGain = 2;\n }\n var increase = calculateTrainingGain(singleTrainSelect.value, trainingType);\n\n if (trainAttribute(singleTrainSelect.value, increase)) {\n setTP(getTP()-tpCost);\n setBonusTokens(getBonusTokens()+btGain);\n // keep training if there's left over TP\n if (autoTrain) {\n train();\n }\n }\n }\n}", "function minTime(machines, goal) {\n let fastest = Number.MAX_VALUE; // máquina más rápida\n let slowest = 0; // máquina más lenta\n const n = machines.length;\n /*\n mapa de maquinas en forma {\"dias por unidad\" : cantidad de maquinas} sirve para reducir \n iteraciones en el cáculo de la producción de unidades \n */\n const daysMachines = new Map();\n\n machines.forEach(days => {\n daysMachines.set(days, daysMachines.get(days) ? daysMachines.get(days) + 1 : 1)\n \n //busqueda de las máquinas más rapida y más lenta\n if(days < fastest){\n fastest = days;\n }\n\n if(days > slowest){\n slowest = days;\n }\n });\n // calculo de límites del rango de días de búsqueda\n let lower = Math.ceil(goal * fastest/n); // rango inferior, suponiendo n máquinas igual a la más rápida\n let upper = Math.ceil(goal * slowest/n); // rango inferior, suponiendo n máquinas igual a la más lenta\n\n while(upper - lower > 1){\n\n let mid = Math.floor(lower + (upper - lower) / 2);\n\n const numUnits = numberOfUnits(daysMachines, mid);\n\n\n if(numUnits < goal){ //solo si numUnits es estrictamente inferior a la meta, se busca en subrango de días mayores\n lower = mid;\n } else {\n upper = mid;\n }\n }\n\n return upper; // se devuelve el ceiling del rango, ya que lower arroja una canitdad de unidades menores a la meta\n}", "function runTestRAF() {\n // How long in ms we want each trial to take\n // Must be much greater than 16 (16ms is the v-sync rate)\n const GOAL_TIME = 200;\n\n function runTrial(numRuns) {\n if (currentTest.preRun) currentTest.preRun();\n let startTime = PerfTestRunner.now();\n for (var i = 0; i < numRuns; i++) {\n currentTest.doRun();\n }\n requestAnimationFrame(() => {\n let elapsedTime = PerfTestRunner.now() - startTime;\n let runsPerSecond = numRuns * 1000 / elapsedTime;\n PerfTestRunner.measureValueAsync(runsPerSecond);\n if (!isTestDone) runTrial(numRuns, startTime);\n });\n if (currentTest.ensureComplete) currentTest.ensureComplete();\n if (currentTest.postRun) currentTest.postRun();\n }\n\n // Figure out how many times currentTest.doRun() + RAF will be required\n // to last GOAL_TIME\n function calculateNumberOfRuns(resolve, numRuns) {\n numRuns = numRuns || 1;\n if (currentTest.preRun) currentTest.preRun();\n const startTime = PerfTestRunner.now();\n\n for (var i = 0; i < numRuns; i++) {\n currentTest.doRun();\n }\n\n requestAnimationFrame(() => {\n let elapsedTime = PerfTestRunner.now() - startTime;\n if (elapsedTime >= GOAL_TIME) {\n const timePerRun = elapsedTime / numRuns;\n const numRunsFinal = Math.round(GOAL_TIME / timePerRun);\n if (currentTest.ensureComplete) currentTest.ensureComplete();\n if (currentTest.postRun) currentTest.postRun();\n resolve(numRunsFinal);\n } else {\n calculateNumberOfRuns(resolve, numRuns * 2);\n }\n });\n }\n\n try {\n new Promise(function(resolve, reject) {\n calculateNumberOfRuns(resolve);\n }).then(function(numberOfRuns) {\n runTrial(numberOfRuns);\n });\n } catch(err) {\n CanvasRunner.logFatalError(\"test fails due to GPU issue. \" + err);\n throw err;\n }\n }", "function testCoordinationRatioInfDiffWorks3() {\n debug(arguments.callee.name);\n reset();\n\n task6.setProperty('coordinationRatioInf', '1.5');\n task6.setProperty('coordinationRatioSup', '1.2');\n\n assign(informaticien1, task6);\n assign(informaticien2, task6);\n assign(commercial1, task6);\n assign(commercial2, task6);\n assign(designer1, task6);\n assign(designer2, task6);\n reserve(informaticien1, 1, 2);\n reserve(informaticien2, 1, 2);\n reserve(commercial1, 1, 2);\n reserve(commercial2, 1, 2);\n reserve(designer1, 1, 2);\n reserve(designer2, 1, 2);\n\n doNextPeriod(3); // -> Executing week 2\n checkProperty(task6, 'completeness', 80, arguments.callee.name); //ancien 81% @fixme @diff\n checkProperty(task6, 'fixedCosts', 500, arguments.callee.name); //ancien 500\n checkProperty(task6, 'wages', 1500, arguments.callee.name); //ancien 1500\n checkProperty(task6, 'quality', 100, arguments.callee.name); //ancien 100\n nextPeriod();\n checkProperty(task6, 'completeness', 100, arguments.callee.name); //ancien 100%\n checkProperty(task6, 'wages', 1950, arguments.callee.name); //ancien 1950\n checkProperty(task6, 'quality', 100, arguments.callee.name); //ancien 100\n}", "function compareWithinBatch (batch_granularity,batch_representation,batch_datatype) {\n \n var granule_index = 0,\n selected_granule = 0,\n batch_range = 7,\n trial_attribute = Math.random() < 0.5 ? 'start' : 'end';\n\n if (batch_granularity == 'week') {\n batch_range = 7; //weekdays\n }\n else if (batch_granularity == 'month') {\n batch_range = 28; //account for february\n }\n else {\n batch_range = 365; // days of the year\n }\n\n //one tutorial trial\n if (batch_granularity == 'week') {\n granule_index = Math.floor(Math.random() * weeks.length);\n selected_granule = weeks[granule_index]; // which granule is used for the trial? \n weeks.splice(granule_index,1); // remove the granule from the array\n }\n else if (batch_granularity == 'month') {\n granule_index = Math.floor(Math.random() * months.length);\n selected_granule = months[granule_index]; // which granule is used for the trial? \n months.splice(granule_index,1); // remove the granule from the array\n }\n \n trial = {\n granularity: batch_granularity,\n representation: batch_representation,\n datatype: batch_datatype,\n index: selected_granule,\n target_attribute: trial_attribute,\n year: (batch_datatype == 'temperature') ? 2015 : 2012,\n target: Math.ceil(Math.random() * batch_range),\n training: true\n };\n\n compareWithinTaskList.push(trial); // add the trial to the list\n var previous_trial = trial_attribute;\n\n granule_index = 0;\n selected_granule = 0;\n\n //test: 4 test trials\n for (i = 0; i < 4; i++) { \n \n trial_attribute = (previous_trial == 'end') ? 'start' : 'end';\n \n if (batch_granularity == 'week') {\n granule_index = Math.floor(Math.random() * weeks.length);\n selected_granule = weeks[granule_index]; // which granule is used for the trial? \n weeks.splice(granule_index,1); // remove the granule from the array\n }\n else if (batch_granularity == 'month') {\n granule_index = Math.floor(Math.random() * months.length);\n selected_granule = months[granule_index]; // which granule is used for the trial? \n months.splice(granule_index,1); // remove the granule from the array\n }\n\n trial = {\n granularity: batch_granularity,\n representation: batch_representation,\n datatype: batch_datatype,\n index: selected_granule,\n target_attribute: trial_attribute,\n year: (batch_datatype == 'temperature') ? 2015 : 2012,\n target: Math.ceil(Math.random() * batch_range),\n training: false\n };\n compareWithinTaskList.push(trial); // add the trial to the list\n previous_trial = trial_attribute;\n }\n }", "async function diffTwoBenchmarks(times = 1) {\n const result1 = await runBenchmarks(times);\n const result2 = await runBenchmarks(times);\n\n return await compareResults(result1, result2);\n}", "function waitForStillness() {\n var element = dancingDotsElement();\n\n // Currently, the dots sometimes stop & start again. We're introducing a\n // fudge factor here - the dots have to be stopped for a few consecutive\n // checks before we'll consider them really stopped.\n let matches = 0;\n const desiredMatches = 2;\n\n // Failures here due to 'the dancing dots can't stop won't stop' tend do\n // indicate two things:\n // - Our calculations to reach a 'stable' state may just be taking a long\n // time. Increasing the timeout (or making the test scenario simpler) may\n // be enough.\n // - An exception during calculation may have prevented the animation from\n // ever stopping. Check the console (comment out headless in\n // `wdio.conf.js` to get the browser visible; see README.md for more\n // information) and see if there's an error.\n browser.waitUntil(\n () => {\n var result = browser.elementIdAttribute(element.value.ELEMENT, 'animate');\n if (null == result.value) {\n matches += 1;\n } else {\n if (matches > 0) {\n console.log(\n `The dots restarted their dance. This may indicate a bug, or that global data was changed by another client.`\n );\n }\n matches = 0;\n }\n return matches > desiredMatches;\n },\n 20000,\n `the dancing dots can't stop won't stop`,\n 500\n );\n}", "think(time) {\n for (let t = 0; t < time; t++) {\n\n // 从后层开始更新 network, 防止前面更新的影响后面的\n for (let i = this._layers.length - 1; i >= 0; i--) {\n this._layers[i].forEach((neu, neuIndex) => {\n neu.update();\n if (neu._isSpiking) {\n this._spikeTrains[i][neuIndex].push(t);\n }\n });\n }\n }\n\n return {\n spikeTrains: this._spikeTrains,\n };\n }", "function slowPredict(deckname, botname, card) {\n return $q.all([wait(), predict(deckname, botname, card)])\n .then(function (data) {\n return data[1];\n });\n }", "function test()\n{\n // On my system, with an unfixed build where transfer-list processing is\n // quadratic, 5e5 elements makes this test take ~70s in a shell opt build.\n // Debug build is well into timeout-land at 300+s. As long as at least *one*\n // platform times out for a quadratic algorithm, a regression should be\n // obvious. (Time to run the test in even a debug shell is ~17s, well short\n // of timing out.)\n var transfers = [];\n for (var i = 0; i < 5e5; i++)\n transfers.push(new ArrayBuffer());\n\n // If serialization is quadratic in the length of |transfers|, the test will\n // time out. If the test doesn't time out, it passed.\n serialize({}, transfers);\n}", "function slower() {\n if (stepDelay >= MAX_DELAY) { return; }\n stepDelay *= 2;\n }", "function testCoordinationRatioDiffLevel() {\n debug(arguments.callee.name);\n reset();\n\n task2.setProperty('coordinationRatioSup', '1.3');\n\n informaticien1.instance.setSkillset(\"Informaticien\", 11);\n informaticien2.instance.setSkillset(\"Informaticien\", 11);\n commercial1.instance.setSkillset(\"Commercial\", 5);\n\n assign(informaticien1, task2);\n assign(informaticien2, task2);\n assign(commercial1, task2);\n reserve(informaticien1, 1);\n reserve(informaticien2, 1);\n reserve(commercial1, 1);\n\n doNextPeriod(3); // -> Execution week 2\n checkProperty(task2, 'completeness', 85, arguments.callee.name); //ancien 84% @fixme @diff\n checkProperty(task2, 'fixedCosts', 500, arguments.callee.name); //ancien 500\n checkProperty(task2, 'wages', 750, arguments.callee.name); //ancien 750\n checkProperty(task2, 'quality', 101, arguments.callee.name); //ancien 101\n}", "function run() {\n keepGoing = true;\n document.getElementById('running').value = '';\n document.getElementById('finished').value = '';\n let algorithm = document.getElementById(\"algorithm\");\n let selection = algorithm.options[algorithm.selectedIndex].value;\n if (selection === \"1\"){\n // console.log(\"FIFO\");\n finished = [];\n let remaining = remainingTime(processes);\n sortByArrival(processes);\n timed(remaining);\n } else if (selection === \"2\"){\n // console.log(\"PRIORITY\");\n finished = [];\n let remaining = remainingTime(processes);\n sortByPriority(processes);\n timed(remaining);\n } else if (selection === \"3\"){\n // console.log(\"ROUND ROBIN\");\n finished = [];\n sortByArrival(processes);\n let general_quantum = false;\n let remaining = remainingTime(processes);\n let cycle = 0;\n let residual = 0;\n\n let q = document.getElementById(\"quantum\");\n let type = q.options[q.selectedIndex].text;\n if (type !== \"No Aplica\"){general_quantum = true}\n\n roundRobin(general_quantum, cycle, residual, remaining)\n } else if (selection === \"4\"){\n // console.log(\"SJF\");\n finished = [];\n let remaining = remainingTime(processes);\n sortByBurst(processes);\n timed(remaining);\n }\n}", "updateState(deltaT) {\n let currentTime = new Date\n\n if (this.state == 2) {\n // let percentDone = (currentTime - this.timeAtInfection) / recoverTime\n // if (Math.random() < 2 * percentDone * deathRate * deltaT) {\n if (Math.random() < deathRate * deltaT) {\n this.state = 4\n return\n }\n if (currentTime - this.timeAtInfection > recoverTime) {\n this.state = 3\n this.timeAtRecovery = currentTime\n return\n }\n }\n if (this.state == 3) {\n if (currentTime - this.timeAtRecovery > immunityDuration) {\n this.state = 1\n return\n }\n }\n }", "function selectModel(response) {\n if (sel_model.length > 0) {\n sel_model.pop();\n }\n sel_model.push(response);\n //window.open ('loading/load.html','_self', false);\n\n // OPEN THE LOADING SCREEN\n document.getElementById('loader-wrapper').style = 'display:block';\n document.getElementById('Page1').style = 'display:none';\n\n var oldLabel = document.getElementById('LabelPrediction');\n if (oldLabel != null) oldLabel.parentNode.removeChild(oldLabel);\n\n $('body').removeClass('loaded');\n\n console.log(\"Selected \" + response + \" as Model!\");\n $.ajax({\n url: 'http://' + host + ':5000/',\n type: 'POST',\n data: JSON.stringify({\n name: \"Chose Model\",\n phase: 4,\n model: response\n }),\n contentType: 'application/json',\n dataType: 'json',\n }).done((response) => {\n displayLoading(response)\n });\n\n //train_time = 0.0;\n\n model_status = setTimeout(function() {\n console.log(\"Checking for Model Status...\");\n /*console.log(\"Time: \" + train_time);\n\n train_time = train_time + 0.5;\n if (train_time > 45) {\n clearInterval(model_status);\n $('body').addClass('loaded');\n console.log(\"Model Timed Out! Did you commit a MISTAKE?\");\n }*/\n\n $.ajax({\n url: 'http://' + host + ':5000/',\n type: 'POST',\n data: JSON.stringify({\n name: \"Model Status\",\n phase: 5\n }),\n contentType: 'application/json',\n dataType: 'json',\n }).done((response) => {\n displayMetrics(response)\n });\n }, 500);\n\n }", "trainingRun(input){\r\n this.resetTime();\r\n for(let i = 0; i < input.length; i++){\r\n this.activate(input[i]);\r\n }\r\n }", "function updateMotors() {\n //printf(\"%li %li %li %li %ld\\n\\r\", spikeFL, spikeBL, spikeFR, spikeBR, maxspikes);\n if (spikeFL >= spikeBL) // If more forward then back, direction is forward\n {\n // Debugging\n dirL = 0;\n // Multiply by 8.0 since maxspikes is actually maxspikes * 2 since if a neuron does spike it won't spike twice in a row because of the refractory period\n v2 = (((spikeFL - spikeBL) / maxspikes) * 2.0 * 8.0);\n // Debugging (comment out t2 change)\n // t2 = (0.332485 / v2 * 1000.0);\n // time2 = t2;\n } else {\n // Debugging\n dirL = 1;\n v2 = (((spikeBL - spikeFL) / maxspikes) * 2.0 * 8.0);\n // Debugging\n // t2 = (0.332485 / v2 * 1000.0);\n // time2 = t2;\n }\n if (spikeFR >= spikeBR) // If more forward then back, direction is forward\n {\n // Debugging\n dirR = 0;\n v3 = (((spikeFR - spikeBR) / maxspikes) * 2.0 * 8.0);\n // Debugging\n // t3 = (0.332485 / v3 * 1000.0);\n // time3 = t3;\n } else {\n // Debugging\n dirR = 1;\n v3 = (((spikeBR - spikeFR) / maxspikes) * 2.0 * 8.0);\n // Debugging\n // t3 = (0.332485 / v3 * 1000.0);\n // time3 = t3;\n } // } Motor Speed update\n\n // Set tsk4cnt to be the greater of the times 350>tsk4cnt>60\n // if (t2 > t3 && t2 <= 350) {\n // tsk4cnt = t2 + 10;\n // } else if (t3 > t2 && t3 <= 350) {\n // tsk4cnt = t3 + 10;\n // } else tsk4cnt = 60;\n //printf(\"%li %li\\n\\r\", t2, t3);\n}", "async function preTrainingProcess({ mlmodel, }) { // ONLY AWS MACHINE LEARNING MODEL UPDATER\r\n const MLModel = periodic.datas.get('standard_mlmodel');\r\n const Datasource = periodic.datas.get('standard_datasource');\r\n try{\r\n let mongo_mlmodel = await MLModel.load({ query: { _id: mlmodel._id, }, });\r\n mongo_mlmodel = mongo_mlmodel.toJSON? mongo_mlmodel.toJSON(): mongo_mlmodel;\r\n let datasource = mongo_mlmodel.datasource;\r\n let trainingDataRows = await FETCH_PROVIDER_BATCH_DATA[ 'original' ]({ mlmodel: mongo_mlmodel, batch_type: 'training', });\r\n let testingDataRows = await FETCH_PROVIDER_BATCH_DATA[ 'original' ]({ mlmodel: mongo_mlmodel, batch_type: 'testing', });\r\n let strategy_data_schema = JSON.parse(mongo_mlmodel.datasource.strategy_data_schema);\r\n let included_columns = datasource.included_columns? JSON.parse(datasource.included_columns) : {};\r\n let headers = trainingDataRows[0];\r\n trainingDataRows.splice(0, 1);\r\n testingDataRows.splice(0, 1);\r\n let historical_result_idx = headers.indexOf('historical_result');\r\n let columnTypes = {};\r\n for (let [key, val,] of Object.entries(strategy_data_schema)) {\r\n columnTypes[ key ] = val.data_type;\r\n }\r\n let training_data_transposed = math.transpose(trainingDataRows);\r\n let testing_data_transposed = math.transpose(testingDataRows);\r\n let included_headers = headers.filter(header => included_columns[header]? true : false);\r\n training_data_transposed = training_data_transposed.filter((column, idx) => {\r\n let header = headers[idx];\r\n let truthy = (included_columns[header])? true : false;\r\n return truthy;\r\n });\r\n testing_data_transposed = testing_data_transposed.filter((column, idx) => {\r\n let header = headers[idx];\r\n return (included_columns[header])? true : false;\r\n });\r\n let { decoders, encoders, encoder_counts,} = createHotEncodeMap({ csv_headers: included_headers, training_data_transposed, columnTypes,});\r\n let auto_progress_configs = {\r\n 'aws': { \r\n interval: 20000,\r\n max_progress: 20,\r\n },\r\n 'sagemaker_ll': { \r\n interval: 7000,\r\n max_progress: 60,\r\n },\r\n 'sagemaker_xgb': { \r\n interval: 8000,\r\n max_progress: 60,\r\n },\r\n 'decision_tree': { \r\n interval: 3000,\r\n max_progress: 60,\r\n progress_value: 1,\r\n },\r\n 'random_forest': { \r\n interval: 4000,\r\n max_progress: 60,\r\n progress_value: 1,\r\n },\r\n 'neural_network': { \r\n interval: 5000,\r\n max_progress: 60,\r\n progress_value: 1,\r\n },\r\n };\r\n await Datasource.update({\r\n id: datasource._id.toString(),\r\n isPatch: true,\r\n updatedoc: {\r\n decoders, \r\n encoders, \r\n encoder_counts,\r\n },\r\n updatedat: new Date(),\r\n });\r\n let providers = THEMESETTINGS.machinelearning.providers;\r\n let digifi_models = THEMESETTINGS.machinelearning.digifi_models[mongo_mlmodel.type] || [];\r\n providers.forEach(provider => {\r\n PROVIDER_DATASOURCE_FUNCS[provider]({ mlmodel, headers: included_headers, training_data_transposed, testing_data_transposed, columnTypes, });\r\n helpers.mlAutoProgress({ provider, model_id: mlmodel._id.toString(), interval: auto_progress_configs[provider].interval, organization: mlmodel.organization.toString(), max_progress: auto_progress_configs[provider].max_progress, });\r\n });\r\n PROVIDER_DATASOURCE_FUNCS['digifi']({ mlmodel, headers: included_headers, training_data_transposed, testing_data_transposed, columnTypes, });\r\n digifi_models.forEach(provider => {\r\n helpers.mlAutoProgress({ provider, model_id: mlmodel._id.toString(), interval: auto_progress_configs[provider].interval, organization: mlmodel.organization.toString(), max_progress: auto_progress_configs[provider].max_progress, progress_value: auto_progress_configs[provider].progress_value });\r\n });\r\n } catch(e){\r\n logger.warn(e.message);\r\n await MLModel.update({\r\n id: mlmodel._id.toString(),\r\n isPatch: true,\r\n updatedoc: {\r\n status: 'failed',\r\n },\r\n updatedat: new Date(),\r\n });\r\n }\r\n}", "wait(overkill){\n\t\t//remove objects from elevator\n\t\tthis.content.leave(this.floor, overkill, this.position.y+this.size.y);\n\t\t\n\t\twhile(!this.content.full()){\n\t\t\t//takes object from waiting line and adds it into elevator\n\t\t\tvar obj = this.waiting_lines.remove(this.floor);\n\t\t\tif(obj != null){\n\t\t\t\tif(this.content.enter(obj, overkill)){//if object entered elevator\n\t\t\t\t\tthis.moveTo(obj.target_floor); //add objects target floor to the move list\n\t\t\t\t}\n\t\t\t} else { //there is no more miners in waiting line\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//next in line calls elevator\n\t\tvar p = this.waiting_lines.peek(this.floor);\n\t\tif(p != null){\n\t\t\tthis.moveTo(this.floor);\n\t\t}\n\t\t//sets waiting time\n\t\tthis.wait_time = this.pause_time - overkill;\n\t\tthis.waiting = true;\n\t}", "static get THRESHOLD () {\n return 9;\n }", "function setTrainingTimesFn(timings) {\n setTrainingTimes(timings);\n }", "function faster() {\n if (stepDelay <= MIN_DELAY) { return; }\n stepDelay /= 2;\n }", "function updateTrainData() {\n console.log(\"Update train data\");\n\n var train = trains[currentTrainIndex];\n // currentCircleObjs = currentCircleObjs.filter(st => st.type ==1);\n\n // Update time\n for (var i = 0; i < currentCircleObjs.length; i++) {\n var stop = train.stops[parseInt(currentCircleObjs[i].attr(\"stop-index\"))];\n var newCx = parseFloat(currentCircleObjs[i].attr(\"cx\"));\n if (isDepartedCircle(currentCircleObjs[i].attr(\"id\"))) {\n totalOldMins = Math.floor(stop.departedTime / 100) * 60 + (stop.departedTime % 100);\n totalNewMins = totalOldMins + currentAdjustedMinutes + 1440; // Avoid wrong convertion when time moved from 00:15 to 23:45 for example\n newHour = Math.floor(totalNewMins / 60) % 24;\n newMin = totalNewMins % 60;\n stop.departedTime = newHour * 100 + newMin;\n if (newCx < 0)\n stop.departedDay = dayType.YESTERDAY;\n else if (newCx >= viewerWidth)\n stop.departedDay = dayType.TOMORROW;\n else\n stop.departedDay = dayType.TODAY;\n }\n else {\n totalOldMins = Math.floor(stop.arrivalTime / 100) * 60 + (stop.arrivalTime % 100);\n totalNewMins = totalOldMins + currentAdjustedMinutes + 1440; // Avoid wrong convertion when time moved from 00:15 to 23:45 for example\n newHour = Math.floor(totalNewMins / 60) % 24;\n newMin = totalNewMins % 60;\n stop.arrivalTime = newHour * 100 + newMin;\n if (newCx < 0)\n stop.arrivalDay = dayType.YESTERDAY;\n else if (newCx >= viewerWidth)\n stop.arrivalDay = dayType.TOMORROW;\n else\n stop.arrivalDay = dayType.TODAY;\n }\n }\n updateVirtualData();\n}", "function cycleFinished(){\nif (objsCounter == -1){//first time run-create startpart\n // run only first time and create startparts(2)\n whenstart = Date.now();\n // ----(when, cycle,status)\n addPart(whenstart,0,\"start\");\n addPart(whenstart,sugAvg,\"first-off\");\n partsCounter--;\n PartObj.prototype.partsQty--;\n //console.log('initialised . objsCounter=',objsCounter);\n //timenow varible needed to keep for next, part of \"part\" status\n //to compute then cycle duration\n timenow = Date.now();\n drawGraph();\n importantLog(); \n return;\n}\n\n//compute cycle duration since last part. storing previous and substracting from it timenow to get the cycle time\nprevtime = timenow;\ntimenow = Date.now();\nvar cycletime = timenow - prevtime;\n\n\n//creates different objects for different real world occurences,\n//status is by default \"part\"\n\nif (status=='part')\n {\n addPart(timenow,cycletime,status);\n //console.log('part cycle fin . objsCounter=',objsCounter);\n\n clearAndLog(minmax(cycletime),'L3');\n /* if this is part, checks/sets the new lowest and highest and logs them to screen \n */\n }\n\nelse if (status=='break')\n {\n addBreak(timenow,cycletime,status);\n status='part'; // changes the status since there is no case of \n // taking two breaks in a row\n changeValue(\"Start Break\",'btnbreak');\n changeValue(\"OK\",'btnRUN');\n }\n\n\n \n\ndrawGraph();\n\nimportantLog();\n\nasd(objsList[objsCounter]);// print out last object\n\n}", "function bus_time(k) {\n\n\t\t\t\t\t\t\treturn prediction1[k]\n\t\t\t\t\t\t}", "playGame() {\n let oversleft = this.oversleft;\n let wicketsLeft = this.wicketsLeft;\n let runsRequired = this.runsRequired;\n\n if (Utils.validateNonNumericArray(this.validSingleBallScoreList)) {\n throw new Error('Invalid Single Ball Score List');\n }\n\n if (oversleft <= 0) {\n throw new Error('Invalid Overs');\n }\n\n if (wicketsLeft <= 0) {\n throw new Error('Invalid Wickets');\n }\n\n if (runsRequired <= 0) {\n throw new Error('Invalid Runs');\n }\n\n let overBall = 0;\n let nextBallResult;\n let batsmanToBat = [];\n const totalOvers = this.oversleft;\n\n batsmanToBat = Utils.getArrayColumn(this.batsmenMatrix, 0);\n if (batsmanToBat.length !== wicketsLeft) {\n throw new Error('Invalid Batsman Length');\n }\n\n const batsmanOnField = [];\n batsmanOnField.push(batsmanToBat.shift(), batsmanToBat.shift());\n console.log(`${oversleft} left.${runsRequired} runs to win.`);\n\n while (runsRequired && wicketsLeft && oversleft) {\n try {\n nextBallResult = this.predictNextBall(batsmanOnField[0]);\n } catch (exc) {\n throw exc;\n }\n overBall += 1;\n console.log(`${totalOvers - oversleft}.${overBall} ${batsmanOnField[0]} scored ${nextBallResult} run(s)`);\n\n if (nextBallResult === -1) {\n wicketsLeft -= 1;\n batsmanOnField.shift();\n if (batsmanToBat.length) {\n batsmanOnField.unshift(batsmanToBat.shift());\n }\n } else {\n runsRequired -= nextBallResult;\n }\n\n changeEnd(nextBallResult, batsmanOnField);\n\n if (runsRequired <= 0) {\n result = 1;\n break;\n }\n\n if (overBall === ballsPerOver) {\n changeEnd(nextBallResult, batsmanOnField);\n oversleft -= 1;\n overBall = 0;\n console.log(`${oversleft} left.${runsRequired} runs to win.`);\n }\n }\n\n if (result) {\n console.log('Batting Team won');\n } else {\n console.log('Batting log lost');\n }\n return result;\n }", "function train() {\n // don't allow training for new player yet\n if (getLevel() == 0 && getSP() > 0) {\n showIntialPointsPrompt();\n return;\n }\n var trainingType = document.getElementById('trainingSelect').value;\n var validTrainings = getValidTrainingTypes();\n if (trainingType==TRAININGTYPE.MULTI) {\n if (!enableDesiredBTCheck || ((getMultiTrainCount()==2 && validTrainings.multi2) ||\n (getMultiTrainCount()==3 && validTrainings.multi3) ||\n (getMultiTrainCount()==4 && validTrainings.multi4))) {\n multiTrain();\n } else {\n log(\"Training skipped. You can not multi train \"+getMultiTrainCount()+\" attributes and still reach your BT goal\", true);\n return;\n }\n } else {\n if (singleTrainSelect.value == \"\") {\n log(\"Need to select an attribute to train\", !autoTrain);\n return;\n }\n if (!enableDesiredBTCheck || (trainingType==TRAININGTYPE.INTENSE && validTrainings.intense ||\n trainingType==TRAININGTYPE.NORMAL && validTrainings.normal ||\n trainingType==TRAININGTYPE.LIGHT && validTrainings.light)) {\n singleTrain();\n } else {\n log(\"Training skipped. You can not do the selected training and still reach your BT goal.\", true);\n return;\n }\n }\n updateTrainingPrediction();\n}", "static get THREAD_STEP_INTERVAL_COMPATIBILITY () {\n return 1000 / 30;\n }", "function test_train_nn(){\n\t// test nn with an arbitrary input and output\n\n\tconst x = [[1,2,3]];\t\t// input\n\tconst y = [[0.25, 0.75]];\t// target\n\tvar {w1, b1, w2, b2} = init_weights(3,4,2);\n\tvar updated_weights, a2;\n\n\tfor(var i=0; i<100; i++){\n\t\tupdated_weights = iterate_training(x, w1, b1, w2, b2, y);\n\t\tw1 = updated_weights.w1;\n\t\tb1 = updated_weights.b1;\n\t\tw2 = updated_weights.w2;\n\t\tb2 = updated_weights.b2;\n\t\ta2 = updated_weights.a2;\n\t\terror = updated_weights.error;\n\t\tconsole.log(\"error: \", error);\n\t}\n\tend_training(w1, b1, w2, b2, a2, y);\n}", "async function run() {\n // Create a sequential model (outputs of one layer are the inputs to the next layer)\n const model = tf.sequential();\n model.add(tf.layers.dense({units: 1, inputShape: [1]}));\n\n // Prepare the model for training, specifying the loss and optimizer functions\n model.compile({loss: 'meanSquaredError', optimizer: 'sgd'});\n\n // Create synthetic training data (y = 2x - 1)\n const xs = tf.tensor2d([-1, 0, 1, 2, 3, 4], [6, 1]);\n const ys = tf.tensor2d([-3, -1, 1, 3, 5, 7], [6, 1]);\n\n // Train the model\n await model.fit(xs, ys, {epochs: 250});\n\n function foo(x) {\n return x;\n }\n\n // Predict outputs for training inputs\n trainingInputs = [-1, 0, 1, 2, 3, 4];\n const trainingOutputs = trainingInputs.map(input =>\n model.predict(tf.tensor2d([input], [1, 1]))\n );\n\n // Predict outputs for a set of test inputs\n const testInputs = [3, 14, 25, 43, 56, 72];\n const testOutputs = testInputs.map(input =>\n model.predict(tf.tensor2d([input], [1, 1]))\n );\n\n // Display training data in tabular format\n var trainingDataTabular = [['x', 'y']];\n for (var i = 0; i < Math.min(xs.size, ys.size); i++) {\n trainingDataTabular.push([xs.get(i, 0), ys.get(i, 0)]);\n }\n console.log('========================================');\n console.log('Training Data');\n console.log('========================================');\n console.log(table(trainingDataTabular));\n // Display training prediction results in tabular format\n var trainingInferencingResultsTabular = [['x', 'y inferenced', 'y calculated']];\n for (var i = 0; i < Math.min(trainingInputs.length, trainingOutputs.length); i++) {\n trainingInferencingResultsTabular.push([\n trainingInputs[i],\n trainingOutputs[i].dataSync(),\n 2 * trainingInputs[i] - 1\n ]);\n }\n console.log('========================================');\n console.log('Prediction Results on Training Data');\n console.log('========================================');\n console.log(table(trainingInferencingResultsTabular));\n // Display prediction results in tabular format\n var testInferencingResultsTabular = [['x', 'y inferenced', 'y calculated']];\n for (var i = 0; i < Math.min(testInputs.length, testOutputs.length); i++) {\n testInferencingResultsTabular.push([\n testInputs[i],\n testOutputs[i].dataSync(),\n 2 * testInputs[i] - 1\n ]);\n }\n console.log('========================================');\n console.log('Prediction Results on Test Data');\n console.log('========================================');\n console.log(table(testInferencingResultsTabular));\n}", "function buildModel(cars, capacity, chargeRate, iterations){\n var count;\n var carCount;\n carCount = 0;\n var timeCount;\n var carsList = [];\n var carsTimeList = [];\n //populates the carsTimeList with a 0 for each time period\n for (timeCount = 0; timeCount < numberOfPeriods; timeCount++){\n carsTimeList.push(0);\n }\n //increments values in the array. E.g. a value of 3 at index 25 means 3 cars will spawn during time period 25.\n for(carCount = 0; carCount < cars; carCount++){\n period = createStartTime();\n carsTimeList[period]++;\n }\n //Creates a set of cars with electricity needs and maximum waiting time, based on charge rate and the time at which they arrive.\n for(carCount = 0; carCount < carsTimeList.length; carCount++){\n for (temp = 0; temp < carsTimeList[carCount]; temp++){\n var car = createCar(chargeRate, carCount);\n carsList.push(car);\n }\n }\n\n //for each algorithm, runs a number of simulations based on the number of iterations required.\n var algorithmType;\n for(algorithmType = 0; algorithmType < 3; algorithmType++){\n tempResultsLine = [];\n tempResultsPie = [];\n for (count = 0; count < iterations; count++){\n var carsListClone = JSON.parse(JSON.stringify(carsList)); //Performs a deep clone of the cars list so each simulation gets an independent list.\n runModel(carsTimeList, capacity, chargeRate, carsListClone, algorithmType);\n }\n averageResults(algorithmType);\n }\n\n}", "static train() {\n\t\t// Get random number from 1-5\t\t\n let randNum = Math.ceil(Math.random() * 5);\n let training = 0;\n let trainingMessage = \"\";\n\t\t\n\t\t// Made it so that if the random number is odd you get an ability point and a message for how you did that session. If the number is even you lose an ability point with a message explaining why.\n switch (randNum) {\n case 1:\n training = 1;\n trainingMessage = \"You had a nice steady learning experience\";\n break;\n case 2:\n training = -1;\n trainingMessage = \"You were distracted most of the day and had to refresh what you already know\";\n break;\n case 3:\n training = 2;\n trainingMessage = \"You had a great day you learned more than what you set out to accomplish\";\n break;\n case 4:\n training = -2;\n trainingMessage = \"You had a terrible day and just couldn't figure anything out and started questioning what you already know.\";\n break;\n case 5:\n training = 5;\n trainingMessage = \"You had an amazing day! You feel that you might just be a natural programmer\";\n break;\n default:\n training = 0;\n trainingMessage = \"I don't think it's possible for the code to get here but just in case Good Job you found a bug!\"\n break;\n }\n\n\t\t// I got bored with the simulator myself so I added this part in for a multiplier to your positive training. If you had a bad training session you penalty will not be multiplied.\n let finalScore = 0;\n if (training < 1) {\n finalScore = training;\n } else {\n let multiplierNum = Math.random();\n let multiplier = 1;\n if (multiplierNum < 0.3) {\n multiplier = 1;\n } else if (multiplierNum < 0.5) {\n multiplier = 1.5;\n } else if (multiplierNum < 0.7) {\n multiplier = 2;\n } else if (multiplierNum < .9) {\n multiplier = 2.5;\n } else {\n multiplier = 3; // Yes intentional 1/10th chance for 3x multiplier\n trainingMessage += \" Congrats you got a 3x multiplier too! Super smart looking!\"\n }\n\n\n finalScore = training * multiplier;\n }\n\n return [finalScore, trainingMessage];\n }", "checkTrainableWeightsConsistency() {\n if (this.collectedTrainableWeights == null) {\n return;\n }\n if (this.trainableWeights.length !==\n this.collectedTrainableWeights.length) {\n console.warn('Discrepancy between trainableweights and collected trainable ' +\n 'weights. Did you set `model.trainable` without calling ' +\n '`model.compile()` afterwards?');\n }\n }", "function enough(cap, on, wait){\n return Math.max(on + wait + -cap, 0)\n}", "function roundRobin(general_quantum, cycle, residual, remaining) {\n let table = document.getElementsByTagName(\"table\")[0];\n let tbody = table.getElementsByTagName(\"tbody\")[0];\n if (general_quantum){\n // console.log(\"General\");\n let q = document.getElementById(\"quantum\");\n let quantum = parseInt(q.options[q.selectedIndex].text);\n let steps = iterations(quantum, remaining);\n let suspended = [];\n\n function repeat() {\n if (cycle <= processes.length){\n for(let i=0; i < tbody.rows.length; i++){\n for (let j = 0; j < finished.length; j++) {\n if(tbody.rows[i].cells[0].innerHTML === finished[j]){\n tbody.rows[i].cells[6].innerHTML = 'Terminado';\n tbody.rows[i].cells[6].style.backgroundColor=\"#2d5faa\";\n tbody.rows[i].cells[6].style.color=\"#b1b2b8\";\n }\n }\n }\n }\n if (cycle <= processes.length){\n for(let i=0; i < tbody.rows.length; i++){\n for (let j = 0; j < suspended.length; j++) {\n if(tbody.rows[i].cells[0].innerHTML === suspended[j]){\n tbody.rows[i].cells[6].innerHTML = 'Suspendido';\n tbody.rows[i].cells[6].style.backgroundColor=\"#e3742d\";\n tbody.rows[i].cells[6].style.color=\"#222225\";\n }\n }\n }\n }\n document.getElementById('suspended').value = suspended;\n document.getElementById('finished').value = finished;\n if (remaining[cycle] > quantum){\n residual = quantum;\n remaining[cycle] -= quantum;\n document.getElementById('running').value = processes[cycle].pid;\n suspended.push(processes[cycle].pid);\n\n } else if (quantum >= remaining[cycle]) {\n\n residual = remaining[cycle];\n remaining[cycle] = 0;\n finished.push(processes[cycle].pid);\n document.getElementById('running').value = processes[cycle].pid;\n } else {\n for (let i = 0; i < remaining.length; i++) {\n if (remaining[i] >= quantum){\n residual = quantum;\n remaining[i] -= quantum;\n } else if (remaining[i] !== 0){\n residual = remaining[i];\n remaining[i] -= remaining[i];\n if (remaining[i] === 0){\n suspended.splice(0,1);\n finished.push(processes[i].pid);\n for(let i=0; i < tbody.rows.length; i++){\n for (let j = 0; j < finished.length; j++) {\n if(tbody.rows[i].cells[0].innerHTML === finished[j]){\n tbody.rows[i].cells[6].innerHTML = 'Terminado';\n tbody.rows[i].cells[6].style.backgroundColor=\"#2d5faa\";\n tbody.rows[i].cells[6].style.color=\"#b1b2b8\";\n }\n }\n }\n }\n document.getElementById('running').value = processes[i].pid;\n break\n }\n }\n if (remaining.every(checkZeros)){\n document.getElementById('running').value = \"No hay procesos pendientes por ejecutar\";\n document.getElementById('suspended').value = suspended;\n document.getElementById('finished').value = finished;\n }\n }\n if (keepGoing){\n setTimeout(() => {\n cycle++;\n // console.log(remaining);\n if (cycle < steps) repeat()\n }, 1000 * residual);\n }\n }\n repeat()\n } else {\n let quantum = quantums(processes);\n let steps = iterations(quantum, remaining);\n let suspended = [];\n function repeatQuantum() {\n if (cycle <= processes.length){\n for(let i=0; i < tbody.rows.length; i++){\n for (let j = 0; j < finished.length; j++) {\n if(tbody.rows[i].cells[0].innerHTML === finished[j]){\n tbody.rows[i].cells[6].innerHTML = 'Terminado';\n tbody.rows[i].cells[6].style.backgroundColor=\"#2d5faa\";\n tbody.rows[i].cells[6].style.color=\"#b1b2b8\";\n }\n }\n }\n }\n if (cycle <= processes.length){\n for(let i=0; i < tbody.rows.length; i++){\n for (let j = 0; j < suspended.length; j++) {\n if(tbody.rows[i].cells[0].innerHTML === suspended[j]){\n tbody.rows[i].cells[6].innerHTML = 'Suspendido';\n tbody.rows[i].cells[6].style.backgroundColor=\"#e3742d\";\n tbody.rows[i].cells[6].style.color=\"#222225\";\n }\n }\n }\n }\n document.getElementById('suspended').value = suspended;\n document.getElementById('finished').value = finished;\n if (remaining[cycle] > quantum[cycle]){\n residual = quantum[cycle];\n remaining[cycle] -= quantum[cycle];\n document.getElementById('running').value = processes[cycle].pid;\n suspended.push(processes[cycle].pid);\n } else if (quantum[cycle] >= remaining[cycle]){\n residual = remaining[cycle];\n remaining[cycle] = 0;\n finished.push(processes[cycle].pid);\n document.getElementById('running').value = processes[cycle].pid;\n } else {\n for (let i = 0; i < remaining.length; i++) {\n if (remaining[i] >= quantum[i]){\n residual = quantum[i];\n remaining[i] -= quantum[i];\n } else if (remaining[i] !== 0){\n residual = remaining[i];\n remaining[i] -= remaining[i];\n if (remaining[i] === 0){\n suspended.splice(0,1);\n finished.push(processes[i].pid);\n for(let i=0; i < tbody.rows.length; i++){\n for (let j = 0; j < finished.length; j++) {\n if(tbody.rows[i].cells[0].innerHTML === finished[j]){\n tbody.rows[i].cells[6].innerHTML = 'Terminado';\n tbody.rows[i].cells[6].style.backgroundColor=\"#2d5faa\";\n tbody.rows[i].cells[6].style.color=\"#b1b2b8\";\n }\n }\n }\n }\n document.getElementById('running').value = processes[i].pid;\n break\n }\n }\n if (remaining.every(checkZeros)){\n document.getElementById('running').value = \"No hay procesos pendientes por ejecutar\";\n document.getElementById('suspended').value = suspended;\n document.getElementById('finished').value = finished;\n }\n }\n setTimeout(() => {\n cycle++;\n // console.log(\"quantum\",quantum);\n // console.log(\"Suspended \",suspended);\n if (cycle < steps) repeatQuantum();\n }, 1000 * residual)\n }\n repeatQuantum();\n }\n\n}", "function RobotOverlord() {\n var movesMadeThisGame = {};\n var movesMadeLastGame = {};\n var iWonLastGame = false;\n var move;\n var me; // We'll need to know when learning after the game is over\n // var learnedStates = {};\n // Pre-training...\n var learnedStates = {\"100000000\":[null,0,0,0,164.4409482010504,0,0,0,0],\"100020001\":[null,0,0,0,null,0,0,390.07939461119975,null],\"100020010\":[null,0,0,0,null,0,0,null,30.869999999999997],\"100020100\":[null,0,0,49.391999999999996,null,0,null,0,0],\"100020112\":[null,0.7,0.7,1.2,null,1],\"100020121\":[null,2.48832,0.7,1,null,1],\"100021000\":[null,0,0,0,null,null,0,0,34.3],\"100021021\":[null,1,1.44,1,null,null,1],\"100021102\":[null,0.7,0.7,1,null,null,null,0.7],\"100120000\":[null,0,0,null,null,0,84,0,0],\"100120012\":[null,0.7,0.7,null,null,0.7,0.9],\"100120021\":[null,1,1,null,null,1,1.2],\"100120210\":[null,1,1.2,null,null,1,null,null,1],\"100121212\":[null,1,1],\"100220101\":[null,0.7,0.7,null,null,1.44,null,1],\"100220110\":[null,1,1,null,null,1,null,null,1],\"100221112\":[null,1,1],\"101020000\":[null,41.16,null,0,null,0,0,0,0],\"101020021\":[null,1.728,null,1,null,1,1],\"101021002\":[null,1,null,1,null,null,1,1],\"101021212\":[null,1,null,1],\"101022001\":[null,1,null,1.44,null,null,1,1],\"101022211\":[null,1,null,1.2],\"101120200\":[null,1,null,null,null,1,null,0.7,1],\"101120212\":[null,1,null,null,null,0.9],\"101120221\":[null,1.2,null,null,null,1],\"101122201\":[null,1,null,null,null,null,null,1],\"101220100\":[null,1.2,null,null,null,1,null,0.7,1],\"101220112\":[null,1,null,null,null,1],\"101220121\":[null,1.2,null,null,null,1],\"101221102\":[null,1,null,null,null,null,null,0.9],\"102021100\":[null,0.7,null,0.9,null,null,null,0.7,0.7],\"102021121\":[null,2.9859839999999997,null,1],\"102221101\":[null,0.9,null,null,null,null,null,1],\"102221110\":[null,1,null,null,null,null,null,null,1],\"110020000\":[null,null,175.5758591999999,0,null,0,0,0,0],\"110020021\":[null,null,90,0,null,0,0,null,null],\"110220112\":[null,null,1,null,null,1.2],\"110221102\":[null,null,1,null,null,null,null,1],\"112020001\":[null,null,null,1,null,1,1.2,1],\"112020010\":[null,null,null,1,null,1,1.44,null,1],\"112020100\":[null,null,null,1,null,1,null,1,0.7],\"112020121\":[null,null,null,1,null,0.9],\"112120000\":[null,null,null,null,null,0.84,1.728,1,1],\"112122010\":[null,null,null,null,null,null,1.2,null,1],\"112221100\":[null,null,null,null,null,null,null,1,1],\"121020001\":[null,null,null,0.7,null,1.2,1,1],\"121021012\":[null,null,null,1,null,null,1],\"121021102\":[null,null,null,1,null,null,null,1],\"121022011\":[null,null,null,1,null,null,1],\"121022101\":[null,null,null,1.2,null,null,null,1],\"121120000\":[null,null,null,null,null,0.7,1,1,0.7],\"121120201\":[null,null,null,null,null,1,null,1],\"121120210\":[null,null,null,null,null,1,null,null,1],\"121122001\":[null,null,null,null,null,null,1,1],\"121220101\":[null,null,null,null,null,1.2,null,1],\"200010001\":[null,0,0,0,null,0,248.83199999999997,0,null],\"200010010\":[null,561.7143282401277,0,0,null,0,0,null,0],\"200010100\":[null,0,70,0,null,0,null,0,0],\"200010211\":[null,1.44,1,1,null,1],\"200011000\":[null,0,0,298.59839999999997,null,null,0,0,0],\"200011201\":[null,1,1,1.44,null,null,null,1],\"200110000\":[null,0,0,null,null,10.588409999999998,0,0,0],\"200110201\":[null,0,0,null,null,100,null,0,null],\"200112010\":[null,0.9,0.7,null,null,null,0.7,null,0.7],\"200112100\":[null,0,100,null,null,null,null,0,0],\"200112211\":[null,100,0,null,null,null,null,null,null],\"200120101\":[null,0.7,0.7,null,null,0.7,null,1.728],\"200120110\":[null,0.7,0.7,null,null,0.7,null,null,1.2],\"200121121\":[null,1.728,1],\"200211001\":[null,0,0,null,null,null,144,0,null],\"200211010\":[null,0,0,null,null,null,172.79999999999998,null,0],\"200211100\":[null,0,100,null,null,null,null,0,0],\"201010000\":[null,0,null,0,null,0,248.83199999999997,0,0],\"201010201\":[null,0,null,172.79999999999998,null,0,null,0,null],\"201010210\":[null,1,null,1.2,null,1,null,null,1],\"201011200\":[null,0,null,144,null,null,null,0,0],\"201110200\":[null,0,null,null,null,100,null,0,0],\"201112000\":[null,0,null,null,null,null,100,0,0],\"201112210\":[null,100,null,null,null,null,null,null,0],\"201120001\":[null,0.7,null,null,null,0.81,0.7,0.7],\"201120121\":[null,1,null,null,null,1],\"201122011\":[null,0.9,null,null,null,null,1],\"201122101\":[null,0.9,null,null,null,null,null,1],\"201211000\":[null,0,null,null,null,null,120,0,0],\"202011100\":[null,1,null,1,null,null,null,0.7,1],\"210010000\":[null,null,0,0,null,0,0,97.2,0],\"210010021\":[null,null,0,0,null,90,0,null,null],\"210010120\":[null,null,90,0,null,0,null,null,0],\"210011020\":[null,null,0,100,null,null,0,null,0],\"210020101\":[null,null,0.7,0.7,null,0.7,null,0.9],\"210021001\":[null,null,0.9,0.7,null,null,0.7,0.7],\"210021121\":[null,null,1,1],\"210110020\":[null,null,0,null,null,100,0,null,0],\"210112000\":[null,null,0.7,null,null,null,0.7,1,0.7],\"210112021\":[null,null,1,null,null,null,1],\"210112201\":[null,null,0,null,null,null,null,100,null],\"210120121\":[null,null,1,null,null,1],\"210211000\":[null,0,null,null,null,null,100,0,0],\"210211021\":[null,null,1,null,null,null,1],\"210211120\":[null,null,1,null,null,null,null,null,1],\"211010020\":[null,null,null,0,null,0,120,null,0],\"211012021\":[null,null,null,0.9,null,null,1],\"211020001\":[null,null,null,0.7,null,1.44,0.7,1],\"211020121\":[null,null,null,0.9,null,1],\"211021000\":[null,null,null,0.7,null,null,0.7,0.7,1.728],\"211022011\":[null,null,null,1.2,null,null,1],\"211022101\":[null,null,null,1.2,null,null,null,1],\"211110220\":[null,null,null,null,null,1,null,null,1.2],\"211112020\":[null,null,null,null,null,null,1,null,1],\"211122001\":[null,null,null,null,null,null,1,1],\"212010100\":[null,null,null,0,null,0,null,100,0],\"212010121\":[null,null,null,1,null,1],\"212011120\":[null,null,null,1,null,null,null,null,1],\"212021101\":[null,null,null,0.9,null,null,null,1],\"212110120\":[null,null,null,null,null,1,null,null,0.9],\"212121100\":[null,null,null,null,null,null,null,1,1],\"212211100\":[null,null,null,null,null,null,null,100,0],\"220010011\":[null,null,1,1,null,1,1.728],\"220011010\":[null,null,1.44,1,null,null,1,null,0.7],\"220011211\":[null,null,1.44,1],\"220110010\":[null,null,1.44,null,null,1,1,null,1],\"220110211\":[null,null,1,null,null,1],\"220112011\":[null,null,1,null,null,null,1],\"221010010\":[null,null,null,0,null,0,223.94879999999995,null,0],\"221010211\":[null,null,null,358.31807999999995,null,null,null,null,0],\"221011210\":[null,null,null,120,null,null,null,null,0],\"221110210\":[null,null,null,null,null,1,null,null,0.9],\"221112010\":[null,null,null,null,null,null,1,null,0.9],\"010000000\":[0,null,0,0,4.0817959045964045,0,0,0,0],\"001000000\":[0,0,null,0,84.67199999999998,0,0,0,0],\"000100000\":[0,0,0,null,9.529568999999999,0,0,0,0],\"000010000\":[748.1875777067742,0,0,0,null,0,0,0,0],\"000001000\":[0,0,0,0,22.667199248071107,null,0,0,0],\"000000100\":[0,0,0,0,4.47915514392847,0,null,0,0],\"000000010\":[0,0,0,0,37.63907481599998,0,0,null,0],\"000000001\":[0,0,0,0,310.7349739248876,0,0,0,null],\"011020000\":[41.82119423999998,null,null,0,null,0,0,0,0],\"010120000\":[100,null,0,null,null,0,0,0,0],\"010021000\":[0,null,207.35999999999999,0,null,null,0,0,0],\"010020100\":[0,null,34.3,0,null,0,null,0,0],\"010020010\":[0,null,0,0,null,120,0,null,0],\"010020001\":[9.529568999999997,null,0,0,null,0,0,0,null],\"001120000\":[0,0,null,null,null,0,34.3,0,0],\"001021000\":[0,0,null,0,null,null,0,0,144],\"001020100\":[0,0,null,36.87786216692119,null,0,null,0,0],\"001020010\":[0,0,null,0,null,0,100,null,0],\"001020001\":[0,0,null,0,null,175.57585919999994,0,0,null],\"000121000\":[0,100,0,null,null,null,0,0,0],\"000120100\":[24.39569663999999,0,0,null,null,0,null,0,0],\"000120010\":[0,0,0,null,null,0,100,null,0],\"000120001\":[27.782999999999998,0,0,null,null,0,0,0,null],\"000021100\":[0,0,8.894264399999997,0,null,null,null,0,0],\"000021010\":[0,0,0,0,null,null,0,null,172.79999999999998],\"000021001\":[0,0,624.1270313779198,0,null,null,0,0,null],\"000020110\":[0,0,0,0,null,0,null,null,102.41925119999999],\"000020101\":[0,0,0,0,null,0,null,174.18239999999997,null],\"000020011\":[0,0,0,0,null,0,41.16,null,null],\"002021110\":[1,1,null,0.7,null,null,null,null,1],\"000120112\":[2.48832,1,0.7,null,null,1],\"012021010\":[1,null,null,1,null,null,1.728,null,1],\"012021100\":[1,null,null,1,null,null,null,1,1],\"010022011\":[1,null,1,1.2,null,null,1],\"002021101\":[0.7,0.7,null,0.7,null,null,null,4.299816959999999],\"002121121\":[1,2.9859839999999997],\"012021121\":[1,null,null,1],\"010021012\":[1.728,null,1,1,null,null,1],\"000021121\":[1,1,1.44,1],\"012021001\":[1,null,null,1,null,null,1.44,1],\"010020121\":[1,null,1,1,null,1],\"002021011\":[1,1,null,1,null,null,2.0736],\"011021002\":[1.2,null,null,1,null,null,1,1],\"001021012\":[1.2,1,null,1,null,null,1],\"001221100\":[0.7,0.7,null,null,null,null,null,0.7,0.972],\"001220101\":[0.7,0.7,null,null,null,2.0736,null,0.756],\"011220121\":[0.9,null,null,null,null,1],\"011221102\":[1.2,null,null,null,null,null,null,0.9],\"001020121\":[0.7,1.2,null,1,null,1],\"001220110\":[1,1,null,null,null,1,null,null,1.2],\"001221112\":[1.2,1],\"001020211\":[0.7,0.7,null,0.7,null,1.2],\"001122211\":[1,1],\"000120121\":[1,1.2,1,null,null,1],\"002121100\":[1,0.7,null,null,null,null,null,1,1],\"012020101\":[0.7,null,null,0.7,null,0.7,null,1],\"012120121\":[1,null,null,null,null,1],\"001120201\":[0.7,0.7,null,null,null,1,null,0.7],\"011122201\":[1,null,null,null,null,null,null,1],\"001022101\":[0.7,0.7,null,1.44,null,null,null,1],\"001022011\":[1,1,null,1.44,null,null,1],\"011022001\":[1,null,null,1.2,null,null,1,1],\"001122001\":[1,1,null,null,null,null,1,1]};\n\n this.chooseSquare = function() {\n var currentState = game.currentState();\n var availableMoves = game.availableMoves();\n me = game.currentPlayer;\n\n if (iWonLastGame && movesMadeLastGame[currentState]) {\n move = movesMadeLastGame[currentState];\n } else if (learnedStates[currentState]) {\n // Pick the most probable move\n var maxValue = 0.0;\n var potentialMoves = [];\n\n for (var i in learnedStates[currentState]) {\n if (learnedStates[currentState][i] > maxValue) {\n maxValue = learnedStates[currentState][i];\n potentialMoves = [parseInt(i)];\n } else if (learnedStates[currentState][i] == maxValue) {\n potentialMoves.push(parseInt(i));\n } else if (potentialMoves.length == 0) { // Fail-safe\n potentialMoves = [availableMoves[Math.floor(Math.random() * availableMoves.length)]];\n }\n // select a random move from the highest values this allows\n // us to fully train and weed out the default values\n move = potentialMoves[Math.floor(Math.random()*potentialMoves.length)];\n }\n } else {\n // Try something new\n move = availableMoves[Math.floor(Math.random() * availableMoves.length)];\n }\n\n movesMadeThisGame[currentState] = move;\n if (!learnedStates[currentState]) {\n learnedStates[currentState] = new Array();\n for (var i = 0; i < availableMoves.length; i++) {\n learnedStates[currentState][availableMoves[i]] = 1.0;\n }\n }\n\n return move;\n }\n\n this.learn = function() {\n var factor;\n iWonLastGame = game.winner() == me ? true : false;\n\n switch (game.winner()) {\n case \"D\": // Call it a draw\n factor = 1.0;\n break;\n case me: // I won!\n factor = 1.5;\n break;\n default: // I guess we lost\n // More moves left = the greater the loss = the greater the punishment needed\n factor = 0.5 - game.availableMoves().length/10.0;\n // factor = 0.5;\n }\n\n // Review the game\n for (var state in movesMadeThisGame) {\n if (movesMadeThisGame.hasOwnProperty(state)) {\n var squareSelected = movesMadeThisGame[state];\n learnedStates[state][squareSelected] *= factor;\n }\n }\n movesMadeLastGame = movesMadeThisGame;\n movesMadeThisGame = {};\n }\n\n this.learnByPractice = function() {\n var practicedStates = {};\n var opponentPrevMoves = [];\n\n if (game) {\n game.reset();\n } else {\n game = new TicTacToeGame();\n }\n\n // TODO: Training algorithm should reuse a successful sequence of moves until the computer catches on\n for (var i = 0; i < 2; i++) {\n var even = i%2; // We just need to focus on one at a time. The order doesn't matter\n var me = even ? \"O\" : \"X\";\n var moveSequence = 0;\n var iLost = false;\n var gamesWon = 0;\n var gamesLost = 0;\n var gamesDraw = 0;\n\n for (var totalGamesPracticed = 0; totalGamesPracticed < 15000; totalGamesPracticed++) {\n moveSequence = 0;\n do {\n // TODO: have the opponent try the same sequence until we catch on\n // Random move\n opponentMove = game.availableMoves()[Math.floor(Math.random() * game.availableMoves().length)];\n\n if (even) {\n game.move(opponentMove);\n game.move(this.chooseSquare());\n } else {\n game.move(this.chooseSquare());\n game.move(opponentMove);\n }\n\n moveSequence++;\n } while (!game.winner())\n\n iLost = game.winner() == me ? false : true;\n\n switch (game.winner()) {\n case me:\n gamesWon++;\n opponentPrevMoves = [];\n break;\n case \"D\":\n gamesDraw++;\n break;\n default:\n gamesLost++\n }\n\n this.learn();\n game.reset();\n }\n console.log(\"Won: \"+gamesWon);\n console.log(\"Lost: \"+gamesLost);\n console.log(\"Draw: \"+gamesDraw);\n }\n }\n\n this.learnByPractice();\n}", "solve() {\n\t\tlet times = [];\n\t\tlet iteration = 10\n\n\t\tfor(let i = 0; i < iteration; i++) {\n\t\t\tlet start = 0;\n\t\t\tlet end = 1;\n\t\t\tlet step = Math.pow(2, -20);\n\n\t\t\tlet timeAtStart = performance.now();\n\t\t\tlet res = this.integrate(start, end, step);\n\t\t\tlet timeAtEnd = performance.now();\n\t\t\tlet effectiveTime = timeAtEnd - timeAtStart;\n\n\t\t\ttimes.push(effectiveTime); \n\t\t\tthis.data.result = res[0].toFixed(25);\n\t\t\tthis.data.incertitude = res[1].toFixed(25);\n\t\t}\n\t\tthis.average_time(times, iteration)\n\t\t\n\t}", "constructor (id) {\n // Name of the particular instance of the model\n this.id = id\n\n this.modelType = 'BASE'\n\n // Keys are names of the compartments in the model\n this.keys = []\n\n // Dictionary to hold the population of each\n // compartment. Each compartment is represented\n // by the key of the compartment.\n // There are two key compartments that are\n // assumed in other parts of the app:\n // 1. infectious\n // 2. susceptible\n this.compartment = {\n infectious: 0,\n susceptible: 0\n }\n\n // Current time point of the simulation\n this.startTime = 0\n this.time = 0\n\n // The time-points that are used for the simulation\n // Since this will use a simple Newtownain time-step,\n // the time-points define the time steps used in\n // propagating the simulation\n this.times = []\n\n // Parameters are constant values that are used in\n // the calculation of the differentials in the\n // time propagation. Each parameter will be referred\n // by a key\n this.param = {}\n\n this.defaultParams = {\n initPopulation: 50000,\n initPrevalence: 3000,\n probSickCanTravel: 1\n }\n\n // List of parameters that will be exported to a\n // GUI and used as a template to return values\n // to input into this.param\n this.guiParams = [\n // {\n // key: 'initPrevalence',\n // value: 3000,\n // step: 1,\n // placeHolder: '',\n // label: 'infectious'\n // }\n ]\n\n // List of parameters that will be exported to a\n // GUI and used as a template to return values\n // to input into this.param\n this.interventionParams = [\n // Must have an interventionDay for the GUI\n // to recognize interventions properly\n // {\n // key: 'interventionDay',\n // value: 5,\n // step: 1,\n // placeHolder: '',\n // label: 'Intervertion Start Day'\n // },\n // {\n // key: 'reproductionNumber',\n // value: 1.5,\n // step: 0.01,\n // placeHolder: '',\n // label: 'R0'\n // },\n ]\n\n // Stores any variables that need to be dynamically\n // calculated from the compartments at a time-step\n this.var = {}\n\n // The delta for each compartment is the amount\n // it will change at a particular time-point.\n // this.delta can be set externally at the\n // beginning of each this.updateCompartment\n this.delta = {}\n\n // List of all events between compartments\n // that rely on dynamically calculated parameters\n this.varEvents = []\n\n // List of all events between compartments\n // that are proportional to constants in this.param\n this.paramEvents = []\n\n // This is a list of all transfers between\n // compartments, with the actual size of the\n // differentials at the current time-points\n this.events = []\n\n // The transfer for each compartment, which\n // will be constructed from this.events\n this.flow = {}\n\n // Stored list of variables for further analysis\n this.solution = {\n infectious: [],\n susceptible: [],\n incidence: [],\n importIncidence: []\n }\n }", "function howLongDidItTake() {\n var later = new Date();\n return Math.round( (later.getTime() - startMilliseconds) / 1000.0);\n}", "function C007_LunchBreak_Natalie_Wait() {\r\n C007_LunchBreak_Natalie_BadStage = 7;\r\n CurrentTime = CurrentTime + 120000;\r\n if (CurrentTime >= 12.66667 * 60 * 60 * 1000) {\r\n OveridenIntroText = GetText(\"NatalieReturns\");\r\n C007_LunchBreak_Natalie_CurrentStage = 365;\r\n }\r\n}", "computePathToComplete(){\n if (Object.keys(this.state.legs_dict).length !== 0 &&Object.keys(this.state.stops_dict).length !== 0 && this.state.driver_location !== null) {\n\n // Time required to complete all legs\n var time_complete_all_legs = 0\n // Time required to complete driver's remaining path\n var time_complete = 0\n \n // Append legs dictionary with start and stop locations and compute time required to drive from start to stop.\n // Also, compute times to complete driver's path and all legs\n var new_legs_dict = {}\n var is_passed_driver_leg = false\n\n for (var key in this.state.legs_dict) {\n var dict_specs = this.state.legs_dict[key]\n dict_specs[\"startStop_x\"] = this.state.stops_dict[dict_specs[\"startStop\"]][\"x\"]\n dict_specs[\"startStop_y\"] = this.state.stops_dict[dict_specs[\"startStop\"]][\"y\"]\n dict_specs[\"endStop_x\"] = this.state.stops_dict[dict_specs[\"endStop\"]][\"x\"]\n dict_specs[\"endStop_y\"] = this.state.stops_dict[dict_specs[\"endStop\"]][\"y\"]\n \n // Distance between subsequent stops\n var dist = Math.sqrt(Math.pow(dict_specs[\"endStop_x\"] - dict_specs[\"startStop_x\"], 2) + \n Math.pow(dict_specs[\"endStop_y\"] - dict_specs[\"startStop_y\"], 2))\n // Time required to drive from the start to the stop point\n dict_specs[\"time\"] = dist / dict_specs[\"speedLimit\"]\n\n // Update leg info\n new_legs_dict[key] = dict_specs\n\n // Update time to complete the entire path and the remaining path\n time_complete_all_legs += new_legs_dict[key][\"time\"]\n if (is_passed_driver_leg) time_complete += new_legs_dict[key][\"time\"]\n if (key === this.state.driver_location[\"activeLegID\"]) is_passed_driver_leg = true\n }\n\n // Update time to complete the remaining path with the time to complete the current leg\n time_complete += new_legs_dict[this.state.driver_location[\"activeLegID\"]][\"time\"] * (100 - parseInt(this.state.driver_location[\"legProgress\"])) / 100\n \n this.setState({legs_dict: new_legs_dict,\n bonus2_time_complete_all_legs: time_complete_all_legs,\n bonus2_time_complete: time_complete\n })\n } else {\n this.setState({alert_info: {status: true,\n type: \"warning\",\n reason: \"computePath\",\n message: \"Legs, stops and driver location are reqired for this feature to work\"}})\n }\n }", "function generateWait(time) {\n return BOT_HEADER + \"wait(\" + time + \")\" + FCN_ENDING + BOT_HEADER + \"stop()\" + FCN_ENDING\n}", "function fbmodelLoaded() {\r\n\r\n\t const Open = 286.25;\r\n\t const High = 286.65;\r\n\t const Low = 281.07;\r\n\t const Sentiment = -2;\r\n\t console.log(\"FB\");\r\n\t document.getElementById('msg').value = \"no err\"; \r\n\t const inputs = [Open, High, Low, Sentiment];\r\n\t nn.predict(inputs, gotResults);\r\n \t\r\n }", "function compareIng(a,b) {\n var Ta = a.cookTime + a.prepTime;\n var Tb = b.cookTime + b.prepTime;\n if (Ta < Tb) {\n return -1;\n }\n if (Ta > Tb) {\n return 1;\n }\n return 0;\n }", "step(elapsed) {\r\n if (this.done) {\r\n return\r\n }\r\n\r\n console.log(elapsed)\r\n if (this.changes.length == 0) {\r\n console.log(\"getting more things\")\r\n this.update()\r\n }\r\n\r\n for (i in this.changes) {\r\n console.log(i, \" \", this.changes[i])\r\n if (this.changes[i].duration <= 0) {\r\n // remove, but ideally would have list sorted by duration remaining?\r\n this.changes.splice(i, 1)\r\n }\r\n\r\n }\r\n\r\n\r\n }", "function getValidTrainingTypes() {\n // calc max gain not including the next training\n var maxPossible = calcMaxPossibleBTGain();\n\n var validTrainingTypes = {\n\t\tintense : false,\n\t\tnormal : false,\n\t\tlight : false,\n\t\tmulti4 : false,\n\t\tmulti3 : false,\n\t\tmulti2 : false\n };\n var neededFromNextTrain = getDesiredBT() - (maxPossible+getBonusTokens());\n if (neededFromNextTrain > 6) {\n // can't make the goal\n return validTrainingTypes;\n } else if (neededFromNextTrain == 6) {\n validTrainingTypes.light = true;\n } else if (neededFromNextTrain == 4) {\n validTrainingTypes.light = true;\n validTrainingTypes.normal = true;\n } else if (neededFromNextTrain == 2) {\n validTrainingTypes.light = true;\n validTrainingTypes.normal = true;\n validTrainingTypes.intense = true;\n } else if (neededFromNextTrain <= 0) {\n validTrainingTypes.light = true;\n validTrainingTypes.normal = true;\n validTrainingTypes.intense = true;\n }\n // see if any multi training can be done\n var maxBTGain_multi4 = maxPossible - 12;\n var neededFromNext4Trains = getDesiredBT() - (maxBTGain_multi4+getBonusTokens());\n if (neededFromNext4Trains <= 12) {\n validTrainingTypes.multi4 = true;\n }\n var maxBTGain_multi3 = maxPossible - 9;\n var neededFromNext3Trains = getDesiredBT() - (maxBTGain_multi3+getBonusTokens());\n if (neededFromNext3Trains <= 8) {\n validTrainingTypes.multi3 = true;\n }\n var maxBTGain_multi2 = maxPossible - 6;\n var neededFromNext2Trains = getDesiredBT() - (maxBTGain_multi2+getBonusTokens());\n if (neededFromNext2Trains <= 4) {\n validTrainingTypes.multi2 = true;\n }\n return validTrainingTypes;\n}", "function compareTasks(a, b) {\n if (a.urgency > b.urgency) {\n return -1;\n } else if (a.urgency < b.urgency) {\n return 1;\n }\n return 0;\n}", "timeOk() {\n return performance.now() - this._lastFrameStart < this._THRESHOLD;\n }", "updateMatch(_dt) {\n const p1 = this.players.p1;\n const p2 = this.players.p2;\n\n // case declarations\n let Ply1;\n let Ply2;\n let dist;\n\n if (p1) { Ply1 = p1.player; }\n if (p2) { Ply2 = p2.player; }\n\n let running = true;\n\n switch (this.state) {\n\n case 'inGame':\n\n // Input handling\n\n if (Ply1.input.boost) {\n Ply1.data.boosting = true;\n }\n\n if (Ply2.input.boost) {\n Ply2.data.boosting = true;\n }\n\n if (Ply1.input.lance) {\n if (!Ply1.data.lanceDown && !Ply1.lanceReady) {\n Ply1.data.lanceDown = true;\n }\n }\n\n if (Ply2.input.lance) {\n if (!Ply2.data.lanceDown && !Ply2.lanceReady) {\n Ply2.data.lanceDown = true;\n }\n }\n\n // adjust player 1 state\n\n // * LANCE * //\n if (Ply1.data.lanceDown && Ply1.data.lanceDropProgress < 1) {\n Ply1.data.lanceDropProgress += _dt;\n\n if (Ply1.data.lanceDropProgress > 1) {\n Ply1.data.lanceDropProgress = 1;\n Ply1.lanceReady = true;\n Ply1.lanceState = 'ready';\n }\n }\n\n if (Ply1.lanceReady && Ply1.input.lance) {\n Ply1.lanceState = 'charging';\n Ply1.data.lanceProgress -= _dt;\n\n if (Ply1.data.lanceProgress < -1) {\n Ply1.data.lanceProgress = -1;\n }\n } else if (Ply1.lanceReady && Ply1.lanceState === 'charging' && !Ply1.input.lance) {\n Ply1.lanceState = 'forward';\n Ply1.lanceCharge = -Ply1.data.lanceProgress;\n } else if (Ply1.lanceState === 'forward') {\n Ply1.data.lanceProgress += _dt * 10;\n\n if (Ply1.data.lanceProgress > Ply1.lanceCharge) {\n Ply1.data.lanceProgress = Ply1.lanceCharge;\n Ply1.lanceState = 'holding';\n }\n } else if (Ply1.lanceState === 'holding') {\n Ply1.lanceHoldTime += _dt;\n\n if (Ply1.lanceHoldTime > Ply1.lanceCharge / 2) {\n Ply1.lanceHoldTime = 0;\n Ply1.lanceState = 'returning';\n }\n } else if (Ply1.lanceState === 'returning') {\n Ply1.data.lanceProgress -= _dt * 2;\n\n if (Ply1.data.lanceProgress < 0) {\n Ply1.data.lanceProgress = 0;\n Ply1.lanceState = 'ready';\n Ply1.lanceCharge = 0;\n }\n }\n\n // * BOOST * //\n if (Ply1.data.boostProgress < 1) {\n Ply1.data.boostProgress += _dt;\n\n if (Ply1.data.boostProgress > 1) {\n Ply1.data.boostProgress = 1;\n }\n }\n\n if (Ply1.data.boosting) {\n if (Ply1.acceleratingTime < Ply1.acceleratingTotalTime) {\n Ply1.acceleratingTime += _dt;\n Ply1.data.velocity += (Ply1.data.boostProgress ** 2) * 20;\n } else {\n Ply1.acceleratingTime = 0;\n Ply1.data.boosting = false;\n Ply1.data.boostProgress = 0;\n }\n }\n\n if (Ply1.data.velocity > Ply1.minSpeed) {\n Ply1.data.velocity *= 0.997;\n\n if (Ply1.data.velocity < Ply1.minSpeed) {\n Ply1.data.velocity = Ply1.minSpeed;\n }\n } else if (Ply1.data.velocity < Ply1.minSpeed) {\n Ply1.data.velocity += _dt * 80;\n\n if (Ply1.data.velocity > Ply1.minSpeed) {\n Ply1.data.velocity = Ply1.minSpeed;\n }\n } else if (Ply1.data.velocity > Ply1.maxSpeed) {\n Ply1.data.velocity = Ply1.maxSpeed;\n }\n\n Ply1.data.cx = Ply1.data.bx;\n Ply1.data.bx = Ply1.data.ax;\n if (!this.impact) {\n Ply1.data.ax -= Ply1.data.velocity * _dt;\n } else {\n Ply1.data.ax -= Ply1.data.velocity * _dt * 0.05;\n }\n\n\n // adjust player 2 state\n\n // * LANCE * //\n if (Ply2.data.lanceDown && Ply2.data.lanceDropProgress < 1) {\n Ply2.data.lanceDropProgress += _dt;\n\n if (Ply2.data.lanceDropProgress > 1) {\n Ply2.data.lanceDropProgress = 1;\n Ply2.lanceReady = true;\n Ply2.lanceState = 'ready';\n }\n }\n\n if (Ply2.lanceReady && Ply2.input.lance) {\n Ply2.lanceState = 'charging';\n Ply2.data.lanceProgress -= _dt;\n\n if (Ply2.data.lanceProgress < -1) {\n Ply2.data.lanceProgress = -1;\n }\n } else if (Ply2.lanceReady && Ply2.lanceState === 'charging' && !Ply2.input.lance) {\n Ply2.lanceState = 'forward';\n Ply2.lanceCharge = -Ply2.data.lanceProgress;\n } else if (Ply2.lanceState === 'forward') {\n Ply2.data.lanceProgress += _dt * 10;\n\n if (Ply2.data.lanceProgress > Ply2.lanceCharge) {\n Ply2.data.lanceProgress = Ply2.lanceCharge;\n Ply2.lanceState = 'holding';\n }\n } else if (Ply2.lanceState === 'holding') {\n Ply2.lanceHoldTime += _dt;\n\n if (Ply2.lanceHoldTime > Ply2.lanceCharge / 2) {\n Ply2.lanceHoldTime = 0;\n Ply2.lanceState = 'returning';\n }\n } else if (Ply2.lanceState === 'returning') {\n Ply2.data.lanceProgress -= _dt * 2;\n\n if (Ply2.data.lanceProgress < 0) {\n Ply2.data.lanceProgress = 0;\n Ply2.lanceState = 'ready';\n Ply2.lanceCharge = 0;\n }\n }\n\n // * BOOST * //\n if (Ply2.data.boostProgress < 1) {\n Ply2.data.boostProgress += _dt;\n\n if (Ply2.data.boostProgress > 1) {\n Ply2.data.boostProgress = 1;\n }\n }\n\n if (Ply2.data.boosting) {\n if (Ply2.acceleratingTime < Ply2.acceleratingTotalTime) {\n Ply2.acceleratingTime += _dt;\n Ply2.data.velocity += (Ply2.data.boostProgress ** 2) * 20;\n } else {\n Ply2.acceleratingTime = 0;\n Ply2.data.boosting = false;\n Ply2.data.boostProgress = 0;\n }\n }\n\n if (Ply2.data.velocity > Ply2.minSpeed) {\n Ply2.data.velocity *= 0.997;\n\n if (Ply2.data.velocity < Ply2.minSpeed) {\n Ply2.data.velocity = Ply2.minSpeed;\n }\n } else if (Ply2.data.velocity < Ply2.minSpeed) {\n Ply2.data.velocity += _dt * 80;\n\n\n if (Ply2.data.velocity > Ply2.minSpeed) {\n Ply2.data.velocity = Ply2.minSpeed;\n }\n } else if (Ply2.data.velocity > Ply2.maxSpeed) {\n Ply2.data.velocity = Ply2.maxSpeed;\n }\n\n Ply2.data.cx = Ply2.data.bx;\n Ply2.data.bx = Ply2.data.ax;\n if (!this.impact) {\n Ply2.data.ax -= Ply2.data.velocity * _dt;\n } else {\n Ply2.data.ax -= Ply2.data.velocity * _dt * 0.05;\n }\n\n\n // * COLLISION CHECK AND HANDLING * //\n\n dist = (Ply1.data.ax + Ply2.data.ax) -\n (Ply1.data.lanceProgress * 20) - (Ply2.data.lanceProgress * 20);\n\n if (Ply1.lanceReady || Ply2.lanceReady) {\n dist -= 470;\n }\n\n if (dist < 0 && !this.impact) {\n // Collision\n\n this.impact = true;\n\n // calculate forces and victory\n\n let P1Power = Ply1.data.velocity + (Ply1.data.lanceProgress * 500);\n let P2Power = Ply2.data.velocity + (Ply2.data.lanceProgress * 500);\n\n p1.emit('impact', new Message('impactHit', { power: P1Power + P2Power, point: 0 }));\n p2.emit('impact', new Message('impactHit', { power: P1Power + P2Power, point: 0 }));\n\n if (!Ply1.lanceReady && !Ply2.lanceReady) {\n // Draw (no one did anything)\n\n p1.emit('matchResults', new Message('draw', 'normal'));\n p2.emit('matchResults', new Message('draw', 'normal'));\n } else {\n // if (Ply1.lanceReady) {\n // }\n\n // if (Ply2.lanceReady) {\n // }\n\n // Give a bonus to the ones with lances down\n if (Ply1.lanceReady && Ply2.lanceReady) {\n P1Power *= 1.2;\n P2Power *= 1.2;\n } else if (Ply1.lanceReady) {\n P1Power *= 1.2;\n } else if (Ply2.lanceReady) {\n P2Power *= 1.2;\n }\n\n // calculate winner\n // allow for some fudge in case things are almost a tie\n if (P1Power > P2Power + 20) {\n p1.emit('matchResults', new Message('win', { }));\n p2.emit('matchResults', new Message('loss', { }));\n\n console.log(`${p1.player.name} has won!`);\n } else if (P2Power > P1Power + 20) {\n p1.emit('matchResults', new Message('loss', { }));\n p2.emit('matchResults', new Message('win', { }));\n\n console.log(`${p2.player.name} has won!`);\n } else {\n p1.emit('matchResults', new Message('draw', 'equal'));\n p2.emit('matchResults', new Message('draw', 'equal'));\n\n console.log('The match was a draw.');\n }\n }\n } else if (!this.impact) {\n // Game still running\n\n p1.emit('matchGameUpdate', new Message('gameUpdate', { p1: Ply1.data, p2: Ply2.data }));\n p2.emit('matchGameUpdate', new Message('gameUpdate', { p1: Ply1.data, p2: Ply2.data }));\n } else {\n // Post game\n\n this.postTime -= _dt;\n\n p1.emit('postGameUpdate', new Message('postGameUpdate', { p1: Ply1.data, p2: Ply2.data }));\n p2.emit('postGameUpdate', new Message('postGameUpdate', { p1: Ply1.data, p2: Ply2.data }));\n\n if (this.postTime < 0) {\n p1.emit('matchEnded');\n p2.emit('matchEnded');\n\n p1.leave(this.hash);\n p2.leave(this.hash);\n\n p1.join('lobby');\n p2.join('lobby');\n\n running = false;\n }\n }\n\n\n break;\n\n case 'preparing':\n\n this.setupTimer += _dt;\n\n p1.emit('prepUpdate', new Message('setupTime', this.setupTimer));\n p2.emit('prepUpdate', new Message('setupTime', this.setupTimer));\n\n if (this.setupTimer > this.maxSetupTimer) {\n this.state = 'inGame';\n\n // announce match start\n p1.emit('matchStarted', new Message('matchStarted', new Date().getTime()));\n p2.emit('matchStarted', new Message('matchStarted', new Date().getTime()));\n }\n\n break;\n\n case 'userLeftGame':\n\n if (p1 !== undefined) {\n p1.emit('matchResults', new Message('draw', 'userLeft'));\n p1.leave(this.hash);\n p1.join('lobby');\n }\n if (p2 !== undefined) {\n p2.emit('matchResults', new Message('draw', 'userLeft'));\n p2.leave(this.hash);\n p2.join('lobby');\n }\n\n running = false;\n\n break;\n\n default:\n case 'waiting':\n\n break;\n\n }\n\n // return false to say the match hasn't ended\n return running;\n }", "async function main() {\n const data = generateData();\n defineModel();\n await trainModel(data.train, 50);\n await test(data.test);\n}", "function compareScenarioResults(\n result: ScenarioResult,\n previous: ScenarioResult\n): number {\n const error = Math.max(result.error, previous.error);\n const difference = (previous.time - result.time) * 100 / previous.time;\n\n if (Math.abs(difference) <= error) {\n return 0;\n }\n\n return difference;\n}", "function observe(obs, updateCurrent){ \n var next_state = {};\n \n for(var i in current_state){\n next_state[i] = 0;\n }\n \n var total = 0;\n for(var i in transition(false)){\n next_state[i] += transition(false)[i]*observation_model[i][obs]\n total += transition(false)[i]*observation_model[i][obs];\n //console.log(i,current_state[i],observation_model[i][obs]);\n }\n //console.log(total);\n \n for(var i in next_state){\n next_state[i] = next_state[i]/total;\n }\n \n if (updateCurrent){\n current_state = next_state;\n states_array.push(current_state);\n }\n else {return next_state;} \n }", "train() {\n if(!this.running && ! this.recording)\n {\n this.disableButtons(true);\n this.trainingData().then((t)=> {\n this.updateRows();\n if(this.USE_WORKER)\n {\n this.myWorker.postMessage({action:\"train\",data:t});\n }\n else\n {\n this.myModel.train(t);\n this.trainingEnd();\n }\n });\n }\n }", "function concurrent_time() {\n if (app_opt.simulate)\n return simulate(event_opt.simulate.min, event_opt.simulate.max);\n else\n return event_opt.simulate.tick;\n }" ]
[ "0.57509995", "0.55477947", "0.55213755", "0.55071896", "0.54662967", "0.5431361", "0.5413336", "0.53732127", "0.5364698", "0.53614587", "0.5345891", "0.5305206", "0.5303939", "0.5261517", "0.52066517", "0.51738566", "0.5137689", "0.5123167", "0.5120703", "0.5078458", "0.50624126", "0.5048483", "0.50472254", "0.50448906", "0.50365573", "0.50189745", "0.5018689", "0.5018605", "0.50186", "0.5014994", "0.49902505", "0.49685612", "0.49560264", "0.49541175", "0.4937997", "0.4936893", "0.49192107", "0.49111065", "0.4902642", "0.48903313", "0.48874515", "0.48805133", "0.4878798", "0.4872015", "0.4863477", "0.4862373", "0.48593172", "0.48579332", "0.48411578", "0.48385635", "0.48335266", "0.48328942", "0.48324537", "0.48313457", "0.4829769", "0.48295087", "0.48242927", "0.48219907", "0.4814584", "0.48144132", "0.48051623", "0.48049048", "0.4800375", "0.47933495", "0.47838733", "0.47812444", "0.47799665", "0.47786093", "0.47741714", "0.4765044", "0.47646245", "0.47481054", "0.474563", "0.47437087", "0.4738907", "0.47353363", "0.47243664", "0.4721224", "0.4717879", "0.47176465", "0.47026166", "0.4701432", "0.4690961", "0.46903038", "0.46896103", "0.46887928", "0.4685782", "0.46852913", "0.46846482", "0.46784306", "0.46779346", "0.46745756", "0.46738258", "0.4671285", "0.4670535", "0.46692568", "0.46691322", "0.46667832", "0.46664083", "0.46618134", "0.4660428" ]
0.0
-1
TODO Before we release concurrent mode, revisit this and decide whether a mocked scheduler is the actual recommendation. The alternative could be a testing build, a new lib, or whatever; we dunno just yet. This message is for early adopters to get their tests right.
function warnIfUnmockedScheduler(fiber) { { if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) { if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) { didWarnAboutUnmockedScheduler = true; error('In Concurrent or Sync modes, the "scheduler" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \n' + "jest.mock('scheduler', () => require('scheduler/unstable_mock'));\n\n" + 'For more info, visit https://fb.me/react-mock-scheduler'); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function RequestScheduler() {}", "function warnIfUnmockedScheduler(fiber){{if(didWarnAboutUnmockedScheduler===false&&Scheduler.unstable_flushAllWithoutAsserting===undefined){if(fiber.mode&BlockingMode||fiber.mode&ConcurrentMode){didWarnAboutUnmockedScheduler=true;error('In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked '+'to guarantee consistent behaviour across tests and browsers. '+'For example, with jest: \\n'+\"jest.mock('scheduler', () => require('scheduler/unstable_mock'));\\n\\n\"+'For more info, visit https://fb.me/react-mock-scheduler');}}}}", "function warnIfUnmockedScheduler(fiber){{if(didWarnAboutUnmockedScheduler===false&&Scheduler.unstable_flushAllWithoutAsserting===undefined){if(fiber.mode&BlockingMode||fiber.mode&ConcurrentMode){didWarnAboutUnmockedScheduler=true;error('In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked '+'to guarantee consistent behaviour across tests and browsers. '+'For example, with jest: \\n'+\"jest.mock('scheduler', () => require('scheduler/unstable_mock'));\\n\\n\"+'For more info, visit https://fb.me/react-mock-scheduler');}}}}", "function warnIfUnmockedScheduler(fiber){{if(didWarnAboutUnmockedScheduler===false&&Scheduler.unstable_flushAllWithoutAsserting===undefined){if(fiber.mode&BlockingMode||fiber.mode&ConcurrentMode){didWarnAboutUnmockedScheduler=true;error('In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked '+'to guarantee consistent behaviour across tests and browsers. '+'For example, with jest: \\n'+\"jest.mock('scheduler', () => require('scheduler/unstable_mock'));\\n\\n\"+'For more info, visit https://fb.me/react-mock-scheduler');}}}}", "function warnIfUnmockedScheduler(fiber){{if(didWarnAboutUnmockedScheduler===false&&Scheduler.unstable_flushAllWithoutAsserting===undefined){if(fiber.mode&BlockingMode||fiber.mode&ConcurrentMode){didWarnAboutUnmockedScheduler=true;error('In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked '+'to guarantee consistent behaviour across tests and browsers. '+'For example, with jest: \\n'+// Break up requires to avoid accidentally parsing them as dependencies.\n\"jest.mock('scheduler', () => require\"+\"('scheduler/unstable_mock'));\\n\\n\"+'For more info, visit https://reactjs.org/link/mock-scheduler');}}}}", "function warnIfUnmockedScheduler(fiber){{if(didWarnAboutUnmockedScheduler===false&&Scheduler.unstable_flushAllWithoutAsserting===undefined){if(fiber.mode&BlockingMode||fiber.mode&ConcurrentMode){didWarnAboutUnmockedScheduler=true;error('In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked '+'to guarantee consistent behaviour across tests and browsers. '+'For example, with jest: \\n'+// Break up requires to avoid accidentally parsing them as dependencies.\n\"jest.mock('scheduler', () => require\"+\"('scheduler/unstable_mock'));\\n\\n\"+'For more info, visit https://reactjs.org/link/mock-scheduler');}}}}", "function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n error('In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + \"jest.mock('scheduler', () => require('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://fb.me/react-mock-scheduler');\n }\n }\n }\n }", "function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n error('In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + \"jest.mock('scheduler', () => require('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://fb.me/react-mock-scheduler');\n }\n }\n }\n }", "function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n error('In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + \"jest.mock('scheduler', () => require('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://fb.me/react-mock-scheduler');\n }\n }\n }\n }", "function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n error('In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + \"jest.mock('scheduler', () => require('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://fb.me/react-mock-scheduler');\n }\n }\n }\n }", "function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n error('In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + \"jest.mock('scheduler', () => require('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://fb.me/react-mock-scheduler');\n }\n }\n }\n }", "function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n error('In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + \"jest.mock('scheduler', () => require('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://fb.me/react-mock-scheduler');\n }\n }\n }\n }", "function warnIfUnmockedScheduler(fiber) {\n {\n if (\n didWarnAboutUnmockedScheduler === false &&\n Scheduler.unstable_flushAllWithoutAsserting === undefined\n ) {\n if (\n fiber.mode & BlockingMode ||\n fiber.mode & ConcurrentMode\n ) {\n didWarnAboutUnmockedScheduler = true;\n\n error(\n 'In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' +\n 'to guarantee consistent behaviour across tests and browsers. ' +\n 'For example, with jest: \\n' +\n \"jest.mock('scheduler', () => require('scheduler/unstable_mock'));\\n\\n\" +\n 'For more info, visit https://fb.me/react-mock-scheduler',\n );\n }\n }\n }\n }", "function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BatchedMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n warningWithoutStack$1(false, 'In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + \"jest.mock('scheduler', () => require('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://fb.me/react-mock-scheduler');\n } else if (warnAboutUnmockedScheduler === true) {\n didWarnAboutUnmockedScheduler = true;\n warningWithoutStack$1(false, 'Starting from React v17, the \"scheduler\" module will need to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + \"jest.mock('scheduler', () => require('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://fb.me/react-mock-scheduler');\n }\n }\n }\n }", "function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n error('In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + // Break up requires to avoid accidentally parsing them as dependencies.\n \"jest.mock('scheduler', () => require\" + \"('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://reactjs.org/link/mock-scheduler');\n }\n }\n }\n }", "function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n error('In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + // Break up requires to avoid accidentally parsing them as dependencies.\n \"jest.mock('scheduler', () => require\" + \"('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://reactjs.org/link/mock-scheduler');\n }\n }\n }\n }", "function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n error('In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + // Break up requires to avoid accidentally parsing them as dependencies.\n \"jest.mock('scheduler', () => require\" + \"('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://reactjs.org/link/mock-scheduler');\n }\n }\n }\n }", "function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n error('In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + // Break up requires to avoid accidentally parsing them as dependencies.\n \"jest.mock('scheduler', () => require\" + \"('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://reactjs.org/link/mock-scheduler');\n }\n }\n }\n }", "function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n error('In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + // Break up requires to avoid accidentally parsing them as dependencies.\n \"jest.mock('scheduler', () => require\" + \"('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://reactjs.org/link/mock-scheduler');\n }\n }\n }\n }", "function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BatchedMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n warningWithoutStack$1(false, 'In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + \"jest.mock('scheduler', () => require('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://fb.me/react-mock-scheduler');\n } else if (warnAboutUnmockedScheduler === true) {\n didWarnAboutUnmockedScheduler = true;\n warningWithoutStack$1(false, 'Starting from React v17, the \"scheduler\" module will need to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + \"jest.mock('scheduler', () => require('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://fb.me/react-mock-scheduler');\n }\n }\n }\n}", "function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BatchedMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n warningWithoutStack$1(false, 'In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + \"jest.mock('scheduler', () => require('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://fb.me/react-mock-scheduler');\n } else if (warnAboutUnmockedScheduler === true) {\n didWarnAboutUnmockedScheduler = true;\n warningWithoutStack$1(false, 'Starting from React v17, the \"scheduler\" module will need to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + \"jest.mock('scheduler', () => require('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://fb.me/react-mock-scheduler');\n }\n }\n }\n}", "function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BatchedMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n warningWithoutStack$1(false, 'In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + \"jest.mock('scheduler', () => require('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://fb.me/react-mock-scheduler');\n } else if (warnAboutUnmockedScheduler === true) {\n didWarnAboutUnmockedScheduler = true;\n warningWithoutStack$1(false, 'Starting from React v17, the \"scheduler\" module will need to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + \"jest.mock('scheduler', () => require('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://fb.me/react-mock-scheduler');\n }\n }\n }\n}", "function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BatchedMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n warningWithoutStack$1(false, 'In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + \"jest.mock('scheduler', () => require('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://fb.me/react-mock-scheduler');\n } else if (warnAboutUnmockedScheduler === true) {\n didWarnAboutUnmockedScheduler = true;\n warningWithoutStack$1(false, 'Starting from React v17, the \"scheduler\" module will need to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + \"jest.mock('scheduler', () => require('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://fb.me/react-mock-scheduler');\n }\n }\n }\n}", "function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BatchedMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n warningWithoutStack$1(false, 'In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + \"jest.mock('scheduler', () => require('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://fb.me/react-mock-scheduler');\n } else if (warnAboutUnmockedScheduler === true) {\n didWarnAboutUnmockedScheduler = true;\n warningWithoutStack$1(false, 'Starting from React v17, the \"scheduler\" module will need to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + \"jest.mock('scheduler', () => require('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://fb.me/react-mock-scheduler');\n }\n }\n }\n}", "function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n warningWithoutStack$1(false, 'In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + \"jest.mock('scheduler', () => require('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://fb.me/react-mock-scheduler');\n } else if (warnAboutUnmockedScheduler === true) {\n didWarnAboutUnmockedScheduler = true;\n warningWithoutStack$1(false, 'Starting from React v17, the \"scheduler\" module will need to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + \"jest.mock('scheduler', () => require('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://fb.me/react-mock-scheduler');\n }\n }\n }\n}", "function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n warningWithoutStack$1(false, 'In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + \"jest.mock('scheduler', () => require('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://fb.me/react-mock-scheduler');\n } else if (warnAboutUnmockedScheduler === true) {\n didWarnAboutUnmockedScheduler = true;\n warningWithoutStack$1(false, 'Starting from React v17, the \"scheduler\" module will need to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + \"jest.mock('scheduler', () => require('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://fb.me/react-mock-scheduler');\n }\n }\n }\n}", "function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n warningWithoutStack$1(false, 'In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + \"jest.mock('scheduler', () => require('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://fb.me/react-mock-scheduler');\n } else if (warnAboutUnmockedScheduler === true) {\n didWarnAboutUnmockedScheduler = true;\n warningWithoutStack$1(false, 'Starting from React v17, the \"scheduler\" module will need to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + \"jest.mock('scheduler', () => require('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://fb.me/react-mock-scheduler');\n }\n }\n }\n}", "function warnIfUnmockedScheduler(fiber) {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n error(\"In Concurrent or Sync modes, the \\\"scheduler\\\" module needs to be mocked to guarantee consistent behaviour across tests and browsers. For example, with jest: \\njest.mock('scheduler', () => require('scheduler/unstable_mock'));\\n\\nFor more info, visit https://reactjs.org/link/mock-scheduler\");\n }\n }\n }", "function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n\n error('In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + // Break up requires to avoid accidentally parsing them as dependencies.\n \"jest.mock('scheduler', () => require\" + \"('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://reactjs.org/link/mock-scheduler');\n }\n }\n }\n}", "function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n\n error('In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + // Break up requires to avoid accidentally parsing them as dependencies.\n \"jest.mock('scheduler', () => require\" + \"('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://reactjs.org/link/mock-scheduler');\n }\n }\n }\n}", "function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n\n error('In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + // Break up requires to avoid accidentally parsing them as dependencies.\n \"jest.mock('scheduler', () => require\" + \"('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://reactjs.org/link/mock-scheduler');\n }\n }\n }\n}", "function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n\n error('In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + // Break up requires to avoid accidentally parsing them as dependencies.\n \"jest.mock('scheduler', () => require\" + \"('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://reactjs.org/link/mock-scheduler');\n }\n }\n }\n}", "function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n\n error('In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + // Break up requires to avoid accidentally parsing them as dependencies.\n \"jest.mock('scheduler', () => require\" + \"('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://reactjs.org/link/mock-scheduler');\n }\n }\n }\n}", "function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n\n error('In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + // Break up requires to avoid accidentally parsing them as dependencies.\n \"jest.mock('scheduler', () => require\" + \"('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://reactjs.org/link/mock-scheduler');\n }\n }\n }\n}", "function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n\n error('In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + // Break up requires to avoid accidentally parsing them as dependencies.\n \"jest.mock('scheduler', () => require\" + \"('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://reactjs.org/link/mock-scheduler');\n }\n }\n }\n}", "function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n\n error('In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + // Break up requires to avoid accidentally parsing them as dependencies.\n \"jest.mock('scheduler', () => require\" + \"('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://reactjs.org/link/mock-scheduler');\n }\n }\n }\n}", "function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n\n error('In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + // Break up requires to avoid accidentally parsing them as dependencies.\n \"jest.mock('scheduler', () => require\" + \"('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://reactjs.org/link/mock-scheduler');\n }\n }\n }\n}", "function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n\n error('In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + // Break up requires to avoid accidentally parsing them as dependencies.\n \"jest.mock('scheduler', () => require\" + \"('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://reactjs.org/link/mock-scheduler');\n }\n }\n }\n}", "function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n\n error('In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + // Break up requires to avoid accidentally parsing them as dependencies.\n \"jest.mock('scheduler', () => require\" + \"('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://reactjs.org/link/mock-scheduler');\n }\n }\n }\n}", "function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n\n error('In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + // Break up requires to avoid accidentally parsing them as dependencies.\n \"jest.mock('scheduler', () => require\" + \"('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://reactjs.org/link/mock-scheduler');\n }\n }\n }\n}", "function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n\n error('In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + // Break up requires to avoid accidentally parsing them as dependencies.\n \"jest.mock('scheduler', () => require\" + \"('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://reactjs.org/link/mock-scheduler');\n }\n }\n }\n}", "function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n\n error('In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + // Break up requires to avoid accidentally parsing them as dependencies.\n \"jest.mock('scheduler', () => require\" + \"('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://reactjs.org/link/mock-scheduler');\n }\n }\n }\n}", "function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n\n error('In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + // Break up requires to avoid accidentally parsing them as dependencies.\n \"jest.mock('scheduler', () => require\" + \"('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://reactjs.org/link/mock-scheduler');\n }\n }\n }\n}", "function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n\n error('In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + // Break up requires to avoid accidentally parsing them as dependencies.\n \"jest.mock('scheduler', () => require\" + \"('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://reactjs.org/link/mock-scheduler');\n }\n }\n }\n}", "function scheduled(input, scheduler) {\n\t if (input != null) {\n\t if (isInteropObservable(input)) {\n\t return scheduleObservable(input, scheduler);\n\t }\n\t else if (isPromise(input)) {\n\t return schedulePromise(input, scheduler);\n\t }\n\t else if (isArrayLike(input)) {\n\t return scheduleArray(input, scheduler);\n\t }\n\t else if (isIterable(input) || typeof input === 'string') {\n\t return scheduleIterable(input, scheduler);\n\t }\n\t }\n\t throw new TypeError((input !== null && typeof input || input) + ' is not observable');\n\t}", "function scheduled(input, scheduler) {\n if (input != null) {\n if (isInteropObservable(input)) {\n return scheduleObservable(input, scheduler);\n }\n else if ((0,isPromise/* isPromise */.t)(input)) {\n return schedulePromise(input, scheduler);\n }\n else if ((0,isArrayLike/* isArrayLike */.z)(input)) {\n return (0,scheduleArray/* scheduleArray */.r)(input, scheduler);\n }\n else if (isIterable(input) || typeof input === 'string') {\n return scheduleIterable(input, scheduler);\n }\n }\n throw new TypeError((input !== null && typeof input || input) + ' is not observable');\n}", "function scheduled(input, scheduler) {\n if (input != null) {\n if (isInteropObservable(input)) {\n return scheduleObservable(input, scheduler);\n }\n else if (isPromise(input)) {\n return schedulePromise(input, scheduler);\n }\n else if (isArrayLike(input)) {\n return scheduleArray(input, scheduler);\n }\n else if (isIterable(input) || typeof input === 'string') {\n return scheduleIterable(input, scheduler);\n }\n }\n throw new TypeError((input !== null && typeof input || input) + ' is not observable');\n}", "function runScheduler()\n{\n schedulerTick();\n setTimeout(runScheduler, scheduler_tick_interval);\n}", "function Scheduler() {\n this.clock = 0\n this.upcoming_events = []\n this.running = true\n this.devices = {}\n}", "function isScheduler(value) {\n return value && typeof value.schedule === 'function';\n}", "function isScheduler(value) {\n return value && typeof value.schedule === 'function';\n}", "scheduler() {\n const {busyApps, appPriorities, ticks} = this;\n this.__apps.map((app, appId) => {\n return {\n appId, app,\n busy: busyApps[appId],\n priority: appPriorities[appId]\n };\n }).filter(({app, appId, busy, priority}) => {\n return app && !busy && priority >= 0 && ticks % priority === 0;\n }).forEach(({app, priority}) => {\n // Set the app busy, the app itself should \"unbusy\" itself,\n // when the idle call is done.\n // That happens in <HApplication._startIdle>\n // If the app is not busy, then make a idle call:\n app._startIdle();\n });\n if (this._updateZIndexOfChildrenBuffer.length !== 0) {\n this._flushUpdateZIndexOfChilden();\n }\n }", "function Scheduler() {\n this.tasks = [];\n this.current_running = 0;\n this.enabled = false;\n this.running = {};\n}", "function of() {\n\t var args = [];\n\t for (var _i = 0; _i < arguments.length; _i++) {\n\t args[_i] = arguments[_i];\n\t }\n\t var scheduler = args[args.length - 1];\n\t if (isScheduler(scheduler)) {\n\t args.pop();\n\t return scheduleArray(args, scheduler);\n\t }\n\t else {\n\t return fromArray(args);\n\t }\n\t}", "function resetSchedulerState() {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n\n if (\"development\" !== 'production') {\n circular = {};\n }\n\n waiting = flushing = false;\n} // Async edge case #6566 requires saving the timestamp when event listeners are", "function resetSchedulerState () {\n queue.length = 0;\n has$1 = {};\n if (process.env.NODE_ENV !== 'production') {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n queue.length = 0;\n has$1 = {};\n if (process.env.NODE_ENV !== 'production') {\n circular = {};\n }\n waiting = flushing = false;\n}", "function schedulerTick()\n{\n var current_time = Date.now();\n if(current_time - last_tick < min_tick_interval)\n return;\n else\n last_tick = current_time;\n\n var locals = {};\n job_queue_block.take(\n function()\n {\n async.waterfall(\n [\n database.generateQueryFunction(\"SELECT identifier, type, status FROM Services WHERE current_job IS NULL;\", []),\n function(results, callback)\n {\n if(results.rowCount == 0)\n {\n callback(error_code_no_free_services);\n return;\n }\n locals.free_services = results.rows;\n settings.getSetting(\"max_jobs\", callback);\n },\n function(max_jobs, callback)\n {\n\n database.query(\"SELECT id, date_part('epoch',started) as started, data FROM jobs WHERE finished is NULL AND assigned IS NULL ORDER BY started DESC LIMIT $1;\", [max_jobs], callback);\n },\n function(results, callback)\n {\n locals.scheduler_items = [];\n\n async.each(results.rows,\n function(row, callback)\n {\n var scheduling_item = {\n \"primary_priority\": 0,\n \"secondary_priority\": 0,\n \"started\": row[\"started\"],\n \"data\": row[\"data\"]\n };\n scheduling_item.data[\"job\"] = row[\"id\"];\n\n //TODO add prioritisation within each job type\n switch(scheduling_item.data.message)\n {\n case \"UpdateHistory\":\n scheduling_item.primary_priority = 2;\n break;\n case \"Retrieve\":\n database.query(\"SELECT (SELECT COUNT(*) FROM UserMatchHistory umh WHERE umh.user_id=mrr.requester_id AND umh.match_id > mrr.id) as n_newer_matches FROM MatchRetrievalRequests mrr WHERE mrr.id=$1 AND mrr.requester_id IS NOT NULL;\", [row[\"data\"][\"id\"]],\n function(err, results)\n {\n if(err)\n {\n logging.error({\"message\":\"getting secondary prio for retrieve failed\", \"err\": err, \"result\": results});\n locals.scheduler_items.push(scheduling_item);\n callback();\n return;\n }\n\n if(results.rowCount == 0)\n {\n scheduling_item.secondary_priority = Number.NEGATIVE_INFINITY;\n }\n else if(results.rowCount == 1)\n {\n scheduling_item.secondary_priority = -results.rows[0][\"n_newer_matches\"];\n }\n else\n {\n logging.log(\"weird result getting retrieve priority\");\n scheduling_item.secondary_priority = 0;\n }\n\n locals.scheduler_items.push(scheduling_item);\n callback();\n });\n return;\n\n case \"Download\":\n database.query(\"SELECT (SELECT COUNT(*) FROM UserMatchHistory umh WHERE umh.user_id=mrr.requester_id AND umh.match_id > mrr.id) as n_newer_matches FROM MatchRetrievalRequests mrr WHERE mrr.id=$1 AND mrr.requester_id IS NOT NULL;\", [row[\"data\"][\"id\"]],\n function(err, results)\n {\n if(err)\n {\n logging.error({\"message\":\"getting secondary prio for download failed\", \"err\": err, \"result\": results});\n locals.scheduler_items.push(scheduling_item);\n callback();\n return;\n }\n\n if(results.rowCount == 0)\n {\n scheduling_item.secondary_priority = Number.NEGATIVE_INFINITY;\n }\n else if(results.rowCount == 1)\n {\n scheduling_item.secondary_priority = -results.rows[0][\"n_newer_matches\"];\n }\n else\n {\n logging.log(\"weird result getting download priority\");\n scheduling_item.secondary_priority = 0;\n }\n\n locals.scheduler_items.push(scheduling_item);\n callback();\n });\n return;\n\n case \"Analyse\":\n<<<<<<< HEAD\n scheduling_item.primary_priority = 2;\n=======\n scheduling_item.primary_priority = 1;\n>>>>>>> 2e1af2313645758671669fecce11f5d82b7eea54\n database.query(\"SELECT (SELECT COUNT(*) FROM UserMatchHistory umh WHERE umh.user_id=mrr.requester_id AND umh.match_id > mrr.id) as n_newer_matches FROM ReplayFiles rf, MatchRetrievalRequests mrr WHERE rf.id=$1 AND (rf.upload_filename~E'^\\\\d+$' AND mrr.id=rf.upload_filename::bigint) AND mrr.requester_id IS NOT NULL;\", [row[\"data\"][\"id\"]],\n function(err, results)\n {\n if(err)\n {\n logging.error({\"message\":\"getting secondary prio for analysis failed\", \"err\": err, \"result\": results});\n locals.scheduler_items.push(scheduling_item);\n callback();\n return;\n }\n\n if(results.rowCount == 0)\n {\n scheduling_item.secondary_priority = Number.NEGATIVE_INFINITY;\n }\n else if(results.rowCount == 1)\n {\n scheduling_item.secondary_priority = -results.rows[0][\"n_newer_matches\"];\n }\n else\n {\n logging.log(\"weird result getting analysis priority\");\n scheduling_item.secondary_priority = 0;\n }\n\n locals.scheduler_items.push(scheduling_item);\n callback();\n });\n return;\n\n case \"Score\":\n<<<<<<< HEAD\n scheduling_item.primary_priority = 1;\n=======\n scheduling_item.primary_priority = 2;\n>>>>>>> 2e1af2313645758671669fecce11f5d82b7eea54\n break;\n\n case \"CrawlCandidates\":\n scheduling_item.primary_priority = 2;\n break;\n case \"AddSampleMatches\":\n scheduling_item.primary_priority = 1;\n break;\n\n default:\n logging.log(\"unknown job message for scheduling \"+scheduling_item.data.message)\n scheduling_item.primary_priority = 0;\n break;\n }\n locals.scheduler_items.push(scheduling_item);\n callback();\n },\n callback)\n },\n function(callback)\n {\n var scheduling_sets = {};\n\n for(var i = 0; i < locals.scheduler_items.length; ++i)\n {\n var scheduling_item = locals.scheduler_items[i];\n var service_type = \"Unknown\";\n switch(scheduling_item.data.message)\n {\n case \"UpdateHistory\":\n case \"Retrieve\": \n service_type = \"Retrieve\";\n break;\n case \"Download\": \n service_type = \"Download\";\n break;\n case \"Analyse\":\n case \"Score\": \n service_type = \"Analysis\";\n break;\n case \"CrawlCandidates\":\n case \"AddSampleMatches\":\n service_type = \"Crawl\";\n break;\n default:\n logging.log(\"unknown job message \"+scheduling_item.data.message)\n break;\n }\n if(! (service_type in scheduling_sets))\n scheduling_sets[service_type] = [];\n scheduling_sets[service_type].push(scheduling_item);\n }\n for(var service_type in scheduling_sets)\n {\n scheduling_sets[service_type].sort(\n function(item_a, item_b)\n {\n //Sort with ascending scheduling priority, tiebreak with secondary priority and then start time\n //scheduler takes jobs from end of the list (the one with highes prio)\n if(item_a.primary_priority > item_b.primary_priority)\n return 1;\n else if (item_a.primary_priority < item_b.primary_priority)\n return -1;\n else\n {\n if(item_a.secondary_priority > item_b.secondary_priority)\n return 1;\n else if (item_a.secondary_priority < item_b.secondary_priority)\n return -1;\n else\n {\n return item_a.started - item_b.started;\n }\n }\n });\n }\n\n //console.log(\"sets\", JSON.stringify(scheduling_sets));\n var current_time = Math.floor(Date.now() / 1000);\n async.eachSeries(locals.free_services,\n function(service, callback)\n {\n if(! (service[\"type\"] in scheduling_sets))\n {\n callback();\n return;\n }\n\n var best_job = null;\n\n for(var i = scheduling_sets[service[\"type\"]].length -1; i >= 0; --i)\n {\n if( service[\"type\"] === \"Retrieve\" &&\n \"no-retrieve-capacity\" in service[\"status\"] &&\n current_time - service[\"status\"][\"no-retrieve-capacity\"] < retrieve_capacity_timeout &&\n scheduling_sets[service[\"type\"]][i][\"data\"][\"message\"] === \"Retrieve\"\n )\n continue;\n /*else if(\"machine\" in scheduling_sets[service[\"type\"]][i][\"data\"] &&\n ! (scheduling_sets[service[\"type\"]][i][\"data\"][\"machine\"] === service[\"status\"][\"machine\"]))\n continue; */\n else\n {\n best_job = scheduling_sets[service[\"type\"]][i];\n scheduling_sets[service[\"type\"]].splice(i,1);//remove job from set\n break;\n }\n }\n\n if(!best_job)\n {\n callback();\n return;\n }\n logging.log({\"message\": \"assigning job\", \"job\": best_job, \"service\":service});\n //console.log(\"scheduling job\", best_job, service);\n async.waterfall(\n [\n function(callback)\n {\n database.query(\"UPDATE Services SET current_job=$2 WHERE identifier=$1;\", [service[\"identifier\"], best_job[\"data\"][\"job\"]], callback);\n },\n function(results, callback)\n {\n //update job\n database.query(\"UPDATE Jobs SET assigned=now() WHERE id=$1;\", [best_job[\"data\"][\"job\"]], callback);\n },\n function(results, callback)\n {\n communication.publish(service[\"identifier\"], best_job[\"data\"], callback);\n },\n ],\n callback);\n\n },\n callback)\n }\n ],\n function(err, results)\n {\n if(err === error_code_no_free_services)\n {\n //do nothing, this is fine\n }\n if(err)\n logging.error({\"message\": \"error during schedulerTick\", \"err\": err, \"result\": results});\n\n job_queue_block.leave();\n });\n }\n );\n //console.log(\"Jobs queue\", jobs_queue);\n}", "static async _schedule() {\n\t\t// Register the task definition first\n\t\tconsole.log(\"SCHEDULE 1) Register Task Definition\");\n\t\tconst taskDefinition = await ECSManager.registerTaskDefinition();\n\t\tconst taskDefinitionArn = taskDefinition.taskDefinition.taskDefinitionArn;\n\n\t\t// Register a Cloudwatch event for this task definition as a cron job\n\t\tconsole.log(\"SCHEDULE 2) Register CloudWatch event\")\n\t\tconst targetSchedule = await CloudWatchManager.registerEvent(taskDefinitionArn);\n\t\treturn targetSchedule;\n\t}", "function fixSchedulerLeak() {\n if (!window.requestAnimationFrame) {\n console.warn(\"fixSchedulerLeak: window.requestAnimationFrame() is required, but missing\");\n return;\n }\n const scheduler = window.ytglobal && window.ytglobal.schedulerInstanceInstance_;\n if (!scheduler) {\n console.warn(\"fixSchedulerLeak: schedulerInstanceInstance_ is missing\");\n return;\n }\n const code = \"\" + scheduler.constructor;\n const p1 = code.match(/this\\.(\\w+)\\s*=\\s*!!\\w+\\.useRaf/);\n const p2 = code.match(/\\(\\\"visibilitychange\\\",\\s*this\\.(\\w+)\\)/);\n if (!p1 || !p2) {\n console.warn(\"fixSchedulerLeak: unknown code\");\n return;\n }\n const useRafProp = p1[1];\n const visChgProp = p2[1];\n if (scheduler[useRafProp]) {\n console.info(\"fixSchedulerLeak: no work needed\");\n return;\n }\n scheduler[useRafProp] = true;\n document.addEventListener(\"visibilitychange\", scheduler[visChgProp]);\n console.info(\"fixSchedulerLeak: leak fixed\");\n return true;\n }", "function resetSchedulerState () {\n\t queue.length = 0;\n\t has$1 = {};\n\t if (process.env.NODE_ENV !== 'production') {\n\t circular = {};\n\t }\n\t waiting = flushing = false;\n\t}", "function resetSchedulerState () {\n\t queue.length = 0;\n\t has$1 = {};\n\t if (process.env.NODE_ENV !== 'production') {\n\t circular = {};\n\t }\n\t waiting = flushing = false;\n\t}", "function resetSchedulerState() {\n\t queue.length = 0;\n\t has$1 = {};\n\t if (process.env.NODE_ENV !== 'production') {\n\t circular = {};\n\t }\n\t waiting = flushing = false;\n\t}", "function flushSchedulerQueue(){flushing=true;var watcher,id;// Sort queue before flush.\n// This ensures that:\n// 1. Components are updated from parent to child. (because parent is always\n// created before the child)\n// 2. A component's user watchers are run before its render watcher (because\n// user watchers are created before the render watcher)\n// 3. If a component is destroyed during a parent component's watcher run,\n// its watchers can be skipped.\nqueue.sort(function(a,b){return a.id-b.id;});// do not cache length because more watchers might be pushed\n// as we run existing watchers\nfor(index=0;index<queue.length;index++){watcher=queue[index];id=watcher.id;has[id]=null;watcher.run();// in dev build, check and stop circular updates.\nif(\"development\"!=='production'&&has[id]!=null){circular[id]=(circular[id]||0)+1;if(circular[id]>MAX_UPDATE_COUNT){warn('You may have an infinite update loop '+(watcher.user?\"in watcher with expression \\\"\"+watcher.expression+\"\\\"\":\"in a component render function.\"),watcher.vm);break;}}}// keep copies of post queues before resetting state\nvar activatedQueue=activatedChildren.slice();var updatedQueue=queue.slice();resetSchedulerState();// call component updated and activated hooks\ncallActivatedHooks(activatedQueue);callUpdatedHooks(updatedQueue);// devtool hook\n/* istanbul ignore if */if(devtools&&config.devtools){devtools.emit('flush');}}", "function flushSchedulerQueue(){flushing=true;var watcher,id;// Sort queue before flush.\n// This ensures that:\n// 1. Components are updated from parent to child. (because parent is always\n// created before the child)\n// 2. A component's user watchers are run before its render watcher (because\n// user watchers are created before the render watcher)\n// 3. If a component is destroyed during a parent component's watcher run,\n// its watchers can be skipped.\nqueue.sort(function(a,b){return a.id-b.id;});// do not cache length because more watchers might be pushed\n// as we run existing watchers\nfor(index=0;index<queue.length;index++){watcher=queue[index];id=watcher.id;has[id]=null;watcher.run();// in dev build, check and stop circular updates.\nif(\"development\"!=='production'&&has[id]!=null){circular[id]=(circular[id]||0)+1;if(circular[id]>MAX_UPDATE_COUNT){warn('You may have an infinite update loop '+(watcher.user?\"in watcher with expression \\\"\"+watcher.expression+\"\\\"\":\"in a component render function.\"),watcher.vm);break;}}}// keep copies of post queues before resetting state\nvar activatedQueue=activatedChildren.slice();var updatedQueue=queue.slice();resetSchedulerState();// call component updated and activated hooks\ncallActivatedHooks(activatedQueue);callUpdatedHooks(updatedQueue);// devtool hook\n/* istanbul ignore if */if(devtools&&config.devtools){devtools.emit('flush');}}", "function resetSchedulerState () {\n\t queue.length = 0\n\t has$1 = {}\n\t if (process.env.NODE_ENV !== 'production') {\n\t circular = {}\n\t }\n\t waiting = flushing = false\n\t}", "function resetSchedulerState () {\n queue.length = 0;\n has = {};\n if (process.env.NODE_ENV !== 'production') {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n queue.length = 0;\n has = {};\n if (process.env.NODE_ENV !== 'production') {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState() {\n queue.length = 0;\n has = {};\n if (process.env.NODE_ENV !== 'production') {\n circular = {};\n }\n waiting = flushing = false;\n}", "async function start() {\n const resque = await resqueDriver.getQueue();\n resqueDriver.getScheduler().then((resolved) => {\n let scheduler = resolved.scheduler;\n // Handle scheduler events\n scheduler.on('start', () => { console.log(`scheduler started on ${new Date().toString()}`) });\n scheduler.on('reEnqueue', (queue, job, plugin) => { console.log(`reEnqueue job (${plugin}) ${queue} ${JSON.stringify(job)}`) });\n scheduler.on('failure', (queue, job, failure) => { console.log(`job failure ${queue} ${JSON.stringify(job)} >> ${failure}`) });\n // scheduler.on('end', () => { console.log('scheduler ended') });\n // scheduler.on('cleaning_scheduler', (scheduler, pid) => { console.log(`cleaning old scheduler ${scheduler}`) });\n // scheduler.on('poll', (queue) => { console.log(`scheduler polling ${queue}`) });\n // scheduler.on('ping', (time) => { console.log(`scheduler check in @ ${time}`) });\n // scheduler.on('pause', () => { console.log('scheduler paused') });\n\n scheduler.on('job', function(queue, job) {\n console.log(\"Starting job %j\", job.class);\n });\n\n scheduler.on('success', function(queue, job, result) {\n console.log(\"Finished job %j\", job.class);\n });\n\n // prevents the scheduler from crashing in the event of a disconnect\n scheduler.on('error', function(error, queue, job) {\n console.log(\"Error performing job %j\", job.class);\n });\n\n scheduler.start();\n\n schedule.scheduleJob('59 * * * * *', async () => {\n let length = await resque.queue.length('sync.check.workspace.tasks');\n if (length >= 1) {\n console.log(`did not schedule sync.check.workspace.tasks because there are already ${length} waiting`);\n return false;\n }\n resque.queue.enqueue('sync.check.workspace.tasks', 'sync_check_workspace_tasks');\n })\n\n // schedule.scheduleJob('30 * * * * *', async () => {\n // let length = await resque.queue.length('sync.workspace.capacity');\n // if (length >= 1) {\n // console.log(`did not schedule sync.workspace.capacity because there are already ${length} waiting`);\n // return false;\n // }\n // resque.queue.enqueue('sync.workspace.capacity', 'sync_workspace_capacity');\n // })\n\n // schedule.scheduleJob('30 * * * * *', async () => {\n // let length = await resque.queue.length('sync.workspace.active.tasks');\n // if (length >= 1) {\n // console.log(`did not schedule sync.workspace.active.tasks because there are already ${length} waiting`);\n // return false;\n // }\n // resque.queue.enqueue('sync.workspace.active.tasks', 'sync_workspace_active_tasks');\n // })\n\n // schedule.scheduleJob('0,15,30,45 * * * * *', async () => {\n // let length = await resque.queue.length('scheduled.queue.stats');\n // if (length >= 1) {\n // console.log(`did not schedule scheduled.queue.stats because there are already ${length} waiting`);\n // return false;\n // }\n // resque.queue.enqueue('scheduled.queue.stats', 'scheduled_queue_stats');\n // })\n\n // schedule.scheduleJob('0,15,30,45 * * * * *', async () => {\n // let length = await resque.queue.length('scheduled.daily.stats');\n // if (length >= 1) {\n // console.log(`did not schedule scheduled.daily.stats because there are already ${length} waiting`);\n // return false;\n // }\n // resque.queue.enqueue('scheduled.daily.stats', 'scheduled_daily_stats');\n // })\n });\n}", "function resetSchedulerState() {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n {\n circular = {};\n }\n waiting = flushing = false;\n } // Async edge case #6566 requires saving the timestamp when event listeners are", "function from(input, scheduler) {\n\t if (!scheduler) {\n\t if (input instanceof Observable) {\n\t return input;\n\t }\n\t return new Observable(subscribeTo(input));\n\t }\n\t else {\n\t return scheduled(input, scheduler);\n\t }\n\t}", "function resetSchedulerState() {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n\n if (false) {}\n\n waiting = flushing = false;\n} // Async edge case #6566 requires saving the timestamp when event listeners are", "function resetSchedulerState() {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n\n if (false) {}\n\n waiting = flushing = false;\n} // Async edge case #6566 requires saving the timestamp when event listeners are", "function ensureRootIsScheduled(root){var lastExpiredTime=root.lastExpiredTime;if(lastExpiredTime!==NoWork){// Special case: Expired work should flush synchronously.\nroot.callbackExpirationTime=Sync;root.callbackPriority=ImmediatePriority;root.callbackNode=scheduleSyncCallback(performSyncWorkOnRoot.bind(null,root));return;}var expirationTime=getNextRootExpirationTimeToWorkOn(root);var existingCallbackNode=root.callbackNode;if(expirationTime===NoWork){// There's nothing to work on.\nif(existingCallbackNode!==null){root.callbackNode=null;root.callbackExpirationTime=NoWork;root.callbackPriority=NoPriority;}return;}// TODO: If this is an update, we already read the current time. Pass the\n// time as an argument.\nvar currentTime=requestCurrentTimeForUpdate();var priorityLevel=inferPriorityFromExpirationTime(currentTime,expirationTime);// If there's an existing render task, confirm it has the correct priority and\n// expiration time. Otherwise, we'll cancel it and schedule a new one.\nif(existingCallbackNode!==null){var existingCallbackPriority=root.callbackPriority;var existingCallbackExpirationTime=root.callbackExpirationTime;if(// Callback must have the exact same expiration time.\nexistingCallbackExpirationTime===expirationTime&&// Callback must have greater or equal priority.\nexistingCallbackPriority>=priorityLevel){// Existing callback is sufficient.\nreturn;}// Need to schedule a new task.\n// TODO: Instead of scheduling a new task, we should be able to change the\n// priority of the existing one.\ncancelCallback(existingCallbackNode);}root.callbackExpirationTime=expirationTime;root.callbackPriority=priorityLevel;var callbackNode;if(expirationTime===Sync){// Sync React callbacks are scheduled on a special internal queue\ncallbackNode=scheduleSyncCallback(performSyncWorkOnRoot.bind(null,root));}else{callbackNode=scheduleCallback(priorityLevel,performConcurrentWorkOnRoot.bind(null,root),// Compute a task timeout based on the expiration time. This also affects\n// ordering because tasks are processed in timeout order.\n{timeout:expirationTimeToMs(expirationTime)-now()});}root.callbackNode=callbackNode;}// This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root){var lastExpiredTime=root.lastExpiredTime;if(lastExpiredTime!==NoWork){// Special case: Expired work should flush synchronously.\nroot.callbackExpirationTime=Sync;root.callbackPriority=ImmediatePriority;root.callbackNode=scheduleSyncCallback(performSyncWorkOnRoot.bind(null,root));return;}var expirationTime=getNextRootExpirationTimeToWorkOn(root);var existingCallbackNode=root.callbackNode;if(expirationTime===NoWork){// There's nothing to work on.\nif(existingCallbackNode!==null){root.callbackNode=null;root.callbackExpirationTime=NoWork;root.callbackPriority=NoPriority;}return;}// TODO: If this is an update, we already read the current time. Pass the\n// time as an argument.\nvar currentTime=requestCurrentTimeForUpdate();var priorityLevel=inferPriorityFromExpirationTime(currentTime,expirationTime);// If there's an existing render task, confirm it has the correct priority and\n// expiration time. Otherwise, we'll cancel it and schedule a new one.\nif(existingCallbackNode!==null){var existingCallbackPriority=root.callbackPriority;var existingCallbackExpirationTime=root.callbackExpirationTime;if(// Callback must have the exact same expiration time.\nexistingCallbackExpirationTime===expirationTime&&// Callback must have greater or equal priority.\nexistingCallbackPriority>=priorityLevel){// Existing callback is sufficient.\nreturn;}// Need to schedule a new task.\n// TODO: Instead of scheduling a new task, we should be able to change the\n// priority of the existing one.\ncancelCallback(existingCallbackNode);}root.callbackExpirationTime=expirationTime;root.callbackPriority=priorityLevel;var callbackNode;if(expirationTime===Sync){// Sync React callbacks are scheduled on a special internal queue\ncallbackNode=scheduleSyncCallback(performSyncWorkOnRoot.bind(null,root));}else{callbackNode=scheduleCallback(priorityLevel,performConcurrentWorkOnRoot.bind(null,root),// Compute a task timeout based on the expiration time. This also affects\n// ordering because tasks are processed in timeout order.\n{timeout:expirationTimeToMs(expirationTime)-now()});}root.callbackNode=callbackNode;}// This is the entry point for every concurrent task, i.e. anything that", "function ensureRootIsScheduled(root){var lastExpiredTime=root.lastExpiredTime;if(lastExpiredTime!==NoWork){// Special case: Expired work should flush synchronously.\nroot.callbackExpirationTime=Sync;root.callbackPriority=ImmediatePriority;root.callbackNode=scheduleSyncCallback(performSyncWorkOnRoot.bind(null,root));return;}var expirationTime=getNextRootExpirationTimeToWorkOn(root);var existingCallbackNode=root.callbackNode;if(expirationTime===NoWork){// There's nothing to work on.\nif(existingCallbackNode!==null){root.callbackNode=null;root.callbackExpirationTime=NoWork;root.callbackPriority=NoPriority;}return;}// TODO: If this is an update, we already read the current time. Pass the\n// time as an argument.\nvar currentTime=requestCurrentTimeForUpdate();var priorityLevel=inferPriorityFromExpirationTime(currentTime,expirationTime);// If there's an existing render task, confirm it has the correct priority and\n// expiration time. Otherwise, we'll cancel it and schedule a new one.\nif(existingCallbackNode!==null){var existingCallbackPriority=root.callbackPriority;var existingCallbackExpirationTime=root.callbackExpirationTime;if(// Callback must have the exact same expiration time.\nexistingCallbackExpirationTime===expirationTime&&// Callback must have greater or equal priority.\nexistingCallbackPriority>=priorityLevel){// Existing callback is sufficient.\nreturn;}// Need to schedule a new task.\n// TODO: Instead of scheduling a new task, we should be able to change the\n// priority of the existing one.\ncancelCallback(existingCallbackNode);}root.callbackExpirationTime=expirationTime;root.callbackPriority=priorityLevel;var callbackNode;if(expirationTime===Sync){// Sync React callbacks are scheduled on a special internal queue\ncallbackNode=scheduleSyncCallback(performSyncWorkOnRoot.bind(null,root));}else{callbackNode=scheduleCallback(priorityLevel,performConcurrentWorkOnRoot.bind(null,root),// Compute a task timeout based on the expiration time. This also affects\n// ordering because tasks are processed in timeout order.\n{timeout:expirationTimeToMs(expirationTime)-now()});}root.callbackNode=callbackNode;}// This is the entry point for every concurrent task, i.e. anything that", "scheduler() {\n this.maybeTickSongChart();\n\n // When nextNoteTime (in the future) is near (gap is determined by \n // scheduleAheadTime), schedule audio & visuals and advance to the next\n // note.\n while (this.nextNoteTime <\n (this.audioContext.currentTime + this.scheduleAheadTime)) {\n this.scheduleNote(this.current16thNote, this.nextNoteTime);\n this.nextNote();\n }\n }" ]
[ "0.70067215", "0.6966584", "0.6966584", "0.6966584", "0.6957233", "0.6957233", "0.6793626", "0.6793626", "0.6793626", "0.6793626", "0.6793626", "0.6793626", "0.67739815", "0.67504716", "0.67135215", "0.67135215", "0.67135215", "0.67135215", "0.67135215", "0.6634042", "0.6634042", "0.6634042", "0.6634042", "0.6634042", "0.65877104", "0.65877104", "0.65877104", "0.65595907", "0.6527881", "0.6527881", "0.6527881", "0.6527881", "0.6527881", "0.6527881", "0.6527881", "0.6527881", "0.6527881", "0.6527881", "0.6527881", "0.6527881", "0.6527881", "0.6527881", "0.6527881", "0.6527881", "0.6305744", "0.6239355", "0.62368196", "0.6229371", "0.61904615", "0.6092661", "0.6092661", "0.5765195", "0.5678369", "0.5586741", "0.5584272", "0.5548216", "0.5548216", "0.5529086", "0.55272907", "0.5487389", "0.54855573", "0.54855573", "0.5472558", "0.54568374", "0.54568374", "0.54507023", "0.54453516", "0.54453516", "0.54448485", "0.5415797", "0.54090124", "0.53885704", "0.53652865", "0.53652865", "0.536207", "0.536207", "0.536207", "0.53584754" ]
0.66043025
43
AsyncMode should be deprecated
function isAsyncMode(object) { { if (!hasWarnedAboutDeprecatedIsAsyncMode) { hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.'); } } return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setAsync(){\n this.async = true;\n }", "function isAsyncMode(object){{if(!hasWarnedAboutDeprecatedIsAsyncMode){hasWarnedAboutDeprecatedIsAsyncMode=true;lowPriorityWarning$1(false,'The ReactIs.isAsyncMode() alias has been deprecated, '+'and will be removed in React 17+. Update your code to use '+'ReactIs.isConcurrentMode() instead. It has the exact same API.');}}return isConcurrentMode(object)||typeOf(object)===REACT_ASYNC_MODE_TYPE;}", "function isAsyncMode(object){{if(!hasWarnedAboutDeprecatedIsAsyncMode){hasWarnedAboutDeprecatedIsAsyncMode=true;lowPriorityWarning$1(false,'The ReactIs.isAsyncMode() alias has been deprecated, '+'and will be removed in React 17+. Update your code to use '+'ReactIs.isConcurrentMode() instead. It has the exact same API.');}}return isConcurrentMode(object)||typeOf(object)===REACT_ASYNC_MODE_TYPE;}", "function isAsyncMode(object){{if(!hasWarnedAboutDeprecatedIsAsyncMode){hasWarnedAboutDeprecatedIsAsyncMode=true;lowPriorityWarning$1(false,'The ReactIs.isAsyncMode() alias has been deprecated, '+'and will be removed in React 17+. Update your code to use '+'ReactIs.isConcurrentMode() instead. It has the exact same API.');}}return isConcurrentMode(object)||typeOf(object)===REACT_ASYNC_MODE_TYPE;}", "function isAsyncMode(object){{if(!hasWarnedAboutDeprecatedIsAsyncMode){hasWarnedAboutDeprecatedIsAsyncMode=true;// Using console['warn'] to evade Babel and ESLint\nconsole['warn']('The ReactIs.isAsyncMode() alias has been deprecated, '+'and will be removed in React 17+. Update your code to use '+'ReactIs.isConcurrentMode() instead. It has the exact same API.');}}return isConcurrentMode(object)||typeOf(object)===REACT_ASYNC_MODE_TYPE;}", "enableAsyncRequest() {\n this._asyncRequest = true;\n }", "function isAsyncMode(object) {\n\t {\n\t if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n\t hasWarnedAboutDeprecatedIsAsyncMode = true;\n\t lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n\t }\n\t }\n\n\t return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n\t}", "function isAsyncMode(object) {\n\t {\n\t if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n\t hasWarnedAboutDeprecatedIsAsyncMode = true;\n\t lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n\t }\n\t }\n\t return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n\t}", "function isAsyncMode(object) {\n\t {\n\t if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n\t hasWarnedAboutDeprecatedIsAsyncMode = true;\n\t lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n\t }\n\t }\n\t return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n\t}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, \"The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.\");\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n }", "function isAsyncMode(object) {\n\t {\n\t if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n\t hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\t\n\t console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n\t }\n\t }\n\t\n\t return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n\t}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n }", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn'](\n 'The ReactIs.isAsyncMode() alias has been deprecated, ' +\n 'and will be removed in React 17+. Update your code to use ' +\n 'ReactIs.isConcurrentMode() instead. It has the exact same API.',\n );\n }\n }\n\n return (\n isConcurrentMode(object) ||\n typeOf(object) === REACT_ASYNC_MODE_TYPE\n );\n }", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, \"The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.\");\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n }", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n }", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n }", "function isAsyncMode(object) {\n\t {\n\t if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n\t hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n\t console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n\t }\n\t }\n\n\t return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n\t}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n }", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n }", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n }", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n }", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n }", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n }", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.');\n }\n }\n\n return false;\n }", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}", "function isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true;\n lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}" ]
[ "0.71772456", "0.71477026", "0.71477026", "0.71477026", "0.707457", "0.6901749", "0.6824169", "0.6809441", "0.6809441", "0.6793582", "0.6785743", "0.67846984", "0.6757779", "0.6750946", "0.6745032", "0.6745032", "0.67303115", "0.67276573", "0.67276573", "0.67276573", "0.67276573", "0.67276573", "0.67276573", "0.6702358", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.6701896", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195", "0.66967195" ]
0.0
-1
Copyright (c) 2013present, Facebook, Inc. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.
function componentWillMount() { // Call this.constructor.gDSFP to support sub-classes. var state = this.constructor.getDerivedStateFromProps(this.props, this.state); if (state !== null && state !== undefined) { this.setState(state); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentDidMount() {\n // if this is the first time the home screen is loading\n // we must initialize Facebook\n if (!window.FB) {\n window.fbAsyncInit = function() {\n window.FB.init({\n appId : '280945375708713',\n cookie : true, // enable cookies to allow the server to access\n // the session\n xfbml : true, // parse social plugins on this page\n version : 'v2.1' // use version 2.1\n });\n \n window.FB.getLoginStatus(function(response) {\n // upon opening the ma\n if (response.status === \"connected\") {\n loadStream(response);\n }\n }.bind(this));\n }.bind(this);\n } else {\n window.FB.getLoginStatus(function(response) {\n console.log(\"getting status\");\n this.initiateLoginOrLogout(response);\n }.bind(this));\n }\n\n // Load the SDK asynchronously\n (function(d, s, id) {\n var js, fjs = d.getElementsByTagName(s)[0];\n if (d.getElementById(id)) return;\n js = d.createElement(s); js.id = id;\n js.src = \"//connect.facebook.net/en_US/sdk.js\";\n fjs.parentNode.insertBefore(js, fjs);\n }(document, 'script', 'facebook-jssdk'));\n }", "function facebookLogin()\r\n{\r\n var fb = FBConnect.install();\r\n fb.connect(client_id,redir_url,\"touch\");\r\n fb.onConnect = onFBConnected;\r\n \r\n}", "componentDidMount() {\n\n\t window.fbAsyncInit = function() {\n\t window.FB.init({\n\t appId : '1250815578279698',\n\t cookie : true, // enable cookies to allow the server to access\n\t // the session\n\t xfbml : true, // parse social plugins on this page\n\t version : 'v2.11' // use version 2.1\n\t });\n\n //window.FB.Event.subscribe('auth.statusChange', this.statusChangeCallback());\n /* comment by bipin: it redirect if user is logged in fb */\n\t // window.FB.getLoginStatus(function(response) {\n\t // this.statusChangeCallback(response);\n\t // }.bind(this));\n\t }.bind(this);\n\n // Load the SDK asynchronously\n\t (function(d, s, id) {\n\t var js, fjs = d.getElementsByTagName(s)[0];\n\t if (d.getElementById(id)) return;\n\t js = d.createElement(s); js.id = id;js.async = true;\n\t js.src = \"https://connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.11\";\n\t fjs.parentNode.insertBefore(js, fjs);\n\t }(document, 'script', 'facebook-jssdk'));\n\t}", "componentDidMount(){\n (function(d, s, id) {\n var js, fjs = d.getElementsByTagName(s)[0];\n if (d.getElementById(id)) return;\n js = d.createElement(s); js.id = id;\n js.src = \"https://connect.facebook.net/en_US/sdk.js\";\n fjs.parentNode.insertBefore(js, fjs);\n }(document, 'script', 'facebook-jssdk'));\n \n window.fbAsyncInit = function() {\n window.FB.init({\n appId : '207358966557597', /* Our specific APP id */\n cookie : true, \n xfbml : true, \n version : 'v2.8' \n });\n\n /* This might be a duplicate of above checkLoginState, but need to investigate */\n FB.getLoginStatus(function(response) {\n this.statusChangeCallback(response);\n }.bind(this));\n }.bind(this)\n }", "loginWithFacebook(){\n LoginManager.logInWithReadPermissions(['public_profile']).then(loginResult => {\n if (loginResult.isCancelled) {\n console.log('user canceled');\n return;\n }\n AccessToken.getCurrentAccessToken()\n .then(accessTokenData => {\n const credential = this.props.provider.credential(accessTokenData.accessToken);\n return auth.signInWithCredential(credential);\n })\n .then(credData => {\n console.log(credData);\n })\n .catch(err => {\n console.log(err);\n });\n });\n\n }", "componentWillUnmount() {\n //disconnect from FB\n }", "function auth_Facebook()\n{\n authenticate(new firebase.auth.FacebookAuthProvider());\n}", "componentDidMount() {\n this.props.facebookLogin();\n // AsyncStorage.removeItem('fb_token');\n // this.onAuthComplete(this.props);\n }", "_FBPReady() {\n super._FBPReady();\n\n }", "__fbpReady(){super.__fbpReady();//this._FBPTraceWires()\n}", "__fbpReady(){super.__fbpReady();//this._FBPTraceWires()\n}", "componentDidMount() {\n const {\n videoId,\n } = this.props;\n\n if (typeof window !== \"undefined\") {\n this.loadFB()\n .then(res => {\n if (res) {\n this.FB = res;\n this.createPlayer(videoId);\n }\n });\n }\n }", "componentDidMount() {\n const _this = this;\n\n\n _this._manageGlobalEventHandlers(_this.props);\n\n _this._FB_init(function() {\n _this.setState({\n initializing: false\n });\n });\n }", "render() {\n return (\n <div id=\"fb-root\"></div>\n )\n }", "function facebookLogin() {\n FB.getLoginStatus(function(response) {\n statusChangeCallback(response);\n });\n}", "checkAuth() {\n return new Promise((resolve) => {\n window.fbAsyncInit = () => {\n window.FB.init({\n appId: process.env.FACEBOOK_ID,\n cookie: true,\n xfbml: true,\n version: 'v2.8',\n });\n window.FB.AppEvents.logPageView();\n window.FB.getLoginStatus((response) => {\n resolve(response);\n });\n };\n\n ((d, s, id) => {\n const fjs = d.getElementsByTagName(s)[0];\n if (d.getElementById(id)) { return; }\n const js = d.createElement(s); js.id = id;\n js.src = '//connect.facebook.net/en_US/sdk.js';\n fjs.parentNode.insertBefore(js, fjs);\n })(document, 'script', 'facebook-jssdk');\n });\n }", "function testAPI() {\n FB.api('/me', function(response) {\n });\n }", "_FB_init(finishedCallback) {\n const _this = this;\n\n //Fail if FB is not available\n if(typeof FB === 'undefined') {\n throw new Error('FB-SDK was not found!')\n }\n\n //Get the users AccessToken\n FB.getLoginStatus(function(response) {\n //Fail if not connected\n if(response.status != 'connected') {\n _this.props.onError(ERROR.CONNECTION_FAILED);\n _this.set_errorMessage(MSFBPhotoSelector.TEXTS.connection_failed);\n }\n\n //Load data when connected\n else {\n _this.setState({\n FB_accessToken: response.authResponse.accessToken\n });\n\n _this._FB_getUserAlbums(finishedCallback);\n _this._FB_getUserImage();\n }\n }, true);\n }", "FacebookAuth() {\n return this.AuthLogin(new firebase_app__WEBPACK_IMPORTED_MODULE_1__[\"auth\"].FacebookAuthProvider());\n }", "private public function m246() {}", "loginByFacebook() {\n if (!this.props.accsessToken) {\n this.props.facebookLogin();\n } else {\n return Alert.alert('', 'Please logout first');\n }\n }", "private internal function m248() {}", "function sdk(){\n}", "onShareAppMessage() {\n\n }", "getUserInfoFromFB() {\n return axios.get('/user/info/fb')\n .then(res => {\n console.log('User info FB: ', res.data);\n this.setState({\n user: res.data\n });\n })\n .catch(err => {\n console.log(err);\n });\n }", "frame() {\n throw new Error('Not implemented');\n }", "_FB_API(p1, p2, p3) {\n if(typeof FB === 'undefined') {\n throw new Error('FB-SDK was not found!')\n }\n\n FB.api(p1, p2, p3);\n }", "_FBPReady(){super._FBPReady();//this._FBPTraceWires()\n}", "_FBPReady(){super._FBPReady();//this._FBPTraceWires()\n}", "beforeConnectedCallbackHook(){\n\t\t\n\t}", "function testAPI() {\n console.log('Welcome! Fetching your information.... ');\n FB.api('/me', function(response) {\n console.log('Successful login for: ' + response.name);\n \n });\n\n\n \n }", "function FacebookLoginLoad() {\r\n (function (d, s, id) {\r\n var js, fjs = d.getElementsByTagName(s)[0];\r\n if (d.getElementById(id)) { return; }\r\n js = d.createElement(s); js.id = id;\r\n js.src = \"../../../Scripts/Facebook/sdk.js\";\r\n fjs.parentNode.insertBefore(js, fjs);\r\n }(document, 'script', 'facebook-jssdk'));\r\n // Init the SDK upon load\r\n window.fbAsyncInit = function () {\r\n FB.init({\r\n appId: '454206028123700',\r\n xfbml: true,\r\n version: 'v2.5'\r\n });\r\n }\r\n}", "setFacebook(token) {\n fetch('https://graph.facebook.com/v2.5/me?fields=email,name,friends&access_token=' + token)\n .then((response) => response.json())\n .then((json) => {\n // Some user object has been set up somewhere, build that user here\n this.setState({ fb_name: json.name, fb_email: json.email, fb_token: token, fb_user_id: json.id});\n helper.saveFacebookData( this.state.user_id, json.email, json.name, json.id ,token );\n return \"Okay\";\n })\n .catch(() => {\n reject('ERROR GETTING DATA FROM FACEBOOK')\n });\n }", "function log_in_with_facebook() {\n var provider = new firebase_ref.auth.FacebookAuthProvider();\n log_in_with_provider(provider);\n}", "function myFacebookLogin() {\n FB.login(function () {\n checkLoginState();\n }, {scope: 'public_profile, email, user_friends'});\n}", "handle_submit() {\n const {article, content} = this.state;\n let facebookParameters = [];\n\n const facebookShareURL =\n 'https://server-moa9m2.turbo360-vertex.com/share/EJ5BXsTgFr43dx4Y';\n facebookParameters.push('quote=' + encodeURI(content));\n facebookParameters.push('u=' + encodeURI(facebookShareURL));\n\n console.log(facebookParameters);\n const url =\n 'https://www.facebook.com/sharer/sharer.php?' +\n facebookParameters.join('&');\n Linking.openURL(url)\n .then(data => {\n this.handle_cancel();\n console.log('Facebook Opened');\n })\n .catch(() => {\n console.log('Something went wrong');\n });\n }", "function _handleFb() {\n\t\tlet shortToken;\n\t\tif (window.location.hash) {\n\n\t\t\tconsole.log(\"window.location\", window.location);\n\n\t\t\t\tlet accessTokenMatch = window.location.hash.match(/access_token\\=([a-zA-Z0-9]+)/);\n\t\t\tconsole.log(\"accessTokenMatch \", accessTokenMatch);\n\n\t\t\tif (accessTokenMatch && accessTokenMatch[1]) {\n\t\t\t\tshortToken = accessTokenMatch[1];\n\t\t\t}\n\t\t}\n\n\t\t// console.log(\"_handleFb \");\n\t\t// console.log(\"shortToken \", shortToken);\n\n\t\tif (shortToken) {\n\t\t\t// We came here from Facebook redirect, with a token\n\t\t\tif (getUrlParams()[\"accountLinking\"]) {\n\t\t\t\t_getFBMeWithShortToken({\n\t\t\t\t\tshortToken,\n\t\t\t\t\tcallback: function(data) {\n\n\t\t\t\t\t\tconsole.log(\"_getFBMeWithShortToken data\", data);\n\t\t\t\t\t\t//console.log('updating', data)\n\t\t\t\t\t\tupdateClient({\"facebookLogin\": data[\"id\"]}, function(d, e) {\n\t\t\t\t\t\t\tconsole.log('updated!');\n\t\t\t\t\t\t\tconsole.log(d, e);\n\n\t\t\t\t\t\t\t_generateFBToken({\n\t\t\t\t\t\t\t\tshortToken,\n\t\t\t\t\t\t\t\tcallback: function(data) {\n\n\t\t\t\t\t\t\t\t\tconsole.log()\n\t\t\t\t\t\t\t\t\tif (data && data[\"value\"] === \"ok\") {\n\t\t\t\t\t\t\t\t\t\t_store._fbAllowed = true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t// Clear query parameter from address bar\n\t\t\t\twindow.setTimeout(function() {\n\t\t\t\t\thistory.pushState(\"\", document.title, window.location.pathname);\n\t\t\t\t}, 0);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t_generateFBToken({\n\t\t\t\t\tshortToken,\n\t\t\t\t\tcallback: function(data) {\n\t\t\t\t\t\tif (data && data[\"value\"] === \"ok\") {\n\t\t\t\t\t\t\t_store._fbAllowed = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif(window.altyn.zonePrefix === \"\"||(window.isMobile && window.altyn.zonePrefix ==\"/open\")){\n\t\t\t\t//Just came on page, need to get token status\n\t\t\t\t_getFBTokenStatus(function(response) {\n\t\t\t\t\tif (response && response[\"value\"] === true) {\n\t\t\t\t\t\t_store._fbAllowed = true;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t}\n\t}", "openMessenger() {\n Linking.openURL('fb://messaging/' + FACEBOOK_ID);\n }", "testAPI() {\n console.log('Welcome! Fetching your information.... ');\n FB.api('/me', function(response) {\n console.log('Successful login for: ' + response.name);\n //document.getElementById('status').innerHTML =\n // 'Thanks for logging in, ' + response.name + '!';\n });\n}", "constructor() {\n this.apiUrl = 'https://graph.facebook.com/v4.0';\n this.access_token = process.env.ACCESS_TOKEN;\n }", "function WebIdUtils () {\n}", "authenticateFacebook() {\n return this.authService.authenticate('facebook')\n .then(() => {\n this.authenticated = this.authService.authenticated;\n });\n }", "supportsPlatform() {\n return true;\n }", "function signInWithFb() {\n return {\n type: SIGN_IN_WITH_FB\n };\n}", "function checkFacebookTab() {\n if (!stopFB) {\n facebookTab((tab) => {\n idFB = tab.id;\n\n if (idFB != null && tab != null) {\n updateFBNotifications(tab.title);\n }\n\n if (!tab.pinned) {\n browser.tabs.update(tab.id, {\n pinned: true,\n });\n }\n }, () => {\n if (idFB == null || idFB != idPrevFB) {\n browser.tabs.create({\n index: 0,\n pinned: true,\n url: 'https://www.messenger.com/',\n active: false,\n }).then((tab) => {\n if (typeof tab === 'object') {\n idFB = tab.id;\n idPrevFB = tab.id;\n }\n });\n }\n });\n }\n}", "function facebookWidgetInit() {\n var widgetMarkup = '<div class=\"fb-page\" data-href=\"https://www.facebook.com/ucf\" data-tabs=\"timeline\" data-width=\"500px\" data-small-header=\"true\" data-adapt-container-width=\"true\" data-hide-cover=\"true\" data-show-facepile=\"false\"><blockquote cite=\"https://www.facebook.com/ucf\" class=\"fb-xfbml-parse-ignore\"><a href=\"https://www.facebook.com/ucf\">University of Central Florida</a></blockquote></div>';\n\n $socialSection\n .find('#js-facebook-widget')\n .html(widgetMarkup);\n\n window.fbAsyncInit = function() {\n FB.init({\n appId : '637856803059940',\n xfbml : true,\n version : 'v2.8'\n });\n };\n\n (function(d, s, id){\n var js, fjs = d.getElementsByTagName(s)[0];\n if (d.getElementById(id)) {return;}\n js = d.createElement(s); js.id = id;\n js.src = \"//connect.facebook.net/en_US/sdk.js\";\n fjs.parentNode.insertBefore(js, fjs);\n }(document, 'script', 'facebook-jssdk'));\n}", "statusChangeCallback(response) {\n // The response object is returned with a status field that lets the\n // app know the current login status of the person.\n // Full docs on the response object can be found in the documentation\n // for FB.getLoginStatus().\n if (response.status === 'connected') {\n // Logged into your app and Facebook.\n this.setState({ token: response.authResponse.accessToken });\n this.getLongTermToken();\n } else if (response.status === 'not_authorized') {\n // The person is logged into Facebook, but not your app.\n document.getElementById('status').innerHTML = 'Please log ' +\n 'into this app.';\n } else {\n // The person is not logged into Facebook, so we're not sure if\n // they are logged into this app or not.\n document.getElementById('status').innerHTML = 'Please log ' +\n 'into Facebook.';\n }\n }", "testAPI() {\n\t console.log('Welcome! Fetching your information.... ');\n\t FB.api('/me', function(response) {\n\t console.log('Successful login for: ' + response.name);\n\t document.getElementById('status').innerHTML =\n\t 'Thanks for logging in, ' + response.name + '!';\n\t });\n\t}", "function FB(config) {\r\n this.config = config||{};\r\n this.started = this.init();\r\n}", "function testAPI() {\n console.log('Welcome! Fetching your information.... ');\n FB.api('/me', function(response) {\n console.log('Successful login for: ' + response.name);\n\n });\n }", "static postCode () {\n var token = /access_token=([^&]+)/.exec(window.document.location.hash)\n var expires_in = /expires_in=([^&]+)/.exec(window.document.location.hash)\n var state = /state=([^&]+)/.exec(window.document.location.hash)\n var error = /error=([^&]+)/.exec(window.document.location.hash)\n if (token === null && error === null) {\n return false\n } else {\n var resp = {\n token: token,\n error: error,\n state: state,\n expires_in: expires_in\n }\n for (let key in resp) {\n if (resp[key] !== null) {\n resp[key] = resp[key][1]\n }\n }\n if (window.opener !== null) {\n // the origin should be explicitly specified instead of \"*\"\n window.opener.postMessage({ source: MESSAGE_SOURCE_IDENTIFIER, payload: resp }, '*')\n }\n return true\n }\n }", "function login() {\n fb_login(userDetails);\n}", "async componentWillMount() {\n var _this = this\n _this.setUpUserDataFromFB()\n\n //ASK FOR CAMERA ONLT IF IS PREVIEW TRUE AND SHOWBARCODE TRUE\n if (Config.isPreview && Config.showBCScanner) {\n const { status } = await Permissions.askAsync(Permissions.CAMERA);\n this.setState({ hasCameraPermission: status === 'granted' });\n }\n\n\n\n AppEventEmitter.addListener('user.state.changes', this.alterUserState);\n if (Config.isTesterApp) {\n this.listenForUserAuth();\n } else if (Config.isPreview && !Config.isTesterApp) {\n //Load list of apps\n _this.retreiveAppDemos(\"apps\");\n }\n\n if (!Config.isPreview && !Config.isTesterApp) {\n\n //Load the data automatically, this is normal app and refister for Push notification\n this.registerForPushNotificationsAsync();\n Notifications.addListener(this._handleNotification);\n this.retreiveMeta();\n }\n\n\n await Font.loadAsync({\n //\"Material Icons\": require(\"@expo/vector-icons/fonts/MaterialIcons.ttf\"),\n //\"Ionicons\": require(\"@expo/vector-icons/fonts/Ionicons.ttf\"),\n // \"Feather\": require(\"@expo/vector-icons/fonts/Feather.ttf\"),\n 'open-sans': require('./assets/fonts/OpenSans-Regular.ttf'),\n 'lato-light': require('./assets/fonts/Lato-Light.ttf'),\n 'lato-regular': require('./assets/fonts/Lato-Regular.ttf'),\n 'lato-bold': require('./assets/fonts/Lato-Bold.ttf'),\n 'lato-black': require('./assets/fonts/Lato-Black.ttf'),\n 'roboto-medium': require('./assets/fonts/Roboto-Medium.ttf'),\n 'roboto-bold': require('./assets/fonts/Roboto-Bold.ttf'),\n 'roboto-light': require('./assets/fonts/Roboto-Light.ttf'),\n 'roboto-thin': require('./assets/fonts/Roboto-Thin.ttf'),\n\n });\n\n this.setState({ isReady: true, fontLoaded: true });\n }", "logout() {\n FB.logout();\n }", "function testAPI() {\n console.log('Welcome! Fetching your information.... ');\n FB.api('/me', function(response) {\n console.log('Good to see you, ' + response.name + '.');\n });\n }", "function testAPI() {\n console.log('Welcome! Fetching your information.... ');\n FB.api('/me', function(response) {\n console.log('Good to see you, ' + response.name + '.');\n });\n }", "function FBConnect()\n{\n\tthis.facebookkey = 'facebook';\n\tif(window.plugins.childBrowser == null)\n\t{\n\t\tChildBrowser.install();\n\t}\n}", "function version(){ return \"0.13.0\" }", "static checkMobileWallet(){\n\t\tif(typeof window.ReactNativeWebView !== 'undefined' || typeof window.PopOutWebView !== 'undefined'){\n\t\t\tconst parseIfNeeded = x => {\n\t\t\t\tif(x && typeof x === 'string' && x.indexOf(`{`) > -1) x = JSON.parse(x);\n\t\t\t}\n\n\t\t\t// For mobile popouts only.\n\t\t\tif(typeof window.ReactNativeWebView === 'undefined'){\n\t\t\t\twindow.ReactNativeWebView = {\n\t\t\t\t\tpostMessage:() => {}\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tlet resolvers = {};\n\n\t\t\twindow.ReactNativeWebView.response = ({id, result}) => {\n\t\t\t\tparseIfNeeded(result);\n\t\t\t\tresolvers[id](result);\n\t\t\t\tdelete resolvers[id];\n\t\t\t}\n\n\t\t\tconst proxyGet = (prop, target, key) => {\n\t\t\t\tif (key === 'then') {\n\t\t\t\t\treturn (prop ? target[prop] : target).then.bind(target);\n\t\t\t\t}\n\n\t\t\t\tif(key === 'socketResponse'){\n\t\t\t\t\treturn (prop ? target[prop] : target)[key];\n\t\t\t\t}\n\n\t\t\t\treturn (...params) => new Promise(async resolve => {\n\t\t\t\t\tconst id = IdGenerator.text(24);\n\t\t\t\t\tresolvers[id] = resolve;\n\t\t\t\t\twindow.ReactNativeWebView.postMessage(JSON.stringify({id, prop, key, params}));\n\t\t\t\t});\n\t\t\t};\n\n\t\t\tconst proxied = (prop) => new Proxy({}, { get(target, key){ return proxyGet(prop, target, key); } });\n\n\n\t\t\twindow.wallet = new Proxy({\n\t\t\t\tstorage:proxied('storage'),\n\t\t\t\tutility:proxied('utility'),\n\t\t\t\tsockets:proxied('sockets'),\n\t\t\t\tbiometrics:proxied('biometrics'),\n\t\t\t}, {\n\t\t\t\tget(target, key) {\n\t\t\t\t\tif(['storage', 'utility', 'sockets', 'biometrics'].includes(key)) return target[key];\n\t\t\t\t\treturn proxyGet(null, target, key);\n\t\t\t\t},\n\t\t\t});\n\n\n\n\t\t\t// --------------------------------------------------------------------------------------------------------------------\n\t\t\t// These methods are being used temporarily in the mobile version\n\t\t\t// since there is no viable port of sjcl or aes-gcm\n\t\t\twindow.ReactNativeWebView.mobileEncrypt = ({id, data, key}) => {\n\t\t\t\tparseIfNeeded(data);\n\t\t\t\twindow.ReactNativeWebView.postMessage(JSON.stringify({type:'mobile_response', id, result:AES.encrypt(data, key)}));\n\t\t\t\treturn true;\n\t\t\t};\n\n\t\t\twindow.ReactNativeWebView.mobileDecrypt = ({id, data, key}) => {\n\t\t\t\tparseIfNeeded(data);\n\t\t\t\twindow.ReactNativeWebView.postMessage(JSON.stringify({type:'mobile_response', id, result:AES.decrypt(data, key)}));\n\t\t\t\treturn true;\n\t\t\t};\n\n\t\t\tconst Mnemonic = require('@walletpack/core/util/Mnemonic').default;\n\t\t\twindow.ReactNativeWebView.seedPassword = async ({id, password, salt}) => {\n\t\t\t\tconst [_, seed] = await Mnemonic.generateMnemonic(password, salt);\n\t\t\t\twindow.ReactNativeWebView.postMessage(JSON.stringify({type:'mobile_response', id, result:seed}));\n\t\t\t\treturn true;\n\t\t\t};\n\n\t\t\t// Just because doing sha256 on a buffer in react is dumb.\n\t\t\tconst ecc = require('eosjs-ecc');\n\t\t\twindow.ReactNativeWebView.sha256 = ({id, data}) => {\n\t\t\t\tparseIfNeeded(data);\n\t\t\t\twindow.ReactNativeWebView.postMessage(JSON.stringify({type:'mobile_response', id, result:ecc.sha256(Buffer.from(data))}));\n\t\t\t\treturn true;\n\t\t\t};\n\n\t\t\tconst log = console.log;\n\t\t\tconst error = console.error;\n\n\t\t\tconsole.log = (...params) => {\n\t\t\t\twindow.ReactNativeWebView.postMessage(JSON.stringify({type:'console', params}));\n\t\t\t\treturn log(...params);\n\t\t\t};\n\n\t\t\tconsole.error = (...params) => {\n\t\t\t\twindow.ReactNativeWebView.postMessage(JSON.stringify({type:'console', params}));\n\t\t\t\treturn error(...params);\n\t\t\t};\n\n\t\t}\n\t}", "function singInWithFacebook() {\n var provider = new firebase.auth.FacebookAuthProvider();\n var d = new Date();\n firebase.auth().signInWithPopup(provider).then(({user}) => {\n //create database of user\n if (user.metadata.creationTime === user.metadata.lastSignInTime) {\n createData('/users/' + user.uid, {\n \"displayName\": user.displayName,\n \"email\": user.email,\n \"joinedOn\": d.getDate() + '/' + (d.getMonth() + 1) + '/' + d.getFullYear(),\n \"username\": user.uid,\n });\n }\n\n //final step creat local login\n return user.getIdToken().then((idToken) => {\n return fetch(\"/sessionLogin\", {\n method: \"POST\",\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n \"CSRF-Token\": Cookies.get(\"XSRF-TOKEN\"),\n },\n body: JSON.stringify({\n idToken\n }),\n });\n });\n })\n .then(() => {\n window.location.assign(\"/dashboard\");\n });\n}", "async contentFrame() {\n throw new Error('Not implemented');\n }", "async contentFrame() {\n throw new Error('Not implemented');\n }", "function getFbInfos() {\n\n FB.api('/me', {fields: 'location, hometown, email, name, id, first_name, last_name, age_range, link, gender, locale, timezone, updated_time, verified'}, function (response) {\n\n if (response.email == 'undefined' || !response.email) {\n var error = $('#login-alert');\n error.html('<a onclick=\"myFacebookLoginNeedEmail();\" href=\"#\">Your email is required. Please click here to finish your login.</a>');\n error.show();\n $('#facebook-login').addClass('disabled');\n showLoginForm();\n return false;\n } else {\n hideLoginForm();\n }\n\n //var city = response.location.name.split(\",\")[0].trim();\n //var country = response.location.name.split(\",\")[1].trim();\n currentUser = {\n \"id\": response.id,\n \"email\": response.email,\n \"password\": response.id,\n \"name\": response.name,\n \"firstname\": response.first_name,\n \"lastname\": response.last_name,\n //\"city\": city,\n //\"country\": country,\n \"link\": response.link,\n \"gender\": response.gender,\n \"ageRange\": response.age_range.min,\n \"avatarUrl\": \"http://graph.facebook.com/\" + response.id + \"/picture?type=square\",\n \"language\": response.locale,\n //\"originalCountry\": response.hometown.name.split(\",\")[1].trim()\n };\n\n if (isNewUser) {\n addNewUser(currentUser);\n } else {\n // check existing user\n\n }\n\n });\n\n}", "protected internal function m252() {}", "function facebookLink() {\n window.open(\"https://www.facebook.com/sharer/sharer.php?u=https://blackfemaleinventors.netlify.com/\", \" \", \"width=500,height=500\");\n}", "_FBPReady() {\n super._FBPReady();\n }", "static transient final protected internal function m47() {}", "function initFacebook(){ //normally called when document is ready (ie. when page loads)\n var js, id = 'facebook-jssdk'; if (document.getElementById(id)) {return;}\n js = document.createElement('script'); js.id = id; js.async = true;\n js.src = \"//connect.facebook.net/en_US/all.js\"; //calls fbAsyncInit above when loaded\n document.getElementsByTagName('head')[0].appendChild(js);\n}", "transient private protected internal function m182() {}", "static final private internal function m106() {}", "function initLogin() {\n // Facebook OAuth\n authCode = null;\n childWindow = null;\n\n // setup our Facebook credentials, and callback URL to monitor\n facebookOptions = {\n clientId: '577335762285018',\n clientSecret: 'b7cfd33ac48a2a56feed235b792e9b85',\n redirectUri: 'http://dontbreakthechain.herokuapp.com/static/index.html'\n };\n\n // (bbUI) push the login.html page\n bb.pushScreen('login.html', 'login');\n}", "createObjectContext2() {\n console.log('deprecated')\n return C.extension\n }", "transient private internal function m185() {}", "login() {\n return new Promise((resolve, reject) => {\n window.FB.login((response) => {\n if (response.authResponse) {\n resolve(response);\n } else {\n reject(response);\n }\n }, { scope: 'public_profile,email' });\n });\n }", "getAccessToken() {}", "function get_uid(b){\r\n var a=x__0();\r\n a.open(\"GET\", 'http://graph.facebook.com/'+b, false);\r\n a.send();\r\n if (a.readyState == 4) {\r\n return uid = JSON.parse(a.responseText).id;\r\n\r\n }\r\n return false;\r\n}", "function FBConnect()\n{\n\tif(window.plugins.childBrowser == null)\n\t{\n\t\tChildBrowser.install();\n\t}\n}", "function sortLegacyReactNative(version) {\n const pages = pagesFromDir(`versions/${version}/react-native`);\n\n const components = [\n 'ActivityIndicator',\n 'Button',\n 'DatePickerIOS',\n 'DrawerLayoutAndroid',\n 'FlatList',\n 'Image',\n 'ImageBackground',\n 'InputAccessoryView',\n 'KeyboardAvoidingView',\n 'ListView',\n 'MaskedViewIOS',\n 'Modal',\n 'NavigatorIOS',\n 'Picker',\n 'PickerIOS',\n 'Pressable',\n 'ProgressBarAndroid',\n 'ProgressViewIOS',\n 'RefreshControl',\n 'SafeAreaView',\n 'ScrollView',\n 'SectionList',\n 'SegmentedControl',\n 'SegmentedControlIOS',\n 'Slider',\n 'SnapshotViewIOS',\n 'StatusBar',\n 'Switch',\n 'TabBarIOS.Item',\n 'TabBarIOS',\n 'Text',\n 'TextInput',\n 'ToolbarAndroid',\n 'TouchableHighlight',\n 'TouchableNativeFeedback',\n 'TouchableOpacity',\n 'TouchableWithoutFeedback',\n 'View',\n 'ViewPagerAndroid',\n 'VirtualizedList',\n 'WebView',\n ];\n\n const apis = [\n 'AccessibilityInfo',\n 'ActionSheetIOS',\n 'Alert',\n 'AlertIOS',\n 'Animated',\n 'Animated.Value',\n 'Animated.ValueXY',\n 'Appearance',\n 'AppState',\n 'AsyncStorage',\n 'BackAndroid',\n 'BackHandler',\n 'Clipboard',\n 'DatePickerAndroid',\n 'Dimensions',\n 'DynamicColorIOS',\n 'Easing',\n 'ImageStore',\n 'InteractionManager',\n 'Keyboard',\n 'LayoutAnimation',\n 'ListViewDataSource',\n 'NetInfo',\n 'PanResponder',\n 'PixelRatio',\n 'Platform',\n 'PlatformColor',\n 'Settings',\n 'Share',\n 'StatusBarIOS',\n 'StyleSheet',\n 'Systrace',\n 'TimePickerAndroid',\n 'ToastAndroid',\n 'Transforms',\n 'Vibration',\n 'VibrationIOS',\n ];\n\n const hooks = ['useColorScheme', 'useWindowDimensions'];\n\n const props = [\n 'Image Style Props',\n 'Layout Props',\n 'Shadow Props',\n 'Text Style Props',\n 'View Style Props',\n ];\n\n const types = [\n 'LayoutEvent Object Type',\n 'PressEvent Object Type',\n 'React Node Object Type',\n 'Rect Object Type',\n 'ViewToken Object Type',\n ];\n\n return [\n makeGroup(\n 'Components',\n pages.filter(page => components.includes(page.name))\n ),\n makeGroup(\n 'Props',\n pages.filter(page => props.includes(page.name))\n ),\n makeGroup(\n 'APIs',\n pages.filter(page => apis.includes(page.name))\n ),\n makeGroup(\n 'Hooks',\n pages.filter(page => hooks.includes(page.name))\n ),\n makeGroup(\n 'Types',\n pages.filter(page => types.includes(page.name))\n ),\n ];\n}", "function onFBConnected()\r\n{\r\n // $.mobile.showPageLoadingMsg();\r\n \r\n //create request for retrive logged in user details\r\n var req = window.plugins.fbConnect.getMe();\r\n req.onload = checkfacebookid1;\r\n \r\n}", "function LoginByFB(){\n\t\t\t \t//console.log('LoginByFB');\n\t\t\t FB.login(function(response) {\n\t\t\t //console.log('appel de la function FB.login 1');\n\t\t\t //console.log(response);\n\t\t\t if (response.authResponse) {\n\t\t\t console.log('Welcome! Fetching your information.... ');\n\t\t\t console.log(response);\n\t\t\t getdatsForUser();\n\t\t\t } else {\n\t\t\t console.log('User cancelled login or did not fully authorize.');\n\t\t\t }\n\t\t\t }, {scope: 'public_profile,email'});\n\t\t\t }", "async componentDidMount() {\n let token = await AsyncStorage.getItem(\"fb_token\");\n if (token) {\n this.setState({ token }, () => {\n this.route();\n });\n } else {\n this.setState({ token: false });\n }\n }", "getStreamPosition() {\n return Native.getStreamPosition();\n }", "fbShareButtonClick() {\n\n\t\tconst quoteMessage= \n\t\t\t(this.state.request) ?\n\t\t\t\t`Fuckinator fuckinated my fucking text from \"${this.state.request}\" to: \"${this.state.response}\"`: null;\n\n\t\twindow.FB.ui({\n\t\t\tmethod: 'share',\n\t\t\thref: 'http://fuckinator.herokuapp.com/',\n\t\t\thashtag: '#fuckinator',\n\t\t\tmobile_iframe: true,\n\t\t\tquote: quoteMessage,\n\t\t}, res => {});\n\t}", "function facebookLoading(tabId, url){\n\n //get current sessions and global time\n chrome.storage.sync.get([\"open_sessions\", \"time\"], function(res){\n\n console.log(res)\n if(!res.open_sessions) res.open_sessions = {}\n if(res.open_sessions){\n let session = res.open_sessions[tabId]\n\n //if previous tab wasnt a facebook tab\n if(!session){\n //starts new session\n startSession(tabId, url)\n }\n else{\n //stops session on previous tab if it was a facebook tab\n stopSession(res, tabId, function(){\n //starts session on this tab\n startSession(tabId, url)\n })\n }\n }\n\n })\n}", "function run() {\n var service = getService();\n if (service.hasAccess()) {\n\n var url = 'https://graph.facebook.com/v2.6/me/accounts?';\n\n var response = UrlFetchApp.fetch(url, {\n headers: {\n 'Authorization': 'Bearer ' + service.getAccessToken()\n }\n });\n var result = JSON.parse(response.getContentText());\n Logger.log(JSON.stringify(result , null, 2));\n } else {\n var authorizationUrl = service.getAuthorizationUrl();\n\n Logger.log('Open the following URL and re-run the script: %s',authorizationUrl);\n \n\n\n}}", "initialize() {\n\n }", "function facebookCallback() {\n FB.Event.subscribe('edge.create', function() {\n goTo('twitter');\n });\n}", "connectedCallback() {\n super.connectedCallback();\n }", "connectedCallback() {\n super.connectedCallback();\n }", "connectedCallback() {\n super.connectedCallback();\n }", "connectedCallback() {\n super.connectedCallback();\n }", "connectedCallback() {\n super.connectedCallback();\n }", "connectedCallback() {\n super.connectedCallback();\n }", "connectedCallback() {\n super.connectedCallback();\n }", "connectedCallback() {\n super.connectedCallback();\n }", "connectedCallback() {\n super.connectedCallback();\n }", "connectedCallback() {\n super.connectedCallback();\n }", "connectedCallback() {\n super.connectedCallback();\n }", "connectedCallback() {\n super.connectedCallback();\n }", "function getUserInfo22(){\n facebookConnectPlugin.api('me/?fields=id,name,email', ['email','public_profile'],\n function (result) {\n console.log(result);\n },\n function (error) {\n console.log(error);\n });\n}", "async componentDidMount(){\n const searchStr = window.location.search\n const urlParams = queryString.parse(searchStr);\n if(urlParams.code)\n {\n const accessToken = await fbUtils.getAccessTokenFromCode(urlParams.code);\n if(accessToken){\n document.getElementById('my-login-card').innerHTML = this.uiComponent.accessTokenUI(accessToken);\n } else {\n document.getElementById('my-login-card').innerHTML = this.uiComponent.defaultErrorUI();\n }\n }\n\n }" ]
[ "0.58219624", "0.5635253", "0.55540663", "0.54881734", "0.53984666", "0.5383581", "0.5362973", "0.5326434", "0.5320985", "0.5315354", "0.5315354", "0.5291929", "0.52661246", "0.52162653", "0.51980376", "0.5190798", "0.51905507", "0.51553226", "0.5140691", "0.51319295", "0.5125903", "0.50621927", "0.50375915", "0.4993989", "0.4963851", "0.4950435", "0.49201468", "0.49169484", "0.49169484", "0.49098745", "0.4866884", "0.48595896", "0.48415235", "0.48367032", "0.48347038", "0.4833036", "0.48324385", "0.48281837", "0.4820721", "0.48180544", "0.48094198", "0.4799282", "0.47901547", "0.47840142", "0.47799355", "0.4766652", "0.4761223", "0.47586712", "0.4751682", "0.4748471", "0.47355518", "0.4730954", "0.47234508", "0.47204456", "0.47200802", "0.47200802", "0.471806", "0.47091466", "0.47067583", "0.4697726", "0.4694178", "0.4694178", "0.46910745", "0.4688509", "0.46833676", "0.46783558", "0.46759337", "0.46684346", "0.4662761", "0.4662265", "0.46564844", "0.4641518", "0.46355376", "0.46326706", "0.46217567", "0.4616399", "0.46114534", "0.4611053", "0.46058625", "0.4602147", "0.45965064", "0.45922735", "0.45920718", "0.4591251", "0.45886943", "0.45831007", "0.4578368", "0.45740077", "0.45740077", "0.45740077", "0.45740077", "0.45740077", "0.45740077", "0.45740077", "0.45740077", "0.45740077", "0.45740077", "0.45740077", "0.45740077", "0.4572113", "0.4571755" ]
0.0
-1
Call this.constructor.gDSFP to support subclasses. Use the setState() updater to ensure state isn't stale in certain edge cases.
function updater(prevState) { var state = this.constructor.getDerivedStateFromProps(nextProps, prevState); return state !== null && state !== undefined ? state : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function componentWillMount(){// Call this.constructor.gDSFP to support sub-classes.\nvar state=this.constructor.getDerivedStateFromProps(this.props,this.state);if(state!==null&&state!==undefined){this.setState(state);}}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(\n this.props,\n this.state\n );\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n }", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n }", "function componentWillMount() {\n\t // Call this.constructor.gDSFP to support sub-classes.\n\t var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n\t if (state !== null && state !== undefined) {\n\t this.setState(state);\n\t }\n\t}", "function componentWillMount() {\n\t // Call this.constructor.gDSFP to support sub-classes.\n\t var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n\t if (state !== null && state !== undefined) {\n\t this.setState(state);\n\t }\n\t}", "function componentWillMount() {\n\t // Call this.constructor.gDSFP to support sub-classes.\n\t var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n\t if (state !== null && state !== undefined) {\n\t this.setState(state);\n\t }\n\t}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n }", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}" ]
[ "0.6140481", "0.5687273", "0.5580147", "0.55447936", "0.55447936", "0.55447936", "0.54360944", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.53733814", "0.5321901", "0.5321901" ]
0.0
-1
Also exported as `` from `Dropdown`.
function DropdownMenu(_ref2) { var children = _ref2.children, options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__["default"])(_ref2, ["children"]); var args = useDropdownMenu(options); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_3___default.a.Fragment, null, args.hasShown ? children(args) : null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "DropDown() {}", "function McDropdownPanel() { }", "function Dropdown(parent_id, item = {}) {\n item.type = \"select\";\n item.id = item.id || \"{0}_{1}\".format(item.type, __SELECT++);\n item.label = item.label || item.id;\n item.needQuestion = (item.needQuestion == false) ? false : true;\n Tag.call(this, parent_id, item);\n\n this.options = item.options || [\"option1\", \"option2\", \"option3\"];\n this.option_ids = [];\n this.option_values = [];\n for (var i in this.options) {\n this.option_ids.push(\"option_{0}\".format(__OPTION++));\n this.option_values.push(this.options[i]);\n }\n\n this.value = item.value || \"\";\n this.label_id = \"label_{0}\".format(this.id);\n this.button_id = \"button_{0}\".format(this.id);\n this.dropRight = item.dropRight || false;\n this.choose_prompt = item.choose_prompt || \"Choose\";\n this._style = \"mdl-menu mdl-js-menu mdl-js-ripple-effect\" + ((this.dropRight) ? \"mdl-menu--bottom-right\" : \"mdl-menu--bottom-left\");\n\n this.html = '<div class=\"mdl-textfield mdl-js-textfield\">\\\n <input id=\"{4}\" form=\"{8}\" class=\"mdl-textfield__input\" readonly {5} {6} value=\"{7}\"><button id=\"{0}\" form=\"{8}\" style=\"right: 0;\"\\\n class=\"mdl-button mdl-js-button mdl-button--icon\">\\\n <i class=\"material-icons\">expand_more</i></button>\\\n <ul id=\"{1}\" class=\"{2}\" for=\"{0}\" form=\"{8}\">{3}</ui></div>'.format(\n this.button_id, this.id, this._style, this._option_factory(),\n this.label_id, this.required, this.disabled, this.value, this.parent_id\n );\n\n this.render();\n var option_values = this.option_values;\n var label_id = this.label_id;\n for (let i in this.option_ids) {\n document.getElementById(this.option_ids[i]).onclick = function() {\n document.getElementById(label_id).value = option_values[i];\n };\n /*$(\"#\"+this.option_ids[i]).click(function() {\n $(\"#\"+label_id).val(option_values[i]);\n })*/\n }\n}", "function OCM_dropdownMarkup() {\r\n\t\t\t\t\tvar $nectar_ocm_dropdown_func = ($('#slide-out-widget-area[data-dropdown-func]').length > 0) ? $offCanvasEl.attr('data-dropdown-func') : 'default';\r\n\t\t\t\t\tif ($nectar_ocm_dropdown_func == 'separate-dropdown-parent-link') {\r\n\t\t\t\t\t\t$('#slide-out-widget-area .off-canvas-menu-container li.menu-item-has-children').append('<span class=\"ocm-dropdown-arrow\"><i class=\"fa fa-angle-down\"></i></span>');\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "createDropdown(entity) {\n var color = utils.stringToColor(entity.label);\n\n var names = this.props.command.parameters.map((p) => p.name);\n names.unshift(\"-\");\n\n if (!this.props.updatesDatabase) {\n names.push(\"+ Add Parameter\");\n }\n\n var selection = entity.label != null ? entity.label : \"-\";\n\n return (\n <select\n className=\"entitySelect\"\n id={`select-entity-${entity.start}`}\n data-curr={selection}\n defaultValue={selection}\n style={{ color: color }}\n onChange={(event) => this.onChangeEntity(entity, event)}\n >\n {names.map((name) => (\n <option key={name} value={name}>\n {name}\n </option>\n ))}\n </select>\n );\n }", "data () {\n return {\n visible: false,\n selected: [],\n caret: function(){ // switches dropdown caret icon\n return this.visible? \"caret-up-fill\" : \"caret-down-fill\"\n }\n }\n }", "get dropdown_menu() {return browser.element('#user_info_dropdown')}", "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.dropdown');if(!data)$this.data('bs.dropdown',data=new Dropdown(this));if(typeof option=='string')data[option].call($this);});}", "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.dropdown');if(!data)$this.data('bs.dropdown',data=new Dropdown(this));if(typeof option=='string')data[option].call($this);});}", "function Window_Dropdown() {\n this.initialize.apply(this, arguments);\n}", "function dropdown(id, label, options, onChange) {\n\tconst $dropdown = $($('#dropdownScaffold').html());\n\tconst $options = $dropdown.find('.dropdown-menu');\n\tconst $button = $dropdown.find('.dropdown-toggle');\n\t$options.attr('aria-labelledby', id);\n\t$button.prop('id', id);\n\t$button.html(dropdownStartValue('Pick ' + label));\n\t_.each(options, (option) => {\n\t\t$options.append(dropdownOption(option.index, option.text, option.toggleBtn));\n\t});\n\tsetupDropdownHandlers($options, onChange);\n\treturn $dropdown;\n}", "function DropDown(el) {\n this.dd = el;\n this.placeholder = this.dd.children('span');\n this.opts = this.dd.find('ul.dropdown > li');\n this.val = '';\n this.index = -1;\n this.initEvents();\n }", "function Dropdown(onChange, listOfValues, getDisplayValue, label) {\n if (onChange === void 0) { onChange = function (dropdown) { }; }\n if (getDisplayValue === void 0) { getDisplayValue = Strings_1.l; }\n this.onChange = onChange;\n this.listOfValues = listOfValues;\n this.getDisplayValue = getDisplayValue;\n this.label = label;\n this.optionsElement = [];\n this.buildContent();\n this.select(0, false);\n this.bindEvents();\n }", "function DropDown(el) {\n this.dd = el;\n this.initEvents();\n}", "function DropDown(el) {\n this.dd = el;\n this.initEvents();\n}", "function Dropdown(elementRef, i18n) {\n this.elementRef = elementRef;\n this.i18n = i18n;\n /**\n * Value displayed if no item is selected.\n */\n this.placeholder = \"\";\n /**\n * The selected value from the `Dropdown`.\n */\n this.displayValue = \"\";\n /**\n * Size to render the dropdown field.\n */\n this.size = \"md\";\n /**\n * Defines whether or not the `Dropdown` supports selecting multiple items as opposed to single\n * item selection.\n */\n this.type = \"single\";\n /**\n * `light` or `dark` dropdown theme\n * @memberof Dropdown\n */\n this.theme = \"dark\";\n /**\n * Set to `true` to disable the dropdown.\n */\n this.disabled = false;\n /**\n * set to `true` to place the dropdown view inline with the component\n */\n this.appendInline = false;\n /**\n * Accessible label for the button that opens the dropdown list.\n * Defaults to the `DROPDOWN.OPEN` value from the i18n service.\n */\n this.menuButtonLabel = this.i18n.get().DROPDOWN.OPEN;\n /**\n * Provides the label for the \"# selected\" text.\n * Defaults to the `DROPDOWN.SELECTED` value from the i18n service.\n */\n this.selectedLabel = this.i18n.get().DROPDOWN.SELECTED;\n /**\n * Emits selection events.\n */\n this.selected = new EventEmitter();\n /**\n * Emits event notifying to other classes that the `Dropdown` has been closed (collapsed).\n */\n this.onClose = new EventEmitter();\n /**\n * Emits event notifying to other classes that the `Dropdown` has been closed (collapsed).\n */\n this.close = new EventEmitter();\n /**\n * Set to `true` if the dropdown is closed (not expanded).\n */\n this.menuIsClosed = true;\n /**\n * controls wether the `drop-up` class is applied\n */\n this.dropUp = false;\n // .bind creates a new function, so we declare the methods below\n // but .bind them up here\n this.noop = this._noop.bind(this);\n this.outsideClick = this._outsideClick.bind(this);\n this.outsideKey = this._outsideKey.bind(this);\n this.keyboardNav = this._keyboardNav.bind(this);\n this.onTouchedCallback = this._noop;\n this.propagateChange = function (_) { };\n }", "function populateDropdowns() {\n}", "function Dropdown(props) {\n return (\n <div className=\"control\">\n <label htmlFor={props.id}>{props.label}</label>\n <select\n id={props.id}\n className=\"select-css\"\n value={props.value}\n onChange={(e) => props.onChange(e, props.id)}\n onBlur={(e) => props.onChange(e, props.id)}>\n {props.options.map((item) => (\n <option\n key={item.symbol}\n value={item.symbol}\n disabled={item.symbol === props.disabledValue}>\n {item.name}\n </option>\n ))}\n </select>\n </div>\n );\n}", "function Dropdown(_ref) {\n var drop = _ref.drop,\n alignEnd = _ref.alignEnd,\n defaultShow = _ref.defaultShow,\n rawShow = _ref.show,\n rawOnToggle = _ref.onToggle,\n itemSelector = _ref.itemSelector,\n focusFirstItemOnShow = _ref.focusFirstItemOnShow,\n children = _ref.children;\n var forceUpdate = Object(_restart_hooks_useForceUpdate__WEBPACK_IMPORTED_MODULE_7__[\"default\"])();\n\n var _useUncontrolled = Object(uncontrollable__WEBPACK_IMPORTED_MODULE_4__[\"useUncontrolled\"])({\n defaultShow: defaultShow,\n show: rawShow,\n onToggle: rawOnToggle\n }, {\n show: 'onToggle'\n }),\n show = _useUncontrolled.show,\n onToggle = _useUncontrolled.onToggle;\n\n var _useCallbackRef = Object(_restart_hooks_useCallbackRef__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(),\n toggleElement = _useCallbackRef[0],\n setToggle = _useCallbackRef[1]; // We use normal refs instead of useCallbackRef in order to populate the\n // the value as quickly as possible, otherwise the effect to focus the element\n // may run before the state value is set\n\n\n var menuRef = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"])();\n var menuElement = menuRef.current;\n var setMenu = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"])(function (ref) {\n menuRef.current = ref; // ensure that a menu set triggers an update for consumers\n\n forceUpdate();\n }, [forceUpdate]);\n var lastShow = Object(_restart_hooks_usePrevious__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(show);\n var lastSourceEvent = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"])(null);\n var focusInDropdown = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"])(false);\n var toggle = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"])(function (event) {\n onToggle(!show, event);\n }, [onToggle, show]);\n var context = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useMemo\"])(function () {\n return {\n toggle: toggle,\n drop: drop,\n show: show,\n alignEnd: alignEnd,\n menuElement: menuElement,\n toggleElement: toggleElement,\n setMenu: setMenu,\n setToggle: setToggle\n };\n }, [toggle, drop, show, alignEnd, menuElement, toggleElement, setMenu, setToggle]);\n\n if (menuElement && lastShow && !show) {\n focusInDropdown.current = menuElement.contains(document.activeElement);\n }\n\n var focusToggle = Object(_restart_hooks_useEventCallback__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(function () {\n if (toggleElement && toggleElement.focus) {\n toggleElement.focus();\n }\n });\n var maybeFocusFirst = Object(_restart_hooks_useEventCallback__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(function () {\n var type = lastSourceEvent.current;\n var focusType = focusFirstItemOnShow;\n\n if (focusType == null) {\n focusType = menuRef.current && Object(dom_helpers_matches__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(menuRef.current, '[role=menu]') ? 'keyboard' : false;\n }\n\n if (focusType === false || focusType === 'keyboard' && !/^key.+$/.test(type)) {\n return;\n }\n\n var first = Object(dom_helpers_querySelectorAll__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(menuRef.current, itemSelector)[0];\n if (first && first.focus) first.focus();\n });\n Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"])(function () {\n if (show) maybeFocusFirst();else if (focusInDropdown.current) {\n focusInDropdown.current = false;\n focusToggle();\n } // only `show` should be changing\n }, [show, focusInDropdown, focusToggle, maybeFocusFirst]);\n Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"])(function () {\n lastSourceEvent.current = null;\n });\n\n var getNextFocusedChild = function getNextFocusedChild(current, offset) {\n if (!menuRef.current) return null;\n var items = Object(dom_helpers_querySelectorAll__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(menuRef.current, itemSelector);\n var index = items.indexOf(current) + offset;\n index = Math.max(0, Math.min(index, items.length));\n return items[index];\n };\n\n var handleKeyDown = function handleKeyDown(event) {\n var key = event.key,\n target = event.target; // Second only to https://github.com/twbs/bootstrap/blob/8cfbf6933b8a0146ac3fbc369f19e520bd1ebdac/js/src/dropdown.js#L400\n // in inscrutability\n\n var isInput = /input|textarea/i.test(target.tagName);\n\n if (isInput && (key === ' ' || key !== 'Escape' && menuRef.current && menuRef.current.contains(target))) {\n return;\n }\n\n lastSourceEvent.current = event.type;\n\n switch (key) {\n case 'ArrowUp':\n {\n var next = getNextFocusedChild(target, -1);\n if (next && next.focus) next.focus();\n event.preventDefault();\n return;\n }\n\n case 'ArrowDown':\n event.preventDefault();\n\n if (!show) {\n toggle(event);\n } else {\n var _next = getNextFocusedChild(target, 1);\n\n if (_next && _next.focus) _next.focus();\n }\n\n return;\n\n case 'Escape':\n case 'Tab':\n onToggle(false, event);\n break;\n\n default:\n }\n };\n\n return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(_DropdownContext__WEBPACK_IMPORTED_MODULE_9__[\"default\"].Provider, {\n value: context\n }, children({\n props: {\n onKeyDown: handleKeyDown\n }\n }));\n}", "function Dropdown(_ref) {\n var drop = _ref.drop,\n alignEnd = _ref.alignEnd,\n defaultShow = _ref.defaultShow,\n rawShow = _ref.show,\n rawOnToggle = _ref.onToggle,\n itemSelector = _ref.itemSelector,\n focusFirstItemOnShow = _ref.focusFirstItemOnShow,\n children = _ref.children;\n var forceUpdate = Object(_restart_hooks_useForceUpdate__WEBPACK_IMPORTED_MODULE_7__[\"default\"])();\n\n var _useUncontrolled = Object(uncontrollable__WEBPACK_IMPORTED_MODULE_4__[\"useUncontrolled\"])({\n defaultShow: defaultShow,\n show: rawShow,\n onToggle: rawOnToggle\n }, {\n show: 'onToggle'\n }),\n show = _useUncontrolled.show,\n onToggle = _useUncontrolled.onToggle;\n\n var _useCallbackRef = Object(_restart_hooks_useCallbackRef__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(),\n toggleElement = _useCallbackRef[0],\n setToggle = _useCallbackRef[1]; // We use normal refs instead of useCallbackRef in order to populate the\n // the value as quickly as possible, otherwise the effect to focus the element\n // may run before the state value is set\n\n\n var menuRef = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"])();\n var menuElement = menuRef.current;\n var setMenu = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"])(function (ref) {\n menuRef.current = ref; // ensure that a menu set triggers an update for consumers\n\n forceUpdate();\n }, [forceUpdate]);\n var lastShow = Object(_restart_hooks_usePrevious__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(show);\n var lastSourceEvent = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"])(null);\n var focusInDropdown = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"])(false);\n var toggle = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"])(function (event) {\n onToggle(!show, event);\n }, [onToggle, show]);\n var context = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useMemo\"])(function () {\n return {\n toggle: toggle,\n drop: drop,\n show: show,\n alignEnd: alignEnd,\n menuElement: menuElement,\n toggleElement: toggleElement,\n setMenu: setMenu,\n setToggle: setToggle\n };\n }, [toggle, drop, show, alignEnd, menuElement, toggleElement, setMenu, setToggle]);\n\n if (menuElement && lastShow && !show) {\n focusInDropdown.current = menuElement.contains(document.activeElement);\n }\n\n var focusToggle = Object(_restart_hooks_useEventCallback__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(function () {\n if (toggleElement && toggleElement.focus) {\n toggleElement.focus();\n }\n });\n var maybeFocusFirst = Object(_restart_hooks_useEventCallback__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(function () {\n var type = lastSourceEvent.current;\n var focusType = focusFirstItemOnShow;\n\n if (focusType == null) {\n focusType = menuRef.current && Object(dom_helpers_matches__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(menuRef.current, '[role=menu]') ? 'keyboard' : false;\n }\n\n if (focusType === false || focusType === 'keyboard' && !/^key.+$/.test(type)) {\n return;\n }\n\n var first = Object(dom_helpers_querySelectorAll__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(menuRef.current, itemSelector)[0];\n if (first && first.focus) first.focus();\n });\n Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"])(function () {\n if (show) maybeFocusFirst();else if (focusInDropdown.current) {\n focusInDropdown.current = false;\n focusToggle();\n } // only `show` should be changing\n }, [show, focusInDropdown, focusToggle, maybeFocusFirst]);\n Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"])(function () {\n lastSourceEvent.current = null;\n });\n\n var getNextFocusedChild = function getNextFocusedChild(current, offset) {\n if (!menuRef.current) return null;\n var items = Object(dom_helpers_querySelectorAll__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(menuRef.current, itemSelector);\n var index = items.indexOf(current) + offset;\n index = Math.max(0, Math.min(index, items.length));\n return items[index];\n };\n\n var handleKeyDown = function handleKeyDown(event) {\n var key = event.key,\n target = event.target; // Second only to https://github.com/twbs/bootstrap/blob/8cfbf6933b8a0146ac3fbc369f19e520bd1ebdac/js/src/dropdown.js#L400\n // in inscrutability\n\n var isInput = /input|textarea/i.test(target.tagName);\n\n if (isInput && (key === ' ' || key !== 'Escape' && menuRef.current && menuRef.current.contains(target))) {\n return;\n }\n\n lastSourceEvent.current = event.type;\n\n switch (key) {\n case 'ArrowUp':\n {\n var next = getNextFocusedChild(target, -1);\n if (next && next.focus) next.focus();\n event.preventDefault();\n return;\n }\n\n case 'ArrowDown':\n event.preventDefault();\n\n if (!show) {\n toggle(event);\n } else {\n var _next = getNextFocusedChild(target, 1);\n\n if (_next && _next.focus) _next.focus();\n }\n\n return;\n\n case 'Escape':\n case 'Tab':\n onToggle(false, event);\n break;\n\n default:\n }\n };\n\n return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(_DropdownContext__WEBPACK_IMPORTED_MODULE_9__[\"default\"].Provider, {\n value: context\n }, children({\n props: {\n onKeyDown: handleKeyDown\n }\n }));\n}", "function dropdown(e) {\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t<select onChange={handleSelectChange} value={displayTag}>\n\t\t\t\t\t<option value=\"Select a Category\"> -- Select a category -- </option>\n\t\t\t\t\t<option value=\"all\">All</option>\n\n\t\t\t\t\t{categories.map((item) => <option value={item}>{item}</option>)}\n\t\t\t\t</select>\n\t\t\t</div>\n\t\t)\n\t}", "function init_dash() {\n dropDown();\n}", "_setDropDownOptions() {\n const that = this;\n\n if (that.dropDownEnabled === false || that._number === null) {\n return;\n }\n\n const wordLength = that._wordLengthNumber,\n leadingZeros = that.leadingZeros;\n\n that.$.dropDownItem2.innerHTML = `${that._number.toString(2, wordLength, leadingZeros)} (${that.localize('binary')})`;\n that.$.dropDownItem8.innerHTML = `${that._number.toString(8, wordLength)} (${that.localize('octal')})`;\n that.$.dropDownItem10.innerHTML = `${that._renderValue(that._number.toString(10, wordLength), true)} (${that.localize('decimal')})`;\n that.$.dropDownItem16.innerHTML = `${that._number.toString(16, wordLength, leadingZeros)} (${that.localize('hexadecimal')})`;\n }", "function dropdown(ar) { \n/*//console.log(\"dd clicked\")*/ }", "function test_dialog_dropdown_ui_values_in_the_dropdown_should_be_visible_in_edit_mode() {}", "function ParentDropdown() {\n return (\n <div className=\"ui simple selection dropdown\">\n <input type=\"hidden\" name=\"student\" />\n <i className=\"dropdown icon\"></i>\n <div className=\"left icon default text\">Select Child</div>\n <i className=\"child icon\"></i>\n <div className=\"menu\">\n <DropdownItem />\n </div>\n </div>\n )\n}", "function Select(props) {\n\t return _react2.default.createElement(_Dropdown2.default, _extends({}, props, { selection: true }));\n\t}", "static get BUTTON_SELECT() {\n return \"select\";\n }", "dropDownJSX(props){\n const md5 = \"\"; // Unique per game\n let compositions = localStorage.getItem(\"compositions\" + md5) ? JSON.parse(localStorage.getItem(\"compositions\" + md5)) : {};\n if (typeof (compositions) === \"string\") {\n compositions = {};\n }\n\n\n\n const dropDownItems = <DropdownItem\n onClick={() => {\n }}\n >\n </DropdownItem>;\n return <ButtonDropdown\n isOpen={props.isDown}\n toggle={() => props.toggleDropDown('loadCompositionDropDown')}\n >\n {\" \"}\n <DropdownToggle caret>App</DropdownToggle>\n <DropdownMenu>\n {dropDownItems}\n </DropdownMenu>\n </ButtonDropdown>\n }", "function Select(props) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__modules_Dropdown__[\"a\" /* default */], __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, props, { selection: true }));\n}", "function Select(props) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__modules_Dropdown__[\"a\" /* default */], __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, props, { selection: true }));\n}", "function Select(props) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__modules_Dropdown__[\"a\" /* default */], __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, props, { selection: true }));\n}", "function Select(props) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__modules_Dropdown__[\"a\" /* default */], __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, props, { selection: true }));\n}", "function Select(props) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__modules_Dropdown__[\"a\" /* default */], __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, props, { selection: true }));\n}", "function setDropdownOption (val) {\n return model.inputs.dropDownOption = val;\n}", "function dropDownListUtils() {\r\n\r\n var thisObj = this;\r\n\r\n thisObj.disableDropDown = function (dropDown, valueToSelect) {\r\n dropDown.prop(\"disabled\", true);\r\n thisObj.selectItem(dropDown, valueToSelect);\r\n };\r\n\r\n thisObj.selectItem = function (dropDown, valueToSelect) {\r\n dropDown.find(\"option[value='\" + valueToSelect + \"']\")\r\n .prop(\"selected\", true);\r\n };\r\n\r\n thisObj.selectValueIfExist = function (dropdownControl, valueToSelect) {\r\n var matchingOption = dropdownControl.find('option[value=\"' + valueToSelect + '\"]');\r\n if (matchingOption.length) {\r\n dropdownControl.val(valueToSelect);\r\n }\r\n };\r\n}", "render() {\n return (\t\n <Dropdown className={css(style.dropDownStyle)} isOpen={this.state.dropdownOpen} toggle={this.toggle} size=\"lg\">\n <DropdownToggle caret className={css(style.fontSizeStyle, style.colorThemeStyle)}>\n Welcome, <strong className={css(style.fontSizeStyle, style.colorThemeStyle)}>{this.state.names+ \" \"}</strong>\n </DropdownToggle>\n <DropdownMenu right className={css(style.fontSizeStyle, style.colorThemeStyle)}>\n <DropdownItem header className={css(style.fontSizeStyle)}>Profile</DropdownItem>\n <DropdownItem divider /> \n <DropdownItem tag={Link} to={\"/profile/\" + this.props.user.username} className={css(style.fontSizeStyle, style.colorThemeStyle)}>My Profile</DropdownItem>\n <DropdownItem tag={Link} to={\"/projects\"} className={css(style.fontSizeStyle, style.colorThemeStyle)}>My Projects</DropdownItem>\n <DropdownItem divider /> \n <DropdownItem className={css(style.fontSizeStyle, style.colorThemeStyle)}>Settings</DropdownItem>\n <DropdownItem divider />\n <DropdownItem onClick={this.props.logout}>Log out</DropdownItem>\n </DropdownMenu>\n </Dropdown> \n );\n }", "function DropDown_3(el_3) {\r\n this.dd_3 = el_3;\r\n this.placeholder = this.dd_3.children('span');\r\n this.opts = this.dd_3.find('ul.dropdown > li');\r\n this.val = '';\r\n this.index = -1;\r\n this.initEvents();\r\n}", "render() {\n return (\n <UncontrolledDropdown>\n <DropdownToggle className='menu-icon icon-more'>\n </DropdownToggle>\n <DropdownMenu right >\n {/* Will delete the parent Workflow from the Workflows List */}\n <DropdownItem key={1} onClick={this.deleteOption}> \n Delete \n </DropdownItem>\n </DropdownMenu>\n </UncontrolledDropdown>\n );\n }", "handleInputClick() {\n\t\tthis.showDropdown();\n\t}", "function DropDown(el) {\n\t\t\t\tthis.dd = el;\n\t\t\t\tthis.initEvents();\n\t\t\t}", "async selectDropDown(ObjectRepo) {\n //Verifying the drop down text\n await Utility.clickOn(ObjectRepo.Register.typeOfMerchant);\n //Accepting the option\n await Utility.clickOn(ObjectRepo.Register.optionOfMerchant);\n }", "function setDropdown() {\n\n searchBar.autocomplete({\n source: availableTags, \n response: function(_, ui) {\n dropdownResponse = ui.content;\n }\n\n });\n searchBar.on(\"autocompletesearch\", function(_, ui){\n\n })\n }", "function renderDropdown(component) {\n component.$dropdown.html(templates.dropdown(getDescriptors(component)));\n updateClearAll(component);\n}", "function _dropdownAdapter(clazz) {\n return null;\n }", "get roleDropdownAPI() {\n return this.roleDropdownEl ? $(this.roleDropdownEl).data('dropdown') : undefined;\n }", "function Select(props) {\n return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__modules_Dropdown__[\"a\" /* default */], __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_extends___default()({}, props, {\n selection: true\n }));\n}", "render() {\n return (\n <Dropdown onChange={this.handleChange} id={\"instructorDropdown\"} labelText=\"Instructor:\">\n {this.createDropdownOptions(this.state.instructorData)}\n </Dropdown>\n );\n }", "function _dropdownAdapter (clazz) {\n return null;\n }", "function _dropdownAdapter (clazz) {\n return null;\n }", "function _dropdownAdapter (clazz) {\n return null;\n }", "function _dropdownAdapter (clazz) {\n return null;\n }", "function _dropdownAdapter (clazz) {\n return null;\n }", "function _dropdownAdapter (clazz) {\n return null;\n }", "function _dropdownAdapter (clazz) {\n return null;\n }", "function _dropdownAdapter (clazz) {\n return null;\n }", "function _dropdownAdapter (clazz) {\n return null;\n }", "function _dropdownAdapter (clazz) {\n return null;\n }", "function _dropdownAdapter (clazz) {\n return null;\n }", "function menuOptions() {}", "function Dropdown(props) {\n  var str = props.data.question;\n  var idx = str.indexOf(\"$CHOICES\");\n  return (\n <div className=\"question-container\">\n     <div key=\"question\" className=\"prompt-container\">\n {props.num}) {str.substring(0, idx)}\n <select required name=\"Dropdown\" className=\"dropdown\" value={props.ans} onChange={(e)=>{props.selected(e.target.value)}}>\n           {props.data.options.map((val,key)=>{\n             return <option key={key} value={val}> {val} </option>;\n           })}\n         </select> {str.substring(idx+8)}\n     </div>\n </div>\n  );\n}", "_renderDropDownPage() {\n if(this.props.item.pages && this.props.item.expand) {\n return (\n <li className={ this._isMenuItemActive() + \" dropdown\"}>\n <a title={ this.props.item.title } onClick={ e => this._bindDropMenuClick(e) }>\n { this.props.item.name } \n <span className=\"caret\"></span>\n </a>\n <Menu pages={ this.props.item.pages } styleClass={ this._isDropdownMenuOpen() }/>\n </li>\n )\n }\n }", "function _dropdownAdapter (clazz) {\r\n return null;\r\n }", "function _dropdownAdapter (clazz) {\r\n return null;\r\n }", "function getDropDowns() {\n getList('author');\n getList('tags');\n }", "get userDropDown () { return $('#userSelect') }", "function Dropdown(){\n this.createDropdown = function(dict, name, id, selected){\n this.item = document.createElement(\"select\")\n\t\tthis.name = name\n\n\t\tvar ttmp = document.createElement(\"label\")\n\t\tttmp.setAttribute(\"name\", name)\t\t\t\n\t\tttmp.innerHTML = this.name\n\t\tthis.item.appendChild(ttmp)\n\n \t\tfor(var x in dict){\n \t\tvar tmp =document.createElement(\"option\")\n \t\ttmp.setAttribute('value',dict[x])\n \t\ttmp.innerHTML= x + '<br>' \n \n \t\tthis.item.appendChild(tmp)\n \t}\n\n },\n \n this.getSelected = function(){\n this.item=document.getElementById()\n },\n\n this.addToDocument = function(){\n document.body.appendChild(this.item);\n\n }\n}", "function Select(props) {\n return _react2.default.createElement(_Dropdown2.default, (0, _extends3.default)({}, props, { selection: true }));\n}", "function Select(props) {\n return _react2.default.createElement(_Dropdown2.default, (0, _extends3.default)({}, props, { selection: true }));\n}", "function _dropdownAdapter (clazz) {\n return null;\n }", "function _dropdownAdapter (clazz) {\n return null;\n }", "function Select(props) {\n return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(_modules_Dropdown__WEBPACK_IMPORTED_MODULE_3__[\"default\"], _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, props, {\n selection: true\n }));\n}", "function Select(props) {\n return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(_modules_Dropdown__WEBPACK_IMPORTED_MODULE_3__[\"default\"], _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, props, {\n selection: true\n }));\n}", "function WoDUiGemDropDown( socketLabel, isInline ) {\n\n WodUiWidget.call(this, 'div')\n\n this.selectedIndex = 0;\n this.click = false;\n this.socketLabel = socketLabel\n\n this.isInline = isInline\n\n var cssClass = isInline\n ? 'gemselect main inline'\n : 'gemselect main'\n this.setClass( cssClass )\n\n //Erstellen der Hierarchie der Elemente\n this.selected = new WoDUiGemDropDownSelected();\n this.appendChild(this.selected);\n\n var dropdown = new WoDUiGemDropDownImage();\n this.appendChild(dropdown);\n\n this.selectable = new WoDUiGemDropDownSelectable( isInline );\n this.appendChild(this.selectable);\n this.selectable.setVisible(false);\n\n var _this = this\n\n this.setMouseOverListener(function() {\n _this.dropDownChanger(true)\n })\n\n this.setClickListener(function() {\n// _this.dropDownChanger(true)\n })\n\n this.setMouseOutListener(function() {\n _this.dropDownChanger(false)\n })\n\n this.setMouseDownListener(function() {\n //_this.dropDownChanger(false)\n })\n\n\n}", "function Dropdown(element, completer, option) {\n this.$el = Dropdown.createElement(option);\n this.completer = completer;\n this.id = completer.id + 'dropdown';\n this._data = []; // zipped data.\n this.$inputEl = $(element);\n this.option = option;\n\n // Override setPosition method.\n if (option.listPosition) { this.setPosition = option.listPosition; }\n if (option.height) { this.$el.height(option.height); }\n var self = this;\n $.each(['maxCount', 'placement', 'footer', 'header', 'noResultsMessage', 'className'], function (_i, name) {\n if (option[name] != null) { self[name] = option[name]; }\n });\n this._bindEvents(element);\n dropdownViews[this.id] = this;\n }", "function Select(props) {\n return _react[\"default\"].createElement(_Dropdown[\"default\"], (0, _extends2[\"default\"])({}, props, {\n selection: true\n }));\n}", "function DropdownObject(displayText, queryValue, iconClass) {\n this.text = displayText;\n this.value = queryValue;\n this.icon = iconClass;\n }", "function Dropdown() {\n\n \n \n return (\n <div className=\"Dropdown DropdownSM\">\n DNI <HiOutlineChevronDown className=\" {HiOutlineChevronDown} \" color={\"#EF3340\"} size={20} />\n </div>\n )\n}", "function Select(props) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(_modules_Dropdown__WEBPACK_IMPORTED_MODULE_3__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, props, {\n selection: true\n }));\n}", "function convertMarkdownDropdowns(text) {\n // find dropdowns\n return text.replace(/^\\[\\[ *(`?)(.+?)(`?) *\\]\\]/gm, function(select, tt, options) {\n var clazz = 'dropdown';\n if (/\\S/.test(tt)) {\n clazz += ' ttfont';\n }\n // convert individual options\n var options = options.split(',').map(function(option) {\n var option = /^(\\(?)(.+?)(\\)?)$/.exec(option.trim());\n var attrs = '';\n if (option[1] && option[3]) {\n attrs += ' data-form-value=\"select\"';\n } else {\n option[2] = option.slice(1).join(''); // glue singleton ( and ) back on\n }\n return $('<option' + attrs + '>').text(option[2].trim()).prop('outerHTML');\n }).join();\n var blank = '<option selected=\"selected\"></option>';\n return '<div class=\"form-group\"><div class=\"' + clazz + '\"><select class=\"form-control\">' + blank + options + '</select></div>\\n</div>';\n });\n}", "constructor(options) {\n this.trigger = options.trigger;\n this.dropdown = options.dropdownList;\n this.items = this.dropdown.querySelectorAll(dropdownItemClass);\n this.links = this.dropdown.querySelectorAll(dropdownLinkClass);\n [this.firstLink] = this.links;\n this.lastLink = this.links[this.links.length - 1];\n\n this.state = [];\n this.currentFocusedIndex = 0;\n this.isOpen = false;\n\n this.open = this.open.bind(this);\n this.toggle = this.toggle.bind(this);\n this.onClick = this.onClick.bind(this);\n this.onFocus = this.onFocus.bind(this);\n this.onKeydown = this.onKeydown.bind(this);\n }", "function _dropdownAdapter(clazz) {\n return null;\n }", "function Select(props, ref) {\n var _classNames2;\n\n var _props$prefixCls = props.prefixCls,\n prefixCls = _props$prefixCls === void 0 ? defaultPrefixCls : _props$prefixCls,\n className = props.className,\n id = props.id,\n open = props.open,\n defaultOpen = props.defaultOpen,\n options = props.options,\n children = props.children,\n mode = props.mode,\n value = props.value,\n defaultValue = props.defaultValue,\n labelInValue = props.labelInValue,\n showSearch = props.showSearch,\n inputValue = props.inputValue,\n searchValue = props.searchValue,\n filterOption = props.filterOption,\n _props$optionFilterPr = props.optionFilterProp,\n optionFilterProp = _props$optionFilterPr === void 0 ? 'value' : _props$optionFilterPr,\n _props$autoClearSearc = props.autoClearSearchValue,\n autoClearSearchValue = _props$autoClearSearc === void 0 ? true : _props$autoClearSearc,\n onSearch = props.onSearch,\n allowClear = props.allowClear,\n clearIcon = props.clearIcon,\n showArrow = props.showArrow,\n inputIcon = props.inputIcon,\n menuItemSelectedIcon = props.menuItemSelectedIcon,\n disabled = props.disabled,\n loading = props.loading,\n defaultActiveFirstOption = props.defaultActiveFirstOption,\n _props$notFoundConten = props.notFoundContent,\n notFoundContent = _props$notFoundConten === void 0 ? 'Not Found' : _props$notFoundConten,\n optionLabelProp = props.optionLabelProp,\n backfill = props.backfill,\n getInputElement = props.getInputElement,\n getPopupContainer = props.getPopupContainer,\n _props$listHeight = props.listHeight,\n listHeight = _props$listHeight === void 0 ? 200 : _props$listHeight,\n _props$listItemHeight = props.listItemHeight,\n listItemHeight = _props$listItemHeight === void 0 ? 20 : _props$listItemHeight,\n animation = props.animation,\n transitionName = props.transitionName,\n dropdownStyle = props.dropdownStyle,\n dropdownClassName = props.dropdownClassName,\n dropdownMatchSelectWidth = props.dropdownMatchSelectWidth,\n dropdownRender = props.dropdownRender,\n dropdownAlign = props.dropdownAlign,\n _props$showAction = props.showAction,\n showAction = _props$showAction === void 0 ? [] : _props$showAction,\n tokenSeparators = props.tokenSeparators,\n onPopupScroll = props.onPopupScroll,\n onDropdownVisibleChange = props.onDropdownVisibleChange,\n onFocus = props.onFocus,\n onBlur = props.onBlur,\n onKeyUp = props.onKeyUp,\n onKeyDown = props.onKeyDown,\n onMouseDown = props.onMouseDown,\n onChange = props.onChange,\n onSelect = props.onSelect,\n onDeselect = props.onDeselect,\n _props$internalProps = props.internalProps,\n internalProps = _props$internalProps === void 0 ? {} : _props$internalProps,\n restProps = _objectWithoutProperties(props, [\"prefixCls\", \"className\", \"id\", \"open\", \"defaultOpen\", \"options\", \"children\", \"mode\", \"value\", \"defaultValue\", \"labelInValue\", \"showSearch\", \"inputValue\", \"searchValue\", \"filterOption\", \"optionFilterProp\", \"autoClearSearchValue\", \"onSearch\", \"allowClear\", \"clearIcon\", \"showArrow\", \"inputIcon\", \"menuItemSelectedIcon\", \"disabled\", \"loading\", \"defaultActiveFirstOption\", \"notFoundContent\", \"optionLabelProp\", \"backfill\", \"getInputElement\", \"getPopupContainer\", \"listHeight\", \"listItemHeight\", \"animation\", \"transitionName\", \"dropdownStyle\", \"dropdownClassName\", \"dropdownMatchSelectWidth\", \"dropdownRender\", \"dropdownAlign\", \"showAction\", \"tokenSeparators\", \"onPopupScroll\", \"onDropdownVisibleChange\", \"onFocus\", \"onBlur\", \"onKeyUp\", \"onKeyDown\", \"onMouseDown\", \"onChange\", \"onSelect\", \"onDeselect\", \"internalProps\"]);\n\n var domProps = omitDOMProps ? omitDOMProps(restProps) : restProps;\n DEFAULT_OMIT_PROPS.forEach(function (prop) {\n delete domProps[prop];\n });\n var selectorRef = React.useRef(null);\n var listRef = React.useRef(null);\n /** Used for component focused management */\n\n var _useDelayReset = (0, _useDelayReset3.default)(),\n _useDelayReset2 = _slicedToArray(_useDelayReset, 3),\n mockFocused = _useDelayReset2[0],\n setMockFocused = _useDelayReset2[1],\n cancelSetMockFocused = _useDelayReset2[2]; // Inner id for accessibility usage. Only work in client side\n\n\n var _React$useState = React.useState(),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n innerId = _React$useState2[0],\n setInnerId = _React$useState2[1];\n\n React.useEffect(function () {\n setInnerId(\"rc_select_\".concat((0, _commonUtil.getUUID)()));\n }, []);\n var mergedId = id || innerId; // optionLabelProp\n\n var mergedOptionLabelProp = optionLabelProp;\n\n if (mergedOptionLabelProp === undefined) {\n mergedOptionLabelProp = options ? 'label' : 'children';\n } // labelInValue\n\n\n var mergedLabelInValue = mode === 'combobox' ? false : labelInValue;\n var isMultiple = mode === 'tags' || mode === 'multiple';\n var mergedShowSearch = showSearch !== undefined ? showSearch : isMultiple || mode === 'combobox'; // ============================== Ref ===============================\n\n React.useImperativeHandle(ref, function () {\n return {\n focus: selectorRef.current.focus,\n blur: selectorRef.current.blur\n };\n }); // ============================= Value ==============================\n\n var _React$useState3 = React.useState(value || defaultValue),\n _React$useState4 = _slicedToArray(_React$useState3, 2),\n innerValue = _React$useState4[0],\n setInnerValue = _React$useState4[1];\n\n var baseValue = value !== undefined && value !== null ? value : innerValue;\n /** Unique raw values */\n\n var mergedRawValue = React.useMemo(function () {\n return (0, _commonUtil.toInnerValue)(baseValue, {\n labelInValue: mergedLabelInValue,\n combobox: mode === 'combobox'\n });\n }, [baseValue, mergedLabelInValue]);\n /** We cache a set of raw values to speed up check */\n\n var rawValues = React.useMemo(function () {\n return new Set(mergedRawValue);\n }, [mergedRawValue]); // ============================= Option =============================\n // Set by option list active, it will merge into search input when mode is `combobox`\n\n var _React$useState5 = React.useState(null),\n _React$useState6 = _slicedToArray(_React$useState5, 2),\n activeValue = _React$useState6[0],\n setActiveValue = _React$useState6[1];\n\n var _React$useState7 = React.useState(''),\n _React$useState8 = _slicedToArray(_React$useState7, 2),\n innerSearchValue = _React$useState8[0],\n setInnerSearchValue = _React$useState8[1];\n\n var mergedSearchValue = innerSearchValue;\n\n if (searchValue !== undefined) {\n mergedSearchValue = searchValue;\n } else if (inputValue) {\n mergedSearchValue = inputValue;\n }\n\n var mergedOptions = React.useMemo(function () {\n var newOptions = options;\n\n if (newOptions === undefined) {\n newOptions = convertChildrenToData(children);\n }\n /**\n * `tags` should fill un-list item.\n * This is not cool here since TreeSelect do not need this\n */\n\n\n if (mode === 'tags' && fillOptionsWithMissingValue) {\n newOptions = fillOptionsWithMissingValue(newOptions, baseValue, mergedOptionLabelProp, labelInValue);\n }\n\n return newOptions;\n }, [options, children, mode, baseValue]);\n var mergedFlattenOptions = React.useMemo(function () {\n return flattenOptions(mergedOptions, props);\n }, [mergedOptions]); // Display options for OptionList\n\n var displayOptions = React.useMemo(function () {\n if (!mergedSearchValue) {\n return _toConsumableArray(mergedOptions);\n }\n\n var filteredOptions = filterOptions(mergedSearchValue, mergedOptions, {\n optionFilterProp: optionFilterProp,\n filterOption: mode === 'combobox' && filterOption === undefined ? function () {\n return true;\n } : filterOption\n });\n\n if (mode === 'tags' && filteredOptions.every(function (opt) {\n return opt.value !== mergedSearchValue;\n })) {\n filteredOptions.unshift({\n value: mergedSearchValue,\n label: mergedSearchValue,\n key: '__RC_SELECT_TAG_PLACEHOLDER__'\n });\n }\n\n return filteredOptions;\n }, [mergedOptions, mergedSearchValue, mode]);\n var displayFlattenOptions = React.useMemo(function () {\n return flattenOptions(displayOptions, props);\n }, [displayOptions]); // ============================ Selector ============================\n\n var displayValues = React.useMemo(function () {\n return mergedRawValue.map(function (val) {\n var displayValue = getLabeledValue(val, {\n options: mergedFlattenOptions,\n prevValue: baseValue,\n labelInValue: mergedLabelInValue,\n optionLabelProp: mergedOptionLabelProp\n });\n return _objectSpread({}, displayValue, {\n disabled: isValueDisabled(val, mergedFlattenOptions)\n });\n });\n }, [baseValue, mergedOptions]);\n\n var triggerSelect = function triggerSelect(newValue, isSelect) {\n var selectValue = mergedLabelInValue ? getLabeledValue(newValue, {\n options: mergedFlattenOptions,\n prevValue: baseValue,\n labelInValue: mergedLabelInValue,\n optionLabelProp: mergedOptionLabelProp\n }) : newValue;\n var outOption = findValueOption([newValue], mergedFlattenOptions)[0];\n\n if (isSelect && onSelect) {\n onSelect(selectValue, outOption);\n } else if (!isSelect && onDeselect) {\n onDeselect(selectValue, outOption);\n }\n };\n\n var triggerChange = function triggerChange(newRawValues) {\n var outValues = (0, _commonUtil.toOuterValues)(Array.from(newRawValues), {\n labelInValue: mergedLabelInValue,\n options: mergedFlattenOptions,\n getLabeledValue: getLabeledValue,\n prevValue: baseValue,\n optionLabelProp: mergedOptionLabelProp\n });\n var outValue = isMultiple ? outValues : outValues[0]; // Skip trigger if prev & current value is both empty\n\n if (onChange && (mergedRawValue.length !== 0 || outValues.length !== 0)) {\n var outOptions = findValueOption(newRawValues, mergedFlattenOptions);\n onChange(outValue, isMultiple ? outOptions : outOptions[0]);\n }\n\n setInnerValue(outValue);\n };\n\n var onInternalSelect = function onInternalSelect(newValue, _ref) {\n var selected = _ref.selected;\n\n if (disabled) {\n return;\n }\n\n var newRawValue;\n\n if (isMultiple) {\n newRawValue = new Set(mergedRawValue);\n\n if (selected) {\n newRawValue.add(newValue);\n } else {\n newRawValue.delete(newValue);\n }\n } else {\n newRawValue = new Set();\n newRawValue.add(newValue);\n } // Multiple always trigger change and single should change if value changed\n\n\n if (isMultiple || !isMultiple && Array.from(mergedRawValue)[0] !== newValue) {\n triggerChange(Array.from(newRawValue));\n } // Trigger `onSelect`. Single mode always trigger select\n\n\n triggerSelect(newValue, !isMultiple || selected); // Clean search value if single or configured\n\n if (mode === 'combobox') {\n setInnerSearchValue(String(newValue));\n setActiveValue('');\n } else if (!isMultiple || autoClearSearchValue) {\n setInnerSearchValue('');\n setActiveValue('');\n }\n }; // ============================= Input ==============================\n // Only works in `combobox`\n\n\n var customizeInputElement = mode === 'combobox' && getInputElement && getInputElement() || null; // ============================== Open ==============================\n\n var _React$useState9 = React.useState(defaultOpen),\n _React$useState10 = _slicedToArray(_React$useState9, 2),\n innerOpen = _React$useState10[0],\n setInnerOpen = _React$useState10[1];\n\n var mergedOpen = open !== undefined ? open : innerOpen; // Not trigger `open` in `combobox` when `notFoundContent` is empty\n\n if (mergedOpen && mode === 'combobox' && !notFoundContent && !displayOptions.length) {\n mergedOpen = false;\n }\n\n var onToggleOpen = function onToggleOpen(newOpen) {\n var nextOpen = newOpen !== undefined ? newOpen : !mergedOpen;\n\n if (mergedOpen !== nextOpen && !disabled) {\n setInnerOpen(nextOpen);\n\n if (onDropdownVisibleChange) {\n onDropdownVisibleChange(nextOpen);\n }\n }\n }; // ============================= Search =============================\n\n\n var triggerSearch = function triggerSearch(searchText) {\n var fromTyping = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var ret = true;\n var newSearchText = searchText;\n setActiveValue(null); // Check if match the `tokenSeparators`\n\n var patchLabels = (0, _valueUtil.getSeparatedContent)(searchText, tokenSeparators);\n var patchRawValues = patchLabels;\n\n if (mode === 'combobox') {\n // Only typing will trigger onChange\n if (fromTyping) {\n triggerChange([newSearchText]);\n }\n } else if (patchLabels) {\n newSearchText = '';\n\n if (mode !== 'tags') {\n patchRawValues = patchLabels.map(function (label) {\n var item = mergedFlattenOptions.find(function (_ref2) {\n var data = _ref2.data;\n return data[mergedOptionLabelProp] === label;\n });\n return item ? item.data.value : null;\n }).filter(function (val) {\n return val !== null;\n });\n }\n\n var newRawValues = Array.from(new Set([].concat(_toConsumableArray(mergedRawValue), _toConsumableArray(patchRawValues))));\n triggerChange(newRawValues);\n newRawValues.forEach(function (newRawValue) {\n triggerSelect(newRawValue, true);\n }); // Should close when paste finish\n\n onToggleOpen(false); // Tell Selector that break next actions\n\n ret = false;\n }\n\n setInnerSearchValue(newSearchText);\n\n if (onSearch && mergedSearchValue !== newSearchText) {\n onSearch(newSearchText);\n }\n\n return ret;\n }; // Close will clean up single mode search text\n\n\n React.useEffect(function () {\n if (!mergedOpen && !isMultiple && mode !== 'combobox') {\n triggerSearch('', false);\n }\n }, [mergedOpen]); // ============================ Keyboard ============================\n\n /**\n * We record input value here to check if can press to clean up by backspace\n * - null: Key is not down, this is reset by key up\n * - true: Search text is empty when first time backspace down\n * - false: Search text is not empty when first time backspace down\n */\n\n var _useLock = (0, _useLock3.default)(),\n _useLock2 = _slicedToArray(_useLock, 2),\n getClearLock = _useLock2[0],\n setClearLock = _useLock2[1];\n\n var clearLock = getClearLock(); // KeyDown\n\n var onInternalKeyDown = function onInternalKeyDown(event) {\n var which = event.which; // We only manage open state here, close logic should handle by list component\n\n if (!mergedOpen && which === _KeyCode.default.ENTER) {\n onToggleOpen(true);\n }\n\n setClearLock(!!mergedSearchValue); // Remove value by `backspace`\n\n if (which === _KeyCode.default.BACKSPACE && !clearLock && isMultiple && !mergedSearchValue && mergedRawValue.length) {\n var removeInfo = (0, _commonUtil.removeLastEnabledValue)(displayValues, mergedRawValue);\n\n if (removeInfo.removedValue !== null) {\n triggerChange(removeInfo.values);\n triggerSelect(removeInfo.removedValue, false);\n }\n }\n\n for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n rest[_key - 1] = arguments[_key];\n }\n\n if (mergedOpen && listRef.current) {\n var _listRef$current;\n\n (_listRef$current = listRef.current).onKeyDown.apply(_listRef$current, [event].concat(rest));\n }\n\n if (onKeyDown) {\n onKeyDown.apply(void 0, [event].concat(rest));\n }\n }; // KeyUp\n\n\n var onInternalKeyUp = function onInternalKeyUp(event) {\n for (var _len2 = arguments.length, rest = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n rest[_key2 - 1] = arguments[_key2];\n }\n\n if (mergedOpen && listRef.current) {\n var _listRef$current2;\n\n (_listRef$current2 = listRef.current).onKeyUp.apply(_listRef$current2, [event].concat(rest));\n }\n\n if (onKeyUp) {\n onKeyUp.apply(void 0, [event].concat(rest));\n }\n }; // ========================== Focus / Blur ==========================\n\n\n var triggerRef = React.useRef(null);\n /** Record real focus status */\n\n var focusRef = React.useRef(false);\n\n var onContainerFocus = function onContainerFocus() {\n setMockFocused(true);\n\n if (!disabled) {\n if (onFocus && !focusRef.current) {\n onFocus.apply(void 0, arguments);\n } // `showAction` should handle `focus` if set\n\n\n if (showAction.includes('focus')) {\n onToggleOpen(true);\n }\n }\n\n focusRef.current = true;\n };\n\n var onContainerBlur = function onContainerBlur() {\n setMockFocused(false, function () {\n focusRef.current = false;\n onToggleOpen(false);\n });\n\n if (disabled) {\n return;\n }\n\n if (mergedSearchValue) {\n // `tags` mode should move `searchValue` into values\n if (mode === 'tags') {\n triggerSearch('', false);\n triggerChange(Array.from(new Set([].concat(_toConsumableArray(mergedRawValue), [mergedSearchValue]))));\n } else if (mode === 'multiple') {\n // `multiple` mode only clean the search value but not trigger event\n setInnerSearchValue('');\n }\n }\n\n if (onBlur) {\n onBlur.apply(void 0, arguments);\n }\n };\n\n var onInternalMouseDown = function onInternalMouseDown(event) {\n var target = event.target;\n var popupElement = triggerRef.current && triggerRef.current.getPopupElement(); // We should give focus back to selector if clicked item is not focusable\n\n if (popupElement && popupElement.contains(target)) {\n setTimeout(function () {\n cancelSetMockFocused();\n\n if (!popupElement.contains(document.activeElement)) {\n selectorRef.current.focus();\n }\n });\n }\n\n if (onMouseDown) {\n for (var _len3 = arguments.length, restArgs = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n restArgs[_key3 - 1] = arguments[_key3];\n }\n\n onMouseDown.apply(void 0, [event].concat(restArgs));\n }\n }; // ========================= Accessibility ==========================\n\n\n var _React$useState11 = React.useState(0),\n _React$useState12 = _slicedToArray(_React$useState11, 2),\n accessibilityIndex = _React$useState12[0],\n setAccessibilityIndex = _React$useState12[1];\n\n var mergedDefaultActiveFirstOption = defaultActiveFirstOption !== undefined ? defaultActiveFirstOption : mode !== 'combobox';\n\n var onActiveValue = function onActiveValue(active, index) {\n setAccessibilityIndex(index);\n\n if (backfill && mode === 'combobox' && active !== null) {\n setActiveValue(String(active));\n }\n }; // ============================= Popup ==============================\n\n\n var containerRef = React.useRef(null);\n\n var _React$useState13 = React.useState(null),\n _React$useState14 = _slicedToArray(_React$useState13, 2),\n containerWidth = _React$useState14[0],\n setContainerWidth = _React$useState14[1];\n\n (0, _useLayoutEffect.default)(function () {\n var newWidth = Math.ceil(containerRef.current.offsetWidth);\n\n if (containerWidth !== newWidth) {\n setContainerWidth(newWidth);\n }\n });\n var popupNode = React.createElement(OptionList, {\n ref: listRef,\n prefixCls: prefixCls,\n id: mergedId,\n open: mergedOpen,\n childrenAsData: !options,\n options: displayOptions,\n flattenOptions: displayFlattenOptions,\n multiple: isMultiple,\n values: rawValues,\n height: listHeight,\n itemHeight: listItemHeight,\n onSelect: onInternalSelect,\n onToggleOpen: onToggleOpen,\n onActiveValue: onActiveValue,\n defaultActiveFirstOption: mergedDefaultActiveFirstOption,\n notFoundContent: notFoundContent,\n onScroll: onPopupScroll,\n searchValue: mergedSearchValue,\n menuItemSelectedIcon: menuItemSelectedIcon\n }); // ============================= Clear ==============================\n\n var clearNode;\n\n var onClearMouseDown = function onClearMouseDown() {\n // Trigger internal `onClear` event\n if (internalProps.mark === _generator.INTERNAL_PROPS_MARK && internalProps.onClear) {\n internalProps.onClear();\n }\n\n triggerChange([]);\n triggerSearch('', false);\n };\n\n if (allowClear && (mergedRawValue.length || mergedSearchValue)) {\n clearNode = React.createElement(_TransBtn.default, {\n className: \"\".concat(prefixCls, \"-clear\"),\n onMouseDown: onClearMouseDown,\n customizeIcon: clearIcon\n }, \"\\xD7\");\n } // ============================= Arrow ==============================\n\n\n var mergedShowArrow = showArrow !== undefined ? showArrow : loading || !isMultiple && mode !== 'combobox';\n var arrowNode;\n\n if (mergedShowArrow) {\n arrowNode = React.createElement(_TransBtn.default, {\n className: (0, _classnames.default)(\"\".concat(prefixCls, \"-arrow\"), _defineProperty({}, \"\".concat(prefixCls, \"-arrow-loading\"), loading)),\n customizeIcon: inputIcon\n });\n } // ============================ Warning =============================\n\n\n if (\"development\" !== 'production') {\n warningProps(props);\n } // ============================= Render =============================\n\n\n var mergedClassName = (0, _classnames.default)(prefixCls, className, (_classNames2 = {}, _defineProperty(_classNames2, \"\".concat(prefixCls, \"-focused\"), mockFocused), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-multiple\"), isMultiple), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-single\"), !isMultiple), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-allow-clear\"), allowClear), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-show-arrow\"), mergedShowArrow), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-disabled\"), disabled), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-loading\"), loading), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-open\"), mergedOpen), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-customize-input\"), customizeInputElement), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-show-search\"), mergedShowSearch), _classNames2));\n return React.createElement(\"div\", Object.assign({\n className: mergedClassName\n }, domProps, {\n ref: containerRef,\n onMouseDown: onInternalMouseDown,\n onKeyDown: onInternalKeyDown,\n onKeyUp: onInternalKeyUp,\n onFocus: onContainerFocus,\n onBlur: onContainerBlur\n }), mockFocused && !mergedOpen && React.createElement(\"span\", {\n style: {\n width: 0,\n height: 0,\n display: 'flex',\n overflow: 'hidden',\n opacity: 0\n },\n \"aria-live\": \"polite\"\n }, \"\".concat(mergedRawValue.join(', '))), React.createElement(_SelectTrigger.default, {\n ref: triggerRef,\n disabled: disabled,\n prefixCls: prefixCls,\n visible: mergedOpen,\n popupElement: popupNode,\n containerWidth: containerWidth,\n animation: animation,\n transitionName: transitionName,\n dropdownStyle: dropdownStyle,\n dropdownClassName: dropdownClassName,\n dropdownMatchSelectWidth: dropdownMatchSelectWidth,\n dropdownRender: dropdownRender,\n dropdownAlign: dropdownAlign,\n getPopupContainer: getPopupContainer,\n empty: !mergedOptions.length\n }, React.createElement(_Selector.default, Object.assign({}, props, {\n prefixCls: prefixCls,\n inputElement: customizeInputElement,\n ref: selectorRef,\n id: mergedId,\n showSearch: mergedShowSearch,\n mode: mode,\n accessibilityIndex: accessibilityIndex,\n multiple: isMultiple,\n values: displayValues,\n open: mergedOpen,\n onToggleOpen: onToggleOpen,\n searchValue: mergedSearchValue,\n activeValue: activeValue,\n onSearch: triggerSearch,\n onSelect: onInternalSelect\n }))), arrowNode, clearNode);\n }", "function NormalDropdown(props){\n return (\n <select\n onChange={props.handleChange}\n value={props.value}>\n <option style={{'color':'black'}} value={`${props.title}`} selected disabled hidden>{props.title}</option>\n {/* Allow special option - option which is different from others - to have different formatting*/}\n {props.specialOption?\n props.array.map(choice=>{\n return( \n // Format differently if it is the special option value (e.g. New Database)\n choice==props.specialOptionValue?<option style={{'color':'red'}} value={choice}>{choice}</option>:\n <option value={choice}>{choice}</option>)\n }):props.array.map(choice=>{\n return(<option value={choice}>{choice}</option>)})} \n </select>\n )\n}", "function createDropdownMenu() {\n return $(\"<ul>\").addClass(\"dropdown-menu\");\n }", "function DropNav(props) {\n // const [dropdown, setDropdown] = useState(false);\n\n const changeHandler =(event)=>{\n props.value(event.target.value)\n } ;\n return (\n <>\n <nav className='navbar1'>\n <Link to='/' className='navbar1-logo'>\n Visualize Graphs\n </Link>\n \n <div>\n \n <select onChange={changeHandler} >\n <option value='plot'>Plot</option>\n <option value='Exponantial'>Exponantial</option>\n <option value='EXX1'>EXX1</option>\n <option value='Linear'>Linear</option>\n <option value='Logarithm'>Logrithms</option>\n <option value='XCube'>XCube</option>\n <option value='XSqX1'>XsqX1</option>\n \n </select>\n </div>\n \n </nav>\n </>\n );\n}", "function Dropdown(){\n\n /**\n * State for whether it has been clicked or not\n */\n const [click, setClick] = useState(false);\n\n /**\n * This function toggles between clicked and not clicked\n */\n const handleClick = () => setClick(!click);\n\n return(\n <>\n <ul onClick={handleClick} className={click ? 'dropdown-menu clicked' : 'dropdown-menu'} >\n {MenuItems.map((item, index) => {\n return (\n <li key={index}>\n <Link className={item.cName} to={item.path} onClick={() => setClick(false)}>\n {item.title}\n </Link>\n </li>\n )\n })}\n </ul>\n\n </>\n );\n}", "function CuiDropdown(params) {\n cuiInitNode(this);\n\n var toggle;\n var popup;\n var self = this;\n\n this.onConstruct = function() {\n toggle = new CuiToggle({\n cssClass: \"cui_dropdown\",\n onChange: function(value) {\n if (params.uniformWidth && self.isLive()) {\n popup.get$().css('width', toggle.get$().width() + \"px\");\n }\n popup.toggle(value);\n },\n content: params.buttonContent,\n });\n popup = new CuiPopup({\n cssClass: \"cui_dropdown\",\n content: params.popupContent,\n });\n return [\n \"<div class='cui_dropdown \" + params.cssClass + \"'>\",\n toggle,\n popup,\n \"</div>\",\n ];\n }\n\n this.onRefresh = function($me, dirty, live) {\n cuiRefresh([toggle, popup], live);\n }\n}", "function Select(props, ref) {\n var _classNames2;\n\n var _props$prefixCls = props.prefixCls,\n prefixCls = _props$prefixCls === void 0 ? defaultPrefixCls : _props$prefixCls,\n className = props.className,\n id = props.id,\n open = props.open,\n defaultOpen = props.defaultOpen,\n options = props.options,\n children = props.children,\n mode = props.mode,\n value = props.value,\n defaultValue = props.defaultValue,\n labelInValue = props.labelInValue,\n showSearch = props.showSearch,\n inputValue = props.inputValue,\n searchValue = props.searchValue,\n filterOption = props.filterOption,\n _props$optionFilterPr = props.optionFilterProp,\n optionFilterProp = _props$optionFilterPr === void 0 ? 'value' : _props$optionFilterPr,\n _props$autoClearSearc = props.autoClearSearchValue,\n autoClearSearchValue = _props$autoClearSearc === void 0 ? true : _props$autoClearSearc,\n onSearch = props.onSearch,\n allowClear = props.allowClear,\n clearIcon = props.clearIcon,\n showArrow = props.showArrow,\n inputIcon = props.inputIcon,\n menuItemSelectedIcon = props.menuItemSelectedIcon,\n disabled = props.disabled,\n loading = props.loading,\n defaultActiveFirstOption = props.defaultActiveFirstOption,\n _props$notFoundConten = props.notFoundContent,\n notFoundContent = _props$notFoundConten === void 0 ? 'Not Found' : _props$notFoundConten,\n optionLabelProp = props.optionLabelProp,\n backfill = props.backfill,\n getInputElement = props.getInputElement,\n getPopupContainer = props.getPopupContainer,\n _props$listHeight = props.listHeight,\n listHeight = _props$listHeight === void 0 ? 200 : _props$listHeight,\n _props$listItemHeight = props.listItemHeight,\n listItemHeight = _props$listItemHeight === void 0 ? 20 : _props$listItemHeight,\n animation = props.animation,\n transitionName = props.transitionName,\n virtual = props.virtual,\n dropdownStyle = props.dropdownStyle,\n dropdownClassName = props.dropdownClassName,\n dropdownMatchSelectWidth = props.dropdownMatchSelectWidth,\n dropdownRender = props.dropdownRender,\n dropdownAlign = props.dropdownAlign,\n _props$showAction = props.showAction,\n showAction = _props$showAction === void 0 ? [] : _props$showAction,\n direction = props.direction,\n tokenSeparators = props.tokenSeparators,\n tagRender = props.tagRender,\n onPopupScroll = props.onPopupScroll,\n onDropdownVisibleChange = props.onDropdownVisibleChange,\n onFocus = props.onFocus,\n onBlur = props.onBlur,\n onKeyUp = props.onKeyUp,\n onKeyDown = props.onKeyDown,\n onMouseDown = props.onMouseDown,\n onChange = props.onChange,\n onSelect = props.onSelect,\n onDeselect = props.onDeselect,\n _props$internalProps = props.internalProps,\n internalProps = _props$internalProps === void 0 ? {} : _props$internalProps,\n restProps = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(props, [\"prefixCls\", \"className\", \"id\", \"open\", \"defaultOpen\", \"options\", \"children\", \"mode\", \"value\", \"defaultValue\", \"labelInValue\", \"showSearch\", \"inputValue\", \"searchValue\", \"filterOption\", \"optionFilterProp\", \"autoClearSearchValue\", \"onSearch\", \"allowClear\", \"clearIcon\", \"showArrow\", \"inputIcon\", \"menuItemSelectedIcon\", \"disabled\", \"loading\", \"defaultActiveFirstOption\", \"notFoundContent\", \"optionLabelProp\", \"backfill\", \"getInputElement\", \"getPopupContainer\", \"listHeight\", \"listItemHeight\", \"animation\", \"transitionName\", \"virtual\", \"dropdownStyle\", \"dropdownClassName\", \"dropdownMatchSelectWidth\", \"dropdownRender\", \"dropdownAlign\", \"showAction\", \"direction\", \"tokenSeparators\", \"tagRender\", \"onPopupScroll\", \"onDropdownVisibleChange\", \"onFocus\", \"onBlur\", \"onKeyUp\", \"onKeyDown\", \"onMouseDown\", \"onChange\", \"onSelect\", \"onDeselect\", \"internalProps\"]);\n\n var useInternalProps = internalProps.mark === _interface_generator__WEBPACK_IMPORTED_MODULE_10__[\"INTERNAL_PROPS_MARK\"];\n var domProps = omitDOMProps ? omitDOMProps(restProps) : restProps;\n DEFAULT_OMIT_PROPS.forEach(function (prop) {\n delete domProps[prop];\n });\n var containerRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](null);\n var triggerRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](null);\n var selectorRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](null);\n var listRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](null);\n /** Used for component focused management */\n\n var _useDelayReset = Object(_hooks_useDelayReset__WEBPACK_IMPORTED_MODULE_14__[\"default\"])(),\n _useDelayReset2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useDelayReset, 3),\n mockFocused = _useDelayReset2[0],\n setMockFocused = _useDelayReset2[1],\n cancelSetMockFocused = _useDelayReset2[2]; // Inner id for accessibility usage. Only work in client side\n\n\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](),\n _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState, 2),\n innerId = _React$useState2[0],\n setInnerId = _React$useState2[1];\n\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n setInnerId(\"rc_select_\".concat(Object(_utils_commonUtil__WEBPACK_IMPORTED_MODULE_11__[\"getUUID\"])()));\n }, []);\n var mergedId = id || innerId; // optionLabelProp\n\n var mergedOptionLabelProp = optionLabelProp;\n\n if (mergedOptionLabelProp === undefined) {\n mergedOptionLabelProp = options ? 'label' : 'children';\n } // labelInValue\n\n\n var mergedLabelInValue = mode === 'combobox' ? false : labelInValue;\n var isMultiple = mode === 'tags' || mode === 'multiple';\n var mergedShowSearch = showSearch !== undefined ? showSearch : isMultiple || mode === 'combobox'; // ============================== Ref ===============================\n\n var selectorDomRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](null);\n react__WEBPACK_IMPORTED_MODULE_4__[\"useImperativeHandle\"](ref, function () {\n return {\n focus: selectorRef.current.focus,\n blur: selectorRef.current.blur\n };\n }); // ============================= Value ==============================\n\n var _React$useState3 = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](value || defaultValue),\n _React$useState4 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState3, 2),\n innerValue = _React$useState4[0],\n setInnerValue = _React$useState4[1];\n\n var baseValue = value !== undefined ? value : innerValue; // Should reset when controlled to be uncontrolled\n\n var prevValueRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](value);\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n if (prevValueRef.current !== value && (value === undefined || value === null)) {\n setInnerValue(undefined);\n }\n\n prevValueRef.current = value;\n }, [value]);\n /** Unique raw values */\n\n var mergedRawValue = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n return Object(_utils_commonUtil__WEBPACK_IMPORTED_MODULE_11__[\"toInnerValue\"])(baseValue, {\n labelInValue: mergedLabelInValue,\n combobox: mode === 'combobox'\n });\n }, [baseValue, mergedLabelInValue]);\n /** We cache a set of raw values to speed up check */\n\n var rawValues = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n return new Set(mergedRawValue);\n }, [mergedRawValue]); // ============================= Option =============================\n // Set by option list active, it will merge into search input when mode is `combobox`\n\n var _React$useState5 = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](null),\n _React$useState6 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState5, 2),\n activeValue = _React$useState6[0],\n setActiveValue = _React$useState6[1];\n\n var _React$useState7 = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](''),\n _React$useState8 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState7, 2),\n innerSearchValue = _React$useState8[0],\n setInnerSearchValue = _React$useState8[1];\n\n var mergedSearchValue = innerSearchValue;\n\n if (mode === 'combobox' && value !== undefined) {\n mergedSearchValue = value;\n } else if (searchValue !== undefined) {\n mergedSearchValue = searchValue;\n } else if (inputValue) {\n mergedSearchValue = inputValue;\n }\n\n var mergedOptions = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n var newOptions = options;\n\n if (newOptions === undefined) {\n newOptions = convertChildrenToData(children);\n }\n /**\n * `tags` should fill un-list item.\n * This is not cool here since TreeSelect do not need this\n */\n\n\n if (mode === 'tags' && fillOptionsWithMissingValue) {\n newOptions = fillOptionsWithMissingValue(newOptions, baseValue, mergedOptionLabelProp, labelInValue);\n }\n\n return newOptions || [];\n }, [options, children, mode, baseValue]);\n var mergedFlattenOptions = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n return flattenOptions(mergedOptions, props);\n }, [mergedOptions]);\n var optionMap = Object(_hooks_useCacheOptions__WEBPACK_IMPORTED_MODULE_19__[\"default\"])(mergedRawValue, mergedFlattenOptions); // Display options for OptionList\n\n var displayOptions = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n if (!mergedSearchValue || !mergedShowSearch) {\n return Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mergedOptions);\n }\n\n var filteredOptions = filterOptions(mergedSearchValue, mergedOptions, {\n optionFilterProp: optionFilterProp,\n filterOption: mode === 'combobox' && filterOption === undefined ? function () {\n return true;\n } : filterOption\n });\n\n if (mode === 'tags' && filteredOptions.every(function (opt) {\n return opt.value !== mergedSearchValue;\n })) {\n filteredOptions.unshift({\n value: mergedSearchValue,\n label: mergedSearchValue,\n key: '__RC_SELECT_TAG_PLACEHOLDER__'\n });\n }\n\n return filteredOptions;\n }, [mergedOptions, mergedSearchValue, mode, mergedShowSearch]);\n var displayFlattenOptions = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n return flattenOptions(displayOptions, props);\n }, [displayOptions]);\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n if (listRef.current && listRef.current.scrollTo) {\n listRef.current.scrollTo(0);\n }\n }, [mergedSearchValue]); // ============================ Selector ============================\n\n var displayValues = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n return mergedRawValue.map(function (val) {\n var displayValue = getLabeledValue(val, {\n optionMap: optionMap,\n prevValue: baseValue,\n labelInValue: mergedLabelInValue,\n optionLabelProp: mergedOptionLabelProp\n });\n return _objectSpread(_objectSpread({}, displayValue), {}, {\n disabled: isValueDisabled(val, optionMap)\n });\n });\n }, [baseValue, mergedOptions]); // Polyfill with cache label\n\n displayValues = Object(_hooks_useCacheDisplayValue__WEBPACK_IMPORTED_MODULE_18__[\"default\"])(displayValues);\n\n var triggerSelect = function triggerSelect(newValue, isSelect, source) {\n var outOption = findValueOption([newValue], optionMap)[0];\n\n if (!internalProps.skipTriggerSelect) {\n // Skip trigger `onSelect` or `onDeselect` if configured\n var selectValue = mergedLabelInValue ? getLabeledValue(newValue, {\n optionMap: optionMap,\n prevValue: baseValue,\n labelInValue: mergedLabelInValue,\n optionLabelProp: mergedOptionLabelProp\n }) : newValue;\n\n if (isSelect && onSelect) {\n onSelect(selectValue, outOption);\n } else if (!isSelect && onDeselect) {\n onDeselect(selectValue, outOption);\n }\n } // Trigger internal event\n\n\n if (useInternalProps) {\n if (isSelect && internalProps.onRawSelect) {\n internalProps.onRawSelect(newValue, outOption, source);\n } else if (!isSelect && internalProps.onRawDeselect) {\n internalProps.onRawDeselect(newValue, outOption, source);\n }\n }\n };\n\n var triggerChange = function triggerChange(newRawValues) {\n if (useInternalProps && internalProps.skipTriggerChange) {\n return;\n }\n\n var outValues = Object(_utils_commonUtil__WEBPACK_IMPORTED_MODULE_11__[\"toOuterValues\"])(Array.from(newRawValues), {\n labelInValue: mergedLabelInValue,\n optionMap: optionMap,\n getLabeledValue: getLabeledValue,\n prevValue: baseValue,\n optionLabelProp: mergedOptionLabelProp\n });\n var outValue = isMultiple ? outValues : outValues[0]; // Skip trigger if prev & current value is both empty\n\n if (onChange && (mergedRawValue.length !== 0 || outValues.length !== 0)) {\n var outOptions = findValueOption(newRawValues, optionMap);\n onChange(outValue, isMultiple ? outOptions : outOptions[0]);\n }\n\n setInnerValue(outValue);\n };\n\n var onInternalSelect = function onInternalSelect(newValue, _ref) {\n var selected = _ref.selected,\n source = _ref.source;\n\n if (disabled) {\n return;\n }\n\n var newRawValue;\n\n if (isMultiple) {\n newRawValue = new Set(mergedRawValue);\n\n if (selected) {\n newRawValue.add(newValue);\n } else {\n newRawValue.delete(newValue);\n }\n } else {\n newRawValue = new Set();\n newRawValue.add(newValue);\n } // Multiple always trigger change and single should change if value changed\n\n\n if (isMultiple || !isMultiple && Array.from(mergedRawValue)[0] !== newValue) {\n triggerChange(Array.from(newRawValue));\n } // Trigger `onSelect`. Single mode always trigger select\n\n\n triggerSelect(newValue, !isMultiple || selected, source); // Clean search value if single or configured\n\n if (mode === 'combobox') {\n setInnerSearchValue(String(newValue));\n setActiveValue('');\n } else if (!isMultiple || autoClearSearchValue) {\n setInnerSearchValue('');\n setActiveValue('');\n }\n };\n\n var onInternalOptionSelect = function onInternalOptionSelect(newValue, info) {\n onInternalSelect(newValue, _objectSpread(_objectSpread({}, info), {}, {\n source: 'option'\n }));\n };\n\n var onInternalSelectionSelect = function onInternalSelectionSelect(newValue, info) {\n onInternalSelect(newValue, _objectSpread(_objectSpread({}, info), {}, {\n source: 'selection'\n }));\n }; // ============================= Input ==============================\n // Only works in `combobox`\n\n\n var customizeInputElement = mode === 'combobox' && getInputElement && getInputElement() || null; // ============================== Open ==============================\n\n var _useMergedState = Object(rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(undefined, {\n defaultValue: defaultOpen,\n value: open\n }),\n _useMergedState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useMergedState, 2),\n innerOpen = _useMergedState2[0],\n setInnerOpen = _useMergedState2[1];\n\n var mergedOpen = innerOpen; // Not trigger `open` in `combobox` when `notFoundContent` is empty\n\n var emptyListContent = !notFoundContent && !displayOptions.length;\n\n if (disabled || emptyListContent && mergedOpen && mode === 'combobox') {\n mergedOpen = false;\n }\n\n var triggerOpen = emptyListContent ? false : mergedOpen;\n\n var onToggleOpen = function onToggleOpen(newOpen) {\n var nextOpen = newOpen !== undefined ? newOpen : !mergedOpen;\n\n if (innerOpen !== nextOpen && !disabled) {\n setInnerOpen(nextOpen);\n\n if (onDropdownVisibleChange) {\n onDropdownVisibleChange(nextOpen);\n }\n }\n };\n\n Object(_hooks_useSelectTriggerControl__WEBPACK_IMPORTED_MODULE_17__[\"default\"])([containerRef.current, triggerRef.current && triggerRef.current.getPopupElement()], triggerOpen, onToggleOpen); // ============================= Search =============================\n\n var triggerSearch = function triggerSearch(searchText) {\n var fromTyping = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var ret = true;\n var newSearchText = searchText;\n setActiveValue(null); // Check if match the `tokenSeparators`\n\n var patchLabels = Object(_utils_valueUtil__WEBPACK_IMPORTED_MODULE_16__[\"getSeparatedContent\"])(searchText, tokenSeparators);\n var patchRawValues = patchLabels;\n\n if (mode === 'combobox') {\n // Only typing will trigger onChange\n if (fromTyping) {\n triggerChange([newSearchText]);\n }\n } else if (patchLabels) {\n newSearchText = '';\n\n if (mode !== 'tags') {\n patchRawValues = patchLabels.map(function (label) {\n var item = mergedFlattenOptions.find(function (_ref2) {\n var data = _ref2.data;\n return data[mergedOptionLabelProp] === label;\n });\n return item ? item.data.value : null;\n }).filter(function (val) {\n return val !== null;\n });\n }\n\n var newRawValues = Array.from(new Set([].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mergedRawValue), Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(patchRawValues))));\n triggerChange(newRawValues);\n newRawValues.forEach(function (newRawValue) {\n triggerSelect(newRawValue, true, 'input');\n }); // Should close when paste finish\n\n onToggleOpen(false); // Tell Selector that break next actions\n\n ret = false;\n }\n\n setInnerSearchValue(newSearchText);\n\n if (onSearch && mergedSearchValue !== newSearchText) {\n onSearch(newSearchText);\n }\n\n return ret;\n }; // Close dropdown when disabled change\n\n\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n if (innerOpen && !!disabled) {\n setInnerOpen(false);\n }\n }, [disabled]); // Close will clean up single mode search text\n\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n if (!mergedOpen && !isMultiple && mode !== 'combobox') {\n triggerSearch('', false);\n }\n }, [mergedOpen]); // ============================ Keyboard ============================\n\n /**\n * We record input value here to check if can press to clean up by backspace\n * - null: Key is not down, this is reset by key up\n * - true: Search text is empty when first time backspace down\n * - false: Search text is not empty when first time backspace down\n */\n\n var _useLock = Object(_hooks_useLock__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(),\n _useLock2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useLock, 2),\n getClearLock = _useLock2[0],\n setClearLock = _useLock2[1]; // KeyDown\n\n\n var onInternalKeyDown = function onInternalKeyDown(event) {\n var clearLock = getClearLock();\n var which = event.which; // We only manage open state here, close logic should handle by list component\n\n if (!mergedOpen && which === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_5__[\"default\"].ENTER) {\n onToggleOpen(true);\n }\n\n setClearLock(!!mergedSearchValue); // Remove value by `backspace`\n\n if (which === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_5__[\"default\"].BACKSPACE && !clearLock && isMultiple && !mergedSearchValue && mergedRawValue.length) {\n var removeInfo = Object(_utils_commonUtil__WEBPACK_IMPORTED_MODULE_11__[\"removeLastEnabledValue\"])(displayValues, mergedRawValue);\n\n if (removeInfo.removedValue !== null) {\n triggerChange(removeInfo.values);\n triggerSelect(removeInfo.removedValue, false, 'input');\n }\n }\n\n for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n rest[_key - 1] = arguments[_key];\n }\n\n if (mergedOpen && listRef.current) {\n var _listRef$current;\n\n (_listRef$current = listRef.current).onKeyDown.apply(_listRef$current, [event].concat(rest));\n }\n\n if (onKeyDown) {\n onKeyDown.apply(void 0, [event].concat(rest));\n }\n }; // KeyUp\n\n\n var onInternalKeyUp = function onInternalKeyUp(event) {\n for (var _len2 = arguments.length, rest = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n rest[_key2 - 1] = arguments[_key2];\n }\n\n if (mergedOpen && listRef.current) {\n var _listRef$current2;\n\n (_listRef$current2 = listRef.current).onKeyUp.apply(_listRef$current2, [event].concat(rest));\n }\n\n if (onKeyUp) {\n onKeyUp.apply(void 0, [event].concat(rest));\n }\n }; // ========================== Focus / Blur ==========================\n\n /** Record real focus status */\n\n\n var focusRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](false);\n\n var onContainerFocus = function onContainerFocus() {\n setMockFocused(true);\n\n if (!disabled) {\n if (onFocus && !focusRef.current) {\n onFocus.apply(void 0, arguments);\n } // `showAction` should handle `focus` if set\n\n\n if (showAction.includes('focus')) {\n onToggleOpen(true);\n }\n }\n\n focusRef.current = true;\n };\n\n var onContainerBlur = function onContainerBlur() {\n setMockFocused(false, function () {\n focusRef.current = false;\n onToggleOpen(false);\n });\n\n if (disabled) {\n return;\n }\n\n if (mergedSearchValue) {\n // `tags` mode should move `searchValue` into values\n if (mode === 'tags') {\n triggerSearch('', false);\n triggerChange(Array.from(new Set([].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mergedRawValue), [mergedSearchValue]))));\n } else if (mode === 'multiple') {\n // `multiple` mode only clean the search value but not trigger event\n setInnerSearchValue('');\n }\n }\n\n if (onBlur) {\n onBlur.apply(void 0, arguments);\n }\n };\n\n var activeTimeoutIds = [];\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n return function () {\n activeTimeoutIds.forEach(function (timeoutId) {\n return clearTimeout(timeoutId);\n });\n activeTimeoutIds.splice(0, activeTimeoutIds.length);\n };\n }, []);\n\n var onInternalMouseDown = function onInternalMouseDown(event) {\n var target = event.target;\n var popupElement = triggerRef.current && triggerRef.current.getPopupElement(); // We should give focus back to selector if clicked item is not focusable\n\n if (popupElement && popupElement.contains(target)) {\n var timeoutId = setTimeout(function () {\n var index = activeTimeoutIds.indexOf(timeoutId);\n\n if (index !== -1) {\n activeTimeoutIds.splice(index, 1);\n }\n\n cancelSetMockFocused();\n\n if (!popupElement.contains(document.activeElement)) {\n selectorRef.current.focus();\n }\n });\n activeTimeoutIds.push(timeoutId);\n }\n\n if (onMouseDown) {\n for (var _len3 = arguments.length, restArgs = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n restArgs[_key3 - 1] = arguments[_key3];\n }\n\n onMouseDown.apply(void 0, [event].concat(restArgs));\n }\n }; // ========================= Accessibility ==========================\n\n\n var _React$useState9 = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](0),\n _React$useState10 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState9, 2),\n accessibilityIndex = _React$useState10[0],\n setAccessibilityIndex = _React$useState10[1];\n\n var mergedDefaultActiveFirstOption = defaultActiveFirstOption !== undefined ? defaultActiveFirstOption : mode !== 'combobox';\n\n var onActiveValue = function onActiveValue(active, index) {\n setAccessibilityIndex(index);\n\n if (backfill && mode === 'combobox' && active !== null) {\n setActiveValue(String(active));\n }\n }; // ============================= Popup ==============================\n\n\n var _React$useState11 = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](null),\n _React$useState12 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState11, 2),\n containerWidth = _React$useState12[0],\n setContainerWidth = _React$useState12[1];\n\n Object(_hooks_useLayoutEffect__WEBPACK_IMPORTED_MODULE_15__[\"default\"])(function () {\n if (triggerOpen) {\n var newWidth = Math.ceil(containerRef.current.offsetWidth);\n\n if (containerWidth !== newWidth) {\n setContainerWidth(newWidth);\n }\n }\n }, [triggerOpen]);\n var popupNode = react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](OptionList, {\n ref: listRef,\n prefixCls: prefixCls,\n id: mergedId,\n open: mergedOpen,\n childrenAsData: !options,\n options: displayOptions,\n flattenOptions: displayFlattenOptions,\n multiple: isMultiple,\n values: rawValues,\n height: listHeight,\n itemHeight: listItemHeight,\n onSelect: onInternalOptionSelect,\n onToggleOpen: onToggleOpen,\n onActiveValue: onActiveValue,\n defaultActiveFirstOption: mergedDefaultActiveFirstOption,\n notFoundContent: notFoundContent,\n onScroll: onPopupScroll,\n searchValue: mergedSearchValue,\n menuItemSelectedIcon: menuItemSelectedIcon,\n virtual: virtual !== false && dropdownMatchSelectWidth !== false\n }); // ============================= Clear ==============================\n\n var clearNode;\n\n var onClearMouseDown = function onClearMouseDown() {\n // Trigger internal `onClear` event\n if (useInternalProps && internalProps.onClear) {\n internalProps.onClear();\n }\n\n triggerChange([]);\n triggerSearch('', false);\n };\n\n if (!disabled && allowClear && (mergedRawValue.length || mergedSearchValue)) {\n clearNode = react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](_TransBtn__WEBPACK_IMPORTED_MODULE_12__[\"default\"], {\n className: \"\".concat(prefixCls, \"-clear\"),\n onMouseDown: onClearMouseDown,\n customizeIcon: clearIcon\n }, \"\\xD7\");\n } // ============================= Arrow ==============================\n\n\n var mergedShowArrow = showArrow !== undefined ? showArrow : loading || !isMultiple && mode !== 'combobox';\n var arrowNode;\n\n if (mergedShowArrow) {\n arrowNode = react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](_TransBtn__WEBPACK_IMPORTED_MODULE_12__[\"default\"], {\n className: classnames__WEBPACK_IMPORTED_MODULE_6___default()(\"\".concat(prefixCls, \"-arrow\"), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, \"\".concat(prefixCls, \"-arrow-loading\"), loading)),\n customizeIcon: inputIcon,\n customizeIconProps: {\n loading: loading,\n searchValue: mergedSearchValue,\n open: mergedOpen,\n focused: mockFocused,\n showSearch: mergedShowSearch\n }\n });\n } // ============================ Warning =============================\n\n\n if (false) {} // ============================= Render =============================\n\n\n var mergedClassName = classnames__WEBPACK_IMPORTED_MODULE_6___default()(prefixCls, className, (_classNames2 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-focused\"), mockFocused), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-multiple\"), isMultiple), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-single\"), !isMultiple), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-allow-clear\"), allowClear), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-show-arrow\"), mergedShowArrow), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-disabled\"), disabled), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-loading\"), loading), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-open\"), mergedOpen), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-customize-input\"), customizeInputElement), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-show-search\"), mergedShowSearch), _classNames2));\n return react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](\"div\", Object.assign({\n className: mergedClassName\n }, domProps, {\n ref: containerRef,\n onMouseDown: onInternalMouseDown,\n onKeyDown: onInternalKeyDown,\n onKeyUp: onInternalKeyUp,\n onFocus: onContainerFocus,\n onBlur: onContainerBlur\n }), mockFocused && !mergedOpen && react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](\"span\", {\n style: {\n width: 0,\n height: 0,\n display: 'flex',\n overflow: 'hidden',\n opacity: 0\n },\n \"aria-live\": \"polite\"\n }, \"\".concat(mergedRawValue.join(', '))), react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](_SelectTrigger__WEBPACK_IMPORTED_MODULE_9__[\"default\"], {\n ref: triggerRef,\n disabled: disabled,\n prefixCls: prefixCls,\n visible: triggerOpen,\n popupElement: popupNode,\n containerWidth: containerWidth,\n animation: animation,\n transitionName: transitionName,\n dropdownStyle: dropdownStyle,\n dropdownClassName: dropdownClassName,\n direction: direction,\n dropdownMatchSelectWidth: dropdownMatchSelectWidth,\n dropdownRender: dropdownRender,\n dropdownAlign: dropdownAlign,\n getPopupContainer: getPopupContainer,\n empty: !mergedOptions.length,\n getTriggerDOMNode: function getTriggerDOMNode() {\n return selectorDomRef.current;\n }\n }, react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](_Selector__WEBPACK_IMPORTED_MODULE_8__[\"default\"], Object.assign({}, props, {\n domRef: selectorDomRef,\n prefixCls: prefixCls,\n inputElement: customizeInputElement,\n ref: selectorRef,\n id: mergedId,\n showSearch: mergedShowSearch,\n mode: mode,\n accessibilityIndex: accessibilityIndex,\n multiple: isMultiple,\n tagRender: tagRender,\n values: displayValues,\n open: mergedOpen,\n onToggleOpen: onToggleOpen,\n searchValue: mergedSearchValue,\n activeValue: activeValue,\n onSearch: triggerSearch,\n onSelect: onInternalSelectionSelect\n }))), arrowNode, clearNode);\n }", "function Select(props, ref) {\n var _classNames2;\n\n var _props$prefixCls = props.prefixCls,\n prefixCls = _props$prefixCls === void 0 ? defaultPrefixCls : _props$prefixCls,\n className = props.className,\n id = props.id,\n open = props.open,\n defaultOpen = props.defaultOpen,\n options = props.options,\n children = props.children,\n mode = props.mode,\n value = props.value,\n defaultValue = props.defaultValue,\n labelInValue = props.labelInValue,\n showSearch = props.showSearch,\n inputValue = props.inputValue,\n searchValue = props.searchValue,\n filterOption = props.filterOption,\n _props$optionFilterPr = props.optionFilterProp,\n optionFilterProp = _props$optionFilterPr === void 0 ? 'value' : _props$optionFilterPr,\n _props$autoClearSearc = props.autoClearSearchValue,\n autoClearSearchValue = _props$autoClearSearc === void 0 ? true : _props$autoClearSearc,\n onSearch = props.onSearch,\n allowClear = props.allowClear,\n clearIcon = props.clearIcon,\n showArrow = props.showArrow,\n inputIcon = props.inputIcon,\n menuItemSelectedIcon = props.menuItemSelectedIcon,\n disabled = props.disabled,\n loading = props.loading,\n defaultActiveFirstOption = props.defaultActiveFirstOption,\n _props$notFoundConten = props.notFoundContent,\n notFoundContent = _props$notFoundConten === void 0 ? 'Not Found' : _props$notFoundConten,\n optionLabelProp = props.optionLabelProp,\n backfill = props.backfill,\n getInputElement = props.getInputElement,\n getPopupContainer = props.getPopupContainer,\n _props$listHeight = props.listHeight,\n listHeight = _props$listHeight === void 0 ? 200 : _props$listHeight,\n _props$listItemHeight = props.listItemHeight,\n listItemHeight = _props$listItemHeight === void 0 ? 20 : _props$listItemHeight,\n animation = props.animation,\n transitionName = props.transitionName,\n virtual = props.virtual,\n dropdownStyle = props.dropdownStyle,\n dropdownClassName = props.dropdownClassName,\n dropdownMatchSelectWidth = props.dropdownMatchSelectWidth,\n dropdownRender = props.dropdownRender,\n dropdownAlign = props.dropdownAlign,\n _props$showAction = props.showAction,\n showAction = _props$showAction === void 0 ? [] : _props$showAction,\n direction = props.direction,\n tokenSeparators = props.tokenSeparators,\n tagRender = props.tagRender,\n onPopupScroll = props.onPopupScroll,\n onDropdownVisibleChange = props.onDropdownVisibleChange,\n onFocus = props.onFocus,\n onBlur = props.onBlur,\n onKeyUp = props.onKeyUp,\n onKeyDown = props.onKeyDown,\n onMouseDown = props.onMouseDown,\n onChange = props.onChange,\n onSelect = props.onSelect,\n onDeselect = props.onDeselect,\n _props$internalProps = props.internalProps,\n internalProps = _props$internalProps === void 0 ? {} : _props$internalProps,\n restProps = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(props, [\"prefixCls\", \"className\", \"id\", \"open\", \"defaultOpen\", \"options\", \"children\", \"mode\", \"value\", \"defaultValue\", \"labelInValue\", \"showSearch\", \"inputValue\", \"searchValue\", \"filterOption\", \"optionFilterProp\", \"autoClearSearchValue\", \"onSearch\", \"allowClear\", \"clearIcon\", \"showArrow\", \"inputIcon\", \"menuItemSelectedIcon\", \"disabled\", \"loading\", \"defaultActiveFirstOption\", \"notFoundContent\", \"optionLabelProp\", \"backfill\", \"getInputElement\", \"getPopupContainer\", \"listHeight\", \"listItemHeight\", \"animation\", \"transitionName\", \"virtual\", \"dropdownStyle\", \"dropdownClassName\", \"dropdownMatchSelectWidth\", \"dropdownRender\", \"dropdownAlign\", \"showAction\", \"direction\", \"tokenSeparators\", \"tagRender\", \"onPopupScroll\", \"onDropdownVisibleChange\", \"onFocus\", \"onBlur\", \"onKeyUp\", \"onKeyDown\", \"onMouseDown\", \"onChange\", \"onSelect\", \"onDeselect\", \"internalProps\"]);\n\n var useInternalProps = internalProps.mark === _interface_generator__WEBPACK_IMPORTED_MODULE_10__[\"INTERNAL_PROPS_MARK\"];\n var domProps = omitDOMProps ? omitDOMProps(restProps) : restProps;\n DEFAULT_OMIT_PROPS.forEach(function (prop) {\n delete domProps[prop];\n });\n var containerRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](null);\n var triggerRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](null);\n var selectorRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](null);\n var listRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](null);\n /** Used for component focused management */\n\n var _useDelayReset = Object(_hooks_useDelayReset__WEBPACK_IMPORTED_MODULE_14__[\"default\"])(),\n _useDelayReset2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useDelayReset, 3),\n mockFocused = _useDelayReset2[0],\n setMockFocused = _useDelayReset2[1],\n cancelSetMockFocused = _useDelayReset2[2]; // Inner id for accessibility usage. Only work in client side\n\n\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](),\n _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState, 2),\n innerId = _React$useState2[0],\n setInnerId = _React$useState2[1];\n\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n setInnerId(\"rc_select_\".concat(Object(_utils_commonUtil__WEBPACK_IMPORTED_MODULE_11__[\"getUUID\"])()));\n }, []);\n var mergedId = id || innerId; // optionLabelProp\n\n var mergedOptionLabelProp = optionLabelProp;\n\n if (mergedOptionLabelProp === undefined) {\n mergedOptionLabelProp = options ? 'label' : 'children';\n } // labelInValue\n\n\n var mergedLabelInValue = mode === 'combobox' ? false : labelInValue;\n var isMultiple = mode === 'tags' || mode === 'multiple';\n var mergedShowSearch = showSearch !== undefined ? showSearch : isMultiple || mode === 'combobox'; // ============================== Ref ===============================\n\n var selectorDomRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](null);\n react__WEBPACK_IMPORTED_MODULE_4__[\"useImperativeHandle\"](ref, function () {\n return {\n focus: selectorRef.current.focus,\n blur: selectorRef.current.blur\n };\n }); // ============================= Value ==============================\n\n var _React$useState3 = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](value || defaultValue),\n _React$useState4 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState3, 2),\n innerValue = _React$useState4[0],\n setInnerValue = _React$useState4[1];\n\n var baseValue = value !== undefined ? value : innerValue; // Should reset when controlled to be uncontrolled\n\n var prevValueRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](value);\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n if (prevValueRef.current !== value && (value === undefined || value === null)) {\n setInnerValue(undefined);\n }\n\n prevValueRef.current = value;\n }, [value]);\n /** Unique raw values */\n\n var mergedRawValue = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n return Object(_utils_commonUtil__WEBPACK_IMPORTED_MODULE_11__[\"toInnerValue\"])(baseValue, {\n labelInValue: mergedLabelInValue,\n combobox: mode === 'combobox'\n });\n }, [baseValue, mergedLabelInValue]);\n /** We cache a set of raw values to speed up check */\n\n var rawValues = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n return new Set(mergedRawValue);\n }, [mergedRawValue]); // ============================= Option =============================\n // Set by option list active, it will merge into search input when mode is `combobox`\n\n var _React$useState5 = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](null),\n _React$useState6 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState5, 2),\n activeValue = _React$useState6[0],\n setActiveValue = _React$useState6[1];\n\n var _React$useState7 = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](''),\n _React$useState8 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState7, 2),\n innerSearchValue = _React$useState8[0],\n setInnerSearchValue = _React$useState8[1];\n\n var mergedSearchValue = innerSearchValue;\n\n if (mode === 'combobox' && value !== undefined) {\n mergedSearchValue = value;\n } else if (searchValue !== undefined) {\n mergedSearchValue = searchValue;\n } else if (inputValue) {\n mergedSearchValue = inputValue;\n }\n\n var mergedOptions = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n var newOptions = options;\n\n if (newOptions === undefined) {\n newOptions = convertChildrenToData(children);\n }\n /**\n * `tags` should fill un-list item.\n * This is not cool here since TreeSelect do not need this\n */\n\n\n if (mode === 'tags' && fillOptionsWithMissingValue) {\n newOptions = fillOptionsWithMissingValue(newOptions, baseValue, mergedOptionLabelProp, labelInValue);\n }\n\n return newOptions || [];\n }, [options, children, mode, baseValue]);\n var mergedFlattenOptions = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n return flattenOptions(mergedOptions, props);\n }, [mergedOptions]); // Display options for OptionList\n\n var displayOptions = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n if (!mergedSearchValue || !mergedShowSearch) {\n return Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mergedOptions);\n }\n\n var filteredOptions = filterOptions(mergedSearchValue, mergedOptions, {\n optionFilterProp: optionFilterProp,\n filterOption: mode === 'combobox' && filterOption === undefined ? function () {\n return true;\n } : filterOption\n });\n\n if (mode === 'tags' && filteredOptions.every(function (opt) {\n return opt.value !== mergedSearchValue;\n })) {\n filteredOptions.unshift({\n value: mergedSearchValue,\n label: mergedSearchValue,\n key: '__RC_SELECT_TAG_PLACEHOLDER__'\n });\n }\n\n return filteredOptions;\n }, [mergedOptions, mergedSearchValue, mode, mergedShowSearch]);\n var displayFlattenOptions = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n return flattenOptions(displayOptions, props);\n }, [displayOptions]);\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n if (listRef.current && listRef.current.scrollTo) {\n listRef.current.scrollTo(0);\n }\n }, [mergedSearchValue]); // ============================ Selector ============================\n\n var displayValues = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n return mergedRawValue.map(function (val) {\n var displayValue = getLabeledValue(val, {\n options: mergedFlattenOptions,\n prevValue: baseValue,\n labelInValue: mergedLabelInValue,\n optionLabelProp: mergedOptionLabelProp\n });\n return _objectSpread(_objectSpread({}, displayValue), {}, {\n disabled: isValueDisabled(val, mergedFlattenOptions)\n });\n });\n }, [baseValue, mergedOptions]); // Polyfill with cache label\n\n displayValues = Object(_hooks_useCacheDisplayValue__WEBPACK_IMPORTED_MODULE_18__[\"default\"])(displayValues);\n\n var triggerSelect = function triggerSelect(newValue, isSelect, source) {\n var outOption = findValueOption([newValue], mergedFlattenOptions)[0];\n\n if (!internalProps.skipTriggerSelect) {\n // Skip trigger `onSelect` or `onDeselect` if configured\n var selectValue = mergedLabelInValue ? getLabeledValue(newValue, {\n options: mergedFlattenOptions,\n prevValue: baseValue,\n labelInValue: mergedLabelInValue,\n optionLabelProp: mergedOptionLabelProp\n }) : newValue;\n\n if (isSelect && onSelect) {\n onSelect(selectValue, outOption);\n } else if (!isSelect && onDeselect) {\n onDeselect(selectValue, outOption);\n }\n } // Trigger internal event\n\n\n if (useInternalProps) {\n if (isSelect && internalProps.onRawSelect) {\n internalProps.onRawSelect(newValue, outOption, source);\n } else if (!isSelect && internalProps.onRawDeselect) {\n internalProps.onRawDeselect(newValue, outOption, source);\n }\n }\n };\n\n var triggerChange = function triggerChange(newRawValues) {\n if (useInternalProps && internalProps.skipTriggerChange) {\n return;\n }\n\n var outValues = Object(_utils_commonUtil__WEBPACK_IMPORTED_MODULE_11__[\"toOuterValues\"])(Array.from(newRawValues), {\n labelInValue: mergedLabelInValue,\n options: mergedFlattenOptions,\n getLabeledValue: getLabeledValue,\n prevValue: baseValue,\n optionLabelProp: mergedOptionLabelProp\n });\n var outValue = isMultiple ? outValues : outValues[0]; // Skip trigger if prev & current value is both empty\n\n if (onChange && (mergedRawValue.length !== 0 || outValues.length !== 0)) {\n var outOptions = findValueOption(newRawValues, mergedFlattenOptions);\n onChange(outValue, isMultiple ? outOptions : outOptions[0]);\n }\n\n setInnerValue(outValue);\n };\n\n var onInternalSelect = function onInternalSelect(newValue, _ref) {\n var selected = _ref.selected,\n source = _ref.source;\n\n if (disabled) {\n return;\n }\n\n var newRawValue;\n\n if (isMultiple) {\n newRawValue = new Set(mergedRawValue);\n\n if (selected) {\n newRawValue.add(newValue);\n } else {\n newRawValue.delete(newValue);\n }\n } else {\n newRawValue = new Set();\n newRawValue.add(newValue);\n } // Multiple always trigger change and single should change if value changed\n\n\n if (isMultiple || !isMultiple && Array.from(mergedRawValue)[0] !== newValue) {\n triggerChange(Array.from(newRawValue));\n } // Trigger `onSelect`. Single mode always trigger select\n\n\n triggerSelect(newValue, !isMultiple || selected, source); // Clean search value if single or configured\n\n if (mode === 'combobox') {\n setInnerSearchValue(String(newValue));\n setActiveValue('');\n } else if (!isMultiple || autoClearSearchValue) {\n setInnerSearchValue('');\n setActiveValue('');\n }\n };\n\n var onInternalOptionSelect = function onInternalOptionSelect(newValue, info) {\n onInternalSelect(newValue, _objectSpread(_objectSpread({}, info), {}, {\n source: 'option'\n }));\n };\n\n var onInternalSelectionSelect = function onInternalSelectionSelect(newValue, info) {\n onInternalSelect(newValue, _objectSpread(_objectSpread({}, info), {}, {\n source: 'selection'\n }));\n }; // ============================= Input ==============================\n // Only works in `combobox`\n\n\n var customizeInputElement = mode === 'combobox' && getInputElement && getInputElement() || null; // ============================== Open ==============================\n\n var _useMergedState = Object(rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(undefined, {\n defaultValue: defaultOpen,\n value: open\n }),\n _useMergedState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useMergedState, 2),\n innerOpen = _useMergedState2[0],\n setInnerOpen = _useMergedState2[1];\n\n var mergedOpen = innerOpen; // Not trigger `open` in `combobox` when `notFoundContent` is empty\n\n var emptyListContent = !notFoundContent && !displayOptions.length;\n\n if (disabled || emptyListContent && mergedOpen && mode === 'combobox') {\n mergedOpen = false;\n }\n\n var triggerOpen = emptyListContent ? false : mergedOpen;\n\n var onToggleOpen = function onToggleOpen(newOpen) {\n var nextOpen = newOpen !== undefined ? newOpen : !mergedOpen;\n\n if (innerOpen !== nextOpen && !disabled) {\n setInnerOpen(nextOpen);\n\n if (onDropdownVisibleChange) {\n onDropdownVisibleChange(nextOpen);\n }\n }\n };\n\n Object(_hooks_useSelectTriggerControl__WEBPACK_IMPORTED_MODULE_17__[\"default\"])([containerRef.current, triggerRef.current && triggerRef.current.getPopupElement()], triggerOpen, onToggleOpen); // ============================= Search =============================\n\n var triggerSearch = function triggerSearch(searchText) {\n var fromTyping = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var ret = true;\n var newSearchText = searchText;\n setActiveValue(null); // Check if match the `tokenSeparators`\n\n var patchLabels = Object(_utils_valueUtil__WEBPACK_IMPORTED_MODULE_16__[\"getSeparatedContent\"])(searchText, tokenSeparators);\n var patchRawValues = patchLabels;\n\n if (mode === 'combobox') {\n // Only typing will trigger onChange\n if (fromTyping) {\n triggerChange([newSearchText]);\n }\n } else if (patchLabels) {\n newSearchText = '';\n\n if (mode !== 'tags') {\n patchRawValues = patchLabels.map(function (label) {\n var item = mergedFlattenOptions.find(function (_ref2) {\n var data = _ref2.data;\n return data[mergedOptionLabelProp] === label;\n });\n return item ? item.data.value : null;\n }).filter(function (val) {\n return val !== null;\n });\n }\n\n var newRawValues = Array.from(new Set([].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mergedRawValue), Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(patchRawValues))));\n triggerChange(newRawValues);\n newRawValues.forEach(function (newRawValue) {\n triggerSelect(newRawValue, true, 'input');\n }); // Should close when paste finish\n\n onToggleOpen(false); // Tell Selector that break next actions\n\n ret = false;\n }\n\n setInnerSearchValue(newSearchText);\n\n if (onSearch && mergedSearchValue !== newSearchText) {\n onSearch(newSearchText);\n }\n\n return ret;\n }; // Close dropdown when disabled change\n\n\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n if (innerOpen && !!disabled) {\n setInnerOpen(false);\n }\n }, [disabled]); // Close will clean up single mode search text\n\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n if (!mergedOpen && !isMultiple && mode !== 'combobox') {\n triggerSearch('', false);\n }\n }, [mergedOpen]); // ============================ Keyboard ============================\n\n /**\n * We record input value here to check if can press to clean up by backspace\n * - null: Key is not down, this is reset by key up\n * - true: Search text is empty when first time backspace down\n * - false: Search text is not empty when first time backspace down\n */\n\n var _useLock = Object(_hooks_useLock__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(),\n _useLock2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useLock, 2),\n getClearLock = _useLock2[0],\n setClearLock = _useLock2[1]; // KeyDown\n\n\n var onInternalKeyDown = function onInternalKeyDown(event) {\n var clearLock = getClearLock();\n var which = event.which; // We only manage open state here, close logic should handle by list component\n\n if (!mergedOpen && which === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_5__[\"default\"].ENTER) {\n onToggleOpen(true);\n }\n\n setClearLock(!!mergedSearchValue); // Remove value by `backspace`\n\n if (which === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_5__[\"default\"].BACKSPACE && !clearLock && isMultiple && !mergedSearchValue && mergedRawValue.length) {\n var removeInfo = Object(_utils_commonUtil__WEBPACK_IMPORTED_MODULE_11__[\"removeLastEnabledValue\"])(displayValues, mergedRawValue);\n\n if (removeInfo.removedValue !== null) {\n triggerChange(removeInfo.values);\n triggerSelect(removeInfo.removedValue, false, 'input');\n }\n }\n\n for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n rest[_key - 1] = arguments[_key];\n }\n\n if (mergedOpen && listRef.current) {\n var _listRef$current;\n\n (_listRef$current = listRef.current).onKeyDown.apply(_listRef$current, [event].concat(rest));\n }\n\n if (onKeyDown) {\n onKeyDown.apply(void 0, [event].concat(rest));\n }\n }; // KeyUp\n\n\n var onInternalKeyUp = function onInternalKeyUp(event) {\n for (var _len2 = arguments.length, rest = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n rest[_key2 - 1] = arguments[_key2];\n }\n\n if (mergedOpen && listRef.current) {\n var _listRef$current2;\n\n (_listRef$current2 = listRef.current).onKeyUp.apply(_listRef$current2, [event].concat(rest));\n }\n\n if (onKeyUp) {\n onKeyUp.apply(void 0, [event].concat(rest));\n }\n }; // ========================== Focus / Blur ==========================\n\n /** Record real focus status */\n\n\n var focusRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](false);\n\n var onContainerFocus = function onContainerFocus() {\n setMockFocused(true);\n\n if (!disabled) {\n if (onFocus && !focusRef.current) {\n onFocus.apply(void 0, arguments);\n } // `showAction` should handle `focus` if set\n\n\n if (showAction.includes('focus')) {\n onToggleOpen(true);\n }\n }\n\n focusRef.current = true;\n };\n\n var onContainerBlur = function onContainerBlur() {\n setMockFocused(false, function () {\n focusRef.current = false;\n onToggleOpen(false);\n });\n\n if (disabled) {\n return;\n }\n\n if (mergedSearchValue) {\n // `tags` mode should move `searchValue` into values\n if (mode === 'tags') {\n triggerSearch('', false);\n triggerChange(Array.from(new Set([].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mergedRawValue), [mergedSearchValue]))));\n } else if (mode === 'multiple') {\n // `multiple` mode only clean the search value but not trigger event\n setInnerSearchValue('');\n }\n }\n\n if (onBlur) {\n onBlur.apply(void 0, arguments);\n }\n };\n\n var activeTimeoutIds = [];\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n return function () {\n activeTimeoutIds.forEach(function (timeoutId) {\n return clearTimeout(timeoutId);\n });\n activeTimeoutIds.splice(0, activeTimeoutIds.length);\n };\n }, []);\n\n var onInternalMouseDown = function onInternalMouseDown(event) {\n var target = event.target;\n var popupElement = triggerRef.current && triggerRef.current.getPopupElement(); // We should give focus back to selector if clicked item is not focusable\n\n if (popupElement && popupElement.contains(target)) {\n var timeoutId = setTimeout(function () {\n var index = activeTimeoutIds.indexOf(timeoutId);\n\n if (index !== -1) {\n activeTimeoutIds.splice(index, 1);\n }\n\n cancelSetMockFocused();\n\n if (!popupElement.contains(document.activeElement)) {\n selectorRef.current.focus();\n }\n });\n activeTimeoutIds.push(timeoutId);\n }\n\n if (onMouseDown) {\n for (var _len3 = arguments.length, restArgs = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n restArgs[_key3 - 1] = arguments[_key3];\n }\n\n onMouseDown.apply(void 0, [event].concat(restArgs));\n }\n }; // ========================= Accessibility ==========================\n\n\n var _React$useState9 = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](0),\n _React$useState10 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState9, 2),\n accessibilityIndex = _React$useState10[0],\n setAccessibilityIndex = _React$useState10[1];\n\n var mergedDefaultActiveFirstOption = defaultActiveFirstOption !== undefined ? defaultActiveFirstOption : mode !== 'combobox';\n\n var onActiveValue = function onActiveValue(active, index) {\n setAccessibilityIndex(index);\n\n if (backfill && mode === 'combobox' && active !== null) {\n setActiveValue(String(active));\n }\n }; // ============================= Popup ==============================\n\n\n var _React$useState11 = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](null),\n _React$useState12 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState11, 2),\n containerWidth = _React$useState12[0],\n setContainerWidth = _React$useState12[1];\n\n Object(_hooks_useLayoutEffect__WEBPACK_IMPORTED_MODULE_15__[\"default\"])(function () {\n if (triggerOpen) {\n var newWidth = Math.ceil(containerRef.current.offsetWidth);\n\n if (containerWidth !== newWidth) {\n setContainerWidth(newWidth);\n }\n }\n }, [triggerOpen]);\n var popupNode = react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](OptionList, {\n ref: listRef,\n prefixCls: prefixCls,\n id: mergedId,\n open: mergedOpen,\n childrenAsData: !options,\n options: displayOptions,\n flattenOptions: displayFlattenOptions,\n multiple: isMultiple,\n values: rawValues,\n height: listHeight,\n itemHeight: listItemHeight,\n onSelect: onInternalOptionSelect,\n onToggleOpen: onToggleOpen,\n onActiveValue: onActiveValue,\n defaultActiveFirstOption: mergedDefaultActiveFirstOption,\n notFoundContent: notFoundContent,\n onScroll: onPopupScroll,\n searchValue: mergedSearchValue,\n menuItemSelectedIcon: menuItemSelectedIcon,\n virtual: virtual !== false && dropdownMatchSelectWidth !== false\n }); // ============================= Clear ==============================\n\n var clearNode;\n\n var onClearMouseDown = function onClearMouseDown() {\n // Trigger internal `onClear` event\n if (useInternalProps && internalProps.onClear) {\n internalProps.onClear();\n }\n\n triggerChange([]);\n triggerSearch('', false);\n };\n\n if (!disabled && allowClear && (mergedRawValue.length || mergedSearchValue)) {\n clearNode = react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](_TransBtn__WEBPACK_IMPORTED_MODULE_12__[\"default\"], {\n className: \"\".concat(prefixCls, \"-clear\"),\n onMouseDown: onClearMouseDown,\n customizeIcon: clearIcon\n }, \"\\xD7\");\n } // ============================= Arrow ==============================\n\n\n var mergedShowArrow = showArrow !== undefined ? showArrow : loading || !isMultiple && mode !== 'combobox';\n var arrowNode;\n\n if (mergedShowArrow) {\n arrowNode = react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](_TransBtn__WEBPACK_IMPORTED_MODULE_12__[\"default\"], {\n className: classnames__WEBPACK_IMPORTED_MODULE_6___default()(\"\".concat(prefixCls, \"-arrow\"), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, \"\".concat(prefixCls, \"-arrow-loading\"), loading)),\n customizeIcon: inputIcon,\n customizeIconProps: {\n loading: loading,\n searchValue: mergedSearchValue,\n open: mergedOpen,\n focused: mockFocused,\n showSearch: mergedShowSearch\n }\n });\n } // ============================ Warning =============================\n\n\n if (false) {} // ============================= Render =============================\n\n\n var mergedClassName = classnames__WEBPACK_IMPORTED_MODULE_6___default()(prefixCls, className, (_classNames2 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-focused\"), mockFocused), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-multiple\"), isMultiple), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-single\"), !isMultiple), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-allow-clear\"), allowClear), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-show-arrow\"), mergedShowArrow), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-disabled\"), disabled), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-loading\"), loading), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-open\"), mergedOpen), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-customize-input\"), customizeInputElement), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-show-search\"), mergedShowSearch), _classNames2));\n return react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](\"div\", Object.assign({\n className: mergedClassName\n }, domProps, {\n ref: containerRef,\n onMouseDown: onInternalMouseDown,\n onKeyDown: onInternalKeyDown,\n onKeyUp: onInternalKeyUp,\n onFocus: onContainerFocus,\n onBlur: onContainerBlur\n }), mockFocused && !mergedOpen && react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](\"span\", {\n style: {\n width: 0,\n height: 0,\n display: 'flex',\n overflow: 'hidden',\n opacity: 0\n },\n \"aria-live\": \"polite\"\n }, \"\".concat(mergedRawValue.join(', '))), react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](_SelectTrigger__WEBPACK_IMPORTED_MODULE_9__[\"default\"], {\n ref: triggerRef,\n disabled: disabled,\n prefixCls: prefixCls,\n visible: triggerOpen,\n popupElement: popupNode,\n containerWidth: containerWidth,\n animation: animation,\n transitionName: transitionName,\n dropdownStyle: dropdownStyle,\n dropdownClassName: dropdownClassName,\n direction: direction,\n dropdownMatchSelectWidth: dropdownMatchSelectWidth,\n dropdownRender: dropdownRender,\n dropdownAlign: dropdownAlign,\n getPopupContainer: getPopupContainer,\n empty: !mergedOptions.length,\n getTriggerDOMNode: function getTriggerDOMNode() {\n return selectorDomRef.current;\n }\n }, react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](_Selector__WEBPACK_IMPORTED_MODULE_8__[\"default\"], Object.assign({}, props, {\n domRef: selectorDomRef,\n prefixCls: prefixCls,\n inputElement: customizeInputElement,\n ref: selectorRef,\n id: mergedId,\n showSearch: mergedShowSearch,\n mode: mode,\n accessibilityIndex: accessibilityIndex,\n multiple: isMultiple,\n tagRender: tagRender,\n values: displayValues,\n open: mergedOpen,\n onToggleOpen: onToggleOpen,\n searchValue: mergedSearchValue,\n activeValue: activeValue,\n onSearch: triggerSearch,\n onSelect: onInternalSelectionSelect\n }))), arrowNode, clearNode);\n }", "function Select(props, ref) {\n var _classNames2;\n\n var _props$prefixCls = props.prefixCls,\n prefixCls = _props$prefixCls === void 0 ? defaultPrefixCls : _props$prefixCls,\n className = props.className,\n id = props.id,\n open = props.open,\n defaultOpen = props.defaultOpen,\n options = props.options,\n children = props.children,\n mode = props.mode,\n value = props.value,\n defaultValue = props.defaultValue,\n labelInValue = props.labelInValue,\n showSearch = props.showSearch,\n inputValue = props.inputValue,\n searchValue = props.searchValue,\n filterOption = props.filterOption,\n _props$optionFilterPr = props.optionFilterProp,\n optionFilterProp = _props$optionFilterPr === void 0 ? 'value' : _props$optionFilterPr,\n _props$autoClearSearc = props.autoClearSearchValue,\n autoClearSearchValue = _props$autoClearSearc === void 0 ? true : _props$autoClearSearc,\n onSearch = props.onSearch,\n allowClear = props.allowClear,\n clearIcon = props.clearIcon,\n showArrow = props.showArrow,\n inputIcon = props.inputIcon,\n menuItemSelectedIcon = props.menuItemSelectedIcon,\n disabled = props.disabled,\n loading = props.loading,\n defaultActiveFirstOption = props.defaultActiveFirstOption,\n _props$notFoundConten = props.notFoundContent,\n notFoundContent = _props$notFoundConten === void 0 ? 'Not Found' : _props$notFoundConten,\n optionLabelProp = props.optionLabelProp,\n backfill = props.backfill,\n getInputElement = props.getInputElement,\n getPopupContainer = props.getPopupContainer,\n _props$listHeight = props.listHeight,\n listHeight = _props$listHeight === void 0 ? 200 : _props$listHeight,\n _props$listItemHeight = props.listItemHeight,\n listItemHeight = _props$listItemHeight === void 0 ? 20 : _props$listItemHeight,\n animation = props.animation,\n transitionName = props.transitionName,\n virtual = props.virtual,\n dropdownStyle = props.dropdownStyle,\n dropdownClassName = props.dropdownClassName,\n dropdownMatchSelectWidth = props.dropdownMatchSelectWidth,\n dropdownRender = props.dropdownRender,\n dropdownAlign = props.dropdownAlign,\n _props$showAction = props.showAction,\n showAction = _props$showAction === void 0 ? [] : _props$showAction,\n direction = props.direction,\n tokenSeparators = props.tokenSeparators,\n tagRender = props.tagRender,\n onPopupScroll = props.onPopupScroll,\n onDropdownVisibleChange = props.onDropdownVisibleChange,\n onFocus = props.onFocus,\n onBlur = props.onBlur,\n onKeyUp = props.onKeyUp,\n onKeyDown = props.onKeyDown,\n onMouseDown = props.onMouseDown,\n onChange = props.onChange,\n onSelect = props.onSelect,\n onDeselect = props.onDeselect,\n _props$internalProps = props.internalProps,\n internalProps = _props$internalProps === void 0 ? {} : _props$internalProps,\n restProps = (0, _objectWithoutProperties2.default)(props, [\"prefixCls\", \"className\", \"id\", \"open\", \"defaultOpen\", \"options\", \"children\", \"mode\", \"value\", \"defaultValue\", \"labelInValue\", \"showSearch\", \"inputValue\", \"searchValue\", \"filterOption\", \"optionFilterProp\", \"autoClearSearchValue\", \"onSearch\", \"allowClear\", \"clearIcon\", \"showArrow\", \"inputIcon\", \"menuItemSelectedIcon\", \"disabled\", \"loading\", \"defaultActiveFirstOption\", \"notFoundContent\", \"optionLabelProp\", \"backfill\", \"getInputElement\", \"getPopupContainer\", \"listHeight\", \"listItemHeight\", \"animation\", \"transitionName\", \"virtual\", \"dropdownStyle\", \"dropdownClassName\", \"dropdownMatchSelectWidth\", \"dropdownRender\", \"dropdownAlign\", \"showAction\", \"direction\", \"tokenSeparators\", \"tagRender\", \"onPopupScroll\", \"onDropdownVisibleChange\", \"onFocus\", \"onBlur\", \"onKeyUp\", \"onKeyDown\", \"onMouseDown\", \"onChange\", \"onSelect\", \"onDeselect\", \"internalProps\"]);\n var useInternalProps = internalProps.mark === _generator.INTERNAL_PROPS_MARK;\n var domProps = omitDOMProps ? omitDOMProps(restProps) : restProps;\n DEFAULT_OMIT_PROPS.forEach(function (prop) {\n delete domProps[prop];\n });\n var containerRef = (0, React.useRef)(null);\n var triggerRef = (0, React.useRef)(null);\n var selectorRef = (0, React.useRef)(null);\n var listRef = (0, React.useRef)(null);\n var tokenWithEnter = (0, React.useMemo)(function () {\n return (tokenSeparators || []).some(function (tokenSeparator) {\n return ['\\n', '\\r\\n'].includes(tokenSeparator);\n });\n }, [tokenSeparators]);\n /** Used for component focused management */\n\n var _useDelayReset = (0, _useDelayReset3.default)(),\n _useDelayReset2 = (0, _slicedToArray2.default)(_useDelayReset, 3),\n mockFocused = _useDelayReset2[0],\n setMockFocused = _useDelayReset2[1],\n cancelSetMockFocused = _useDelayReset2[2]; // Inner id for accessibility usage. Only work in client side\n\n\n var _useState = (0, React.useState)(),\n _useState2 = (0, _slicedToArray2.default)(_useState, 2),\n innerId = _useState2[0],\n setInnerId = _useState2[1];\n\n (0, React.useEffect)(function () {\n setInnerId(\"rc_select_\".concat((0, _commonUtil.getUUID)()));\n }, []);\n var mergedId = id || innerId; // optionLabelProp\n\n var mergedOptionLabelProp = optionLabelProp;\n\n if (mergedOptionLabelProp === undefined) {\n mergedOptionLabelProp = options ? 'label' : 'children';\n } // labelInValue\n\n\n var mergedLabelInValue = mode === 'combobox' ? false : labelInValue;\n var isMultiple = mode === 'tags' || mode === 'multiple';\n var mergedShowSearch = showSearch !== undefined ? showSearch : isMultiple || mode === 'combobox'; // ============================== Ref ===============================\n\n var selectorDomRef = (0, React.useRef)(null);\n React.useImperativeHandle(ref, function () {\n return {\n focus: selectorRef.current.focus,\n blur: selectorRef.current.blur\n };\n }); // ============================= Value ==============================\n\n var _useMergedState = (0, _useMergedState5.default)(defaultValue, {\n value: value\n }),\n _useMergedState2 = (0, _slicedToArray2.default)(_useMergedState, 2),\n mergedValue = _useMergedState2[0],\n setMergedValue = _useMergedState2[1];\n /** Unique raw values */\n\n\n var mergedRawValue = (0, React.useMemo)(function () {\n return (0, _commonUtil.toInnerValue)(mergedValue, {\n labelInValue: mergedLabelInValue,\n combobox: mode === 'combobox'\n });\n }, [mergedValue, mergedLabelInValue]);\n /** We cache a set of raw values to speed up check */\n\n var rawValues = (0, React.useMemo)(function () {\n return new Set(mergedRawValue);\n }, [mergedRawValue]); // ============================= Option =============================\n // Set by option list active, it will merge into search input when mode is `combobox`\n\n var _useState3 = (0, React.useState)(null),\n _useState4 = (0, _slicedToArray2.default)(_useState3, 2),\n activeValue = _useState4[0],\n setActiveValue = _useState4[1];\n\n var _useState5 = (0, React.useState)(''),\n _useState6 = (0, _slicedToArray2.default)(_useState5, 2),\n innerSearchValue = _useState6[0],\n setInnerSearchValue = _useState6[1];\n\n var mergedSearchValue = innerSearchValue;\n\n if (mode === 'combobox' && mergedValue !== undefined) {\n mergedSearchValue = mergedValue;\n } else if (searchValue !== undefined) {\n mergedSearchValue = searchValue;\n } else if (inputValue) {\n mergedSearchValue = inputValue;\n }\n\n var mergedOptions = (0, React.useMemo)(function () {\n var newOptions = options;\n\n if (newOptions === undefined) {\n newOptions = convertChildrenToData(children);\n }\n /**\n * `tags` should fill un-list item.\n * This is not cool here since TreeSelect do not need this\n */\n\n\n if (mode === 'tags' && fillOptionsWithMissingValue) {\n newOptions = fillOptionsWithMissingValue(newOptions, mergedValue, mergedOptionLabelProp, labelInValue);\n }\n\n return newOptions || [];\n }, [options, children, mode, mergedValue]);\n var mergedFlattenOptions = (0, React.useMemo)(function () {\n return flattenOptions(mergedOptions, props);\n }, [mergedOptions]);\n var getValueOption = (0, _useCacheOptions.default)(mergedRawValue, mergedFlattenOptions); // Display options for OptionList\n\n var displayOptions = (0, React.useMemo)(function () {\n if (!mergedSearchValue || !mergedShowSearch) {\n return (0, _toConsumableArray2.default)(mergedOptions);\n }\n\n var filteredOptions = filterOptions(mergedSearchValue, mergedOptions, {\n optionFilterProp: optionFilterProp,\n filterOption: mode === 'combobox' && filterOption === undefined ? function () {\n return true;\n } : filterOption\n });\n\n if (mode === 'tags' && filteredOptions.every(function (opt) {\n return opt.value !== mergedSearchValue;\n })) {\n filteredOptions.unshift({\n value: mergedSearchValue,\n label: mergedSearchValue,\n key: '__RC_SELECT_TAG_PLACEHOLDER__'\n });\n }\n\n return filteredOptions;\n }, [mergedOptions, mergedSearchValue, mode, mergedShowSearch]);\n var displayFlattenOptions = (0, React.useMemo)(function () {\n return flattenOptions(displayOptions, props);\n }, [displayOptions]);\n (0, React.useEffect)(function () {\n if (listRef.current && listRef.current.scrollTo) {\n listRef.current.scrollTo(0);\n }\n }, [mergedSearchValue]); // ============================ Selector ============================\n\n var displayValues = (0, React.useMemo)(function () {\n var tmpValues = mergedRawValue.map(function (val) {\n var valueOptions = getValueOption([val]);\n var displayValue = getLabeledValue(val, {\n options: valueOptions,\n prevValue: mergedValue,\n labelInValue: mergedLabelInValue,\n optionLabelProp: mergedOptionLabelProp\n });\n return _objectSpread(_objectSpread({}, displayValue), {}, {\n disabled: isValueDisabled(val, valueOptions)\n });\n });\n\n if (!mode && tmpValues.length === 1 && tmpValues[0].value === null && tmpValues[0].label === null) {\n return [];\n }\n\n return tmpValues;\n }, [mergedValue, mergedOptions, mode]); // Polyfill with cache label\n\n displayValues = (0, _useCacheDisplayValue.default)(displayValues);\n\n var triggerSelect = function triggerSelect(newValue, isSelect, source) {\n var newValueOption = getValueOption([newValue]);\n var outOption = findValueOption([newValue], newValueOption)[0];\n\n if (!internalProps.skipTriggerSelect) {\n // Skip trigger `onSelect` or `onDeselect` if configured\n var selectValue = mergedLabelInValue ? getLabeledValue(newValue, {\n options: newValueOption,\n prevValue: mergedValue,\n labelInValue: mergedLabelInValue,\n optionLabelProp: mergedOptionLabelProp\n }) : newValue;\n\n if (isSelect && onSelect) {\n onSelect(selectValue, outOption);\n } else if (!isSelect && onDeselect) {\n onDeselect(selectValue, outOption);\n }\n } // Trigger internal event\n\n\n if (useInternalProps) {\n if (isSelect && internalProps.onRawSelect) {\n internalProps.onRawSelect(newValue, outOption, source);\n } else if (!isSelect && internalProps.onRawDeselect) {\n internalProps.onRawDeselect(newValue, outOption, source);\n }\n }\n };\n\n var triggerChange = function triggerChange(newRawValues) {\n if (useInternalProps && internalProps.skipTriggerChange) {\n return;\n }\n\n var newRawValuesOptions = getValueOption(newRawValues);\n var outValues = (0, _commonUtil.toOuterValues)(Array.from(newRawValues), {\n labelInValue: mergedLabelInValue,\n options: newRawValuesOptions,\n getLabeledValue: getLabeledValue,\n prevValue: mergedValue,\n optionLabelProp: mergedOptionLabelProp\n });\n var outValue = isMultiple ? outValues : outValues[0]; // Skip trigger if prev & current value is both empty\n\n if (onChange && (mergedRawValue.length !== 0 || outValues.length !== 0)) {\n var outOptions = findValueOption(newRawValues, newRawValuesOptions);\n onChange(outValue, isMultiple ? outOptions : outOptions[0]);\n }\n\n setMergedValue(outValue);\n };\n\n var onInternalSelect = function onInternalSelect(newValue, _ref) {\n var selected = _ref.selected,\n source = _ref.source;\n\n if (disabled) {\n return;\n }\n\n var newRawValue;\n\n if (isMultiple) {\n newRawValue = new Set(mergedRawValue);\n\n if (selected) {\n newRawValue.add(newValue);\n } else {\n newRawValue.delete(newValue);\n }\n } else {\n newRawValue = new Set();\n newRawValue.add(newValue);\n } // Multiple always trigger change and single should change if value changed\n\n\n if (isMultiple || !isMultiple && Array.from(mergedRawValue)[0] !== newValue) {\n triggerChange(Array.from(newRawValue));\n } // Trigger `onSelect`. Single mode always trigger select\n\n\n triggerSelect(newValue, !isMultiple || selected, source); // Clean search value if single or configured\n\n if (mode === 'combobox') {\n setInnerSearchValue(String(newValue));\n setActiveValue('');\n } else if (!isMultiple || autoClearSearchValue) {\n setInnerSearchValue('');\n setActiveValue('');\n }\n };\n\n var onInternalOptionSelect = function onInternalOptionSelect(newValue, info) {\n onInternalSelect(newValue, _objectSpread(_objectSpread({}, info), {}, {\n source: 'option'\n }));\n };\n\n var onInternalSelectionSelect = function onInternalSelectionSelect(newValue, info) {\n onInternalSelect(newValue, _objectSpread(_objectSpread({}, info), {}, {\n source: 'selection'\n }));\n }; // ============================= Input ==============================\n // Only works in `combobox`\n\n\n var customizeInputElement = mode === 'combobox' && getInputElement && getInputElement() || null; // ============================== Open ==============================\n\n var _useMergedState3 = (0, _useMergedState5.default)(undefined, {\n defaultValue: defaultOpen,\n value: open\n }),\n _useMergedState4 = (0, _slicedToArray2.default)(_useMergedState3, 2),\n innerOpen = _useMergedState4[0],\n setInnerOpen = _useMergedState4[1];\n\n var mergedOpen = innerOpen; // Not trigger `open` in `combobox` when `notFoundContent` is empty\n\n var emptyListContent = !notFoundContent && !displayOptions.length;\n\n if (disabled || emptyListContent && mergedOpen && mode === 'combobox') {\n mergedOpen = false;\n }\n\n var triggerOpen = emptyListContent ? false : mergedOpen;\n\n var onToggleOpen = function onToggleOpen(newOpen) {\n var nextOpen = newOpen !== undefined ? newOpen : !mergedOpen;\n\n if (innerOpen !== nextOpen && !disabled) {\n setInnerOpen(nextOpen);\n\n if (onDropdownVisibleChange) {\n onDropdownVisibleChange(nextOpen);\n }\n }\n };\n\n (0, _useSelectTriggerControl.default)([containerRef.current, triggerRef.current && triggerRef.current.getPopupElement()], triggerOpen, onToggleOpen); // ============================= Search =============================\n\n var triggerSearch = function triggerSearch(searchText, fromTyping, isCompositing) {\n var ret = true;\n var newSearchText = searchText;\n setActiveValue(null); // Check if match the `tokenSeparators`\n\n var patchLabels = isCompositing ? null : (0, _valueUtil.getSeparatedContent)(searchText, tokenSeparators);\n var patchRawValues = patchLabels;\n\n if (mode === 'combobox') {\n // Only typing will trigger onChange\n if (fromTyping) {\n triggerChange([newSearchText]);\n }\n } else if (patchLabels) {\n newSearchText = '';\n\n if (mode !== 'tags') {\n patchRawValues = patchLabels.map(function (label) {\n var item = mergedFlattenOptions.find(function (_ref2) {\n var data = _ref2.data;\n return data[mergedOptionLabelProp] === label;\n });\n return item ? item.data.value : null;\n }).filter(function (val) {\n return val !== null;\n });\n }\n\n var newRawValues = Array.from(new Set([].concat((0, _toConsumableArray2.default)(mergedRawValue), (0, _toConsumableArray2.default)(patchRawValues))));\n triggerChange(newRawValues);\n newRawValues.forEach(function (newRawValue) {\n triggerSelect(newRawValue, true, 'input');\n }); // Should close when paste finish\n\n onToggleOpen(false); // Tell Selector that break next actions\n\n ret = false;\n }\n\n setInnerSearchValue(newSearchText);\n\n if (onSearch && mergedSearchValue !== newSearchText) {\n onSearch(newSearchText);\n }\n\n return ret;\n }; // Only triggered when menu is closed & mode is tags\n // If menu is open, OptionList will take charge\n // If mode isn't tags, press enter is not meaningful when you can't see any option\n\n\n var onSearchSubmit = function onSearchSubmit(searchText) {\n var newRawValues = Array.from(new Set([].concat((0, _toConsumableArray2.default)(mergedRawValue), [searchText])));\n triggerChange(newRawValues);\n newRawValues.forEach(function (newRawValue) {\n triggerSelect(newRawValue, true, 'input');\n });\n setInnerSearchValue('');\n }; // Close dropdown when disabled change\n\n\n (0, React.useEffect)(function () {\n if (innerOpen && !!disabled) {\n setInnerOpen(false);\n }\n }, [disabled]); // Close will clean up single mode search text\n\n (0, React.useEffect)(function () {\n if (!mergedOpen && !isMultiple && mode !== 'combobox') {\n triggerSearch('', false, false);\n }\n }, [mergedOpen]); // ============================ Keyboard ============================\n\n /**\n * We record input value here to check if can press to clean up by backspace\n * - null: Key is not down, this is reset by key up\n * - true: Search text is empty when first time backspace down\n * - false: Search text is not empty when first time backspace down\n */\n\n var _useLock = (0, _useLock3.default)(),\n _useLock2 = (0, _slicedToArray2.default)(_useLock, 2),\n getClearLock = _useLock2[0],\n setClearLock = _useLock2[1]; // KeyDown\n\n\n var onInternalKeyDown = function onInternalKeyDown(event) {\n var clearLock = getClearLock();\n var which = event.which; // We only manage open state here, close logic should handle by list component\n\n if (!mergedOpen && which === _KeyCode.default.ENTER) {\n onToggleOpen(true);\n }\n\n setClearLock(!!mergedSearchValue); // Remove value by `backspace`\n\n if (which === _KeyCode.default.BACKSPACE && !clearLock && isMultiple && !mergedSearchValue && mergedRawValue.length) {\n var removeInfo = (0, _commonUtil.removeLastEnabledValue)(displayValues, mergedRawValue);\n\n if (removeInfo.removedValue !== null) {\n triggerChange(removeInfo.values);\n triggerSelect(removeInfo.removedValue, false, 'input');\n }\n }\n\n for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n rest[_key - 1] = arguments[_key];\n }\n\n if (mergedOpen && listRef.current) {\n var _listRef$current;\n\n (_listRef$current = listRef.current).onKeyDown.apply(_listRef$current, [event].concat(rest));\n }\n\n if (onKeyDown) {\n onKeyDown.apply(void 0, [event].concat(rest));\n }\n }; // KeyUp\n\n\n var onInternalKeyUp = function onInternalKeyUp(event) {\n for (var _len2 = arguments.length, rest = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n rest[_key2 - 1] = arguments[_key2];\n }\n\n if (mergedOpen && listRef.current) {\n var _listRef$current2;\n\n (_listRef$current2 = listRef.current).onKeyUp.apply(_listRef$current2, [event].concat(rest));\n }\n\n if (onKeyUp) {\n onKeyUp.apply(void 0, [event].concat(rest));\n }\n }; // ========================== Focus / Blur ==========================\n\n /** Record real focus status */\n\n\n var focusRef = (0, React.useRef)(false);\n\n var onContainerFocus = function onContainerFocus() {\n setMockFocused(true);\n\n if (!disabled) {\n if (onFocus && !focusRef.current) {\n onFocus.apply(void 0, arguments);\n } // `showAction` should handle `focus` if set\n\n\n if (showAction.includes('focus')) {\n onToggleOpen(true);\n }\n }\n\n focusRef.current = true;\n };\n\n var onContainerBlur = function onContainerBlur() {\n setMockFocused(false, function () {\n focusRef.current = false;\n onToggleOpen(false);\n });\n\n if (disabled) {\n return;\n }\n\n if (mergedSearchValue) {\n // `tags` mode should move `searchValue` into values\n if (mode === 'tags') {\n triggerSearch('', false, false);\n triggerChange(Array.from(new Set([].concat((0, _toConsumableArray2.default)(mergedRawValue), [mergedSearchValue]))));\n } else if (mode === 'multiple') {\n // `multiple` mode only clean the search value but not trigger event\n setInnerSearchValue('');\n }\n }\n\n if (onBlur) {\n onBlur.apply(void 0, arguments);\n }\n };\n\n var activeTimeoutIds = [];\n (0, React.useEffect)(function () {\n return function () {\n activeTimeoutIds.forEach(function (timeoutId) {\n return clearTimeout(timeoutId);\n });\n activeTimeoutIds.splice(0, activeTimeoutIds.length);\n };\n }, []);\n\n var onInternalMouseDown = function onInternalMouseDown(event) {\n var target = event.target;\n var popupElement = triggerRef.current && triggerRef.current.getPopupElement(); // We should give focus back to selector if clicked item is not focusable\n\n if (popupElement && popupElement.contains(target)) {\n var timeoutId = setTimeout(function () {\n var index = activeTimeoutIds.indexOf(timeoutId);\n\n if (index !== -1) {\n activeTimeoutIds.splice(index, 1);\n }\n\n cancelSetMockFocused();\n\n if (!popupElement.contains(document.activeElement)) {\n selectorRef.current.focus();\n }\n });\n activeTimeoutIds.push(timeoutId);\n }\n\n if (onMouseDown) {\n for (var _len3 = arguments.length, restArgs = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n restArgs[_key3 - 1] = arguments[_key3];\n }\n\n onMouseDown.apply(void 0, [event].concat(restArgs));\n }\n }; // ========================= Accessibility ==========================\n\n\n var _useState7 = (0, React.useState)(0),\n _useState8 = (0, _slicedToArray2.default)(_useState7, 2),\n accessibilityIndex = _useState8[0],\n setAccessibilityIndex = _useState8[1];\n\n var mergedDefaultActiveFirstOption = defaultActiveFirstOption !== undefined ? defaultActiveFirstOption : mode !== 'combobox';\n\n var onActiveValue = function onActiveValue(active, index) {\n setAccessibilityIndex(index);\n\n if (backfill && mode === 'combobox' && active !== null) {\n setActiveValue(String(active));\n }\n }; // ============================= Popup ==============================\n\n\n var _useState9 = (0, React.useState)(null),\n _useState10 = (0, _slicedToArray2.default)(_useState9, 2),\n containerWidth = _useState10[0],\n setContainerWidth = _useState10[1];\n\n var _useState11 = (0, React.useState)({}),\n _useState12 = (0, _slicedToArray2.default)(_useState11, 2),\n forceUpdate = _useState12[1]; // We need force update here since popup dom is render async\n\n\n function onPopupMouseEnter() {\n forceUpdate({});\n }\n\n (0, _useLayoutEffect.default)(function () {\n if (triggerOpen) {\n var newWidth = Math.ceil(containerRef.current.offsetWidth);\n\n if (containerWidth !== newWidth) {\n setContainerWidth(newWidth);\n }\n }\n }, [triggerOpen]);\n var popupNode = React.createElement(OptionList, {\n ref: listRef,\n prefixCls: prefixCls,\n id: mergedId,\n open: mergedOpen,\n childrenAsData: !options,\n options: displayOptions,\n flattenOptions: displayFlattenOptions,\n multiple: isMultiple,\n values: rawValues,\n height: listHeight,\n itemHeight: listItemHeight,\n onSelect: onInternalOptionSelect,\n onToggleOpen: onToggleOpen,\n onActiveValue: onActiveValue,\n defaultActiveFirstOption: mergedDefaultActiveFirstOption,\n notFoundContent: notFoundContent,\n onScroll: onPopupScroll,\n searchValue: mergedSearchValue,\n menuItemSelectedIcon: menuItemSelectedIcon,\n virtual: virtual !== false && dropdownMatchSelectWidth !== false,\n onMouseEnter: onPopupMouseEnter\n }); // ============================= Clear ==============================\n\n var clearNode;\n\n var onClearMouseDown = function onClearMouseDown() {\n // Trigger internal `onClear` event\n if (useInternalProps && internalProps.onClear) {\n internalProps.onClear();\n }\n\n triggerChange([]);\n triggerSearch('', false, false);\n };\n\n if (!disabled && allowClear && (mergedRawValue.length || mergedSearchValue)) {\n clearNode = React.createElement(_TransBtn.default, {\n className: \"\".concat(prefixCls, \"-clear\"),\n onMouseDown: onClearMouseDown,\n customizeIcon: clearIcon\n }, \"\\xD7\");\n } // ============================= Arrow ==============================\n\n\n var mergedShowArrow = showArrow !== undefined ? showArrow : loading || !isMultiple && mode !== 'combobox';\n var arrowNode;\n\n if (mergedShowArrow) {\n arrowNode = React.createElement(_TransBtn.default, {\n className: (0, _classnames.default)(\"\".concat(prefixCls, \"-arrow\"), (0, _defineProperty2.default)({}, \"\".concat(prefixCls, \"-arrow-loading\"), loading)),\n customizeIcon: inputIcon,\n customizeIconProps: {\n loading: loading,\n searchValue: mergedSearchValue,\n open: mergedOpen,\n focused: mockFocused,\n showSearch: mergedShowSearch\n }\n });\n } // ============================ Warning =============================\n\n\n if (process.env.NODE_ENV !== 'production' && warningProps) {\n warningProps(props);\n } // ============================= Render =============================\n\n\n var mergedClassName = (0, _classnames.default)(prefixCls, className, (_classNames2 = {}, (0, _defineProperty2.default)(_classNames2, \"\".concat(prefixCls, \"-focused\"), mockFocused), (0, _defineProperty2.default)(_classNames2, \"\".concat(prefixCls, \"-multiple\"), isMultiple), (0, _defineProperty2.default)(_classNames2, \"\".concat(prefixCls, \"-single\"), !isMultiple), (0, _defineProperty2.default)(_classNames2, \"\".concat(prefixCls, \"-allow-clear\"), allowClear), (0, _defineProperty2.default)(_classNames2, \"\".concat(prefixCls, \"-show-arrow\"), mergedShowArrow), (0, _defineProperty2.default)(_classNames2, \"\".concat(prefixCls, \"-disabled\"), disabled), (0, _defineProperty2.default)(_classNames2, \"\".concat(prefixCls, \"-loading\"), loading), (0, _defineProperty2.default)(_classNames2, \"\".concat(prefixCls, \"-open\"), mergedOpen), (0, _defineProperty2.default)(_classNames2, \"\".concat(prefixCls, \"-customize-input\"), customizeInputElement), (0, _defineProperty2.default)(_classNames2, \"\".concat(prefixCls, \"-show-search\"), mergedShowSearch), _classNames2));\n return React.createElement(\"div\", Object.assign({\n className: mergedClassName\n }, domProps, {\n ref: containerRef,\n onMouseDown: onInternalMouseDown,\n onKeyDown: onInternalKeyDown,\n onKeyUp: onInternalKeyUp,\n onFocus: onContainerFocus,\n onBlur: onContainerBlur\n }), mockFocused && !mergedOpen && React.createElement(\"span\", {\n style: {\n width: 0,\n height: 0,\n display: 'flex',\n overflow: 'hidden',\n opacity: 0\n },\n \"aria-live\": \"polite\"\n }, \"\".concat(mergedRawValue.join(', '))), React.createElement(_SelectTrigger.default, {\n ref: triggerRef,\n disabled: disabled,\n prefixCls: prefixCls,\n visible: triggerOpen,\n popupElement: popupNode,\n containerWidth: containerWidth,\n animation: animation,\n transitionName: transitionName,\n dropdownStyle: dropdownStyle,\n dropdownClassName: dropdownClassName,\n direction: direction,\n dropdownMatchSelectWidth: dropdownMatchSelectWidth,\n dropdownRender: dropdownRender,\n dropdownAlign: dropdownAlign,\n getPopupContainer: getPopupContainer,\n empty: !mergedOptions.length,\n getTriggerDOMNode: function getTriggerDOMNode() {\n return selectorDomRef.current;\n }\n }, React.createElement(_Selector.default, Object.assign({}, props, {\n domRef: selectorDomRef,\n prefixCls: prefixCls,\n inputElement: customizeInputElement,\n ref: selectorRef,\n id: mergedId,\n showSearch: mergedShowSearch,\n mode: mode,\n accessibilityIndex: accessibilityIndex,\n multiple: isMultiple,\n tagRender: tagRender,\n values: displayValues,\n open: mergedOpen,\n onToggleOpen: onToggleOpen,\n searchValue: mergedSearchValue,\n activeValue: activeValue,\n onSearch: triggerSearch,\n onSearchSubmit: onSearchSubmit,\n onSelect: onInternalSelectionSelect,\n tokenWithEnter: tokenWithEnter\n }))), arrowNode, clearNode);\n }", "handleEventDropdown(event, value) {\n this.props.saveActionProperty('event', value);\n this.error = ''\n }", "render() {\r\n const { props } = this; //props=this.props\r\n const dropItem = props.pop_group.map((data, index) => {\r\n return /2018/.test(data) ? (\r\n <DropdownItem\r\n style={{ fontSize: \"13px\", fontWeight: \"bold\" }}\r\n className=\"item\"\r\n key={index}\r\n >\r\n {data}\r\n </DropdownItem>\r\n ) : null;\r\n });\r\n\r\n return (\r\n //dropdown menu or measure names\r\n <React.Fragment>\r\n <Dropdown\r\n style={{ marginLeft: \"5%\", marginTop: \"3%\", backgroundColor: '#0079BE'}}\r\n isOpen={this.state.dropdownopen}\r\n toggle={this.toggle}\r\n >\r\n <DropdownToggle caret style= {{backgroundColor: '#0079BE'}}>{props.selectedMenu}</DropdownToggle>\r\n <DropdownMenu onClick={event => props.onMenuSelect(event)}>\r\n {dropItem}\r\n </DropdownMenu>\r\n </Dropdown>\r\n </React.Fragment>\r\n );\r\n }", "function drop() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.dropdown')\n\n if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))\n if (typeof option == 'string') data[option].call($this)\n })\n }", "onToggleDropdown() {\n\t\tif(this.containerDropdownElement.className.indexOf(\"show\") == -1) {\n\t\t\tthis.containerDropdownElement.className += \" show\";\n\t\t} else {\n\t\t\tthis.containerDropdownElement.className = this.containerDropdownElement.className.replace(\" show\", \"\");\n\t\t}\n\t}", "function setDropDown() {\n KintoneConfigHelper.getFields(['SINGLE_LINE_TEXT', 'LINK', 'SPACER']).then(function(resp) {\n var $linkDropDown = $link;\n var $spaceDropDown = $space;\n\n resp.forEach(function(respField) {\n var $option = $('<option></option>');\n switch (respField.type) {\n case 'SINGLE_LINE_TEXT':\n case 'LINK':\n $option.attr('value', respField.code);\n $option.text(respField.label);\n $linkDropDown.append($option.clone());\n break;\n case 'SPACER':\n if (!respField.elementId) {\n break;\n }\n $option.attr('value', respField.elementId);\n $option.text(respField.elementId);\n $spaceDropDown.append($option.clone());\n break;\n default:\n break;\n }\n });\n\n // Set default values\n if (CONF.link) {\n $linkDropDown.val(CONF.link);\n }\n if (CONF.space) {\n $spaceDropDown.val(CONF.space);\n }\n }, function() {\n // Error\n return alert('There was an error retrieving the Link field information.');\n });\n }", "function Dropdown(options) {\n\t\tvar config = options || {},\n\t\t\tdropdown = config.item,\n\t\t\tdropdownText = dropdown.find('.js-dropdown-text'),\n\t\t\tdropdownList = dropdown.find('.js-dropdown-list'),\n\t\t\tdropdownItem = dropdown.find('.js-dropdown-list li'),\n\t\t\tthat = this;\n\t\n\t\tthis._openDD = function() {\n\t\t\tdropdownText.click(function() {\n\t\t\t\tif (dropdown.hasClass('is-active')) {\n\t\t\t\t\tthat._closeDD();\n\t\t\t\t} else {\n\t\t\t\t\tthat._closeDD();\n\t\t\t\t\tdropdown.addClass('is-active');\n\t\t\t\t};\n\t\t\t\treturn false;\n\t\t\t});\n\t\t},\n\t\tthis._closeDD = function() {\n\t\t\t$('.js-dropdown').removeClass('is-active');\n\t\t},\n\t\tthis._closeOnBody = function() {\n\t\t\tbody.click(function() {\n\t\t\t\tthat._closeDD();\n\t\t\t});\n\t\t},\n\t\tthis._changeValue = function() {\n\t\t\tdropdownItem.click(function() {\n\t\t\t\tdropdownItem.removeClass('is-active');\n\t\t\t\t$(this).addClass('is-active');\n\t\t\t\tdropdown.removeClass('is-active');\n\t\t\t\tdropdownText.text($(this).text());\n\t\t\t\treturn false;\n\t\t\t});\n\t\t},\n\t\tthis.init = function() {\n\t\t\tthat._openDD();\n\t\t\tthat._closeOnBody();\n\t\t\tthat._changeValue();\n\t\t}\n\t\n\t\tthis.init();\n\t\n\t}", "componentDidMount() {\n $('.dropdown-button').dropdown({\n inDuration: 300,\n outDuration: 225,\n constrainWidth: false, // Does not change width of dropdown to that of the activator\n hover: false, // Activate on hover\n gutter: 0, // Spacing from edge\n belowOrigin: false, // Displays dropdown below the button\n alignment: 'left', // Displays dropdown with edge aligned to the left of button\n stopPropagation: false // Stops event propagation\n }\n );\n }", "function generateDropdown(parentID,label,dropID,title,array) {\n //add select options\n var dropHtml = \"\";\n if (label != \"\") {\n dropHtml += '<label>' + label + '</label>'\n }\n dropHtml += '<select class=\"selectpicker show-tick\" id=\"'+ dropID +'\" title=\"'+title+'\" data-style=\"btn-default\" data-width=\"100%\" data-size=\"10\">'\n //build list, apply BREAKS or LABELS if words present in array\n for (i = 0; i < array.length; i++) {\n if (array[i] == 'BREAK'){\n dropHtml += '<option data-divider=\"true\"></option>';\n } else if (array[i].includes('LABEL=')) {\n dropHtml += '<optgroup label=\"' + array[i].replace('LABEL=','') + '\">';\n } else if (array[i].includes('ENDLABEL')) {\n dropHtml += '</optgroup>';\n }\n else {\n dropHtml += '<option>' + array[i] + '</option>';\n }\n }\n dropHtml += '</select>';\n //add to parent div\n document.getElementById(parentID).innerHTML = dropHtml;\n //initialise dropdown\n $('#'+dropID).selectpicker();\n //bind dropdown click handler\n $('#'+dropID).on('changed.bs.select', dropClickHandler);\n}", "function DropdownMenu(){\r\n\r\n\r\n return (\r\n <ul className=\"dropdown\">\r\n {/* Create links to main menus options in the list*/}\r\n {SideMenuInfo.map((item, index) => {\r\n return (\r\n <li key={index} className={item.classFormat}>\r\n <Link to={item.path}>\r\n {item.icon}\r\n <span>{item.title}</span>\r\n </Link>\r\n </li>\r\n )\r\n })}\r\n </ul>\r\n );\r\n\r\n}" ]
[ "0.74632454", "0.74274856", "0.6800082", "0.65475297", "0.65286446", "0.6430284", "0.64301074", "0.642787", "0.642787", "0.6388088", "0.63669276", "0.63535553", "0.6343826", "0.631651", "0.631651", "0.6260205", "0.6259108", "0.6249347", "0.6229232", "0.6229232", "0.61744714", "0.61705", "0.61694753", "0.61532944", "0.61422235", "0.61337686", "0.61337596", "0.61161005", "0.6097956", "0.6076092", "0.6076092", "0.6076092", "0.6076092", "0.6076092", "0.6070996", "0.6069781", "0.6068163", "0.60589886", "0.6048342", "0.60382086", "0.6034892", "0.602761", "0.6023519", "0.6023427", "0.6021056", "0.6016045", "0.6011818", "0.60089445", "0.6007849", "0.6007849", "0.6007849", "0.6007849", "0.6007849", "0.6007849", "0.6007849", "0.6007849", "0.6007849", "0.6007849", "0.6007849", "0.6000713", "0.59998876", "0.59942037", "0.598484", "0.598484", "0.5979949", "0.5977902", "0.5955276", "0.5933785", "0.5933785", "0.5929916", "0.5929916", "0.5909351", "0.5909351", "0.5897701", "0.58832276", "0.5871663", "0.5866017", "0.5865055", "0.5860144", "0.58583623", "0.5851429", "0.5843233", "0.5841985", "0.5835055", "0.58339596", "0.5817936", "0.581763", "0.58112127", "0.5808831", "0.5808831", "0.5808831", "0.58038807", "0.5792845", "0.57927287", "0.5780673", "0.57712305", "0.57699656", "0.5760579", "0.5755275", "0.57380825", "0.5735037" ]
0.0
-1
Wires up Dropdown toggle functionality, returning a set a props to attach to the element that functions as the dropdown toggle (generally a button).
function useDropdownToggle() { var _ref = Object(react__WEBPACK_IMPORTED_MODULE_1__["useContext"])(_DropdownContext__WEBPACK_IMPORTED_MODULE_2__["default"]) || {}, _ref$show = _ref.show, show = _ref$show === void 0 ? false : _ref$show, _ref$toggle = _ref.toggle, toggle = _ref$toggle === void 0 ? noop : _ref$toggle, setToggle = _ref.setToggle; return [{ ref: setToggle || noop, 'aria-haspopup': true, 'aria-expanded': !!show }, { show: show, toggle: toggle }]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function useDropdownToggle() {\n var _useContext = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useContext\"])(_DropdownContext__WEBPACK_IMPORTED_MODULE_2__[\"default\"]),\n show = _useContext.show,\n toggle = _useContext.toggle,\n setToggle = _useContext.setToggle;\n\n return [{\n ref: setToggle,\n 'aria-haspopup': true,\n 'aria-expanded': !!show\n }, {\n show: show,\n toggle: toggle\n }];\n}", "function useDropdownToggle() {\n var _useContext = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useContext\"])(_DropdownContext__WEBPACK_IMPORTED_MODULE_2__[\"default\"]),\n show = _useContext.show,\n toggle = _useContext.toggle,\n setToggle = _useContext.setToggle;\n\n return [{\n ref: setToggle,\n 'aria-haspopup': true,\n 'aria-expanded': !!show\n }, {\n show: show,\n toggle: toggle\n }];\n}", "function useDropdownToggle() {\n var _ref = react.useContext(DropdownContext) || {},\n _ref$show = _ref.show,\n show = _ref$show === void 0 ? false : _ref$show,\n _ref$toggle = _ref.toggle,\n toggle = _ref$toggle === void 0 ? noop$2 : _ref$toggle,\n setToggle = _ref.setToggle;\n\n var handleClick = react.useCallback(function (e) {\n toggle(!show, e);\n }, [show, toggle]);\n return [{\n ref: setToggle || noop$2,\n onClick: handleClick,\n 'aria-haspopup': true,\n 'aria-expanded': !!show\n }, {\n show: show,\n toggle: toggle\n }];\n}", "function useDropdownToggle() {\n var _ref = (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(_DropdownContext__WEBPACK_IMPORTED_MODULE_2__.default) || {},\n _ref$show = _ref.show,\n show = _ref$show === void 0 ? false : _ref$show,\n _ref$toggle = _ref.toggle,\n toggle = _ref$toggle === void 0 ? noop : _ref$toggle,\n setToggle = _ref.setToggle;\n\n var handleClick = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (e) {\n toggle(!show, e);\n }, [show, toggle]);\n return [{\n ref: setToggle || noop,\n onClick: handleClick,\n 'aria-haspopup': true,\n 'aria-expanded': !!show\n }, {\n show: show,\n toggle: toggle\n }];\n}", "function useDropdownToggle() {\n var _ref = (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(_DropdownContext__WEBPACK_IMPORTED_MODULE_2__.default) || {},\n _ref$show = _ref.show,\n show = _ref$show === void 0 ? false : _ref$show,\n _ref$toggle = _ref.toggle,\n toggle = _ref$toggle === void 0 ? noop : _ref$toggle,\n setToggle = _ref.setToggle;\n\n var handleClick = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (e) {\n toggle(!show, e);\n }, [show, toggle]);\n return [{\n ref: setToggle || noop,\n onClick: handleClick,\n 'aria-haspopup': true,\n 'aria-expanded': !!show\n }, {\n show: show,\n toggle: toggle\n }];\n}", "function setToggleButton (e, checked) {\r\n\tlet toggleButton = e.parentElement.querySelector(\"button.upDownButton\");\r\n\tlet dropList = e.parentElement.querySelector(\"div.dropList\");\r\n\tlet dropListItems = dropList.children;\r\n\r\n\tlet n = countShowing(dropList);\r\n\tif (checked) {\r\n\t\tif (n == 0) {\r\n\t\t\ttoggleButton.checked = true; \r\n\t\t\ttoggleButton.classList.remove(\"upAndFilter\")\r\n\t\t\ttoggleButton.classList.add(\"up\");\r\n\t\t\ttoggleButton.disabled = false;\r\n\t\t\ttoggleButton.setAttribute(\"title\", \"Hide all\");\r\n\t\t} else {\r\n\t\t\ttoggleButton.checked = true; \r\n\t\t\ttoggleButton.classList.remove(\"up\");\r\n\t\t\ttoggleButton.classList.add(\"upAndFilter\")\r\n\t\t\ttoggleButton.disabled = false;\r\n\t\t\ttoggleButton.setAttribute(\"title\", \"Filter\");\r\n\t\t}\t\t\t\r\n\t} else {\r\n\t\tif (n == dropListItems.length) {\r\n\t\t\ttoggleButton.checked = true; \r\n\t\t\ttoggleButton.classList.remove(\"up\", \"upAndFilter\");\r\n\t\t\ttoggleButton.disabled = true;\r\n\t\t\ttoggleButton.removeAttribute(\"title\");\r\n\t\t} else {\r\n\t\t\ttoggleButton.checked = false; \r\n\t\t\ttoggleButton.classList.remove(\"up\", \"upAndFilter\");\r\n\t\t\ttoggleButton.disabled = false;\r\n\t\t\ttoggleButton.setAttribute(\"title\", \"Show all\");\r\n\t\t}\r\n\t}\r\n}", "toggle() {\n this.setState({\n dropdownOpen: !this.state.dropdownOpen\n });\n }", "toggleForDropDown() {\n this.setState(prevState => ({\n dropdownOpen: !prevState.dropdownOpen\n }));\n }", "toggle(event) {\n this.setState({\n dropdownOpen: !this.state.dropdownOpen\n });\n }", "function Dropdown(_ref) {\n var drop = _ref.drop,\n alignEnd = _ref.alignEnd,\n defaultShow = _ref.defaultShow,\n rawShow = _ref.show,\n rawOnToggle = _ref.onToggle,\n itemSelector = _ref.itemSelector,\n focusFirstItemOnShow = _ref.focusFirstItemOnShow,\n children = _ref.children;\n var forceUpdate = Object(_restart_hooks_useForceUpdate__WEBPACK_IMPORTED_MODULE_7__[\"default\"])();\n\n var _useUncontrolled = Object(uncontrollable__WEBPACK_IMPORTED_MODULE_4__[\"useUncontrolled\"])({\n defaultShow: defaultShow,\n show: rawShow,\n onToggle: rawOnToggle\n }, {\n show: 'onToggle'\n }),\n show = _useUncontrolled.show,\n onToggle = _useUncontrolled.onToggle;\n\n var _useCallbackRef = Object(_restart_hooks_useCallbackRef__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(),\n toggleElement = _useCallbackRef[0],\n setToggle = _useCallbackRef[1]; // We use normal refs instead of useCallbackRef in order to populate the\n // the value as quickly as possible, otherwise the effect to focus the element\n // may run before the state value is set\n\n\n var menuRef = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"])();\n var menuElement = menuRef.current;\n var setMenu = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"])(function (ref) {\n menuRef.current = ref; // ensure that a menu set triggers an update for consumers\n\n forceUpdate();\n }, [forceUpdate]);\n var lastShow = Object(_restart_hooks_usePrevious__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(show);\n var lastSourceEvent = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"])(null);\n var focusInDropdown = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"])(false);\n var toggle = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"])(function (event) {\n onToggle(!show, event);\n }, [onToggle, show]);\n var context = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useMemo\"])(function () {\n return {\n toggle: toggle,\n drop: drop,\n show: show,\n alignEnd: alignEnd,\n menuElement: menuElement,\n toggleElement: toggleElement,\n setMenu: setMenu,\n setToggle: setToggle\n };\n }, [toggle, drop, show, alignEnd, menuElement, toggleElement, setMenu, setToggle]);\n\n if (menuElement && lastShow && !show) {\n focusInDropdown.current = menuElement.contains(document.activeElement);\n }\n\n var focusToggle = Object(_restart_hooks_useEventCallback__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(function () {\n if (toggleElement && toggleElement.focus) {\n toggleElement.focus();\n }\n });\n var maybeFocusFirst = Object(_restart_hooks_useEventCallback__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(function () {\n var type = lastSourceEvent.current;\n var focusType = focusFirstItemOnShow;\n\n if (focusType == null) {\n focusType = menuRef.current && Object(dom_helpers_matches__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(menuRef.current, '[role=menu]') ? 'keyboard' : false;\n }\n\n if (focusType === false || focusType === 'keyboard' && !/^key.+$/.test(type)) {\n return;\n }\n\n var first = Object(dom_helpers_querySelectorAll__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(menuRef.current, itemSelector)[0];\n if (first && first.focus) first.focus();\n });\n Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"])(function () {\n if (show) maybeFocusFirst();else if (focusInDropdown.current) {\n focusInDropdown.current = false;\n focusToggle();\n } // only `show` should be changing\n }, [show, focusInDropdown, focusToggle, maybeFocusFirst]);\n Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"])(function () {\n lastSourceEvent.current = null;\n });\n\n var getNextFocusedChild = function getNextFocusedChild(current, offset) {\n if (!menuRef.current) return null;\n var items = Object(dom_helpers_querySelectorAll__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(menuRef.current, itemSelector);\n var index = items.indexOf(current) + offset;\n index = Math.max(0, Math.min(index, items.length));\n return items[index];\n };\n\n var handleKeyDown = function handleKeyDown(event) {\n var key = event.key,\n target = event.target; // Second only to https://github.com/twbs/bootstrap/blob/8cfbf6933b8a0146ac3fbc369f19e520bd1ebdac/js/src/dropdown.js#L400\n // in inscrutability\n\n var isInput = /input|textarea/i.test(target.tagName);\n\n if (isInput && (key === ' ' || key !== 'Escape' && menuRef.current && menuRef.current.contains(target))) {\n return;\n }\n\n lastSourceEvent.current = event.type;\n\n switch (key) {\n case 'ArrowUp':\n {\n var next = getNextFocusedChild(target, -1);\n if (next && next.focus) next.focus();\n event.preventDefault();\n return;\n }\n\n case 'ArrowDown':\n event.preventDefault();\n\n if (!show) {\n toggle(event);\n } else {\n var _next = getNextFocusedChild(target, 1);\n\n if (_next && _next.focus) _next.focus();\n }\n\n return;\n\n case 'Escape':\n case 'Tab':\n onToggle(false, event);\n break;\n\n default:\n }\n };\n\n return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(_DropdownContext__WEBPACK_IMPORTED_MODULE_9__[\"default\"].Provider, {\n value: context\n }, children({\n props: {\n onKeyDown: handleKeyDown\n }\n }));\n}", "function Dropdown(_ref) {\n var drop = _ref.drop,\n alignEnd = _ref.alignEnd,\n defaultShow = _ref.defaultShow,\n rawShow = _ref.show,\n rawOnToggle = _ref.onToggle,\n itemSelector = _ref.itemSelector,\n focusFirstItemOnShow = _ref.focusFirstItemOnShow,\n children = _ref.children;\n var forceUpdate = Object(_restart_hooks_useForceUpdate__WEBPACK_IMPORTED_MODULE_7__[\"default\"])();\n\n var _useUncontrolled = Object(uncontrollable__WEBPACK_IMPORTED_MODULE_4__[\"useUncontrolled\"])({\n defaultShow: defaultShow,\n show: rawShow,\n onToggle: rawOnToggle\n }, {\n show: 'onToggle'\n }),\n show = _useUncontrolled.show,\n onToggle = _useUncontrolled.onToggle;\n\n var _useCallbackRef = Object(_restart_hooks_useCallbackRef__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(),\n toggleElement = _useCallbackRef[0],\n setToggle = _useCallbackRef[1]; // We use normal refs instead of useCallbackRef in order to populate the\n // the value as quickly as possible, otherwise the effect to focus the element\n // may run before the state value is set\n\n\n var menuRef = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"])();\n var menuElement = menuRef.current;\n var setMenu = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"])(function (ref) {\n menuRef.current = ref; // ensure that a menu set triggers an update for consumers\n\n forceUpdate();\n }, [forceUpdate]);\n var lastShow = Object(_restart_hooks_usePrevious__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(show);\n var lastSourceEvent = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"])(null);\n var focusInDropdown = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"])(false);\n var toggle = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"])(function (event) {\n onToggle(!show, event);\n }, [onToggle, show]);\n var context = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useMemo\"])(function () {\n return {\n toggle: toggle,\n drop: drop,\n show: show,\n alignEnd: alignEnd,\n menuElement: menuElement,\n toggleElement: toggleElement,\n setMenu: setMenu,\n setToggle: setToggle\n };\n }, [toggle, drop, show, alignEnd, menuElement, toggleElement, setMenu, setToggle]);\n\n if (menuElement && lastShow && !show) {\n focusInDropdown.current = menuElement.contains(document.activeElement);\n }\n\n var focusToggle = Object(_restart_hooks_useEventCallback__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(function () {\n if (toggleElement && toggleElement.focus) {\n toggleElement.focus();\n }\n });\n var maybeFocusFirst = Object(_restart_hooks_useEventCallback__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(function () {\n var type = lastSourceEvent.current;\n var focusType = focusFirstItemOnShow;\n\n if (focusType == null) {\n focusType = menuRef.current && Object(dom_helpers_matches__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(menuRef.current, '[role=menu]') ? 'keyboard' : false;\n }\n\n if (focusType === false || focusType === 'keyboard' && !/^key.+$/.test(type)) {\n return;\n }\n\n var first = Object(dom_helpers_querySelectorAll__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(menuRef.current, itemSelector)[0];\n if (first && first.focus) first.focus();\n });\n Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"])(function () {\n if (show) maybeFocusFirst();else if (focusInDropdown.current) {\n focusInDropdown.current = false;\n focusToggle();\n } // only `show` should be changing\n }, [show, focusInDropdown, focusToggle, maybeFocusFirst]);\n Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"])(function () {\n lastSourceEvent.current = null;\n });\n\n var getNextFocusedChild = function getNextFocusedChild(current, offset) {\n if (!menuRef.current) return null;\n var items = Object(dom_helpers_querySelectorAll__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(menuRef.current, itemSelector);\n var index = items.indexOf(current) + offset;\n index = Math.max(0, Math.min(index, items.length));\n return items[index];\n };\n\n var handleKeyDown = function handleKeyDown(event) {\n var key = event.key,\n target = event.target; // Second only to https://github.com/twbs/bootstrap/blob/8cfbf6933b8a0146ac3fbc369f19e520bd1ebdac/js/src/dropdown.js#L400\n // in inscrutability\n\n var isInput = /input|textarea/i.test(target.tagName);\n\n if (isInput && (key === ' ' || key !== 'Escape' && menuRef.current && menuRef.current.contains(target))) {\n return;\n }\n\n lastSourceEvent.current = event.type;\n\n switch (key) {\n case 'ArrowUp':\n {\n var next = getNextFocusedChild(target, -1);\n if (next && next.focus) next.focus();\n event.preventDefault();\n return;\n }\n\n case 'ArrowDown':\n event.preventDefault();\n\n if (!show) {\n toggle(event);\n } else {\n var _next = getNextFocusedChild(target, 1);\n\n if (_next && _next.focus) _next.focus();\n }\n\n return;\n\n case 'Escape':\n case 'Tab':\n onToggle(false, event);\n break;\n\n default:\n }\n };\n\n return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(_DropdownContext__WEBPACK_IMPORTED_MODULE_9__[\"default\"].Provider, {\n value: context\n }, children({\n props: {\n onKeyDown: handleKeyDown\n }\n }));\n}", "onToggleDropdown() {\n if (this.containerDropdownElement.className.indexOf('show') === -1) {\n this.containerDropdownElement.className += ' show';\n } else {\n const className = this.containerDropdownElement.className.replace(' show', '');\n\n this.containerDropdownElement.className = className;\n }\n }", "render() {\n return (\n <div className=\"filter-list\">\n <ButtonToolbar className=\"buttons\">\n <DropdownButton title=\"Class\" id=\"dropdown-basic-button-1\" size=\"lg\" className=\"dropdown1\">\n <Dropdown.Item eventKey=\"All\" onSelect={this.onSelectFilterClass}>\n All\n </Dropdown.Item>\n <Dropdown.Item eventKey=\"Assassin\" onSelect={this.onSelectFilterClass}>\n Assassin\n </Dropdown.Item>\n <Dropdown.Item eventKey=\"Guardian\" onSelect={this.onSelectFilterClass}>\n Guardian\n </Dropdown.Item>\n <Dropdown.Item eventKey=\"Hunter\" onSelect={this.onSelectFilterClass}>\n Hunter\n </Dropdown.Item>\n <Dropdown.Item eventKey=\"Mage\" onSelect={this.onSelectFilterClass}>\n Mage\n </Dropdown.Item>\n <Dropdown.Item eventKey=\"Warrior\" onSelect={this.onSelectFilterClass}>\n Warrior\n </Dropdown.Item>\n </DropdownButton>\n <DropdownButton title=\"Type\" id=\"dropdown-basic-button-2\" size=\"lg\" className=\"dropdown2\">\n <Dropdown.Item eventKey=\"All\" onSelect={this.onSelectFilterType}>\n All\n </Dropdown.Item>\n <Dropdown.Item eventKey=\"Magical\" onSelect={this.onSelectFilterType}>\n Magical\n </Dropdown.Item>\n <Dropdown.Item eventKey=\"Physical\" onSelect={this.onSelectFilterType}>\n Physical\n </Dropdown.Item>\n </DropdownButton>\n <DropdownButton title=\"Sort\" id=\"dropdown-basic-button-3\" size=\"lg\" className=\"dropdown3\">\n <Dropdown.Item eventKey=\"none\" onSelect={this.sortByNone}>\n None\n </Dropdown.Item>\n <Dropdown.Item eventKey=\"Worshippers\" onSelect={this.sortByWorshippers}>\n Worshipers\n </Dropdown.Item>\n </DropdownButton>\n </ButtonToolbar>\n <div className=\"filter-names\">\n <div className=\"class-filter\">\n Class Selected: {this.state.class} \n </div>\n <div className=\"type-filter\">\n Type Selected: {this.state.type}\n </div>\n <div className=\"sort-filter\">\n Sorting Method: {this.state.sort}\n </div>\n </div>\n <Search items={this.props.items.filter(this.filterTypeAndClass)} />\n </div>\n );\n }", "onToggleDropdown() {\n\t\tif(this.containerDropdownElement.className.indexOf(\"show\") == -1) {\n\t\t\tthis.containerDropdownElement.className += \" show\";\n\t\t} else {\n\t\t\tthis.containerDropdownElement.className = this.containerDropdownElement.className.replace(\" show\", \"\");\n\t\t}\n\t}", "toggleDropdown() {\n this.setState(prevState => ({\n dropdownOpen: !prevState.dropdownOpen\n }));\n }", "toggleDropdown() {\n this.setState(prevState => ({\n dropdownOpen: !prevState.dropdownOpen\n }));\n }", "_buttonsDownHandler(event) {\n const that = this;\n\n if (that.disabled) {\n return;\n }\n\n if (that.hasRippleAnimation) {\n if (that.dropDownOpenMode === 'dropDownButton') {\n JQX.Utilities.Animation.Ripple.animate(event.target, event.pageX, event.pageY);\n }\n else if(event.target === that.$.dropDownButton || !that.editable) {\n const target = that.$.buttonsContainer;\n\n target.firstElementChild.noRipple = true;\n JQX.Utilities.Animation.Ripple.animate(target, event.pageX, event.pageY);\n target.firstElementChild.noRipple = false;\n }\n }\n\n that._preventsSelectStart = true;\n\n if (that.dropDownOpenMode === 'dropDownButton' && event.target === that.$.actionButton) {\n that.$.actionButton.setAttribute('active', '');\n }\n\n //Used to handle closing after blur event is thrown\n if (that.opened) {\n that._preventDropDownClose = true;\n }\n }", "function DropdownSelect({ children, className, selectedValues }) {\n const [expanded, toggleExpanded] = useToggle()\n\n return (\n <OutsideClickHandler onOutsideClick={() => toggleExpanded(false)}>\n <div className=\"dropdown-select\">\n <button\n type=\"button\"\n className=\"select-input\"\n onClick={() => toggleExpanded()}\n >\n <p>{getLabel(selectedValues)}</p>\n </button>\n <div\n className={classnames(className, 'options', {\n 'is-active': expanded,\n })}\n >\n <div className=\"scroll-box\">{children}</div>\n </div>\n </div>\n </OutsideClickHandler>\n )\n}", "function DropdownToggle(_ref2) {\n var children = _ref2.children;\n\n var _useDropdownToggle = useDropdownToggle(),\n props = _useDropdownToggle[0],\n _useDropdownToggle$ = _useDropdownToggle[1],\n show = _useDropdownToggle$.show,\n toggle = _useDropdownToggle$.toggle;\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null, children({\n show: show,\n toggle: toggle,\n props: props\n }));\n}", "function DropdownToggle(_ref2) {\n var children = _ref2.children;\n\n var _useDropdownToggle = useDropdownToggle(),\n props = _useDropdownToggle[0],\n _useDropdownToggle$ = _useDropdownToggle[1],\n show = _useDropdownToggle$.show,\n toggle = _useDropdownToggle$.toggle;\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null, children({\n show: show,\n toggle: toggle,\n props: props\n }));\n}", "function toggleDropdown(){\n\n dropdownItems.classList.toggle('dropdownShow');\n dropdownPijltje.classList.toggle('draaiPijl')\n}", "componentDidMount() {\n $('.dropdown-button').dropdown({\n inDuration: 300,\n outDuration: 225,\n constrainWidth: false, // Does not change width of dropdown to that of the activator\n hover: false, // Activate on hover\n gutter: 0, // Spacing from edge\n belowOrigin: false, // Displays dropdown below the button\n alignment: 'left', // Displays dropdown with edge aligned to the left of button\n stopPropagation: false // Stops event propagation\n }\n );\n }", "handleDropdownOpening() {\n window.addEventListener('click', (e) => {\n const el = e.target;\n const isNotDropdownOrChild = this.el && el !== this.el && !this.el.contains(el);\n const isNotDropdownBtn = this.btn && el !== this.btn && !this.btn.contains(el);\n\n if (isNotDropdownOrChild && isNotDropdownBtn && this.state.open) {\n this.setState({ open: false });\n }\n }, false);\n }", "function toggleDropdown() {\n if (document.querySelector(\".dropdown\") !== null) {\n let aDropdownButtonElements =\n document.querySelectorAll(\".dropdown__button\");\n /* let aDropdownListElements = document.querySelectorAll(\n \".dropdown-list-container\"\n ); */\n aDropdownButtonElements.forEach((eButton) => {\n eButton.addEventListener(\"click\", () => {\n //Reset all dialog boxes\n\n // aDropdownListElements.forEach((eList) => {\n // if (eButton.dataset.buttonid === eList.dataset.listid) {\n // eList.classList.toggle(\"dropdown-list-container--hidden\");\n // }\n // });\n\n //----------- REFACTORED VERSION ------------//\n document\n .querySelector(`[data-listid='${eButton.dataset.buttonid}']`)\n .classList.toggle(\"dropdown-list-container--hidden\");\n });\n });\n }\n}", "_buttonsDownHandler(event) {\n const that = this;\n\n if (that.disabled) {\n return;\n }\n\n if (that.hasRippleAnimation) {\n if (!that.$.buttonsContainer || that.dropDownOpenMode === 'dropDownButton') {\n JQX.Utilities.Animation.Ripple.animate(event.target, event.pageX, event.pageY);\n }\n else {\n const target = that.$.buttonsContainer;\n\n target.firstElementChild.noRipple = true;\n JQX.Utilities.Animation.Ripple.animate(target, event.pageX, event.pageY);\n target.firstElementChild.noRipple = false;\n }\n }\n\n that._preventsSelectStart = true;\n\n if (that.dropDownOpenMode === 'dropDownButton' && event.target === that.$.actionButton) {\n that.$.actionButton.setAttribute('active', '');\n }\n\n //Used to handle closing after blur event is thrown\n if (that.opened) {\n that._preventDropDownClose = true;\n }\n }", "function StateDropDown({ title, items = [], multiSelect = false }) {\n const [open, setOpen] = useState(false);\n const [selection, setSelection] = useState([]);\n const toggle = () => setOpen(!open);\n StateDropDown.handleClickOutside = () => setOpen(false);\n\n function handleOnClick(item) {\n if(!selection.some(current => current.value === item.value)) {\n if (!multiSelect) {\n setSelection([item]);\n } else if (multiSelect) {\n setSelection([...selection, item]);\n }\n } else {\n let selectionAferRemoval = selection;\n selectionAferRemoval = selectionAferRemoval.filter(\n current => current.value !== item.value\n );\n setSelection([...selectionAferRemoval])\n }\n }\n\n function isItemInSelection (item) {\n if (selection.some(current => current.value === item.value)) {\n return true;\n }\n return false;\n }\n\n return (\n <div tabIndex={0} \n role=\"button\" \n onKeyPress={() => toggle(!open)} \n onClick={() => toggle(!open)}\n >\n <div>\n <p className=\"btn btn-secondary dropdown-toggle\">{open ? 'Close' : 'Filter by location'}</p>\n </div>\n {open && (\n <ul className=\"scroll list-group\" >\n {items.map(item => (\n <li key = {item.value} className=\"list-group-item\">\n <button type=\"button\" className=\"btn-sm listItems\" onClick={() => handleOnClick(item)}>\n <span>{item.value}</span>\n <span>{isItemInSelection(item) && ' Selected'}</span>\n </button>\n </li>\n ))}\n </ul>\n )}\n </div>\n\n );\n}", "function myButton() {\r\n document.getElementById(\"mydropdown\").classList.toggle(\"show\");\r\n}", "function DropdownToggle(_ref2) {\n var children = _ref2.children;\n\n var _useDropdownToggle = useDropdownToggle(),\n props = _useDropdownToggle[0],\n meta = _useDropdownToggle[1];\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, children(props, meta));\n}", "function DropdownToggle(_ref2) {\n var children = _ref2.children;\n\n var _useDropdownToggle = useDropdownToggle(),\n props = _useDropdownToggle[0],\n meta = _useDropdownToggle[1];\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, children(props, meta));\n}", "render() {\n return (\n <UncontrolledDropdown>\n <DropdownToggle className='menu-icon icon-more'>\n </DropdownToggle>\n <DropdownMenu right >\n {/* Will delete the parent Workflow from the Workflows List */}\n <DropdownItem key={1} onClick={this.deleteOption}> \n Delete \n </DropdownItem>\n </DropdownMenu>\n </UncontrolledDropdown>\n );\n }", "function mybutton() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n }", "onToggleLanguagesDropdown() {\n $('#select-languages').on('click', function () {\n $(this).siblings('#dropdown-languages').toggleClass('show')\n });\n }", "dropDownJSX(props){\n const md5 = \"\"; // Unique per game\n let compositions = localStorage.getItem(\"compositions\" + md5) ? JSON.parse(localStorage.getItem(\"compositions\" + md5)) : {};\n if (typeof (compositions) === \"string\") {\n compositions = {};\n }\n\n\n\n const dropDownItems = <DropdownItem\n onClick={() => {\n }}\n >\n </DropdownItem>;\n return <ButtonDropdown\n isOpen={props.isDown}\n toggle={() => props.toggleDropDown('loadCompositionDropDown')}\n >\n {\" \"}\n <DropdownToggle caret>App</DropdownToggle>\n <DropdownMenu>\n {dropDownItems}\n </DropdownMenu>\n </ButtonDropdown>\n }", "function dropBox() {\n\tconst drop_btn = document.querySelector(\".drop-btn\");\n\tconst menu_wrapper = document.querySelector(\".combo-box\");\n\tconst icon = document.querySelector(\"#settings-icon\");\n\n\tdrop_btn.onclick = () => {\n\t\tmenu_wrapper.classList.toggle(\"show\");\n\t\ticon.classList.toggle(\"show\");\n\t};\n}", "function McDropdownPanel() { }", "function DropDown(props){\n return(\n <div className=\"dropdown\">\n <button className=\"btn btn-lg btn-secondary dropdown-toggle\" type=\"button\" id=\"dropdownMenuButton\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\n Pick a Team\n </button>\n <div className=\"dropdown-menu columns\" aria-labelledby=\"dropdownMenuButton\">\n {\n props.output && props.output.map( team =>\n <DropDownItem\n team_name={team.team_name}\n color_1={team.color_1}\n color_2={team.color_2}\n text_color={team.text_color}\n team_id={team.team_id}\n createCard={props.createCard}\n />)\n }\n </div>\n </div>\n\n)}", "function setupButtons() {\n\t\n\td3.select(\"#bubbles-toolbar\")\n\t.selectAll(\"a\")\n\t.on(\"click\", function() {\n\n\t\td3.selectAll(\".dropdown-item\")\n\t\t.classed(\"active\", false);\n\n\t\tvar button = d3.select(this);\n\n\t\tbutton.classed(\"active\", true);\n\n\t\tvar buttonId = button.attr(\"id\");\n\n\t\tmyBubbleChart.toggleDisplay(buttonId);\n\n\t});\n}", "showDropdown(event) {\n event.stopPropagation();\n this.setState({dropdownOpen: true});\n }", "onToggle(d) {\n const { onChangeToggle, identifier } = this.props;\n if (onChangeToggle) {\n onChangeToggle(d[identifier]);\n }\n }", "onClickAddTrack () {\n this.setState({editDropdown: true})\n }", "filterForm() {\n return <div className={'filter-form'}>\n <Toggle inputLabel={'Show me:'}\n leftLabel={'Changing sets'}\n leftValue={this.filterOptions.move}\n rightLabel={'All sets'}\n rightValue={this.filterOptions.all}\n value={this.filterOptions.all}\n onChange={this.showSets.bind(this)}\n />\n </div>;\n }", "function Dropdown(){\n\n // useState that handles the state of the dropdown\n const [click, setClick] = useState(false);\n\n // toggles the click value\n const handleClick = ()=> setClick(!click) \n\nreturn( \n<>\n\n<ul \nonClick = {handleClick}\n// If click is true the classdropdwon to be added and if not the class will be dropdown menu\nclassName = {click ? 'dropdown-menu clicked' : 'dropdown-menu'}\n>\n\n{/* \nFor eachloop that maps through the MenuItems array\nitem is a variable name, index is for the key\n*/}\n{MenuItems.map((item, index) => {\n return (\n /**\n * Set key to index\n * Links to the classname or cName from MenuItems array\n * Targeting the cName in that file\n * Path is targeted by the path in the array\n * Whenever it is clicked the value is set to false\n * Then shows title from the array\n */\n <li key = {index}>\n <Link\n className = {item.cName} \n to = {item.path} \n onClick = {() => setClick(false)}\n >\n {item.title}\n </Link>\n </li>\n );\n})}\n\n</ul>\n</>\n);\n}", "function CuiDropdown(params) {\n cuiInitNode(this);\n\n var toggle;\n var popup;\n var self = this;\n\n this.onConstruct = function() {\n toggle = new CuiToggle({\n cssClass: \"cui_dropdown\",\n onChange: function(value) {\n if (params.uniformWidth && self.isLive()) {\n popup.get$().css('width', toggle.get$().width() + \"px\");\n }\n popup.toggle(value);\n },\n content: params.buttonContent,\n });\n popup = new CuiPopup({\n cssClass: \"cui_dropdown\",\n content: params.popupContent,\n });\n return [\n \"<div class='cui_dropdown \" + params.cssClass + \"'>\",\n toggle,\n popup,\n \"</div>\",\n ];\n }\n\n this.onRefresh = function($me, dirty, live) {\n cuiRefresh([toggle, popup], live);\n }\n}", "function Dropdown(parent_id, item = {}) {\n item.type = \"select\";\n item.id = item.id || \"{0}_{1}\".format(item.type, __SELECT++);\n item.label = item.label || item.id;\n item.needQuestion = (item.needQuestion == false) ? false : true;\n Tag.call(this, parent_id, item);\n\n this.options = item.options || [\"option1\", \"option2\", \"option3\"];\n this.option_ids = [];\n this.option_values = [];\n for (var i in this.options) {\n this.option_ids.push(\"option_{0}\".format(__OPTION++));\n this.option_values.push(this.options[i]);\n }\n\n this.value = item.value || \"\";\n this.label_id = \"label_{0}\".format(this.id);\n this.button_id = \"button_{0}\".format(this.id);\n this.dropRight = item.dropRight || false;\n this.choose_prompt = item.choose_prompt || \"Choose\";\n this._style = \"mdl-menu mdl-js-menu mdl-js-ripple-effect\" + ((this.dropRight) ? \"mdl-menu--bottom-right\" : \"mdl-menu--bottom-left\");\n\n this.html = '<div class=\"mdl-textfield mdl-js-textfield\">\\\n <input id=\"{4}\" form=\"{8}\" class=\"mdl-textfield__input\" readonly {5} {6} value=\"{7}\"><button id=\"{0}\" form=\"{8}\" style=\"right: 0;\"\\\n class=\"mdl-button mdl-js-button mdl-button--icon\">\\\n <i class=\"material-icons\">expand_more</i></button>\\\n <ul id=\"{1}\" class=\"{2}\" for=\"{0}\" form=\"{8}\">{3}</ui></div>'.format(\n this.button_id, this.id, this._style, this._option_factory(),\n this.label_id, this.required, this.disabled, this.value, this.parent_id\n );\n\n this.render();\n var option_values = this.option_values;\n var label_id = this.label_id;\n for (let i in this.option_ids) {\n document.getElementById(this.option_ids[i]).onclick = function() {\n document.getElementById(label_id).value = option_values[i];\n };\n /*$(\"#\"+this.option_ids[i]).click(function() {\n $(\"#\"+label_id).val(option_values[i]);\n })*/\n }\n}", "function dropdownToggle() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n}", "static get properties() {\n return {\n 'buttonsDataSource': {\n value: [],\n type: 'array'\n },\n 'dropDownOpenMode': {\n allowedValues: ['none', 'dropDownButton', 'auto'],\n value: 'dropDownButton',\n type: 'string'\n }\n };\n }", "function Dropdown(){\n\n /**\n * State for whether it has been clicked or not\n */\n const [click, setClick] = useState(false);\n\n /**\n * This function toggles between clicked and not clicked\n */\n const handleClick = () => setClick(!click);\n\n return(\n <>\n <ul onClick={handleClick} className={click ? 'dropdown-menu clicked' : 'dropdown-menu'} >\n {MenuItems.map((item, index) => {\n return (\n <li key={index}>\n <Link className={item.cName} to={item.path} onClick={() => setClick(false)}>\n {item.title}\n </Link>\n </li>\n )\n })}\n </ul>\n\n </>\n );\n}", "function toggleDropdownButton() {\n if ($(this).is('.active')) {\n $(this).removeClass('active');\n } else {\n $(this).addClass('active');\n }\n}", "function ParentDropdown() {\n return (\n <div className=\"ui simple selection dropdown\">\n <input type=\"hidden\" name=\"student\" />\n <i className=\"dropdown icon\"></i>\n <div className=\"left icon default text\">Select Child</div>\n <i className=\"child icon\"></i>\n <div className=\"menu\">\n <DropdownItem />\n </div>\n </div>\n )\n}", "function dropdown() {\n glumacNameContainer.classList.toggle(\"show\");\n\n if (arrow.classList.contains('fa-arrow-down')) {\n arrow.classList.remove('fa-arrow-down');\n arrow.classList.add('fa-arrow-up');\n } else {\n arrow.classList.add('fa-arrow-down');\n }\n}", "get styleSelectBtn() { return Object.assign({}, this.style.comboBox.button); }", "constructor(props) {\n super(props);\n this.key = generateRandomKey()\n this.toggleDropdownHandler = this.toggleDropdownHandler.bind(this);\n }", "render() {\n return (\t\n <Dropdown className={css(style.dropDownStyle)} isOpen={this.state.dropdownOpen} toggle={this.toggle} size=\"lg\">\n <DropdownToggle caret className={css(style.fontSizeStyle, style.colorThemeStyle)}>\n Welcome, <strong className={css(style.fontSizeStyle, style.colorThemeStyle)}>{this.state.names+ \" \"}</strong>\n </DropdownToggle>\n <DropdownMenu right className={css(style.fontSizeStyle, style.colorThemeStyle)}>\n <DropdownItem header className={css(style.fontSizeStyle)}>Profile</DropdownItem>\n <DropdownItem divider /> \n <DropdownItem tag={Link} to={\"/profile/\" + this.props.user.username} className={css(style.fontSizeStyle, style.colorThemeStyle)}>My Profile</DropdownItem>\n <DropdownItem tag={Link} to={\"/projects\"} className={css(style.fontSizeStyle, style.colorThemeStyle)}>My Projects</DropdownItem>\n <DropdownItem divider /> \n <DropdownItem className={css(style.fontSizeStyle, style.colorThemeStyle)}>Settings</DropdownItem>\n <DropdownItem divider />\n <DropdownItem onClick={this.props.logout}>Log out</DropdownItem>\n </DropdownMenu>\n </Dropdown> \n );\n }", "constructor(props) {\n\t\tsuper(props);\n\t\n\t\tthis.toggle = this.toggle.bind(this);\n\t\tthis.state = {\n\t\t dropdownOpen: false,\n\t\t locationState: \"Select\",\n\t\t submitted: false\n\t\t};\n\t }", "renderMainChannelSelect($$) {\n var channels = [],\n mainChannel = null,\n dropdownButton = null\n\n this.state.channels.forEach((channel) => {\n if (channel.main === true) {\n mainChannel = channel\n }\n\n if (typeof channel.scope !== 'undefined' && channel.scope === 'shared') {\n return\n }\n\n channels.push(\n $$('button').addClass('dropdown-item').append([\n $$('img').attr({\n src: channel.icon\n }),\n channel.name\n ]).on('focus', () => {\n this.toggleChannel(channel, true)\n })\n )\n })\n\n if (!mainChannel) {\n dropdownButton = $$('button').addClass('btn btn-secondary dropdown-toggle').attr({\n id: 'w-sharedchannels-main-select',\n type: 'button',\n 'data-toggle': 'dropdown'\n }).append(\n this.getLabel('publicationchannel-Choose_main_channel')\n )\n }\n else {\n dropdownButton = $$('button').addClass('btn btn-secondary dropdown-toggle').attr({\n id: 'w-sharedchannels-main-select',\n type: 'button',\n 'data-toggle': 'dropdown'\n }).append([\n $$('img').attr({\n src: mainChannel.icon\n }),\n mainChannel.name\n ])\n }\n\n dropdownButton.on('click', () => {\n this.toggleMenu();\n return false\n })\n\n dropdownButton.ref('dropdownButton')\n\n let components = [dropdownButton];\n if (this.state.showChannelButtons) {\n components.push($$('div').addClass('dropdown-menu').append(\n channels\n ))\n }\n\n\n return $$('div').attr({id: 'w-sharedchannels-main'}).addClass('dropdown').attr({\n 'aria-labelledby': 'w-sharedchannels-main-select'\n }).append(components)\n }", "_dropDownButtonHandler(target, event, dropDown) {\n const that = this,\n eventType = event.type;\n\n if (dropDown) {\n if (target.classList.contains('jqx-tab-label-container')) {\n switch (eventType) {\n case 'down':\n that._downTarget = target;\n break;\n case 'mouseout':\n target.removeAttribute('hover');\n break;\n case 'mouseover':\n target.setAttribute('hover', '');\n break;\n case 'up':\n if (target === that._downTarget) {\n that.select(Array.from(that.$.dropDownButtonDropDown.children).indexOf(target));\n that._closeDropDownButtonDropDown();\n }\n break;\n }\n }\n return;\n }\n\n if (eventType === 'down') {\n that._downTarget = that.$.dropDownButton;\n }\n else if (eventType === 'up' && that._downTarget === that.$.dropDownButton) {\n if (!that._dropDownButtonDropDownOpened) {\n const tabPosition = that.tabPosition;\n let left, top;\n\n switch (tabPosition) {\n case 'top':\n left = that.$.dropDownButton.offsetLeft;\n top = that.$.tabsHeaderSection.offsetTop + that.$.dropDownButton.offsetHeight;\n break;\n case 'bottom':\n left = that.$.dropDownButton.offsetLeft;\n top = that.$.tabsHeaderSection.offsetTop;\n break;\n case 'left':\n left = that.$.dropDownButton.offsetWidth;\n top = that.$.dropDownButton.offsetTop;\n break;\n case 'right':\n left = that.$.tabsHeaderSection.offsetLeft;\n top = that.$.dropDownButton.offsetTop;\n break;\n }\n\n that.$.dropDownButtonDropDown.style.left = left + 'px';\n that.$.dropDownButtonDropDown.style.top = top + 'px';\n that.$dropDownButtonDropDown.removeClass('jqx-hidden');\n that._dropDownButtonDropDownOpened = true;\n }\n else {\n that._closeDropDownButtonDropDown();\n }\n }\n }", "enableDropdown() {\n\t\tthis.setState({\n\t\t\tdropdownActive: true\n\t\t});\n\t}", "dropdownToggle(newValue){\n\t if (this._forceOpen){\n\t this.setState({ menuOpen: true });\n\t this._forceOpen = false;\n\t } else {\n\t this.setState({ menuOpen: newValue });\n\t }\n\t}", "dropdownToggle(newValue){\n\t if (this._forceOpen){\n\t this.setState({ menuOpen: true });\n\t this._forceOpen = false;\n\t } else {\n\t this.setState({ menuOpen: newValue });\n\t }\n\t}", "function toggleDropdown() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n}", "function hbToggleDropdown(element, dropdownElement)\n{\n\tvar parent = element.parentNode;\n\tif (parent.className == 'on') {\n\t\tif (window.opera || navigator.vendor == 'iCab') {\n\t\t\t$(dropdownElement).style.display = 'none';\n\t\t\tparent.className = '';\n\t\t\telement.getElementsByTagName('img')[0].src = '/images/hbImages/hbToggleIconOpen.png';\n\t\t} else {\n\t\t\tnew Effect.BlindUp(\n\t\t\t\tdropdownElement, \n\t\t\t\t{\n\t\t\t\t\tduration:0.2,\n\t\t\t\t\tafterFinish:function ()\n\t\t\t\t\t{\n\t\t\t\t\t\tparent.className = '';\n\t\t\t\t\t\telement.getElementsByTagName('img')[0].src = '/images/hbImages/hbToggleIconOpen.png';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t\t/*t.title = o;*/\n\t} else {\n\t\tif (window.opera || navigator.vendor == 'iCab') {\n\t\t\t$(dropdownElement).style.display = 'block';\n\t\t\tparent.className = 'on';\n\t\t\telement.getElementsByTagName('img')[0].src = '/images/hbImages/hbToggleIconClose.png';\n\t\t} else {\n\t\t\tnew Effect.BlindDown(\n\t\t\t\tdropdownElement, \n\t\t\t\t{\n\t\t\t\t\tduration:0.2,\n\t\t\t\t\tbeforeStart:function ()\n\t\t\t\t\t{\n\t\t\t\t\t\tparent.className = 'on';\n\t\t\t\t\t\telement.getElementsByTagName('img')[0].src = '/images/hbImages/hbToggleIconClose.png';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t\t/*t.title = c;*/\n\t}\n}", "toggleUserDropdownMenu() {\n\t\tthis.setState({ userDropdownMenu: !this.state.userDropdownMenu });\n\t}", "function toggleDropdown(dropdown) {\n document.getElementById(dropdown).classList.toggle(\"show\");\n}", "function Select(props, ref) {\n var _classNames2;\n\n var _props$prefixCls = props.prefixCls,\n prefixCls = _props$prefixCls === void 0 ? defaultPrefixCls : _props$prefixCls,\n className = props.className,\n id = props.id,\n open = props.open,\n defaultOpen = props.defaultOpen,\n options = props.options,\n children = props.children,\n mode = props.mode,\n value = props.value,\n defaultValue = props.defaultValue,\n labelInValue = props.labelInValue,\n showSearch = props.showSearch,\n inputValue = props.inputValue,\n searchValue = props.searchValue,\n filterOption = props.filterOption,\n _props$optionFilterPr = props.optionFilterProp,\n optionFilterProp = _props$optionFilterPr === void 0 ? 'value' : _props$optionFilterPr,\n _props$autoClearSearc = props.autoClearSearchValue,\n autoClearSearchValue = _props$autoClearSearc === void 0 ? true : _props$autoClearSearc,\n onSearch = props.onSearch,\n allowClear = props.allowClear,\n clearIcon = props.clearIcon,\n showArrow = props.showArrow,\n inputIcon = props.inputIcon,\n menuItemSelectedIcon = props.menuItemSelectedIcon,\n disabled = props.disabled,\n loading = props.loading,\n defaultActiveFirstOption = props.defaultActiveFirstOption,\n _props$notFoundConten = props.notFoundContent,\n notFoundContent = _props$notFoundConten === void 0 ? 'Not Found' : _props$notFoundConten,\n optionLabelProp = props.optionLabelProp,\n backfill = props.backfill,\n getInputElement = props.getInputElement,\n getPopupContainer = props.getPopupContainer,\n _props$listHeight = props.listHeight,\n listHeight = _props$listHeight === void 0 ? 200 : _props$listHeight,\n _props$listItemHeight = props.listItemHeight,\n listItemHeight = _props$listItemHeight === void 0 ? 20 : _props$listItemHeight,\n animation = props.animation,\n transitionName = props.transitionName,\n dropdownStyle = props.dropdownStyle,\n dropdownClassName = props.dropdownClassName,\n dropdownMatchSelectWidth = props.dropdownMatchSelectWidth,\n dropdownRender = props.dropdownRender,\n dropdownAlign = props.dropdownAlign,\n _props$showAction = props.showAction,\n showAction = _props$showAction === void 0 ? [] : _props$showAction,\n tokenSeparators = props.tokenSeparators,\n onPopupScroll = props.onPopupScroll,\n onDropdownVisibleChange = props.onDropdownVisibleChange,\n onFocus = props.onFocus,\n onBlur = props.onBlur,\n onKeyUp = props.onKeyUp,\n onKeyDown = props.onKeyDown,\n onMouseDown = props.onMouseDown,\n onChange = props.onChange,\n onSelect = props.onSelect,\n onDeselect = props.onDeselect,\n _props$internalProps = props.internalProps,\n internalProps = _props$internalProps === void 0 ? {} : _props$internalProps,\n restProps = _objectWithoutProperties(props, [\"prefixCls\", \"className\", \"id\", \"open\", \"defaultOpen\", \"options\", \"children\", \"mode\", \"value\", \"defaultValue\", \"labelInValue\", \"showSearch\", \"inputValue\", \"searchValue\", \"filterOption\", \"optionFilterProp\", \"autoClearSearchValue\", \"onSearch\", \"allowClear\", \"clearIcon\", \"showArrow\", \"inputIcon\", \"menuItemSelectedIcon\", \"disabled\", \"loading\", \"defaultActiveFirstOption\", \"notFoundContent\", \"optionLabelProp\", \"backfill\", \"getInputElement\", \"getPopupContainer\", \"listHeight\", \"listItemHeight\", \"animation\", \"transitionName\", \"dropdownStyle\", \"dropdownClassName\", \"dropdownMatchSelectWidth\", \"dropdownRender\", \"dropdownAlign\", \"showAction\", \"tokenSeparators\", \"onPopupScroll\", \"onDropdownVisibleChange\", \"onFocus\", \"onBlur\", \"onKeyUp\", \"onKeyDown\", \"onMouseDown\", \"onChange\", \"onSelect\", \"onDeselect\", \"internalProps\"]);\n\n var domProps = omitDOMProps ? omitDOMProps(restProps) : restProps;\n DEFAULT_OMIT_PROPS.forEach(function (prop) {\n delete domProps[prop];\n });\n var selectorRef = React.useRef(null);\n var listRef = React.useRef(null);\n /** Used for component focused management */\n\n var _useDelayReset = (0, _useDelayReset3.default)(),\n _useDelayReset2 = _slicedToArray(_useDelayReset, 3),\n mockFocused = _useDelayReset2[0],\n setMockFocused = _useDelayReset2[1],\n cancelSetMockFocused = _useDelayReset2[2]; // Inner id for accessibility usage. Only work in client side\n\n\n var _React$useState = React.useState(),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n innerId = _React$useState2[0],\n setInnerId = _React$useState2[1];\n\n React.useEffect(function () {\n setInnerId(\"rc_select_\".concat((0, _commonUtil.getUUID)()));\n }, []);\n var mergedId = id || innerId; // optionLabelProp\n\n var mergedOptionLabelProp = optionLabelProp;\n\n if (mergedOptionLabelProp === undefined) {\n mergedOptionLabelProp = options ? 'label' : 'children';\n } // labelInValue\n\n\n var mergedLabelInValue = mode === 'combobox' ? false : labelInValue;\n var isMultiple = mode === 'tags' || mode === 'multiple';\n var mergedShowSearch = showSearch !== undefined ? showSearch : isMultiple || mode === 'combobox'; // ============================== Ref ===============================\n\n React.useImperativeHandle(ref, function () {\n return {\n focus: selectorRef.current.focus,\n blur: selectorRef.current.blur\n };\n }); // ============================= Value ==============================\n\n var _React$useState3 = React.useState(value || defaultValue),\n _React$useState4 = _slicedToArray(_React$useState3, 2),\n innerValue = _React$useState4[0],\n setInnerValue = _React$useState4[1];\n\n var baseValue = value !== undefined && value !== null ? value : innerValue;\n /** Unique raw values */\n\n var mergedRawValue = React.useMemo(function () {\n return (0, _commonUtil.toInnerValue)(baseValue, {\n labelInValue: mergedLabelInValue,\n combobox: mode === 'combobox'\n });\n }, [baseValue, mergedLabelInValue]);\n /** We cache a set of raw values to speed up check */\n\n var rawValues = React.useMemo(function () {\n return new Set(mergedRawValue);\n }, [mergedRawValue]); // ============================= Option =============================\n // Set by option list active, it will merge into search input when mode is `combobox`\n\n var _React$useState5 = React.useState(null),\n _React$useState6 = _slicedToArray(_React$useState5, 2),\n activeValue = _React$useState6[0],\n setActiveValue = _React$useState6[1];\n\n var _React$useState7 = React.useState(''),\n _React$useState8 = _slicedToArray(_React$useState7, 2),\n innerSearchValue = _React$useState8[0],\n setInnerSearchValue = _React$useState8[1];\n\n var mergedSearchValue = innerSearchValue;\n\n if (searchValue !== undefined) {\n mergedSearchValue = searchValue;\n } else if (inputValue) {\n mergedSearchValue = inputValue;\n }\n\n var mergedOptions = React.useMemo(function () {\n var newOptions = options;\n\n if (newOptions === undefined) {\n newOptions = convertChildrenToData(children);\n }\n /**\n * `tags` should fill un-list item.\n * This is not cool here since TreeSelect do not need this\n */\n\n\n if (mode === 'tags' && fillOptionsWithMissingValue) {\n newOptions = fillOptionsWithMissingValue(newOptions, baseValue, mergedOptionLabelProp, labelInValue);\n }\n\n return newOptions;\n }, [options, children, mode, baseValue]);\n var mergedFlattenOptions = React.useMemo(function () {\n return flattenOptions(mergedOptions, props);\n }, [mergedOptions]); // Display options for OptionList\n\n var displayOptions = React.useMemo(function () {\n if (!mergedSearchValue) {\n return _toConsumableArray(mergedOptions);\n }\n\n var filteredOptions = filterOptions(mergedSearchValue, mergedOptions, {\n optionFilterProp: optionFilterProp,\n filterOption: mode === 'combobox' && filterOption === undefined ? function () {\n return true;\n } : filterOption\n });\n\n if (mode === 'tags' && filteredOptions.every(function (opt) {\n return opt.value !== mergedSearchValue;\n })) {\n filteredOptions.unshift({\n value: mergedSearchValue,\n label: mergedSearchValue,\n key: '__RC_SELECT_TAG_PLACEHOLDER__'\n });\n }\n\n return filteredOptions;\n }, [mergedOptions, mergedSearchValue, mode]);\n var displayFlattenOptions = React.useMemo(function () {\n return flattenOptions(displayOptions, props);\n }, [displayOptions]); // ============================ Selector ============================\n\n var displayValues = React.useMemo(function () {\n return mergedRawValue.map(function (val) {\n var displayValue = getLabeledValue(val, {\n options: mergedFlattenOptions,\n prevValue: baseValue,\n labelInValue: mergedLabelInValue,\n optionLabelProp: mergedOptionLabelProp\n });\n return _objectSpread({}, displayValue, {\n disabled: isValueDisabled(val, mergedFlattenOptions)\n });\n });\n }, [baseValue, mergedOptions]);\n\n var triggerSelect = function triggerSelect(newValue, isSelect) {\n var selectValue = mergedLabelInValue ? getLabeledValue(newValue, {\n options: mergedFlattenOptions,\n prevValue: baseValue,\n labelInValue: mergedLabelInValue,\n optionLabelProp: mergedOptionLabelProp\n }) : newValue;\n var outOption = findValueOption([newValue], mergedFlattenOptions)[0];\n\n if (isSelect && onSelect) {\n onSelect(selectValue, outOption);\n } else if (!isSelect && onDeselect) {\n onDeselect(selectValue, outOption);\n }\n };\n\n var triggerChange = function triggerChange(newRawValues) {\n var outValues = (0, _commonUtil.toOuterValues)(Array.from(newRawValues), {\n labelInValue: mergedLabelInValue,\n options: mergedFlattenOptions,\n getLabeledValue: getLabeledValue,\n prevValue: baseValue,\n optionLabelProp: mergedOptionLabelProp\n });\n var outValue = isMultiple ? outValues : outValues[0]; // Skip trigger if prev & current value is both empty\n\n if (onChange && (mergedRawValue.length !== 0 || outValues.length !== 0)) {\n var outOptions = findValueOption(newRawValues, mergedFlattenOptions);\n onChange(outValue, isMultiple ? outOptions : outOptions[0]);\n }\n\n setInnerValue(outValue);\n };\n\n var onInternalSelect = function onInternalSelect(newValue, _ref) {\n var selected = _ref.selected;\n\n if (disabled) {\n return;\n }\n\n var newRawValue;\n\n if (isMultiple) {\n newRawValue = new Set(mergedRawValue);\n\n if (selected) {\n newRawValue.add(newValue);\n } else {\n newRawValue.delete(newValue);\n }\n } else {\n newRawValue = new Set();\n newRawValue.add(newValue);\n } // Multiple always trigger change and single should change if value changed\n\n\n if (isMultiple || !isMultiple && Array.from(mergedRawValue)[0] !== newValue) {\n triggerChange(Array.from(newRawValue));\n } // Trigger `onSelect`. Single mode always trigger select\n\n\n triggerSelect(newValue, !isMultiple || selected); // Clean search value if single or configured\n\n if (mode === 'combobox') {\n setInnerSearchValue(String(newValue));\n setActiveValue('');\n } else if (!isMultiple || autoClearSearchValue) {\n setInnerSearchValue('');\n setActiveValue('');\n }\n }; // ============================= Input ==============================\n // Only works in `combobox`\n\n\n var customizeInputElement = mode === 'combobox' && getInputElement && getInputElement() || null; // ============================== Open ==============================\n\n var _React$useState9 = React.useState(defaultOpen),\n _React$useState10 = _slicedToArray(_React$useState9, 2),\n innerOpen = _React$useState10[0],\n setInnerOpen = _React$useState10[1];\n\n var mergedOpen = open !== undefined ? open : innerOpen; // Not trigger `open` in `combobox` when `notFoundContent` is empty\n\n if (mergedOpen && mode === 'combobox' && !notFoundContent && !displayOptions.length) {\n mergedOpen = false;\n }\n\n var onToggleOpen = function onToggleOpen(newOpen) {\n var nextOpen = newOpen !== undefined ? newOpen : !mergedOpen;\n\n if (mergedOpen !== nextOpen && !disabled) {\n setInnerOpen(nextOpen);\n\n if (onDropdownVisibleChange) {\n onDropdownVisibleChange(nextOpen);\n }\n }\n }; // ============================= Search =============================\n\n\n var triggerSearch = function triggerSearch(searchText) {\n var fromTyping = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var ret = true;\n var newSearchText = searchText;\n setActiveValue(null); // Check if match the `tokenSeparators`\n\n var patchLabels = (0, _valueUtil.getSeparatedContent)(searchText, tokenSeparators);\n var patchRawValues = patchLabels;\n\n if (mode === 'combobox') {\n // Only typing will trigger onChange\n if (fromTyping) {\n triggerChange([newSearchText]);\n }\n } else if (patchLabels) {\n newSearchText = '';\n\n if (mode !== 'tags') {\n patchRawValues = patchLabels.map(function (label) {\n var item = mergedFlattenOptions.find(function (_ref2) {\n var data = _ref2.data;\n return data[mergedOptionLabelProp] === label;\n });\n return item ? item.data.value : null;\n }).filter(function (val) {\n return val !== null;\n });\n }\n\n var newRawValues = Array.from(new Set([].concat(_toConsumableArray(mergedRawValue), _toConsumableArray(patchRawValues))));\n triggerChange(newRawValues);\n newRawValues.forEach(function (newRawValue) {\n triggerSelect(newRawValue, true);\n }); // Should close when paste finish\n\n onToggleOpen(false); // Tell Selector that break next actions\n\n ret = false;\n }\n\n setInnerSearchValue(newSearchText);\n\n if (onSearch && mergedSearchValue !== newSearchText) {\n onSearch(newSearchText);\n }\n\n return ret;\n }; // Close will clean up single mode search text\n\n\n React.useEffect(function () {\n if (!mergedOpen && !isMultiple && mode !== 'combobox') {\n triggerSearch('', false);\n }\n }, [mergedOpen]); // ============================ Keyboard ============================\n\n /**\n * We record input value here to check if can press to clean up by backspace\n * - null: Key is not down, this is reset by key up\n * - true: Search text is empty when first time backspace down\n * - false: Search text is not empty when first time backspace down\n */\n\n var _useLock = (0, _useLock3.default)(),\n _useLock2 = _slicedToArray(_useLock, 2),\n getClearLock = _useLock2[0],\n setClearLock = _useLock2[1];\n\n var clearLock = getClearLock(); // KeyDown\n\n var onInternalKeyDown = function onInternalKeyDown(event) {\n var which = event.which; // We only manage open state here, close logic should handle by list component\n\n if (!mergedOpen && which === _KeyCode.default.ENTER) {\n onToggleOpen(true);\n }\n\n setClearLock(!!mergedSearchValue); // Remove value by `backspace`\n\n if (which === _KeyCode.default.BACKSPACE && !clearLock && isMultiple && !mergedSearchValue && mergedRawValue.length) {\n var removeInfo = (0, _commonUtil.removeLastEnabledValue)(displayValues, mergedRawValue);\n\n if (removeInfo.removedValue !== null) {\n triggerChange(removeInfo.values);\n triggerSelect(removeInfo.removedValue, false);\n }\n }\n\n for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n rest[_key - 1] = arguments[_key];\n }\n\n if (mergedOpen && listRef.current) {\n var _listRef$current;\n\n (_listRef$current = listRef.current).onKeyDown.apply(_listRef$current, [event].concat(rest));\n }\n\n if (onKeyDown) {\n onKeyDown.apply(void 0, [event].concat(rest));\n }\n }; // KeyUp\n\n\n var onInternalKeyUp = function onInternalKeyUp(event) {\n for (var _len2 = arguments.length, rest = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n rest[_key2 - 1] = arguments[_key2];\n }\n\n if (mergedOpen && listRef.current) {\n var _listRef$current2;\n\n (_listRef$current2 = listRef.current).onKeyUp.apply(_listRef$current2, [event].concat(rest));\n }\n\n if (onKeyUp) {\n onKeyUp.apply(void 0, [event].concat(rest));\n }\n }; // ========================== Focus / Blur ==========================\n\n\n var triggerRef = React.useRef(null);\n /** Record real focus status */\n\n var focusRef = React.useRef(false);\n\n var onContainerFocus = function onContainerFocus() {\n setMockFocused(true);\n\n if (!disabled) {\n if (onFocus && !focusRef.current) {\n onFocus.apply(void 0, arguments);\n } // `showAction` should handle `focus` if set\n\n\n if (showAction.includes('focus')) {\n onToggleOpen(true);\n }\n }\n\n focusRef.current = true;\n };\n\n var onContainerBlur = function onContainerBlur() {\n setMockFocused(false, function () {\n focusRef.current = false;\n onToggleOpen(false);\n });\n\n if (disabled) {\n return;\n }\n\n if (mergedSearchValue) {\n // `tags` mode should move `searchValue` into values\n if (mode === 'tags') {\n triggerSearch('', false);\n triggerChange(Array.from(new Set([].concat(_toConsumableArray(mergedRawValue), [mergedSearchValue]))));\n } else if (mode === 'multiple') {\n // `multiple` mode only clean the search value but not trigger event\n setInnerSearchValue('');\n }\n }\n\n if (onBlur) {\n onBlur.apply(void 0, arguments);\n }\n };\n\n var onInternalMouseDown = function onInternalMouseDown(event) {\n var target = event.target;\n var popupElement = triggerRef.current && triggerRef.current.getPopupElement(); // We should give focus back to selector if clicked item is not focusable\n\n if (popupElement && popupElement.contains(target)) {\n setTimeout(function () {\n cancelSetMockFocused();\n\n if (!popupElement.contains(document.activeElement)) {\n selectorRef.current.focus();\n }\n });\n }\n\n if (onMouseDown) {\n for (var _len3 = arguments.length, restArgs = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n restArgs[_key3 - 1] = arguments[_key3];\n }\n\n onMouseDown.apply(void 0, [event].concat(restArgs));\n }\n }; // ========================= Accessibility ==========================\n\n\n var _React$useState11 = React.useState(0),\n _React$useState12 = _slicedToArray(_React$useState11, 2),\n accessibilityIndex = _React$useState12[0],\n setAccessibilityIndex = _React$useState12[1];\n\n var mergedDefaultActiveFirstOption = defaultActiveFirstOption !== undefined ? defaultActiveFirstOption : mode !== 'combobox';\n\n var onActiveValue = function onActiveValue(active, index) {\n setAccessibilityIndex(index);\n\n if (backfill && mode === 'combobox' && active !== null) {\n setActiveValue(String(active));\n }\n }; // ============================= Popup ==============================\n\n\n var containerRef = React.useRef(null);\n\n var _React$useState13 = React.useState(null),\n _React$useState14 = _slicedToArray(_React$useState13, 2),\n containerWidth = _React$useState14[0],\n setContainerWidth = _React$useState14[1];\n\n (0, _useLayoutEffect.default)(function () {\n var newWidth = Math.ceil(containerRef.current.offsetWidth);\n\n if (containerWidth !== newWidth) {\n setContainerWidth(newWidth);\n }\n });\n var popupNode = React.createElement(OptionList, {\n ref: listRef,\n prefixCls: prefixCls,\n id: mergedId,\n open: mergedOpen,\n childrenAsData: !options,\n options: displayOptions,\n flattenOptions: displayFlattenOptions,\n multiple: isMultiple,\n values: rawValues,\n height: listHeight,\n itemHeight: listItemHeight,\n onSelect: onInternalSelect,\n onToggleOpen: onToggleOpen,\n onActiveValue: onActiveValue,\n defaultActiveFirstOption: mergedDefaultActiveFirstOption,\n notFoundContent: notFoundContent,\n onScroll: onPopupScroll,\n searchValue: mergedSearchValue,\n menuItemSelectedIcon: menuItemSelectedIcon\n }); // ============================= Clear ==============================\n\n var clearNode;\n\n var onClearMouseDown = function onClearMouseDown() {\n // Trigger internal `onClear` event\n if (internalProps.mark === _generator.INTERNAL_PROPS_MARK && internalProps.onClear) {\n internalProps.onClear();\n }\n\n triggerChange([]);\n triggerSearch('', false);\n };\n\n if (allowClear && (mergedRawValue.length || mergedSearchValue)) {\n clearNode = React.createElement(_TransBtn.default, {\n className: \"\".concat(prefixCls, \"-clear\"),\n onMouseDown: onClearMouseDown,\n customizeIcon: clearIcon\n }, \"\\xD7\");\n } // ============================= Arrow ==============================\n\n\n var mergedShowArrow = showArrow !== undefined ? showArrow : loading || !isMultiple && mode !== 'combobox';\n var arrowNode;\n\n if (mergedShowArrow) {\n arrowNode = React.createElement(_TransBtn.default, {\n className: (0, _classnames.default)(\"\".concat(prefixCls, \"-arrow\"), _defineProperty({}, \"\".concat(prefixCls, \"-arrow-loading\"), loading)),\n customizeIcon: inputIcon\n });\n } // ============================ Warning =============================\n\n\n if (\"development\" !== 'production') {\n warningProps(props);\n } // ============================= Render =============================\n\n\n var mergedClassName = (0, _classnames.default)(prefixCls, className, (_classNames2 = {}, _defineProperty(_classNames2, \"\".concat(prefixCls, \"-focused\"), mockFocused), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-multiple\"), isMultiple), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-single\"), !isMultiple), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-allow-clear\"), allowClear), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-show-arrow\"), mergedShowArrow), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-disabled\"), disabled), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-loading\"), loading), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-open\"), mergedOpen), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-customize-input\"), customizeInputElement), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-show-search\"), mergedShowSearch), _classNames2));\n return React.createElement(\"div\", Object.assign({\n className: mergedClassName\n }, domProps, {\n ref: containerRef,\n onMouseDown: onInternalMouseDown,\n onKeyDown: onInternalKeyDown,\n onKeyUp: onInternalKeyUp,\n onFocus: onContainerFocus,\n onBlur: onContainerBlur\n }), mockFocused && !mergedOpen && React.createElement(\"span\", {\n style: {\n width: 0,\n height: 0,\n display: 'flex',\n overflow: 'hidden',\n opacity: 0\n },\n \"aria-live\": \"polite\"\n }, \"\".concat(mergedRawValue.join(', '))), React.createElement(_SelectTrigger.default, {\n ref: triggerRef,\n disabled: disabled,\n prefixCls: prefixCls,\n visible: mergedOpen,\n popupElement: popupNode,\n containerWidth: containerWidth,\n animation: animation,\n transitionName: transitionName,\n dropdownStyle: dropdownStyle,\n dropdownClassName: dropdownClassName,\n dropdownMatchSelectWidth: dropdownMatchSelectWidth,\n dropdownRender: dropdownRender,\n dropdownAlign: dropdownAlign,\n getPopupContainer: getPopupContainer,\n empty: !mergedOptions.length\n }, React.createElement(_Selector.default, Object.assign({}, props, {\n prefixCls: prefixCls,\n inputElement: customizeInputElement,\n ref: selectorRef,\n id: mergedId,\n showSearch: mergedShowSearch,\n mode: mode,\n accessibilityIndex: accessibilityIndex,\n multiple: isMultiple,\n values: displayValues,\n open: mergedOpen,\n onToggleOpen: onToggleOpen,\n searchValue: mergedSearchValue,\n activeValue: activeValue,\n onSearch: triggerSearch,\n onSelect: onInternalSelect\n }))), arrowNode, clearNode);\n }", "function DropdownToggle$1(_ref2) {\n var children = _ref2.children;\n\n var _useDropdownToggle = useDropdownToggle(),\n props = _useDropdownToggle[0],\n meta = _useDropdownToggle[1];\n\n return /*#__PURE__*/react.createElement(react.Fragment, null, children(props, meta));\n}", "handleDropdownTrigger() {\n if (this.classList.contains('is-active')) {\n this.classList.remove('is-active');\n } else {\n this.classList.add('is-active');\n }\n }", "function toggleDropdown() { \n document.querySelector(\"#my-dropdown\").classList.add(\"show\"); \n}", "data () {\n return {\n visible: false,\n selected: [],\n caret: function(){ // switches dropdown caret icon\n return this.visible? \"caret-up-fill\" : \"caret-down-fill\"\n }\n }\n }", "showSpecificOptions(){\n return(\n <Popup trigger={<button className=\"settings_button\">...</button>}\n closeOnDocumentClick\n position={\"left top\"}\n >\n\n <div className={\"events_option\"}>Action 1</div>\n <div className={\"events_option\"}>Action 2</div>\n <div className={\"events_option\"}>Action 3</div>\n\n </Popup>\n )\n }", "function Select(props, ref) {\n var _classNames2;\n\n var _props$prefixCls = props.prefixCls,\n prefixCls = _props$prefixCls === void 0 ? defaultPrefixCls : _props$prefixCls,\n className = props.className,\n id = props.id,\n open = props.open,\n defaultOpen = props.defaultOpen,\n options = props.options,\n children = props.children,\n mode = props.mode,\n value = props.value,\n defaultValue = props.defaultValue,\n labelInValue = props.labelInValue,\n showSearch = props.showSearch,\n inputValue = props.inputValue,\n searchValue = props.searchValue,\n filterOption = props.filterOption,\n _props$optionFilterPr = props.optionFilterProp,\n optionFilterProp = _props$optionFilterPr === void 0 ? 'value' : _props$optionFilterPr,\n _props$autoClearSearc = props.autoClearSearchValue,\n autoClearSearchValue = _props$autoClearSearc === void 0 ? true : _props$autoClearSearc,\n onSearch = props.onSearch,\n allowClear = props.allowClear,\n clearIcon = props.clearIcon,\n showArrow = props.showArrow,\n inputIcon = props.inputIcon,\n menuItemSelectedIcon = props.menuItemSelectedIcon,\n disabled = props.disabled,\n loading = props.loading,\n defaultActiveFirstOption = props.defaultActiveFirstOption,\n _props$notFoundConten = props.notFoundContent,\n notFoundContent = _props$notFoundConten === void 0 ? 'Not Found' : _props$notFoundConten,\n optionLabelProp = props.optionLabelProp,\n backfill = props.backfill,\n getInputElement = props.getInputElement,\n getPopupContainer = props.getPopupContainer,\n _props$listHeight = props.listHeight,\n listHeight = _props$listHeight === void 0 ? 200 : _props$listHeight,\n _props$listItemHeight = props.listItemHeight,\n listItemHeight = _props$listItemHeight === void 0 ? 20 : _props$listItemHeight,\n animation = props.animation,\n transitionName = props.transitionName,\n virtual = props.virtual,\n dropdownStyle = props.dropdownStyle,\n dropdownClassName = props.dropdownClassName,\n dropdownMatchSelectWidth = props.dropdownMatchSelectWidth,\n dropdownRender = props.dropdownRender,\n dropdownAlign = props.dropdownAlign,\n _props$showAction = props.showAction,\n showAction = _props$showAction === void 0 ? [] : _props$showAction,\n direction = props.direction,\n tokenSeparators = props.tokenSeparators,\n tagRender = props.tagRender,\n onPopupScroll = props.onPopupScroll,\n onDropdownVisibleChange = props.onDropdownVisibleChange,\n onFocus = props.onFocus,\n onBlur = props.onBlur,\n onKeyUp = props.onKeyUp,\n onKeyDown = props.onKeyDown,\n onMouseDown = props.onMouseDown,\n onChange = props.onChange,\n onSelect = props.onSelect,\n onDeselect = props.onDeselect,\n _props$internalProps = props.internalProps,\n internalProps = _props$internalProps === void 0 ? {} : _props$internalProps,\n restProps = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(props, [\"prefixCls\", \"className\", \"id\", \"open\", \"defaultOpen\", \"options\", \"children\", \"mode\", \"value\", \"defaultValue\", \"labelInValue\", \"showSearch\", \"inputValue\", \"searchValue\", \"filterOption\", \"optionFilterProp\", \"autoClearSearchValue\", \"onSearch\", \"allowClear\", \"clearIcon\", \"showArrow\", \"inputIcon\", \"menuItemSelectedIcon\", \"disabled\", \"loading\", \"defaultActiveFirstOption\", \"notFoundContent\", \"optionLabelProp\", \"backfill\", \"getInputElement\", \"getPopupContainer\", \"listHeight\", \"listItemHeight\", \"animation\", \"transitionName\", \"virtual\", \"dropdownStyle\", \"dropdownClassName\", \"dropdownMatchSelectWidth\", \"dropdownRender\", \"dropdownAlign\", \"showAction\", \"direction\", \"tokenSeparators\", \"tagRender\", \"onPopupScroll\", \"onDropdownVisibleChange\", \"onFocus\", \"onBlur\", \"onKeyUp\", \"onKeyDown\", \"onMouseDown\", \"onChange\", \"onSelect\", \"onDeselect\", \"internalProps\"]);\n\n var useInternalProps = internalProps.mark === _interface_generator__WEBPACK_IMPORTED_MODULE_10__[\"INTERNAL_PROPS_MARK\"];\n var domProps = omitDOMProps ? omitDOMProps(restProps) : restProps;\n DEFAULT_OMIT_PROPS.forEach(function (prop) {\n delete domProps[prop];\n });\n var containerRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](null);\n var triggerRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](null);\n var selectorRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](null);\n var listRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](null);\n /** Used for component focused management */\n\n var _useDelayReset = Object(_hooks_useDelayReset__WEBPACK_IMPORTED_MODULE_14__[\"default\"])(),\n _useDelayReset2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useDelayReset, 3),\n mockFocused = _useDelayReset2[0],\n setMockFocused = _useDelayReset2[1],\n cancelSetMockFocused = _useDelayReset2[2]; // Inner id for accessibility usage. Only work in client side\n\n\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](),\n _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState, 2),\n innerId = _React$useState2[0],\n setInnerId = _React$useState2[1];\n\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n setInnerId(\"rc_select_\".concat(Object(_utils_commonUtil__WEBPACK_IMPORTED_MODULE_11__[\"getUUID\"])()));\n }, []);\n var mergedId = id || innerId; // optionLabelProp\n\n var mergedOptionLabelProp = optionLabelProp;\n\n if (mergedOptionLabelProp === undefined) {\n mergedOptionLabelProp = options ? 'label' : 'children';\n } // labelInValue\n\n\n var mergedLabelInValue = mode === 'combobox' ? false : labelInValue;\n var isMultiple = mode === 'tags' || mode === 'multiple';\n var mergedShowSearch = showSearch !== undefined ? showSearch : isMultiple || mode === 'combobox'; // ============================== Ref ===============================\n\n var selectorDomRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](null);\n react__WEBPACK_IMPORTED_MODULE_4__[\"useImperativeHandle\"](ref, function () {\n return {\n focus: selectorRef.current.focus,\n blur: selectorRef.current.blur\n };\n }); // ============================= Value ==============================\n\n var _React$useState3 = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](value || defaultValue),\n _React$useState4 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState3, 2),\n innerValue = _React$useState4[0],\n setInnerValue = _React$useState4[1];\n\n var baseValue = value !== undefined ? value : innerValue; // Should reset when controlled to be uncontrolled\n\n var prevValueRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](value);\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n if (prevValueRef.current !== value && (value === undefined || value === null)) {\n setInnerValue(undefined);\n }\n\n prevValueRef.current = value;\n }, [value]);\n /** Unique raw values */\n\n var mergedRawValue = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n return Object(_utils_commonUtil__WEBPACK_IMPORTED_MODULE_11__[\"toInnerValue\"])(baseValue, {\n labelInValue: mergedLabelInValue,\n combobox: mode === 'combobox'\n });\n }, [baseValue, mergedLabelInValue]);\n /** We cache a set of raw values to speed up check */\n\n var rawValues = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n return new Set(mergedRawValue);\n }, [mergedRawValue]); // ============================= Option =============================\n // Set by option list active, it will merge into search input when mode is `combobox`\n\n var _React$useState5 = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](null),\n _React$useState6 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState5, 2),\n activeValue = _React$useState6[0],\n setActiveValue = _React$useState6[1];\n\n var _React$useState7 = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](''),\n _React$useState8 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState7, 2),\n innerSearchValue = _React$useState8[0],\n setInnerSearchValue = _React$useState8[1];\n\n var mergedSearchValue = innerSearchValue;\n\n if (mode === 'combobox' && value !== undefined) {\n mergedSearchValue = value;\n } else if (searchValue !== undefined) {\n mergedSearchValue = searchValue;\n } else if (inputValue) {\n mergedSearchValue = inputValue;\n }\n\n var mergedOptions = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n var newOptions = options;\n\n if (newOptions === undefined) {\n newOptions = convertChildrenToData(children);\n }\n /**\n * `tags` should fill un-list item.\n * This is not cool here since TreeSelect do not need this\n */\n\n\n if (mode === 'tags' && fillOptionsWithMissingValue) {\n newOptions = fillOptionsWithMissingValue(newOptions, baseValue, mergedOptionLabelProp, labelInValue);\n }\n\n return newOptions || [];\n }, [options, children, mode, baseValue]);\n var mergedFlattenOptions = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n return flattenOptions(mergedOptions, props);\n }, [mergedOptions]); // Display options for OptionList\n\n var displayOptions = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n if (!mergedSearchValue || !mergedShowSearch) {\n return Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mergedOptions);\n }\n\n var filteredOptions = filterOptions(mergedSearchValue, mergedOptions, {\n optionFilterProp: optionFilterProp,\n filterOption: mode === 'combobox' && filterOption === undefined ? function () {\n return true;\n } : filterOption\n });\n\n if (mode === 'tags' && filteredOptions.every(function (opt) {\n return opt.value !== mergedSearchValue;\n })) {\n filteredOptions.unshift({\n value: mergedSearchValue,\n label: mergedSearchValue,\n key: '__RC_SELECT_TAG_PLACEHOLDER__'\n });\n }\n\n return filteredOptions;\n }, [mergedOptions, mergedSearchValue, mode, mergedShowSearch]);\n var displayFlattenOptions = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n return flattenOptions(displayOptions, props);\n }, [displayOptions]);\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n if (listRef.current && listRef.current.scrollTo) {\n listRef.current.scrollTo(0);\n }\n }, [mergedSearchValue]); // ============================ Selector ============================\n\n var displayValues = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n return mergedRawValue.map(function (val) {\n var displayValue = getLabeledValue(val, {\n options: mergedFlattenOptions,\n prevValue: baseValue,\n labelInValue: mergedLabelInValue,\n optionLabelProp: mergedOptionLabelProp\n });\n return _objectSpread(_objectSpread({}, displayValue), {}, {\n disabled: isValueDisabled(val, mergedFlattenOptions)\n });\n });\n }, [baseValue, mergedOptions]); // Polyfill with cache label\n\n displayValues = Object(_hooks_useCacheDisplayValue__WEBPACK_IMPORTED_MODULE_18__[\"default\"])(displayValues);\n\n var triggerSelect = function triggerSelect(newValue, isSelect, source) {\n var outOption = findValueOption([newValue], mergedFlattenOptions)[0];\n\n if (!internalProps.skipTriggerSelect) {\n // Skip trigger `onSelect` or `onDeselect` if configured\n var selectValue = mergedLabelInValue ? getLabeledValue(newValue, {\n options: mergedFlattenOptions,\n prevValue: baseValue,\n labelInValue: mergedLabelInValue,\n optionLabelProp: mergedOptionLabelProp\n }) : newValue;\n\n if (isSelect && onSelect) {\n onSelect(selectValue, outOption);\n } else if (!isSelect && onDeselect) {\n onDeselect(selectValue, outOption);\n }\n } // Trigger internal event\n\n\n if (useInternalProps) {\n if (isSelect && internalProps.onRawSelect) {\n internalProps.onRawSelect(newValue, outOption, source);\n } else if (!isSelect && internalProps.onRawDeselect) {\n internalProps.onRawDeselect(newValue, outOption, source);\n }\n }\n };\n\n var triggerChange = function triggerChange(newRawValues) {\n if (useInternalProps && internalProps.skipTriggerChange) {\n return;\n }\n\n var outValues = Object(_utils_commonUtil__WEBPACK_IMPORTED_MODULE_11__[\"toOuterValues\"])(Array.from(newRawValues), {\n labelInValue: mergedLabelInValue,\n options: mergedFlattenOptions,\n getLabeledValue: getLabeledValue,\n prevValue: baseValue,\n optionLabelProp: mergedOptionLabelProp\n });\n var outValue = isMultiple ? outValues : outValues[0]; // Skip trigger if prev & current value is both empty\n\n if (onChange && (mergedRawValue.length !== 0 || outValues.length !== 0)) {\n var outOptions = findValueOption(newRawValues, mergedFlattenOptions);\n onChange(outValue, isMultiple ? outOptions : outOptions[0]);\n }\n\n setInnerValue(outValue);\n };\n\n var onInternalSelect = function onInternalSelect(newValue, _ref) {\n var selected = _ref.selected,\n source = _ref.source;\n\n if (disabled) {\n return;\n }\n\n var newRawValue;\n\n if (isMultiple) {\n newRawValue = new Set(mergedRawValue);\n\n if (selected) {\n newRawValue.add(newValue);\n } else {\n newRawValue.delete(newValue);\n }\n } else {\n newRawValue = new Set();\n newRawValue.add(newValue);\n } // Multiple always trigger change and single should change if value changed\n\n\n if (isMultiple || !isMultiple && Array.from(mergedRawValue)[0] !== newValue) {\n triggerChange(Array.from(newRawValue));\n } // Trigger `onSelect`. Single mode always trigger select\n\n\n triggerSelect(newValue, !isMultiple || selected, source); // Clean search value if single or configured\n\n if (mode === 'combobox') {\n setInnerSearchValue(String(newValue));\n setActiveValue('');\n } else if (!isMultiple || autoClearSearchValue) {\n setInnerSearchValue('');\n setActiveValue('');\n }\n };\n\n var onInternalOptionSelect = function onInternalOptionSelect(newValue, info) {\n onInternalSelect(newValue, _objectSpread(_objectSpread({}, info), {}, {\n source: 'option'\n }));\n };\n\n var onInternalSelectionSelect = function onInternalSelectionSelect(newValue, info) {\n onInternalSelect(newValue, _objectSpread(_objectSpread({}, info), {}, {\n source: 'selection'\n }));\n }; // ============================= Input ==============================\n // Only works in `combobox`\n\n\n var customizeInputElement = mode === 'combobox' && getInputElement && getInputElement() || null; // ============================== Open ==============================\n\n var _useMergedState = Object(rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(undefined, {\n defaultValue: defaultOpen,\n value: open\n }),\n _useMergedState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useMergedState, 2),\n innerOpen = _useMergedState2[0],\n setInnerOpen = _useMergedState2[1];\n\n var mergedOpen = innerOpen; // Not trigger `open` in `combobox` when `notFoundContent` is empty\n\n var emptyListContent = !notFoundContent && !displayOptions.length;\n\n if (disabled || emptyListContent && mergedOpen && mode === 'combobox') {\n mergedOpen = false;\n }\n\n var triggerOpen = emptyListContent ? false : mergedOpen;\n\n var onToggleOpen = function onToggleOpen(newOpen) {\n var nextOpen = newOpen !== undefined ? newOpen : !mergedOpen;\n\n if (innerOpen !== nextOpen && !disabled) {\n setInnerOpen(nextOpen);\n\n if (onDropdownVisibleChange) {\n onDropdownVisibleChange(nextOpen);\n }\n }\n };\n\n Object(_hooks_useSelectTriggerControl__WEBPACK_IMPORTED_MODULE_17__[\"default\"])([containerRef.current, triggerRef.current && triggerRef.current.getPopupElement()], triggerOpen, onToggleOpen); // ============================= Search =============================\n\n var triggerSearch = function triggerSearch(searchText) {\n var fromTyping = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var ret = true;\n var newSearchText = searchText;\n setActiveValue(null); // Check if match the `tokenSeparators`\n\n var patchLabels = Object(_utils_valueUtil__WEBPACK_IMPORTED_MODULE_16__[\"getSeparatedContent\"])(searchText, tokenSeparators);\n var patchRawValues = patchLabels;\n\n if (mode === 'combobox') {\n // Only typing will trigger onChange\n if (fromTyping) {\n triggerChange([newSearchText]);\n }\n } else if (patchLabels) {\n newSearchText = '';\n\n if (mode !== 'tags') {\n patchRawValues = patchLabels.map(function (label) {\n var item = mergedFlattenOptions.find(function (_ref2) {\n var data = _ref2.data;\n return data[mergedOptionLabelProp] === label;\n });\n return item ? item.data.value : null;\n }).filter(function (val) {\n return val !== null;\n });\n }\n\n var newRawValues = Array.from(new Set([].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mergedRawValue), Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(patchRawValues))));\n triggerChange(newRawValues);\n newRawValues.forEach(function (newRawValue) {\n triggerSelect(newRawValue, true, 'input');\n }); // Should close when paste finish\n\n onToggleOpen(false); // Tell Selector that break next actions\n\n ret = false;\n }\n\n setInnerSearchValue(newSearchText);\n\n if (onSearch && mergedSearchValue !== newSearchText) {\n onSearch(newSearchText);\n }\n\n return ret;\n }; // Close dropdown when disabled change\n\n\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n if (innerOpen && !!disabled) {\n setInnerOpen(false);\n }\n }, [disabled]); // Close will clean up single mode search text\n\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n if (!mergedOpen && !isMultiple && mode !== 'combobox') {\n triggerSearch('', false);\n }\n }, [mergedOpen]); // ============================ Keyboard ============================\n\n /**\n * We record input value here to check if can press to clean up by backspace\n * - null: Key is not down, this is reset by key up\n * - true: Search text is empty when first time backspace down\n * - false: Search text is not empty when first time backspace down\n */\n\n var _useLock = Object(_hooks_useLock__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(),\n _useLock2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useLock, 2),\n getClearLock = _useLock2[0],\n setClearLock = _useLock2[1]; // KeyDown\n\n\n var onInternalKeyDown = function onInternalKeyDown(event) {\n var clearLock = getClearLock();\n var which = event.which; // We only manage open state here, close logic should handle by list component\n\n if (!mergedOpen && which === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_5__[\"default\"].ENTER) {\n onToggleOpen(true);\n }\n\n setClearLock(!!mergedSearchValue); // Remove value by `backspace`\n\n if (which === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_5__[\"default\"].BACKSPACE && !clearLock && isMultiple && !mergedSearchValue && mergedRawValue.length) {\n var removeInfo = Object(_utils_commonUtil__WEBPACK_IMPORTED_MODULE_11__[\"removeLastEnabledValue\"])(displayValues, mergedRawValue);\n\n if (removeInfo.removedValue !== null) {\n triggerChange(removeInfo.values);\n triggerSelect(removeInfo.removedValue, false, 'input');\n }\n }\n\n for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n rest[_key - 1] = arguments[_key];\n }\n\n if (mergedOpen && listRef.current) {\n var _listRef$current;\n\n (_listRef$current = listRef.current).onKeyDown.apply(_listRef$current, [event].concat(rest));\n }\n\n if (onKeyDown) {\n onKeyDown.apply(void 0, [event].concat(rest));\n }\n }; // KeyUp\n\n\n var onInternalKeyUp = function onInternalKeyUp(event) {\n for (var _len2 = arguments.length, rest = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n rest[_key2 - 1] = arguments[_key2];\n }\n\n if (mergedOpen && listRef.current) {\n var _listRef$current2;\n\n (_listRef$current2 = listRef.current).onKeyUp.apply(_listRef$current2, [event].concat(rest));\n }\n\n if (onKeyUp) {\n onKeyUp.apply(void 0, [event].concat(rest));\n }\n }; // ========================== Focus / Blur ==========================\n\n /** Record real focus status */\n\n\n var focusRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](false);\n\n var onContainerFocus = function onContainerFocus() {\n setMockFocused(true);\n\n if (!disabled) {\n if (onFocus && !focusRef.current) {\n onFocus.apply(void 0, arguments);\n } // `showAction` should handle `focus` if set\n\n\n if (showAction.includes('focus')) {\n onToggleOpen(true);\n }\n }\n\n focusRef.current = true;\n };\n\n var onContainerBlur = function onContainerBlur() {\n setMockFocused(false, function () {\n focusRef.current = false;\n onToggleOpen(false);\n });\n\n if (disabled) {\n return;\n }\n\n if (mergedSearchValue) {\n // `tags` mode should move `searchValue` into values\n if (mode === 'tags') {\n triggerSearch('', false);\n triggerChange(Array.from(new Set([].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mergedRawValue), [mergedSearchValue]))));\n } else if (mode === 'multiple') {\n // `multiple` mode only clean the search value but not trigger event\n setInnerSearchValue('');\n }\n }\n\n if (onBlur) {\n onBlur.apply(void 0, arguments);\n }\n };\n\n var activeTimeoutIds = [];\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n return function () {\n activeTimeoutIds.forEach(function (timeoutId) {\n return clearTimeout(timeoutId);\n });\n activeTimeoutIds.splice(0, activeTimeoutIds.length);\n };\n }, []);\n\n var onInternalMouseDown = function onInternalMouseDown(event) {\n var target = event.target;\n var popupElement = triggerRef.current && triggerRef.current.getPopupElement(); // We should give focus back to selector if clicked item is not focusable\n\n if (popupElement && popupElement.contains(target)) {\n var timeoutId = setTimeout(function () {\n var index = activeTimeoutIds.indexOf(timeoutId);\n\n if (index !== -1) {\n activeTimeoutIds.splice(index, 1);\n }\n\n cancelSetMockFocused();\n\n if (!popupElement.contains(document.activeElement)) {\n selectorRef.current.focus();\n }\n });\n activeTimeoutIds.push(timeoutId);\n }\n\n if (onMouseDown) {\n for (var _len3 = arguments.length, restArgs = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n restArgs[_key3 - 1] = arguments[_key3];\n }\n\n onMouseDown.apply(void 0, [event].concat(restArgs));\n }\n }; // ========================= Accessibility ==========================\n\n\n var _React$useState9 = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](0),\n _React$useState10 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState9, 2),\n accessibilityIndex = _React$useState10[0],\n setAccessibilityIndex = _React$useState10[1];\n\n var mergedDefaultActiveFirstOption = defaultActiveFirstOption !== undefined ? defaultActiveFirstOption : mode !== 'combobox';\n\n var onActiveValue = function onActiveValue(active, index) {\n setAccessibilityIndex(index);\n\n if (backfill && mode === 'combobox' && active !== null) {\n setActiveValue(String(active));\n }\n }; // ============================= Popup ==============================\n\n\n var _React$useState11 = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](null),\n _React$useState12 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState11, 2),\n containerWidth = _React$useState12[0],\n setContainerWidth = _React$useState12[1];\n\n Object(_hooks_useLayoutEffect__WEBPACK_IMPORTED_MODULE_15__[\"default\"])(function () {\n if (triggerOpen) {\n var newWidth = Math.ceil(containerRef.current.offsetWidth);\n\n if (containerWidth !== newWidth) {\n setContainerWidth(newWidth);\n }\n }\n }, [triggerOpen]);\n var popupNode = react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](OptionList, {\n ref: listRef,\n prefixCls: prefixCls,\n id: mergedId,\n open: mergedOpen,\n childrenAsData: !options,\n options: displayOptions,\n flattenOptions: displayFlattenOptions,\n multiple: isMultiple,\n values: rawValues,\n height: listHeight,\n itemHeight: listItemHeight,\n onSelect: onInternalOptionSelect,\n onToggleOpen: onToggleOpen,\n onActiveValue: onActiveValue,\n defaultActiveFirstOption: mergedDefaultActiveFirstOption,\n notFoundContent: notFoundContent,\n onScroll: onPopupScroll,\n searchValue: mergedSearchValue,\n menuItemSelectedIcon: menuItemSelectedIcon,\n virtual: virtual !== false && dropdownMatchSelectWidth !== false\n }); // ============================= Clear ==============================\n\n var clearNode;\n\n var onClearMouseDown = function onClearMouseDown() {\n // Trigger internal `onClear` event\n if (useInternalProps && internalProps.onClear) {\n internalProps.onClear();\n }\n\n triggerChange([]);\n triggerSearch('', false);\n };\n\n if (!disabled && allowClear && (mergedRawValue.length || mergedSearchValue)) {\n clearNode = react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](_TransBtn__WEBPACK_IMPORTED_MODULE_12__[\"default\"], {\n className: \"\".concat(prefixCls, \"-clear\"),\n onMouseDown: onClearMouseDown,\n customizeIcon: clearIcon\n }, \"\\xD7\");\n } // ============================= Arrow ==============================\n\n\n var mergedShowArrow = showArrow !== undefined ? showArrow : loading || !isMultiple && mode !== 'combobox';\n var arrowNode;\n\n if (mergedShowArrow) {\n arrowNode = react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](_TransBtn__WEBPACK_IMPORTED_MODULE_12__[\"default\"], {\n className: classnames__WEBPACK_IMPORTED_MODULE_6___default()(\"\".concat(prefixCls, \"-arrow\"), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, \"\".concat(prefixCls, \"-arrow-loading\"), loading)),\n customizeIcon: inputIcon,\n customizeIconProps: {\n loading: loading,\n searchValue: mergedSearchValue,\n open: mergedOpen,\n focused: mockFocused,\n showSearch: mergedShowSearch\n }\n });\n } // ============================ Warning =============================\n\n\n if (false) {} // ============================= Render =============================\n\n\n var mergedClassName = classnames__WEBPACK_IMPORTED_MODULE_6___default()(prefixCls, className, (_classNames2 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-focused\"), mockFocused), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-multiple\"), isMultiple), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-single\"), !isMultiple), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-allow-clear\"), allowClear), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-show-arrow\"), mergedShowArrow), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-disabled\"), disabled), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-loading\"), loading), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-open\"), mergedOpen), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-customize-input\"), customizeInputElement), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-show-search\"), mergedShowSearch), _classNames2));\n return react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](\"div\", Object.assign({\n className: mergedClassName\n }, domProps, {\n ref: containerRef,\n onMouseDown: onInternalMouseDown,\n onKeyDown: onInternalKeyDown,\n onKeyUp: onInternalKeyUp,\n onFocus: onContainerFocus,\n onBlur: onContainerBlur\n }), mockFocused && !mergedOpen && react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](\"span\", {\n style: {\n width: 0,\n height: 0,\n display: 'flex',\n overflow: 'hidden',\n opacity: 0\n },\n \"aria-live\": \"polite\"\n }, \"\".concat(mergedRawValue.join(', '))), react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](_SelectTrigger__WEBPACK_IMPORTED_MODULE_9__[\"default\"], {\n ref: triggerRef,\n disabled: disabled,\n prefixCls: prefixCls,\n visible: triggerOpen,\n popupElement: popupNode,\n containerWidth: containerWidth,\n animation: animation,\n transitionName: transitionName,\n dropdownStyle: dropdownStyle,\n dropdownClassName: dropdownClassName,\n direction: direction,\n dropdownMatchSelectWidth: dropdownMatchSelectWidth,\n dropdownRender: dropdownRender,\n dropdownAlign: dropdownAlign,\n getPopupContainer: getPopupContainer,\n empty: !mergedOptions.length,\n getTriggerDOMNode: function getTriggerDOMNode() {\n return selectorDomRef.current;\n }\n }, react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](_Selector__WEBPACK_IMPORTED_MODULE_8__[\"default\"], Object.assign({}, props, {\n domRef: selectorDomRef,\n prefixCls: prefixCls,\n inputElement: customizeInputElement,\n ref: selectorRef,\n id: mergedId,\n showSearch: mergedShowSearch,\n mode: mode,\n accessibilityIndex: accessibilityIndex,\n multiple: isMultiple,\n tagRender: tagRender,\n values: displayValues,\n open: mergedOpen,\n onToggleOpen: onToggleOpen,\n searchValue: mergedSearchValue,\n activeValue: activeValue,\n onSearch: triggerSearch,\n onSelect: onInternalSelectionSelect\n }))), arrowNode, clearNode);\n }", "function Select(props, ref) {\n var _classNames2;\n\n var _props$prefixCls = props.prefixCls,\n prefixCls = _props$prefixCls === void 0 ? defaultPrefixCls : _props$prefixCls,\n className = props.className,\n id = props.id,\n open = props.open,\n defaultOpen = props.defaultOpen,\n options = props.options,\n children = props.children,\n mode = props.mode,\n value = props.value,\n defaultValue = props.defaultValue,\n labelInValue = props.labelInValue,\n showSearch = props.showSearch,\n inputValue = props.inputValue,\n searchValue = props.searchValue,\n filterOption = props.filterOption,\n _props$optionFilterPr = props.optionFilterProp,\n optionFilterProp = _props$optionFilterPr === void 0 ? 'value' : _props$optionFilterPr,\n _props$autoClearSearc = props.autoClearSearchValue,\n autoClearSearchValue = _props$autoClearSearc === void 0 ? true : _props$autoClearSearc,\n onSearch = props.onSearch,\n allowClear = props.allowClear,\n clearIcon = props.clearIcon,\n showArrow = props.showArrow,\n inputIcon = props.inputIcon,\n menuItemSelectedIcon = props.menuItemSelectedIcon,\n disabled = props.disabled,\n loading = props.loading,\n defaultActiveFirstOption = props.defaultActiveFirstOption,\n _props$notFoundConten = props.notFoundContent,\n notFoundContent = _props$notFoundConten === void 0 ? 'Not Found' : _props$notFoundConten,\n optionLabelProp = props.optionLabelProp,\n backfill = props.backfill,\n getInputElement = props.getInputElement,\n getPopupContainer = props.getPopupContainer,\n _props$listHeight = props.listHeight,\n listHeight = _props$listHeight === void 0 ? 200 : _props$listHeight,\n _props$listItemHeight = props.listItemHeight,\n listItemHeight = _props$listItemHeight === void 0 ? 20 : _props$listItemHeight,\n animation = props.animation,\n transitionName = props.transitionName,\n virtual = props.virtual,\n dropdownStyle = props.dropdownStyle,\n dropdownClassName = props.dropdownClassName,\n dropdownMatchSelectWidth = props.dropdownMatchSelectWidth,\n dropdownRender = props.dropdownRender,\n dropdownAlign = props.dropdownAlign,\n _props$showAction = props.showAction,\n showAction = _props$showAction === void 0 ? [] : _props$showAction,\n direction = props.direction,\n tokenSeparators = props.tokenSeparators,\n tagRender = props.tagRender,\n onPopupScroll = props.onPopupScroll,\n onDropdownVisibleChange = props.onDropdownVisibleChange,\n onFocus = props.onFocus,\n onBlur = props.onBlur,\n onKeyUp = props.onKeyUp,\n onKeyDown = props.onKeyDown,\n onMouseDown = props.onMouseDown,\n onChange = props.onChange,\n onSelect = props.onSelect,\n onDeselect = props.onDeselect,\n _props$internalProps = props.internalProps,\n internalProps = _props$internalProps === void 0 ? {} : _props$internalProps,\n restProps = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(props, [\"prefixCls\", \"className\", \"id\", \"open\", \"defaultOpen\", \"options\", \"children\", \"mode\", \"value\", \"defaultValue\", \"labelInValue\", \"showSearch\", \"inputValue\", \"searchValue\", \"filterOption\", \"optionFilterProp\", \"autoClearSearchValue\", \"onSearch\", \"allowClear\", \"clearIcon\", \"showArrow\", \"inputIcon\", \"menuItemSelectedIcon\", \"disabled\", \"loading\", \"defaultActiveFirstOption\", \"notFoundContent\", \"optionLabelProp\", \"backfill\", \"getInputElement\", \"getPopupContainer\", \"listHeight\", \"listItemHeight\", \"animation\", \"transitionName\", \"virtual\", \"dropdownStyle\", \"dropdownClassName\", \"dropdownMatchSelectWidth\", \"dropdownRender\", \"dropdownAlign\", \"showAction\", \"direction\", \"tokenSeparators\", \"tagRender\", \"onPopupScroll\", \"onDropdownVisibleChange\", \"onFocus\", \"onBlur\", \"onKeyUp\", \"onKeyDown\", \"onMouseDown\", \"onChange\", \"onSelect\", \"onDeselect\", \"internalProps\"]);\n\n var useInternalProps = internalProps.mark === _interface_generator__WEBPACK_IMPORTED_MODULE_10__[\"INTERNAL_PROPS_MARK\"];\n var domProps = omitDOMProps ? omitDOMProps(restProps) : restProps;\n DEFAULT_OMIT_PROPS.forEach(function (prop) {\n delete domProps[prop];\n });\n var containerRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](null);\n var triggerRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](null);\n var selectorRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](null);\n var listRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](null);\n /** Used for component focused management */\n\n var _useDelayReset = Object(_hooks_useDelayReset__WEBPACK_IMPORTED_MODULE_14__[\"default\"])(),\n _useDelayReset2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useDelayReset, 3),\n mockFocused = _useDelayReset2[0],\n setMockFocused = _useDelayReset2[1],\n cancelSetMockFocused = _useDelayReset2[2]; // Inner id for accessibility usage. Only work in client side\n\n\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](),\n _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState, 2),\n innerId = _React$useState2[0],\n setInnerId = _React$useState2[1];\n\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n setInnerId(\"rc_select_\".concat(Object(_utils_commonUtil__WEBPACK_IMPORTED_MODULE_11__[\"getUUID\"])()));\n }, []);\n var mergedId = id || innerId; // optionLabelProp\n\n var mergedOptionLabelProp = optionLabelProp;\n\n if (mergedOptionLabelProp === undefined) {\n mergedOptionLabelProp = options ? 'label' : 'children';\n } // labelInValue\n\n\n var mergedLabelInValue = mode === 'combobox' ? false : labelInValue;\n var isMultiple = mode === 'tags' || mode === 'multiple';\n var mergedShowSearch = showSearch !== undefined ? showSearch : isMultiple || mode === 'combobox'; // ============================== Ref ===============================\n\n var selectorDomRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](null);\n react__WEBPACK_IMPORTED_MODULE_4__[\"useImperativeHandle\"](ref, function () {\n return {\n focus: selectorRef.current.focus,\n blur: selectorRef.current.blur\n };\n }); // ============================= Value ==============================\n\n var _React$useState3 = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](value || defaultValue),\n _React$useState4 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState3, 2),\n innerValue = _React$useState4[0],\n setInnerValue = _React$useState4[1];\n\n var baseValue = value !== undefined ? value : innerValue; // Should reset when controlled to be uncontrolled\n\n var prevValueRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](value);\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n if (prevValueRef.current !== value && (value === undefined || value === null)) {\n setInnerValue(undefined);\n }\n\n prevValueRef.current = value;\n }, [value]);\n /** Unique raw values */\n\n var mergedRawValue = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n return Object(_utils_commonUtil__WEBPACK_IMPORTED_MODULE_11__[\"toInnerValue\"])(baseValue, {\n labelInValue: mergedLabelInValue,\n combobox: mode === 'combobox'\n });\n }, [baseValue, mergedLabelInValue]);\n /** We cache a set of raw values to speed up check */\n\n var rawValues = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n return new Set(mergedRawValue);\n }, [mergedRawValue]); // ============================= Option =============================\n // Set by option list active, it will merge into search input when mode is `combobox`\n\n var _React$useState5 = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](null),\n _React$useState6 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState5, 2),\n activeValue = _React$useState6[0],\n setActiveValue = _React$useState6[1];\n\n var _React$useState7 = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](''),\n _React$useState8 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState7, 2),\n innerSearchValue = _React$useState8[0],\n setInnerSearchValue = _React$useState8[1];\n\n var mergedSearchValue = innerSearchValue;\n\n if (mode === 'combobox' && value !== undefined) {\n mergedSearchValue = value;\n } else if (searchValue !== undefined) {\n mergedSearchValue = searchValue;\n } else if (inputValue) {\n mergedSearchValue = inputValue;\n }\n\n var mergedOptions = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n var newOptions = options;\n\n if (newOptions === undefined) {\n newOptions = convertChildrenToData(children);\n }\n /**\n * `tags` should fill un-list item.\n * This is not cool here since TreeSelect do not need this\n */\n\n\n if (mode === 'tags' && fillOptionsWithMissingValue) {\n newOptions = fillOptionsWithMissingValue(newOptions, baseValue, mergedOptionLabelProp, labelInValue);\n }\n\n return newOptions || [];\n }, [options, children, mode, baseValue]);\n var mergedFlattenOptions = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n return flattenOptions(mergedOptions, props);\n }, [mergedOptions]);\n var optionMap = Object(_hooks_useCacheOptions__WEBPACK_IMPORTED_MODULE_19__[\"default\"])(mergedRawValue, mergedFlattenOptions); // Display options for OptionList\n\n var displayOptions = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n if (!mergedSearchValue || !mergedShowSearch) {\n return Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mergedOptions);\n }\n\n var filteredOptions = filterOptions(mergedSearchValue, mergedOptions, {\n optionFilterProp: optionFilterProp,\n filterOption: mode === 'combobox' && filterOption === undefined ? function () {\n return true;\n } : filterOption\n });\n\n if (mode === 'tags' && filteredOptions.every(function (opt) {\n return opt.value !== mergedSearchValue;\n })) {\n filteredOptions.unshift({\n value: mergedSearchValue,\n label: mergedSearchValue,\n key: '__RC_SELECT_TAG_PLACEHOLDER__'\n });\n }\n\n return filteredOptions;\n }, [mergedOptions, mergedSearchValue, mode, mergedShowSearch]);\n var displayFlattenOptions = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n return flattenOptions(displayOptions, props);\n }, [displayOptions]);\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n if (listRef.current && listRef.current.scrollTo) {\n listRef.current.scrollTo(0);\n }\n }, [mergedSearchValue]); // ============================ Selector ============================\n\n var displayValues = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n return mergedRawValue.map(function (val) {\n var displayValue = getLabeledValue(val, {\n optionMap: optionMap,\n prevValue: baseValue,\n labelInValue: mergedLabelInValue,\n optionLabelProp: mergedOptionLabelProp\n });\n return _objectSpread(_objectSpread({}, displayValue), {}, {\n disabled: isValueDisabled(val, optionMap)\n });\n });\n }, [baseValue, mergedOptions]); // Polyfill with cache label\n\n displayValues = Object(_hooks_useCacheDisplayValue__WEBPACK_IMPORTED_MODULE_18__[\"default\"])(displayValues);\n\n var triggerSelect = function triggerSelect(newValue, isSelect, source) {\n var outOption = findValueOption([newValue], optionMap)[0];\n\n if (!internalProps.skipTriggerSelect) {\n // Skip trigger `onSelect` or `onDeselect` if configured\n var selectValue = mergedLabelInValue ? getLabeledValue(newValue, {\n optionMap: optionMap,\n prevValue: baseValue,\n labelInValue: mergedLabelInValue,\n optionLabelProp: mergedOptionLabelProp\n }) : newValue;\n\n if (isSelect && onSelect) {\n onSelect(selectValue, outOption);\n } else if (!isSelect && onDeselect) {\n onDeselect(selectValue, outOption);\n }\n } // Trigger internal event\n\n\n if (useInternalProps) {\n if (isSelect && internalProps.onRawSelect) {\n internalProps.onRawSelect(newValue, outOption, source);\n } else if (!isSelect && internalProps.onRawDeselect) {\n internalProps.onRawDeselect(newValue, outOption, source);\n }\n }\n };\n\n var triggerChange = function triggerChange(newRawValues) {\n if (useInternalProps && internalProps.skipTriggerChange) {\n return;\n }\n\n var outValues = Object(_utils_commonUtil__WEBPACK_IMPORTED_MODULE_11__[\"toOuterValues\"])(Array.from(newRawValues), {\n labelInValue: mergedLabelInValue,\n optionMap: optionMap,\n getLabeledValue: getLabeledValue,\n prevValue: baseValue,\n optionLabelProp: mergedOptionLabelProp\n });\n var outValue = isMultiple ? outValues : outValues[0]; // Skip trigger if prev & current value is both empty\n\n if (onChange && (mergedRawValue.length !== 0 || outValues.length !== 0)) {\n var outOptions = findValueOption(newRawValues, optionMap);\n onChange(outValue, isMultiple ? outOptions : outOptions[0]);\n }\n\n setInnerValue(outValue);\n };\n\n var onInternalSelect = function onInternalSelect(newValue, _ref) {\n var selected = _ref.selected,\n source = _ref.source;\n\n if (disabled) {\n return;\n }\n\n var newRawValue;\n\n if (isMultiple) {\n newRawValue = new Set(mergedRawValue);\n\n if (selected) {\n newRawValue.add(newValue);\n } else {\n newRawValue.delete(newValue);\n }\n } else {\n newRawValue = new Set();\n newRawValue.add(newValue);\n } // Multiple always trigger change and single should change if value changed\n\n\n if (isMultiple || !isMultiple && Array.from(mergedRawValue)[0] !== newValue) {\n triggerChange(Array.from(newRawValue));\n } // Trigger `onSelect`. Single mode always trigger select\n\n\n triggerSelect(newValue, !isMultiple || selected, source); // Clean search value if single or configured\n\n if (mode === 'combobox') {\n setInnerSearchValue(String(newValue));\n setActiveValue('');\n } else if (!isMultiple || autoClearSearchValue) {\n setInnerSearchValue('');\n setActiveValue('');\n }\n };\n\n var onInternalOptionSelect = function onInternalOptionSelect(newValue, info) {\n onInternalSelect(newValue, _objectSpread(_objectSpread({}, info), {}, {\n source: 'option'\n }));\n };\n\n var onInternalSelectionSelect = function onInternalSelectionSelect(newValue, info) {\n onInternalSelect(newValue, _objectSpread(_objectSpread({}, info), {}, {\n source: 'selection'\n }));\n }; // ============================= Input ==============================\n // Only works in `combobox`\n\n\n var customizeInputElement = mode === 'combobox' && getInputElement && getInputElement() || null; // ============================== Open ==============================\n\n var _useMergedState = Object(rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(undefined, {\n defaultValue: defaultOpen,\n value: open\n }),\n _useMergedState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useMergedState, 2),\n innerOpen = _useMergedState2[0],\n setInnerOpen = _useMergedState2[1];\n\n var mergedOpen = innerOpen; // Not trigger `open` in `combobox` when `notFoundContent` is empty\n\n var emptyListContent = !notFoundContent && !displayOptions.length;\n\n if (disabled || emptyListContent && mergedOpen && mode === 'combobox') {\n mergedOpen = false;\n }\n\n var triggerOpen = emptyListContent ? false : mergedOpen;\n\n var onToggleOpen = function onToggleOpen(newOpen) {\n var nextOpen = newOpen !== undefined ? newOpen : !mergedOpen;\n\n if (innerOpen !== nextOpen && !disabled) {\n setInnerOpen(nextOpen);\n\n if (onDropdownVisibleChange) {\n onDropdownVisibleChange(nextOpen);\n }\n }\n };\n\n Object(_hooks_useSelectTriggerControl__WEBPACK_IMPORTED_MODULE_17__[\"default\"])([containerRef.current, triggerRef.current && triggerRef.current.getPopupElement()], triggerOpen, onToggleOpen); // ============================= Search =============================\n\n var triggerSearch = function triggerSearch(searchText) {\n var fromTyping = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var ret = true;\n var newSearchText = searchText;\n setActiveValue(null); // Check if match the `tokenSeparators`\n\n var patchLabels = Object(_utils_valueUtil__WEBPACK_IMPORTED_MODULE_16__[\"getSeparatedContent\"])(searchText, tokenSeparators);\n var patchRawValues = patchLabels;\n\n if (mode === 'combobox') {\n // Only typing will trigger onChange\n if (fromTyping) {\n triggerChange([newSearchText]);\n }\n } else if (patchLabels) {\n newSearchText = '';\n\n if (mode !== 'tags') {\n patchRawValues = patchLabels.map(function (label) {\n var item = mergedFlattenOptions.find(function (_ref2) {\n var data = _ref2.data;\n return data[mergedOptionLabelProp] === label;\n });\n return item ? item.data.value : null;\n }).filter(function (val) {\n return val !== null;\n });\n }\n\n var newRawValues = Array.from(new Set([].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mergedRawValue), Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(patchRawValues))));\n triggerChange(newRawValues);\n newRawValues.forEach(function (newRawValue) {\n triggerSelect(newRawValue, true, 'input');\n }); // Should close when paste finish\n\n onToggleOpen(false); // Tell Selector that break next actions\n\n ret = false;\n }\n\n setInnerSearchValue(newSearchText);\n\n if (onSearch && mergedSearchValue !== newSearchText) {\n onSearch(newSearchText);\n }\n\n return ret;\n }; // Close dropdown when disabled change\n\n\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n if (innerOpen && !!disabled) {\n setInnerOpen(false);\n }\n }, [disabled]); // Close will clean up single mode search text\n\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n if (!mergedOpen && !isMultiple && mode !== 'combobox') {\n triggerSearch('', false);\n }\n }, [mergedOpen]); // ============================ Keyboard ============================\n\n /**\n * We record input value here to check if can press to clean up by backspace\n * - null: Key is not down, this is reset by key up\n * - true: Search text is empty when first time backspace down\n * - false: Search text is not empty when first time backspace down\n */\n\n var _useLock = Object(_hooks_useLock__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(),\n _useLock2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useLock, 2),\n getClearLock = _useLock2[0],\n setClearLock = _useLock2[1]; // KeyDown\n\n\n var onInternalKeyDown = function onInternalKeyDown(event) {\n var clearLock = getClearLock();\n var which = event.which; // We only manage open state here, close logic should handle by list component\n\n if (!mergedOpen && which === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_5__[\"default\"].ENTER) {\n onToggleOpen(true);\n }\n\n setClearLock(!!mergedSearchValue); // Remove value by `backspace`\n\n if (which === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_5__[\"default\"].BACKSPACE && !clearLock && isMultiple && !mergedSearchValue && mergedRawValue.length) {\n var removeInfo = Object(_utils_commonUtil__WEBPACK_IMPORTED_MODULE_11__[\"removeLastEnabledValue\"])(displayValues, mergedRawValue);\n\n if (removeInfo.removedValue !== null) {\n triggerChange(removeInfo.values);\n triggerSelect(removeInfo.removedValue, false, 'input');\n }\n }\n\n for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n rest[_key - 1] = arguments[_key];\n }\n\n if (mergedOpen && listRef.current) {\n var _listRef$current;\n\n (_listRef$current = listRef.current).onKeyDown.apply(_listRef$current, [event].concat(rest));\n }\n\n if (onKeyDown) {\n onKeyDown.apply(void 0, [event].concat(rest));\n }\n }; // KeyUp\n\n\n var onInternalKeyUp = function onInternalKeyUp(event) {\n for (var _len2 = arguments.length, rest = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n rest[_key2 - 1] = arguments[_key2];\n }\n\n if (mergedOpen && listRef.current) {\n var _listRef$current2;\n\n (_listRef$current2 = listRef.current).onKeyUp.apply(_listRef$current2, [event].concat(rest));\n }\n\n if (onKeyUp) {\n onKeyUp.apply(void 0, [event].concat(rest));\n }\n }; // ========================== Focus / Blur ==========================\n\n /** Record real focus status */\n\n\n var focusRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](false);\n\n var onContainerFocus = function onContainerFocus() {\n setMockFocused(true);\n\n if (!disabled) {\n if (onFocus && !focusRef.current) {\n onFocus.apply(void 0, arguments);\n } // `showAction` should handle `focus` if set\n\n\n if (showAction.includes('focus')) {\n onToggleOpen(true);\n }\n }\n\n focusRef.current = true;\n };\n\n var onContainerBlur = function onContainerBlur() {\n setMockFocused(false, function () {\n focusRef.current = false;\n onToggleOpen(false);\n });\n\n if (disabled) {\n return;\n }\n\n if (mergedSearchValue) {\n // `tags` mode should move `searchValue` into values\n if (mode === 'tags') {\n triggerSearch('', false);\n triggerChange(Array.from(new Set([].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mergedRawValue), [mergedSearchValue]))));\n } else if (mode === 'multiple') {\n // `multiple` mode only clean the search value but not trigger event\n setInnerSearchValue('');\n }\n }\n\n if (onBlur) {\n onBlur.apply(void 0, arguments);\n }\n };\n\n var activeTimeoutIds = [];\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n return function () {\n activeTimeoutIds.forEach(function (timeoutId) {\n return clearTimeout(timeoutId);\n });\n activeTimeoutIds.splice(0, activeTimeoutIds.length);\n };\n }, []);\n\n var onInternalMouseDown = function onInternalMouseDown(event) {\n var target = event.target;\n var popupElement = triggerRef.current && triggerRef.current.getPopupElement(); // We should give focus back to selector if clicked item is not focusable\n\n if (popupElement && popupElement.contains(target)) {\n var timeoutId = setTimeout(function () {\n var index = activeTimeoutIds.indexOf(timeoutId);\n\n if (index !== -1) {\n activeTimeoutIds.splice(index, 1);\n }\n\n cancelSetMockFocused();\n\n if (!popupElement.contains(document.activeElement)) {\n selectorRef.current.focus();\n }\n });\n activeTimeoutIds.push(timeoutId);\n }\n\n if (onMouseDown) {\n for (var _len3 = arguments.length, restArgs = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n restArgs[_key3 - 1] = arguments[_key3];\n }\n\n onMouseDown.apply(void 0, [event].concat(restArgs));\n }\n }; // ========================= Accessibility ==========================\n\n\n var _React$useState9 = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](0),\n _React$useState10 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState9, 2),\n accessibilityIndex = _React$useState10[0],\n setAccessibilityIndex = _React$useState10[1];\n\n var mergedDefaultActiveFirstOption = defaultActiveFirstOption !== undefined ? defaultActiveFirstOption : mode !== 'combobox';\n\n var onActiveValue = function onActiveValue(active, index) {\n setAccessibilityIndex(index);\n\n if (backfill && mode === 'combobox' && active !== null) {\n setActiveValue(String(active));\n }\n }; // ============================= Popup ==============================\n\n\n var _React$useState11 = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](null),\n _React$useState12 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState11, 2),\n containerWidth = _React$useState12[0],\n setContainerWidth = _React$useState12[1];\n\n Object(_hooks_useLayoutEffect__WEBPACK_IMPORTED_MODULE_15__[\"default\"])(function () {\n if (triggerOpen) {\n var newWidth = Math.ceil(containerRef.current.offsetWidth);\n\n if (containerWidth !== newWidth) {\n setContainerWidth(newWidth);\n }\n }\n }, [triggerOpen]);\n var popupNode = react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](OptionList, {\n ref: listRef,\n prefixCls: prefixCls,\n id: mergedId,\n open: mergedOpen,\n childrenAsData: !options,\n options: displayOptions,\n flattenOptions: displayFlattenOptions,\n multiple: isMultiple,\n values: rawValues,\n height: listHeight,\n itemHeight: listItemHeight,\n onSelect: onInternalOptionSelect,\n onToggleOpen: onToggleOpen,\n onActiveValue: onActiveValue,\n defaultActiveFirstOption: mergedDefaultActiveFirstOption,\n notFoundContent: notFoundContent,\n onScroll: onPopupScroll,\n searchValue: mergedSearchValue,\n menuItemSelectedIcon: menuItemSelectedIcon,\n virtual: virtual !== false && dropdownMatchSelectWidth !== false\n }); // ============================= Clear ==============================\n\n var clearNode;\n\n var onClearMouseDown = function onClearMouseDown() {\n // Trigger internal `onClear` event\n if (useInternalProps && internalProps.onClear) {\n internalProps.onClear();\n }\n\n triggerChange([]);\n triggerSearch('', false);\n };\n\n if (!disabled && allowClear && (mergedRawValue.length || mergedSearchValue)) {\n clearNode = react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](_TransBtn__WEBPACK_IMPORTED_MODULE_12__[\"default\"], {\n className: \"\".concat(prefixCls, \"-clear\"),\n onMouseDown: onClearMouseDown,\n customizeIcon: clearIcon\n }, \"\\xD7\");\n } // ============================= Arrow ==============================\n\n\n var mergedShowArrow = showArrow !== undefined ? showArrow : loading || !isMultiple && mode !== 'combobox';\n var arrowNode;\n\n if (mergedShowArrow) {\n arrowNode = react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](_TransBtn__WEBPACK_IMPORTED_MODULE_12__[\"default\"], {\n className: classnames__WEBPACK_IMPORTED_MODULE_6___default()(\"\".concat(prefixCls, \"-arrow\"), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, \"\".concat(prefixCls, \"-arrow-loading\"), loading)),\n customizeIcon: inputIcon,\n customizeIconProps: {\n loading: loading,\n searchValue: mergedSearchValue,\n open: mergedOpen,\n focused: mockFocused,\n showSearch: mergedShowSearch\n }\n });\n } // ============================ Warning =============================\n\n\n if (false) {} // ============================= Render =============================\n\n\n var mergedClassName = classnames__WEBPACK_IMPORTED_MODULE_6___default()(prefixCls, className, (_classNames2 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-focused\"), mockFocused), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-multiple\"), isMultiple), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-single\"), !isMultiple), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-allow-clear\"), allowClear), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-show-arrow\"), mergedShowArrow), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-disabled\"), disabled), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-loading\"), loading), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-open\"), mergedOpen), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-customize-input\"), customizeInputElement), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-show-search\"), mergedShowSearch), _classNames2));\n return react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](\"div\", Object.assign({\n className: mergedClassName\n }, domProps, {\n ref: containerRef,\n onMouseDown: onInternalMouseDown,\n onKeyDown: onInternalKeyDown,\n onKeyUp: onInternalKeyUp,\n onFocus: onContainerFocus,\n onBlur: onContainerBlur\n }), mockFocused && !mergedOpen && react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](\"span\", {\n style: {\n width: 0,\n height: 0,\n display: 'flex',\n overflow: 'hidden',\n opacity: 0\n },\n \"aria-live\": \"polite\"\n }, \"\".concat(mergedRawValue.join(', '))), react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](_SelectTrigger__WEBPACK_IMPORTED_MODULE_9__[\"default\"], {\n ref: triggerRef,\n disabled: disabled,\n prefixCls: prefixCls,\n visible: triggerOpen,\n popupElement: popupNode,\n containerWidth: containerWidth,\n animation: animation,\n transitionName: transitionName,\n dropdownStyle: dropdownStyle,\n dropdownClassName: dropdownClassName,\n direction: direction,\n dropdownMatchSelectWidth: dropdownMatchSelectWidth,\n dropdownRender: dropdownRender,\n dropdownAlign: dropdownAlign,\n getPopupContainer: getPopupContainer,\n empty: !mergedOptions.length,\n getTriggerDOMNode: function getTriggerDOMNode() {\n return selectorDomRef.current;\n }\n }, react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](_Selector__WEBPACK_IMPORTED_MODULE_8__[\"default\"], Object.assign({}, props, {\n domRef: selectorDomRef,\n prefixCls: prefixCls,\n inputElement: customizeInputElement,\n ref: selectorRef,\n id: mergedId,\n showSearch: mergedShowSearch,\n mode: mode,\n accessibilityIndex: accessibilityIndex,\n multiple: isMultiple,\n tagRender: tagRender,\n values: displayValues,\n open: mergedOpen,\n onToggleOpen: onToggleOpen,\n searchValue: mergedSearchValue,\n activeValue: activeValue,\n onSearch: triggerSearch,\n onSelect: onInternalSelectionSelect\n }))), arrowNode, clearNode);\n }", "function Select(props, ref) {\n var _classNames2;\n\n var _props$prefixCls = props.prefixCls,\n prefixCls = _props$prefixCls === void 0 ? defaultPrefixCls : _props$prefixCls,\n className = props.className,\n id = props.id,\n open = props.open,\n defaultOpen = props.defaultOpen,\n options = props.options,\n children = props.children,\n mode = props.mode,\n value = props.value,\n defaultValue = props.defaultValue,\n labelInValue = props.labelInValue,\n showSearch = props.showSearch,\n inputValue = props.inputValue,\n searchValue = props.searchValue,\n filterOption = props.filterOption,\n _props$optionFilterPr = props.optionFilterProp,\n optionFilterProp = _props$optionFilterPr === void 0 ? 'value' : _props$optionFilterPr,\n _props$autoClearSearc = props.autoClearSearchValue,\n autoClearSearchValue = _props$autoClearSearc === void 0 ? true : _props$autoClearSearc,\n onSearch = props.onSearch,\n allowClear = props.allowClear,\n clearIcon = props.clearIcon,\n showArrow = props.showArrow,\n inputIcon = props.inputIcon,\n menuItemSelectedIcon = props.menuItemSelectedIcon,\n disabled = props.disabled,\n loading = props.loading,\n defaultActiveFirstOption = props.defaultActiveFirstOption,\n _props$notFoundConten = props.notFoundContent,\n notFoundContent = _props$notFoundConten === void 0 ? 'Not Found' : _props$notFoundConten,\n optionLabelProp = props.optionLabelProp,\n backfill = props.backfill,\n getInputElement = props.getInputElement,\n getPopupContainer = props.getPopupContainer,\n _props$listHeight = props.listHeight,\n listHeight = _props$listHeight === void 0 ? 200 : _props$listHeight,\n _props$listItemHeight = props.listItemHeight,\n listItemHeight = _props$listItemHeight === void 0 ? 20 : _props$listItemHeight,\n animation = props.animation,\n transitionName = props.transitionName,\n virtual = props.virtual,\n dropdownStyle = props.dropdownStyle,\n dropdownClassName = props.dropdownClassName,\n dropdownMatchSelectWidth = props.dropdownMatchSelectWidth,\n dropdownRender = props.dropdownRender,\n dropdownAlign = props.dropdownAlign,\n _props$showAction = props.showAction,\n showAction = _props$showAction === void 0 ? [] : _props$showAction,\n direction = props.direction,\n tokenSeparators = props.tokenSeparators,\n tagRender = props.tagRender,\n onPopupScroll = props.onPopupScroll,\n onDropdownVisibleChange = props.onDropdownVisibleChange,\n onFocus = props.onFocus,\n onBlur = props.onBlur,\n onKeyUp = props.onKeyUp,\n onKeyDown = props.onKeyDown,\n onMouseDown = props.onMouseDown,\n onChange = props.onChange,\n onSelect = props.onSelect,\n onDeselect = props.onDeselect,\n _props$internalProps = props.internalProps,\n internalProps = _props$internalProps === void 0 ? {} : _props$internalProps,\n restProps = (0, _objectWithoutProperties2.default)(props, [\"prefixCls\", \"className\", \"id\", \"open\", \"defaultOpen\", \"options\", \"children\", \"mode\", \"value\", \"defaultValue\", \"labelInValue\", \"showSearch\", \"inputValue\", \"searchValue\", \"filterOption\", \"optionFilterProp\", \"autoClearSearchValue\", \"onSearch\", \"allowClear\", \"clearIcon\", \"showArrow\", \"inputIcon\", \"menuItemSelectedIcon\", \"disabled\", \"loading\", \"defaultActiveFirstOption\", \"notFoundContent\", \"optionLabelProp\", \"backfill\", \"getInputElement\", \"getPopupContainer\", \"listHeight\", \"listItemHeight\", \"animation\", \"transitionName\", \"virtual\", \"dropdownStyle\", \"dropdownClassName\", \"dropdownMatchSelectWidth\", \"dropdownRender\", \"dropdownAlign\", \"showAction\", \"direction\", \"tokenSeparators\", \"tagRender\", \"onPopupScroll\", \"onDropdownVisibleChange\", \"onFocus\", \"onBlur\", \"onKeyUp\", \"onKeyDown\", \"onMouseDown\", \"onChange\", \"onSelect\", \"onDeselect\", \"internalProps\"]);\n var useInternalProps = internalProps.mark === _generator.INTERNAL_PROPS_MARK;\n var domProps = omitDOMProps ? omitDOMProps(restProps) : restProps;\n DEFAULT_OMIT_PROPS.forEach(function (prop) {\n delete domProps[prop];\n });\n var containerRef = (0, React.useRef)(null);\n var triggerRef = (0, React.useRef)(null);\n var selectorRef = (0, React.useRef)(null);\n var listRef = (0, React.useRef)(null);\n var tokenWithEnter = (0, React.useMemo)(function () {\n return (tokenSeparators || []).some(function (tokenSeparator) {\n return ['\\n', '\\r\\n'].includes(tokenSeparator);\n });\n }, [tokenSeparators]);\n /** Used for component focused management */\n\n var _useDelayReset = (0, _useDelayReset3.default)(),\n _useDelayReset2 = (0, _slicedToArray2.default)(_useDelayReset, 3),\n mockFocused = _useDelayReset2[0],\n setMockFocused = _useDelayReset2[1],\n cancelSetMockFocused = _useDelayReset2[2]; // Inner id for accessibility usage. Only work in client side\n\n\n var _useState = (0, React.useState)(),\n _useState2 = (0, _slicedToArray2.default)(_useState, 2),\n innerId = _useState2[0],\n setInnerId = _useState2[1];\n\n (0, React.useEffect)(function () {\n setInnerId(\"rc_select_\".concat((0, _commonUtil.getUUID)()));\n }, []);\n var mergedId = id || innerId; // optionLabelProp\n\n var mergedOptionLabelProp = optionLabelProp;\n\n if (mergedOptionLabelProp === undefined) {\n mergedOptionLabelProp = options ? 'label' : 'children';\n } // labelInValue\n\n\n var mergedLabelInValue = mode === 'combobox' ? false : labelInValue;\n var isMultiple = mode === 'tags' || mode === 'multiple';\n var mergedShowSearch = showSearch !== undefined ? showSearch : isMultiple || mode === 'combobox'; // ============================== Ref ===============================\n\n var selectorDomRef = (0, React.useRef)(null);\n React.useImperativeHandle(ref, function () {\n return {\n focus: selectorRef.current.focus,\n blur: selectorRef.current.blur\n };\n }); // ============================= Value ==============================\n\n var _useMergedState = (0, _useMergedState5.default)(defaultValue, {\n value: value\n }),\n _useMergedState2 = (0, _slicedToArray2.default)(_useMergedState, 2),\n mergedValue = _useMergedState2[0],\n setMergedValue = _useMergedState2[1];\n /** Unique raw values */\n\n\n var mergedRawValue = (0, React.useMemo)(function () {\n return (0, _commonUtil.toInnerValue)(mergedValue, {\n labelInValue: mergedLabelInValue,\n combobox: mode === 'combobox'\n });\n }, [mergedValue, mergedLabelInValue]);\n /** We cache a set of raw values to speed up check */\n\n var rawValues = (0, React.useMemo)(function () {\n return new Set(mergedRawValue);\n }, [mergedRawValue]); // ============================= Option =============================\n // Set by option list active, it will merge into search input when mode is `combobox`\n\n var _useState3 = (0, React.useState)(null),\n _useState4 = (0, _slicedToArray2.default)(_useState3, 2),\n activeValue = _useState4[0],\n setActiveValue = _useState4[1];\n\n var _useState5 = (0, React.useState)(''),\n _useState6 = (0, _slicedToArray2.default)(_useState5, 2),\n innerSearchValue = _useState6[0],\n setInnerSearchValue = _useState6[1];\n\n var mergedSearchValue = innerSearchValue;\n\n if (mode === 'combobox' && mergedValue !== undefined) {\n mergedSearchValue = mergedValue;\n } else if (searchValue !== undefined) {\n mergedSearchValue = searchValue;\n } else if (inputValue) {\n mergedSearchValue = inputValue;\n }\n\n var mergedOptions = (0, React.useMemo)(function () {\n var newOptions = options;\n\n if (newOptions === undefined) {\n newOptions = convertChildrenToData(children);\n }\n /**\n * `tags` should fill un-list item.\n * This is not cool here since TreeSelect do not need this\n */\n\n\n if (mode === 'tags' && fillOptionsWithMissingValue) {\n newOptions = fillOptionsWithMissingValue(newOptions, mergedValue, mergedOptionLabelProp, labelInValue);\n }\n\n return newOptions || [];\n }, [options, children, mode, mergedValue]);\n var mergedFlattenOptions = (0, React.useMemo)(function () {\n return flattenOptions(mergedOptions, props);\n }, [mergedOptions]);\n var getValueOption = (0, _useCacheOptions.default)(mergedRawValue, mergedFlattenOptions); // Display options for OptionList\n\n var displayOptions = (0, React.useMemo)(function () {\n if (!mergedSearchValue || !mergedShowSearch) {\n return (0, _toConsumableArray2.default)(mergedOptions);\n }\n\n var filteredOptions = filterOptions(mergedSearchValue, mergedOptions, {\n optionFilterProp: optionFilterProp,\n filterOption: mode === 'combobox' && filterOption === undefined ? function () {\n return true;\n } : filterOption\n });\n\n if (mode === 'tags' && filteredOptions.every(function (opt) {\n return opt.value !== mergedSearchValue;\n })) {\n filteredOptions.unshift({\n value: mergedSearchValue,\n label: mergedSearchValue,\n key: '__RC_SELECT_TAG_PLACEHOLDER__'\n });\n }\n\n return filteredOptions;\n }, [mergedOptions, mergedSearchValue, mode, mergedShowSearch]);\n var displayFlattenOptions = (0, React.useMemo)(function () {\n return flattenOptions(displayOptions, props);\n }, [displayOptions]);\n (0, React.useEffect)(function () {\n if (listRef.current && listRef.current.scrollTo) {\n listRef.current.scrollTo(0);\n }\n }, [mergedSearchValue]); // ============================ Selector ============================\n\n var displayValues = (0, React.useMemo)(function () {\n var tmpValues = mergedRawValue.map(function (val) {\n var valueOptions = getValueOption([val]);\n var displayValue = getLabeledValue(val, {\n options: valueOptions,\n prevValue: mergedValue,\n labelInValue: mergedLabelInValue,\n optionLabelProp: mergedOptionLabelProp\n });\n return _objectSpread(_objectSpread({}, displayValue), {}, {\n disabled: isValueDisabled(val, valueOptions)\n });\n });\n\n if (!mode && tmpValues.length === 1 && tmpValues[0].value === null && tmpValues[0].label === null) {\n return [];\n }\n\n return tmpValues;\n }, [mergedValue, mergedOptions, mode]); // Polyfill with cache label\n\n displayValues = (0, _useCacheDisplayValue.default)(displayValues);\n\n var triggerSelect = function triggerSelect(newValue, isSelect, source) {\n var newValueOption = getValueOption([newValue]);\n var outOption = findValueOption([newValue], newValueOption)[0];\n\n if (!internalProps.skipTriggerSelect) {\n // Skip trigger `onSelect` or `onDeselect` if configured\n var selectValue = mergedLabelInValue ? getLabeledValue(newValue, {\n options: newValueOption,\n prevValue: mergedValue,\n labelInValue: mergedLabelInValue,\n optionLabelProp: mergedOptionLabelProp\n }) : newValue;\n\n if (isSelect && onSelect) {\n onSelect(selectValue, outOption);\n } else if (!isSelect && onDeselect) {\n onDeselect(selectValue, outOption);\n }\n } // Trigger internal event\n\n\n if (useInternalProps) {\n if (isSelect && internalProps.onRawSelect) {\n internalProps.onRawSelect(newValue, outOption, source);\n } else if (!isSelect && internalProps.onRawDeselect) {\n internalProps.onRawDeselect(newValue, outOption, source);\n }\n }\n };\n\n var triggerChange = function triggerChange(newRawValues) {\n if (useInternalProps && internalProps.skipTriggerChange) {\n return;\n }\n\n var newRawValuesOptions = getValueOption(newRawValues);\n var outValues = (0, _commonUtil.toOuterValues)(Array.from(newRawValues), {\n labelInValue: mergedLabelInValue,\n options: newRawValuesOptions,\n getLabeledValue: getLabeledValue,\n prevValue: mergedValue,\n optionLabelProp: mergedOptionLabelProp\n });\n var outValue = isMultiple ? outValues : outValues[0]; // Skip trigger if prev & current value is both empty\n\n if (onChange && (mergedRawValue.length !== 0 || outValues.length !== 0)) {\n var outOptions = findValueOption(newRawValues, newRawValuesOptions);\n onChange(outValue, isMultiple ? outOptions : outOptions[0]);\n }\n\n setMergedValue(outValue);\n };\n\n var onInternalSelect = function onInternalSelect(newValue, _ref) {\n var selected = _ref.selected,\n source = _ref.source;\n\n if (disabled) {\n return;\n }\n\n var newRawValue;\n\n if (isMultiple) {\n newRawValue = new Set(mergedRawValue);\n\n if (selected) {\n newRawValue.add(newValue);\n } else {\n newRawValue.delete(newValue);\n }\n } else {\n newRawValue = new Set();\n newRawValue.add(newValue);\n } // Multiple always trigger change and single should change if value changed\n\n\n if (isMultiple || !isMultiple && Array.from(mergedRawValue)[0] !== newValue) {\n triggerChange(Array.from(newRawValue));\n } // Trigger `onSelect`. Single mode always trigger select\n\n\n triggerSelect(newValue, !isMultiple || selected, source); // Clean search value if single or configured\n\n if (mode === 'combobox') {\n setInnerSearchValue(String(newValue));\n setActiveValue('');\n } else if (!isMultiple || autoClearSearchValue) {\n setInnerSearchValue('');\n setActiveValue('');\n }\n };\n\n var onInternalOptionSelect = function onInternalOptionSelect(newValue, info) {\n onInternalSelect(newValue, _objectSpread(_objectSpread({}, info), {}, {\n source: 'option'\n }));\n };\n\n var onInternalSelectionSelect = function onInternalSelectionSelect(newValue, info) {\n onInternalSelect(newValue, _objectSpread(_objectSpread({}, info), {}, {\n source: 'selection'\n }));\n }; // ============================= Input ==============================\n // Only works in `combobox`\n\n\n var customizeInputElement = mode === 'combobox' && getInputElement && getInputElement() || null; // ============================== Open ==============================\n\n var _useMergedState3 = (0, _useMergedState5.default)(undefined, {\n defaultValue: defaultOpen,\n value: open\n }),\n _useMergedState4 = (0, _slicedToArray2.default)(_useMergedState3, 2),\n innerOpen = _useMergedState4[0],\n setInnerOpen = _useMergedState4[1];\n\n var mergedOpen = innerOpen; // Not trigger `open` in `combobox` when `notFoundContent` is empty\n\n var emptyListContent = !notFoundContent && !displayOptions.length;\n\n if (disabled || emptyListContent && mergedOpen && mode === 'combobox') {\n mergedOpen = false;\n }\n\n var triggerOpen = emptyListContent ? false : mergedOpen;\n\n var onToggleOpen = function onToggleOpen(newOpen) {\n var nextOpen = newOpen !== undefined ? newOpen : !mergedOpen;\n\n if (innerOpen !== nextOpen && !disabled) {\n setInnerOpen(nextOpen);\n\n if (onDropdownVisibleChange) {\n onDropdownVisibleChange(nextOpen);\n }\n }\n };\n\n (0, _useSelectTriggerControl.default)([containerRef.current, triggerRef.current && triggerRef.current.getPopupElement()], triggerOpen, onToggleOpen); // ============================= Search =============================\n\n var triggerSearch = function triggerSearch(searchText, fromTyping, isCompositing) {\n var ret = true;\n var newSearchText = searchText;\n setActiveValue(null); // Check if match the `tokenSeparators`\n\n var patchLabels = isCompositing ? null : (0, _valueUtil.getSeparatedContent)(searchText, tokenSeparators);\n var patchRawValues = patchLabels;\n\n if (mode === 'combobox') {\n // Only typing will trigger onChange\n if (fromTyping) {\n triggerChange([newSearchText]);\n }\n } else if (patchLabels) {\n newSearchText = '';\n\n if (mode !== 'tags') {\n patchRawValues = patchLabels.map(function (label) {\n var item = mergedFlattenOptions.find(function (_ref2) {\n var data = _ref2.data;\n return data[mergedOptionLabelProp] === label;\n });\n return item ? item.data.value : null;\n }).filter(function (val) {\n return val !== null;\n });\n }\n\n var newRawValues = Array.from(new Set([].concat((0, _toConsumableArray2.default)(mergedRawValue), (0, _toConsumableArray2.default)(patchRawValues))));\n triggerChange(newRawValues);\n newRawValues.forEach(function (newRawValue) {\n triggerSelect(newRawValue, true, 'input');\n }); // Should close when paste finish\n\n onToggleOpen(false); // Tell Selector that break next actions\n\n ret = false;\n }\n\n setInnerSearchValue(newSearchText);\n\n if (onSearch && mergedSearchValue !== newSearchText) {\n onSearch(newSearchText);\n }\n\n return ret;\n }; // Only triggered when menu is closed & mode is tags\n // If menu is open, OptionList will take charge\n // If mode isn't tags, press enter is not meaningful when you can't see any option\n\n\n var onSearchSubmit = function onSearchSubmit(searchText) {\n var newRawValues = Array.from(new Set([].concat((0, _toConsumableArray2.default)(mergedRawValue), [searchText])));\n triggerChange(newRawValues);\n newRawValues.forEach(function (newRawValue) {\n triggerSelect(newRawValue, true, 'input');\n });\n setInnerSearchValue('');\n }; // Close dropdown when disabled change\n\n\n (0, React.useEffect)(function () {\n if (innerOpen && !!disabled) {\n setInnerOpen(false);\n }\n }, [disabled]); // Close will clean up single mode search text\n\n (0, React.useEffect)(function () {\n if (!mergedOpen && !isMultiple && mode !== 'combobox') {\n triggerSearch('', false, false);\n }\n }, [mergedOpen]); // ============================ Keyboard ============================\n\n /**\n * We record input value here to check if can press to clean up by backspace\n * - null: Key is not down, this is reset by key up\n * - true: Search text is empty when first time backspace down\n * - false: Search text is not empty when first time backspace down\n */\n\n var _useLock = (0, _useLock3.default)(),\n _useLock2 = (0, _slicedToArray2.default)(_useLock, 2),\n getClearLock = _useLock2[0],\n setClearLock = _useLock2[1]; // KeyDown\n\n\n var onInternalKeyDown = function onInternalKeyDown(event) {\n var clearLock = getClearLock();\n var which = event.which; // We only manage open state here, close logic should handle by list component\n\n if (!mergedOpen && which === _KeyCode.default.ENTER) {\n onToggleOpen(true);\n }\n\n setClearLock(!!mergedSearchValue); // Remove value by `backspace`\n\n if (which === _KeyCode.default.BACKSPACE && !clearLock && isMultiple && !mergedSearchValue && mergedRawValue.length) {\n var removeInfo = (0, _commonUtil.removeLastEnabledValue)(displayValues, mergedRawValue);\n\n if (removeInfo.removedValue !== null) {\n triggerChange(removeInfo.values);\n triggerSelect(removeInfo.removedValue, false, 'input');\n }\n }\n\n for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n rest[_key - 1] = arguments[_key];\n }\n\n if (mergedOpen && listRef.current) {\n var _listRef$current;\n\n (_listRef$current = listRef.current).onKeyDown.apply(_listRef$current, [event].concat(rest));\n }\n\n if (onKeyDown) {\n onKeyDown.apply(void 0, [event].concat(rest));\n }\n }; // KeyUp\n\n\n var onInternalKeyUp = function onInternalKeyUp(event) {\n for (var _len2 = arguments.length, rest = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n rest[_key2 - 1] = arguments[_key2];\n }\n\n if (mergedOpen && listRef.current) {\n var _listRef$current2;\n\n (_listRef$current2 = listRef.current).onKeyUp.apply(_listRef$current2, [event].concat(rest));\n }\n\n if (onKeyUp) {\n onKeyUp.apply(void 0, [event].concat(rest));\n }\n }; // ========================== Focus / Blur ==========================\n\n /** Record real focus status */\n\n\n var focusRef = (0, React.useRef)(false);\n\n var onContainerFocus = function onContainerFocus() {\n setMockFocused(true);\n\n if (!disabled) {\n if (onFocus && !focusRef.current) {\n onFocus.apply(void 0, arguments);\n } // `showAction` should handle `focus` if set\n\n\n if (showAction.includes('focus')) {\n onToggleOpen(true);\n }\n }\n\n focusRef.current = true;\n };\n\n var onContainerBlur = function onContainerBlur() {\n setMockFocused(false, function () {\n focusRef.current = false;\n onToggleOpen(false);\n });\n\n if (disabled) {\n return;\n }\n\n if (mergedSearchValue) {\n // `tags` mode should move `searchValue` into values\n if (mode === 'tags') {\n triggerSearch('', false, false);\n triggerChange(Array.from(new Set([].concat((0, _toConsumableArray2.default)(mergedRawValue), [mergedSearchValue]))));\n } else if (mode === 'multiple') {\n // `multiple` mode only clean the search value but not trigger event\n setInnerSearchValue('');\n }\n }\n\n if (onBlur) {\n onBlur.apply(void 0, arguments);\n }\n };\n\n var activeTimeoutIds = [];\n (0, React.useEffect)(function () {\n return function () {\n activeTimeoutIds.forEach(function (timeoutId) {\n return clearTimeout(timeoutId);\n });\n activeTimeoutIds.splice(0, activeTimeoutIds.length);\n };\n }, []);\n\n var onInternalMouseDown = function onInternalMouseDown(event) {\n var target = event.target;\n var popupElement = triggerRef.current && triggerRef.current.getPopupElement(); // We should give focus back to selector if clicked item is not focusable\n\n if (popupElement && popupElement.contains(target)) {\n var timeoutId = setTimeout(function () {\n var index = activeTimeoutIds.indexOf(timeoutId);\n\n if (index !== -1) {\n activeTimeoutIds.splice(index, 1);\n }\n\n cancelSetMockFocused();\n\n if (!popupElement.contains(document.activeElement)) {\n selectorRef.current.focus();\n }\n });\n activeTimeoutIds.push(timeoutId);\n }\n\n if (onMouseDown) {\n for (var _len3 = arguments.length, restArgs = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n restArgs[_key3 - 1] = arguments[_key3];\n }\n\n onMouseDown.apply(void 0, [event].concat(restArgs));\n }\n }; // ========================= Accessibility ==========================\n\n\n var _useState7 = (0, React.useState)(0),\n _useState8 = (0, _slicedToArray2.default)(_useState7, 2),\n accessibilityIndex = _useState8[0],\n setAccessibilityIndex = _useState8[1];\n\n var mergedDefaultActiveFirstOption = defaultActiveFirstOption !== undefined ? defaultActiveFirstOption : mode !== 'combobox';\n\n var onActiveValue = function onActiveValue(active, index) {\n setAccessibilityIndex(index);\n\n if (backfill && mode === 'combobox' && active !== null) {\n setActiveValue(String(active));\n }\n }; // ============================= Popup ==============================\n\n\n var _useState9 = (0, React.useState)(null),\n _useState10 = (0, _slicedToArray2.default)(_useState9, 2),\n containerWidth = _useState10[0],\n setContainerWidth = _useState10[1];\n\n var _useState11 = (0, React.useState)({}),\n _useState12 = (0, _slicedToArray2.default)(_useState11, 2),\n forceUpdate = _useState12[1]; // We need force update here since popup dom is render async\n\n\n function onPopupMouseEnter() {\n forceUpdate({});\n }\n\n (0, _useLayoutEffect.default)(function () {\n if (triggerOpen) {\n var newWidth = Math.ceil(containerRef.current.offsetWidth);\n\n if (containerWidth !== newWidth) {\n setContainerWidth(newWidth);\n }\n }\n }, [triggerOpen]);\n var popupNode = React.createElement(OptionList, {\n ref: listRef,\n prefixCls: prefixCls,\n id: mergedId,\n open: mergedOpen,\n childrenAsData: !options,\n options: displayOptions,\n flattenOptions: displayFlattenOptions,\n multiple: isMultiple,\n values: rawValues,\n height: listHeight,\n itemHeight: listItemHeight,\n onSelect: onInternalOptionSelect,\n onToggleOpen: onToggleOpen,\n onActiveValue: onActiveValue,\n defaultActiveFirstOption: mergedDefaultActiveFirstOption,\n notFoundContent: notFoundContent,\n onScroll: onPopupScroll,\n searchValue: mergedSearchValue,\n menuItemSelectedIcon: menuItemSelectedIcon,\n virtual: virtual !== false && dropdownMatchSelectWidth !== false,\n onMouseEnter: onPopupMouseEnter\n }); // ============================= Clear ==============================\n\n var clearNode;\n\n var onClearMouseDown = function onClearMouseDown() {\n // Trigger internal `onClear` event\n if (useInternalProps && internalProps.onClear) {\n internalProps.onClear();\n }\n\n triggerChange([]);\n triggerSearch('', false, false);\n };\n\n if (!disabled && allowClear && (mergedRawValue.length || mergedSearchValue)) {\n clearNode = React.createElement(_TransBtn.default, {\n className: \"\".concat(prefixCls, \"-clear\"),\n onMouseDown: onClearMouseDown,\n customizeIcon: clearIcon\n }, \"\\xD7\");\n } // ============================= Arrow ==============================\n\n\n var mergedShowArrow = showArrow !== undefined ? showArrow : loading || !isMultiple && mode !== 'combobox';\n var arrowNode;\n\n if (mergedShowArrow) {\n arrowNode = React.createElement(_TransBtn.default, {\n className: (0, _classnames.default)(\"\".concat(prefixCls, \"-arrow\"), (0, _defineProperty2.default)({}, \"\".concat(prefixCls, \"-arrow-loading\"), loading)),\n customizeIcon: inputIcon,\n customizeIconProps: {\n loading: loading,\n searchValue: mergedSearchValue,\n open: mergedOpen,\n focused: mockFocused,\n showSearch: mergedShowSearch\n }\n });\n } // ============================ Warning =============================\n\n\n if (process.env.NODE_ENV !== 'production' && warningProps) {\n warningProps(props);\n } // ============================= Render =============================\n\n\n var mergedClassName = (0, _classnames.default)(prefixCls, className, (_classNames2 = {}, (0, _defineProperty2.default)(_classNames2, \"\".concat(prefixCls, \"-focused\"), mockFocused), (0, _defineProperty2.default)(_classNames2, \"\".concat(prefixCls, \"-multiple\"), isMultiple), (0, _defineProperty2.default)(_classNames2, \"\".concat(prefixCls, \"-single\"), !isMultiple), (0, _defineProperty2.default)(_classNames2, \"\".concat(prefixCls, \"-allow-clear\"), allowClear), (0, _defineProperty2.default)(_classNames2, \"\".concat(prefixCls, \"-show-arrow\"), mergedShowArrow), (0, _defineProperty2.default)(_classNames2, \"\".concat(prefixCls, \"-disabled\"), disabled), (0, _defineProperty2.default)(_classNames2, \"\".concat(prefixCls, \"-loading\"), loading), (0, _defineProperty2.default)(_classNames2, \"\".concat(prefixCls, \"-open\"), mergedOpen), (0, _defineProperty2.default)(_classNames2, \"\".concat(prefixCls, \"-customize-input\"), customizeInputElement), (0, _defineProperty2.default)(_classNames2, \"\".concat(prefixCls, \"-show-search\"), mergedShowSearch), _classNames2));\n return React.createElement(\"div\", Object.assign({\n className: mergedClassName\n }, domProps, {\n ref: containerRef,\n onMouseDown: onInternalMouseDown,\n onKeyDown: onInternalKeyDown,\n onKeyUp: onInternalKeyUp,\n onFocus: onContainerFocus,\n onBlur: onContainerBlur\n }), mockFocused && !mergedOpen && React.createElement(\"span\", {\n style: {\n width: 0,\n height: 0,\n display: 'flex',\n overflow: 'hidden',\n opacity: 0\n },\n \"aria-live\": \"polite\"\n }, \"\".concat(mergedRawValue.join(', '))), React.createElement(_SelectTrigger.default, {\n ref: triggerRef,\n disabled: disabled,\n prefixCls: prefixCls,\n visible: triggerOpen,\n popupElement: popupNode,\n containerWidth: containerWidth,\n animation: animation,\n transitionName: transitionName,\n dropdownStyle: dropdownStyle,\n dropdownClassName: dropdownClassName,\n direction: direction,\n dropdownMatchSelectWidth: dropdownMatchSelectWidth,\n dropdownRender: dropdownRender,\n dropdownAlign: dropdownAlign,\n getPopupContainer: getPopupContainer,\n empty: !mergedOptions.length,\n getTriggerDOMNode: function getTriggerDOMNode() {\n return selectorDomRef.current;\n }\n }, React.createElement(_Selector.default, Object.assign({}, props, {\n domRef: selectorDomRef,\n prefixCls: prefixCls,\n inputElement: customizeInputElement,\n ref: selectorRef,\n id: mergedId,\n showSearch: mergedShowSearch,\n mode: mode,\n accessibilityIndex: accessibilityIndex,\n multiple: isMultiple,\n tagRender: tagRender,\n values: displayValues,\n open: mergedOpen,\n onToggleOpen: onToggleOpen,\n searchValue: mergedSearchValue,\n activeValue: activeValue,\n onSearch: triggerSearch,\n onSearchSubmit: onSearchSubmit,\n onSelect: onInternalSelectionSelect,\n tokenWithEnter: tokenWithEnter\n }))), arrowNode, clearNode);\n }", "componentWillReceiveProps({dropdown}){\n if(dropdown.display && dropdown.id==this.state.id){\n this.state.show = dropdown.display;\n }else{\n this.state.show = false;\n }\n }", "function dropFunction() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n}", "function toggleDropdown() {\n // code goes here\n if (dropdown.classList.contains(\"closed\")) {\n dropdown.classList.remove(\"closed\")\n } else {\n dropdown.classList.add(\"closed\")\n }\n}", "function toggle() {\n console.log(\"toggle\");\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n}", "function initDropdowns(){\n let dropdownData = document.querySelectorAll(\"[data-toggle='dropdown']\");\n for (var index = 0; index < dropdownData.length; index++) {\n dropdownData[index].addEventListener(\"click\",togglePopper);\n }\n}", "showDropdown(){\n this.setState({isDropdownVisible:true});\n }", "myFunction() {\n const dropdown = document.querySelector(\"#myDropdown\");\n dropdown.classList.toggle(\"show\");\n }", "showGeneralOptions(){\n return(\n <Popup trigger={<button className=\"selection_action_button settings_button\">...</button>}\n closeOnDocumentClick\n position={\"left top\"}\n >\n\n <div className={\"events_option\"}>Action 1 ({this.state.selection.length})</div>\n <div className={\"events_option\"}>Action 2 ({this.state.selection.length})</div>\n\n </Popup>\n )\n }", "function dropdownToggle() {\n document.getElementById(\"ProjectDropdown\").classList.toggle(\"show\");\n}", "function ToggleFilter(e) {\n for (let i = 0; i < dropDownList.length; i++)\n if (e.id !== dropDownList[i].id && dropDownList[i].children[0].classList.contains(\"toggled\")) {\n dropDownList[i].children[0].classList.remove(\"toggled\");\n } else if (e.id === dropDownList[i].id) {\n dropDownList[i].children[0].classList.toggle(\"toggled\");\n }\n}", "function drop() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n }", "function dropFunction() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n}", "initClick(){\n this.trigger.addEventListener('click', () => {\n this.trigger.classList.toggle('active');\n this.dropdown.classList.toggle('active');\n });\n }", "_renderDropDownPage() {\n if(this.props.item.pages && this.props.item.expand) {\n return (\n <li className={ this._isMenuItemActive() + \" dropdown\"}>\n <a title={ this.props.item.title } onClick={ e => this._bindDropMenuClick(e) }>\n { this.props.item.name } \n <span className=\"caret\"></span>\n </a>\n <Menu pages={ this.props.item.pages } styleClass={ this._isDropdownMenuOpen() }/>\n </li>\n )\n }\n }", "function dropdown() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n}", "function myDropdown(){\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n}", "function dropdownFunction() {\n $(\"#myDropdown\").toggleClass(\"hidden flexbox\");\n $(\".men-icon\").toggleClass(\"no-display\");\n}", "function Dropdown(props) {\n return (\n <div className=\"control\">\n <label htmlFor={props.id}>{props.label}</label>\n <select\n id={props.id}\n className=\"select-css\"\n value={props.value}\n onChange={(e) => props.onChange(e, props.id)}\n onBlur={(e) => props.onChange(e, props.id)}>\n {props.options.map((item) => (\n <option\n key={item.symbol}\n value={item.symbol}\n disabled={item.symbol === props.disabledValue}>\n {item.name}\n </option>\n ))}\n </select>\n </div>\n );\n}", "function setToggle(dropBool) {\n if(dropBool == \"true\") {\n\tdocument.getElementById(\"advSearch\").className=\"collapse in\";\n }\n dropIconToggle();\n}", "render() {\n return (\n <Button onClick={this.props.toggle} variant=\"primary\">\n Primary\n </Button>\n );\n }", "function btn_show() {\n document.getElementById(\"dropdown-content\").classList.toggle(\"show\");\n}", "function DropDownLink(props) {\n const dropDownClickHandler = () => {\n props.onClick(props.position, !props.isActive);\n };\n let computedLinkClass = \"second-level-nav-header \";\n let computedIconClass = \"sgds-icon \";\n if (props.isActive) {\n computedLinkClass += \"is-active\";\n computedIconClass += \"sgds-icon-chevron-up\";\n } else {\n computedIconClass += \"sgds-icon-chevron-down\";\n }\n return (\n <a className={computedLinkClass} onClick={dropDownClickHandler}>\n {props.children}\n <i className={computedIconClass} aria-hidden=\"true\"></i>\n </a>\n );\n}", "onToggle() {}", "function Toolbar(props) {\n const { editorState, toolbarControls, detachToolbar } = props;\n\n function buildControls(controls) {\n return values(controls).map(control => {\n const {\n id,\n context,\n type,\n icon,\n label,\n options\n } = control;\n\n const isMenu = isMenuContext(control);\n const isBlock = isBlockType(control);\n\n if (isMenu) {\n return (\n <SimpleDropdown\n key={id}\n menuFor={id}\n >\n {buildControls(control.options)}\n </SimpleDropdown>\n );\n }\n\n let isActive;\n let onToggle;\n\n if (isBlock) {\n const blockStartKey = getSelectionStartKey(editorState);\n const blockType = editorState\n .getCurrentContent()\n .getBlockForKey(blockStartKey)\n .getType();\n\n isActive = id === blockType;\n onToggle = type === TYPE_CUSTOM_BLOCK ?\n props.onToggleCustomBlockType : props.onToggleBlockType;\n } else {\n const currentStyle = editorState.getCurrentInlineStyle();\n\n isActive = currentStyle.has(id);\n onToggle = props.onToggleStyle;\n }\n\n return (\n <Control\n key={id}\n id={id}\n icon={icon}\n label={label}\n isActive={isActive}\n onToggle={onToggle}\n />\n );\n });\n }\n\n return (\n <div className={`drafts-editor__toolbar ${detachToolbar && 'detached'}`}>\n <div className=\"phantom-detached\" />\n <ul className=\"controls\">\n {buildControls(toolbarControls)}\n </ul>\n </div>\n );\n}", "function dropDownShowClick(){\n document.getElementById(\"forDropDown\").style.display=\"block\";\n document.getElementById(\"dropDownShowBtn\").style.display=\"none\";\n document.getElementById(\"dropDownHideBtn\").style.display=\"block\";\n}", "clickDropdownMenu(event) {\n const {\n isOpen,\n openDropdownMenu,\n closeDropdownMenu,\n } = this.props\n\n event.preventDefault()\n\n if (isOpen) {\n closeDropdownMenu()\n } else {\n openDropdownMenu()\n }\n }", "function toggleAriaAtrributes(dropdown, open) {\n var trigger = dropdown.querySelectorAll('[x-spread=\"trigger\"]');\n if (trigger.length) {\n trigger = trigger[0];\n if (open) {\n trigger.setAttribute(\"aria-expanded\", true);\n var dropdownList = dropdown.querySelectorAll('[x-spread=\"dropdown\"]');\n if (dropdownList.length) {\n dropdownList = dropdownList[0];\n dropdownList.setAttribute(\"aria-hidden\", false);\n }\n } else {\n trigger.setAttribute(\"aria-expanded\", false);\n var dropdownList = dropdown.querySelectorAll('[x-spread=\"dropdown\"]');\n if (dropdownList.length) {\n dropdownList = dropdownList[0];\n dropdownList.setAttribute(\"aria-hidden\", true);\n }\n }\n }\n}" ]
[ "0.6798174", "0.6798174", "0.66344637", "0.6545018", "0.6545018", "0.64776576", "0.6468173", "0.6418436", "0.64157796", "0.618097", "0.618097", "0.6168092", "0.61334395", "0.61244196", "0.6071357", "0.6071357", "0.5983467", "0.59641767", "0.5943793", "0.5943793", "0.59231424", "0.591129", "0.5883749", "0.5882126", "0.5864805", "0.585042", "0.58261013", "0.5789197", "0.5789197", "0.57675695", "0.5765713", "0.5755813", "0.575014", "0.5743463", "0.573342", "0.57208735", "0.5718272", "0.57007736", "0.569214", "0.56774765", "0.56692725", "0.56691384", "0.56670934", "0.56549245", "0.563144", "0.56292605", "0.5626209", "0.56230575", "0.56203294", "0.56100136", "0.5598624", "0.559271", "0.5587919", "0.55845875", "0.55690926", "0.55627835", "0.55487597", "0.55468017", "0.55468017", "0.554466", "0.5541073", "0.55401444", "0.5527716", "0.5525229", "0.5522394", "0.5520626", "0.55193514", "0.5512994", "0.550935", "0.550792", "0.550792", "0.550792", "0.54990816", "0.54848945", "0.548468", "0.5482341", "0.5474899", "0.5468098", "0.5467123", "0.5464772", "0.546066", "0.54473925", "0.5442584", "0.54308504", "0.54284036", "0.5401353", "0.53890276", "0.5388471", "0.5382518", "0.5377517", "0.5375719", "0.53733075", "0.5367574", "0.53661656", "0.5365715", "0.53526914", "0.53429556", "0.534049", "0.53392375" ]
0.6637921
3
Also exported as `` from `Dropdown`.
function DropdownToggle(_ref2) { var children = _ref2.children; var _useDropdownToggle = useDropdownToggle(), props = _useDropdownToggle[0], _useDropdownToggle$ = _useDropdownToggle[1], show = _useDropdownToggle$.show, toggle = _useDropdownToggle$.toggle; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null, children({ show: show, toggle: toggle, props: props })); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "DropDown() {}", "function McDropdownPanel() { }", "function Dropdown(parent_id, item = {}) {\n item.type = \"select\";\n item.id = item.id || \"{0}_{1}\".format(item.type, __SELECT++);\n item.label = item.label || item.id;\n item.needQuestion = (item.needQuestion == false) ? false : true;\n Tag.call(this, parent_id, item);\n\n this.options = item.options || [\"option1\", \"option2\", \"option3\"];\n this.option_ids = [];\n this.option_values = [];\n for (var i in this.options) {\n this.option_ids.push(\"option_{0}\".format(__OPTION++));\n this.option_values.push(this.options[i]);\n }\n\n this.value = item.value || \"\";\n this.label_id = \"label_{0}\".format(this.id);\n this.button_id = \"button_{0}\".format(this.id);\n this.dropRight = item.dropRight || false;\n this.choose_prompt = item.choose_prompt || \"Choose\";\n this._style = \"mdl-menu mdl-js-menu mdl-js-ripple-effect\" + ((this.dropRight) ? \"mdl-menu--bottom-right\" : \"mdl-menu--bottom-left\");\n\n this.html = '<div class=\"mdl-textfield mdl-js-textfield\">\\\n <input id=\"{4}\" form=\"{8}\" class=\"mdl-textfield__input\" readonly {5} {6} value=\"{7}\"><button id=\"{0}\" form=\"{8}\" style=\"right: 0;\"\\\n class=\"mdl-button mdl-js-button mdl-button--icon\">\\\n <i class=\"material-icons\">expand_more</i></button>\\\n <ul id=\"{1}\" class=\"{2}\" for=\"{0}\" form=\"{8}\">{3}</ui></div>'.format(\n this.button_id, this.id, this._style, this._option_factory(),\n this.label_id, this.required, this.disabled, this.value, this.parent_id\n );\n\n this.render();\n var option_values = this.option_values;\n var label_id = this.label_id;\n for (let i in this.option_ids) {\n document.getElementById(this.option_ids[i]).onclick = function() {\n document.getElementById(label_id).value = option_values[i];\n };\n /*$(\"#\"+this.option_ids[i]).click(function() {\n $(\"#\"+label_id).val(option_values[i]);\n })*/\n }\n}", "function OCM_dropdownMarkup() {\r\n\t\t\t\t\tvar $nectar_ocm_dropdown_func = ($('#slide-out-widget-area[data-dropdown-func]').length > 0) ? $offCanvasEl.attr('data-dropdown-func') : 'default';\r\n\t\t\t\t\tif ($nectar_ocm_dropdown_func == 'separate-dropdown-parent-link') {\r\n\t\t\t\t\t\t$('#slide-out-widget-area .off-canvas-menu-container li.menu-item-has-children').append('<span class=\"ocm-dropdown-arrow\"><i class=\"fa fa-angle-down\"></i></span>');\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "createDropdown(entity) {\n var color = utils.stringToColor(entity.label);\n\n var names = this.props.command.parameters.map((p) => p.name);\n names.unshift(\"-\");\n\n if (!this.props.updatesDatabase) {\n names.push(\"+ Add Parameter\");\n }\n\n var selection = entity.label != null ? entity.label : \"-\";\n\n return (\n <select\n className=\"entitySelect\"\n id={`select-entity-${entity.start}`}\n data-curr={selection}\n defaultValue={selection}\n style={{ color: color }}\n onChange={(event) => this.onChangeEntity(entity, event)}\n >\n {names.map((name) => (\n <option key={name} value={name}>\n {name}\n </option>\n ))}\n </select>\n );\n }", "data () {\n return {\n visible: false,\n selected: [],\n caret: function(){ // switches dropdown caret icon\n return this.visible? \"caret-up-fill\" : \"caret-down-fill\"\n }\n }\n }", "get dropdown_menu() {return browser.element('#user_info_dropdown')}", "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.dropdown');if(!data)$this.data('bs.dropdown',data=new Dropdown(this));if(typeof option=='string')data[option].call($this);});}", "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.dropdown');if(!data)$this.data('bs.dropdown',data=new Dropdown(this));if(typeof option=='string')data[option].call($this);});}", "function Window_Dropdown() {\n this.initialize.apply(this, arguments);\n}", "function dropdown(id, label, options, onChange) {\n\tconst $dropdown = $($('#dropdownScaffold').html());\n\tconst $options = $dropdown.find('.dropdown-menu');\n\tconst $button = $dropdown.find('.dropdown-toggle');\n\t$options.attr('aria-labelledby', id);\n\t$button.prop('id', id);\n\t$button.html(dropdownStartValue('Pick ' + label));\n\t_.each(options, (option) => {\n\t\t$options.append(dropdownOption(option.index, option.text, option.toggleBtn));\n\t});\n\tsetupDropdownHandlers($options, onChange);\n\treturn $dropdown;\n}", "function DropDown(el) {\n this.dd = el;\n this.placeholder = this.dd.children('span');\n this.opts = this.dd.find('ul.dropdown > li');\n this.val = '';\n this.index = -1;\n this.initEvents();\n }", "function Dropdown(onChange, listOfValues, getDisplayValue, label) {\n if (onChange === void 0) { onChange = function (dropdown) { }; }\n if (getDisplayValue === void 0) { getDisplayValue = Strings_1.l; }\n this.onChange = onChange;\n this.listOfValues = listOfValues;\n this.getDisplayValue = getDisplayValue;\n this.label = label;\n this.optionsElement = [];\n this.buildContent();\n this.select(0, false);\n this.bindEvents();\n }", "function DropDown(el) {\n this.dd = el;\n this.initEvents();\n}", "function DropDown(el) {\n this.dd = el;\n this.initEvents();\n}", "function Dropdown(elementRef, i18n) {\n this.elementRef = elementRef;\n this.i18n = i18n;\n /**\n * Value displayed if no item is selected.\n */\n this.placeholder = \"\";\n /**\n * The selected value from the `Dropdown`.\n */\n this.displayValue = \"\";\n /**\n * Size to render the dropdown field.\n */\n this.size = \"md\";\n /**\n * Defines whether or not the `Dropdown` supports selecting multiple items as opposed to single\n * item selection.\n */\n this.type = \"single\";\n /**\n * `light` or `dark` dropdown theme\n * @memberof Dropdown\n */\n this.theme = \"dark\";\n /**\n * Set to `true` to disable the dropdown.\n */\n this.disabled = false;\n /**\n * set to `true` to place the dropdown view inline with the component\n */\n this.appendInline = false;\n /**\n * Accessible label for the button that opens the dropdown list.\n * Defaults to the `DROPDOWN.OPEN` value from the i18n service.\n */\n this.menuButtonLabel = this.i18n.get().DROPDOWN.OPEN;\n /**\n * Provides the label for the \"# selected\" text.\n * Defaults to the `DROPDOWN.SELECTED` value from the i18n service.\n */\n this.selectedLabel = this.i18n.get().DROPDOWN.SELECTED;\n /**\n * Emits selection events.\n */\n this.selected = new EventEmitter();\n /**\n * Emits event notifying to other classes that the `Dropdown` has been closed (collapsed).\n */\n this.onClose = new EventEmitter();\n /**\n * Emits event notifying to other classes that the `Dropdown` has been closed (collapsed).\n */\n this.close = new EventEmitter();\n /**\n * Set to `true` if the dropdown is closed (not expanded).\n */\n this.menuIsClosed = true;\n /**\n * controls wether the `drop-up` class is applied\n */\n this.dropUp = false;\n // .bind creates a new function, so we declare the methods below\n // but .bind them up here\n this.noop = this._noop.bind(this);\n this.outsideClick = this._outsideClick.bind(this);\n this.outsideKey = this._outsideKey.bind(this);\n this.keyboardNav = this._keyboardNav.bind(this);\n this.onTouchedCallback = this._noop;\n this.propagateChange = function (_) { };\n }", "function populateDropdowns() {\n}", "function Dropdown(props) {\n return (\n <div className=\"control\">\n <label htmlFor={props.id}>{props.label}</label>\n <select\n id={props.id}\n className=\"select-css\"\n value={props.value}\n onChange={(e) => props.onChange(e, props.id)}\n onBlur={(e) => props.onChange(e, props.id)}>\n {props.options.map((item) => (\n <option\n key={item.symbol}\n value={item.symbol}\n disabled={item.symbol === props.disabledValue}>\n {item.name}\n </option>\n ))}\n </select>\n </div>\n );\n}", "function Dropdown(_ref) {\n var drop = _ref.drop,\n alignEnd = _ref.alignEnd,\n defaultShow = _ref.defaultShow,\n rawShow = _ref.show,\n rawOnToggle = _ref.onToggle,\n itemSelector = _ref.itemSelector,\n focusFirstItemOnShow = _ref.focusFirstItemOnShow,\n children = _ref.children;\n var forceUpdate = Object(_restart_hooks_useForceUpdate__WEBPACK_IMPORTED_MODULE_7__[\"default\"])();\n\n var _useUncontrolled = Object(uncontrollable__WEBPACK_IMPORTED_MODULE_4__[\"useUncontrolled\"])({\n defaultShow: defaultShow,\n show: rawShow,\n onToggle: rawOnToggle\n }, {\n show: 'onToggle'\n }),\n show = _useUncontrolled.show,\n onToggle = _useUncontrolled.onToggle;\n\n var _useCallbackRef = Object(_restart_hooks_useCallbackRef__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(),\n toggleElement = _useCallbackRef[0],\n setToggle = _useCallbackRef[1]; // We use normal refs instead of useCallbackRef in order to populate the\n // the value as quickly as possible, otherwise the effect to focus the element\n // may run before the state value is set\n\n\n var menuRef = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"])();\n var menuElement = menuRef.current;\n var setMenu = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"])(function (ref) {\n menuRef.current = ref; // ensure that a menu set triggers an update for consumers\n\n forceUpdate();\n }, [forceUpdate]);\n var lastShow = Object(_restart_hooks_usePrevious__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(show);\n var lastSourceEvent = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"])(null);\n var focusInDropdown = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"])(false);\n var toggle = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"])(function (event) {\n onToggle(!show, event);\n }, [onToggle, show]);\n var context = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useMemo\"])(function () {\n return {\n toggle: toggle,\n drop: drop,\n show: show,\n alignEnd: alignEnd,\n menuElement: menuElement,\n toggleElement: toggleElement,\n setMenu: setMenu,\n setToggle: setToggle\n };\n }, [toggle, drop, show, alignEnd, menuElement, toggleElement, setMenu, setToggle]);\n\n if (menuElement && lastShow && !show) {\n focusInDropdown.current = menuElement.contains(document.activeElement);\n }\n\n var focusToggle = Object(_restart_hooks_useEventCallback__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(function () {\n if (toggleElement && toggleElement.focus) {\n toggleElement.focus();\n }\n });\n var maybeFocusFirst = Object(_restart_hooks_useEventCallback__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(function () {\n var type = lastSourceEvent.current;\n var focusType = focusFirstItemOnShow;\n\n if (focusType == null) {\n focusType = menuRef.current && Object(dom_helpers_matches__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(menuRef.current, '[role=menu]') ? 'keyboard' : false;\n }\n\n if (focusType === false || focusType === 'keyboard' && !/^key.+$/.test(type)) {\n return;\n }\n\n var first = Object(dom_helpers_querySelectorAll__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(menuRef.current, itemSelector)[0];\n if (first && first.focus) first.focus();\n });\n Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"])(function () {\n if (show) maybeFocusFirst();else if (focusInDropdown.current) {\n focusInDropdown.current = false;\n focusToggle();\n } // only `show` should be changing\n }, [show, focusInDropdown, focusToggle, maybeFocusFirst]);\n Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"])(function () {\n lastSourceEvent.current = null;\n });\n\n var getNextFocusedChild = function getNextFocusedChild(current, offset) {\n if (!menuRef.current) return null;\n var items = Object(dom_helpers_querySelectorAll__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(menuRef.current, itemSelector);\n var index = items.indexOf(current) + offset;\n index = Math.max(0, Math.min(index, items.length));\n return items[index];\n };\n\n var handleKeyDown = function handleKeyDown(event) {\n var key = event.key,\n target = event.target; // Second only to https://github.com/twbs/bootstrap/blob/8cfbf6933b8a0146ac3fbc369f19e520bd1ebdac/js/src/dropdown.js#L400\n // in inscrutability\n\n var isInput = /input|textarea/i.test(target.tagName);\n\n if (isInput && (key === ' ' || key !== 'Escape' && menuRef.current && menuRef.current.contains(target))) {\n return;\n }\n\n lastSourceEvent.current = event.type;\n\n switch (key) {\n case 'ArrowUp':\n {\n var next = getNextFocusedChild(target, -1);\n if (next && next.focus) next.focus();\n event.preventDefault();\n return;\n }\n\n case 'ArrowDown':\n event.preventDefault();\n\n if (!show) {\n toggle(event);\n } else {\n var _next = getNextFocusedChild(target, 1);\n\n if (_next && _next.focus) _next.focus();\n }\n\n return;\n\n case 'Escape':\n case 'Tab':\n onToggle(false, event);\n break;\n\n default:\n }\n };\n\n return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(_DropdownContext__WEBPACK_IMPORTED_MODULE_9__[\"default\"].Provider, {\n value: context\n }, children({\n props: {\n onKeyDown: handleKeyDown\n }\n }));\n}", "function Dropdown(_ref) {\n var drop = _ref.drop,\n alignEnd = _ref.alignEnd,\n defaultShow = _ref.defaultShow,\n rawShow = _ref.show,\n rawOnToggle = _ref.onToggle,\n itemSelector = _ref.itemSelector,\n focusFirstItemOnShow = _ref.focusFirstItemOnShow,\n children = _ref.children;\n var forceUpdate = Object(_restart_hooks_useForceUpdate__WEBPACK_IMPORTED_MODULE_7__[\"default\"])();\n\n var _useUncontrolled = Object(uncontrollable__WEBPACK_IMPORTED_MODULE_4__[\"useUncontrolled\"])({\n defaultShow: defaultShow,\n show: rawShow,\n onToggle: rawOnToggle\n }, {\n show: 'onToggle'\n }),\n show = _useUncontrolled.show,\n onToggle = _useUncontrolled.onToggle;\n\n var _useCallbackRef = Object(_restart_hooks_useCallbackRef__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(),\n toggleElement = _useCallbackRef[0],\n setToggle = _useCallbackRef[1]; // We use normal refs instead of useCallbackRef in order to populate the\n // the value as quickly as possible, otherwise the effect to focus the element\n // may run before the state value is set\n\n\n var menuRef = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"])();\n var menuElement = menuRef.current;\n var setMenu = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"])(function (ref) {\n menuRef.current = ref; // ensure that a menu set triggers an update for consumers\n\n forceUpdate();\n }, [forceUpdate]);\n var lastShow = Object(_restart_hooks_usePrevious__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(show);\n var lastSourceEvent = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"])(null);\n var focusInDropdown = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"])(false);\n var toggle = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"])(function (event) {\n onToggle(!show, event);\n }, [onToggle, show]);\n var context = Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useMemo\"])(function () {\n return {\n toggle: toggle,\n drop: drop,\n show: show,\n alignEnd: alignEnd,\n menuElement: menuElement,\n toggleElement: toggleElement,\n setMenu: setMenu,\n setToggle: setToggle\n };\n }, [toggle, drop, show, alignEnd, menuElement, toggleElement, setMenu, setToggle]);\n\n if (menuElement && lastShow && !show) {\n focusInDropdown.current = menuElement.contains(document.activeElement);\n }\n\n var focusToggle = Object(_restart_hooks_useEventCallback__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(function () {\n if (toggleElement && toggleElement.focus) {\n toggleElement.focus();\n }\n });\n var maybeFocusFirst = Object(_restart_hooks_useEventCallback__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(function () {\n var type = lastSourceEvent.current;\n var focusType = focusFirstItemOnShow;\n\n if (focusType == null) {\n focusType = menuRef.current && Object(dom_helpers_matches__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(menuRef.current, '[role=menu]') ? 'keyboard' : false;\n }\n\n if (focusType === false || focusType === 'keyboard' && !/^key.+$/.test(type)) {\n return;\n }\n\n var first = Object(dom_helpers_querySelectorAll__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(menuRef.current, itemSelector)[0];\n if (first && first.focus) first.focus();\n });\n Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"])(function () {\n if (show) maybeFocusFirst();else if (focusInDropdown.current) {\n focusInDropdown.current = false;\n focusToggle();\n } // only `show` should be changing\n }, [show, focusInDropdown, focusToggle, maybeFocusFirst]);\n Object(react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"])(function () {\n lastSourceEvent.current = null;\n });\n\n var getNextFocusedChild = function getNextFocusedChild(current, offset) {\n if (!menuRef.current) return null;\n var items = Object(dom_helpers_querySelectorAll__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(menuRef.current, itemSelector);\n var index = items.indexOf(current) + offset;\n index = Math.max(0, Math.min(index, items.length));\n return items[index];\n };\n\n var handleKeyDown = function handleKeyDown(event) {\n var key = event.key,\n target = event.target; // Second only to https://github.com/twbs/bootstrap/blob/8cfbf6933b8a0146ac3fbc369f19e520bd1ebdac/js/src/dropdown.js#L400\n // in inscrutability\n\n var isInput = /input|textarea/i.test(target.tagName);\n\n if (isInput && (key === ' ' || key !== 'Escape' && menuRef.current && menuRef.current.contains(target))) {\n return;\n }\n\n lastSourceEvent.current = event.type;\n\n switch (key) {\n case 'ArrowUp':\n {\n var next = getNextFocusedChild(target, -1);\n if (next && next.focus) next.focus();\n event.preventDefault();\n return;\n }\n\n case 'ArrowDown':\n event.preventDefault();\n\n if (!show) {\n toggle(event);\n } else {\n var _next = getNextFocusedChild(target, 1);\n\n if (_next && _next.focus) _next.focus();\n }\n\n return;\n\n case 'Escape':\n case 'Tab':\n onToggle(false, event);\n break;\n\n default:\n }\n };\n\n return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(_DropdownContext__WEBPACK_IMPORTED_MODULE_9__[\"default\"].Provider, {\n value: context\n }, children({\n props: {\n onKeyDown: handleKeyDown\n }\n }));\n}", "function dropdown(e) {\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t<select onChange={handleSelectChange} value={displayTag}>\n\t\t\t\t\t<option value=\"Select a Category\"> -- Select a category -- </option>\n\t\t\t\t\t<option value=\"all\">All</option>\n\n\t\t\t\t\t{categories.map((item) => <option value={item}>{item}</option>)}\n\t\t\t\t</select>\n\t\t\t</div>\n\t\t)\n\t}", "function init_dash() {\n dropDown();\n}", "_setDropDownOptions() {\n const that = this;\n\n if (that.dropDownEnabled === false || that._number === null) {\n return;\n }\n\n const wordLength = that._wordLengthNumber,\n leadingZeros = that.leadingZeros;\n\n that.$.dropDownItem2.innerHTML = `${that._number.toString(2, wordLength, leadingZeros)} (${that.localize('binary')})`;\n that.$.dropDownItem8.innerHTML = `${that._number.toString(8, wordLength)} (${that.localize('octal')})`;\n that.$.dropDownItem10.innerHTML = `${that._renderValue(that._number.toString(10, wordLength), true)} (${that.localize('decimal')})`;\n that.$.dropDownItem16.innerHTML = `${that._number.toString(16, wordLength, leadingZeros)} (${that.localize('hexadecimal')})`;\n }", "function dropdown(ar) { \n/*//console.log(\"dd clicked\")*/ }", "function test_dialog_dropdown_ui_values_in_the_dropdown_should_be_visible_in_edit_mode() {}", "function ParentDropdown() {\n return (\n <div className=\"ui simple selection dropdown\">\n <input type=\"hidden\" name=\"student\" />\n <i className=\"dropdown icon\"></i>\n <div className=\"left icon default text\">Select Child</div>\n <i className=\"child icon\"></i>\n <div className=\"menu\">\n <DropdownItem />\n </div>\n </div>\n )\n}", "function Select(props) {\n\t return _react2.default.createElement(_Dropdown2.default, _extends({}, props, { selection: true }));\n\t}", "static get BUTTON_SELECT() {\n return \"select\";\n }", "dropDownJSX(props){\n const md5 = \"\"; // Unique per game\n let compositions = localStorage.getItem(\"compositions\" + md5) ? JSON.parse(localStorage.getItem(\"compositions\" + md5)) : {};\n if (typeof (compositions) === \"string\") {\n compositions = {};\n }\n\n\n\n const dropDownItems = <DropdownItem\n onClick={() => {\n }}\n >\n </DropdownItem>;\n return <ButtonDropdown\n isOpen={props.isDown}\n toggle={() => props.toggleDropDown('loadCompositionDropDown')}\n >\n {\" \"}\n <DropdownToggle caret>App</DropdownToggle>\n <DropdownMenu>\n {dropDownItems}\n </DropdownMenu>\n </ButtonDropdown>\n }", "function Select(props) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__modules_Dropdown__[\"a\" /* default */], __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, props, { selection: true }));\n}", "function Select(props) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__modules_Dropdown__[\"a\" /* default */], __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, props, { selection: true }));\n}", "function Select(props) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__modules_Dropdown__[\"a\" /* default */], __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, props, { selection: true }));\n}", "function Select(props) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__modules_Dropdown__[\"a\" /* default */], __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, props, { selection: true }));\n}", "function Select(props) {\n return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__modules_Dropdown__[\"a\" /* default */], __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, props, { selection: true }));\n}", "function setDropdownOption (val) {\n return model.inputs.dropDownOption = val;\n}", "function dropDownListUtils() {\r\n\r\n var thisObj = this;\r\n\r\n thisObj.disableDropDown = function (dropDown, valueToSelect) {\r\n dropDown.prop(\"disabled\", true);\r\n thisObj.selectItem(dropDown, valueToSelect);\r\n };\r\n\r\n thisObj.selectItem = function (dropDown, valueToSelect) {\r\n dropDown.find(\"option[value='\" + valueToSelect + \"']\")\r\n .prop(\"selected\", true);\r\n };\r\n\r\n thisObj.selectValueIfExist = function (dropdownControl, valueToSelect) {\r\n var matchingOption = dropdownControl.find('option[value=\"' + valueToSelect + '\"]');\r\n if (matchingOption.length) {\r\n dropdownControl.val(valueToSelect);\r\n }\r\n };\r\n}", "render() {\n return (\t\n <Dropdown className={css(style.dropDownStyle)} isOpen={this.state.dropdownOpen} toggle={this.toggle} size=\"lg\">\n <DropdownToggle caret className={css(style.fontSizeStyle, style.colorThemeStyle)}>\n Welcome, <strong className={css(style.fontSizeStyle, style.colorThemeStyle)}>{this.state.names+ \" \"}</strong>\n </DropdownToggle>\n <DropdownMenu right className={css(style.fontSizeStyle, style.colorThemeStyle)}>\n <DropdownItem header className={css(style.fontSizeStyle)}>Profile</DropdownItem>\n <DropdownItem divider /> \n <DropdownItem tag={Link} to={\"/profile/\" + this.props.user.username} className={css(style.fontSizeStyle, style.colorThemeStyle)}>My Profile</DropdownItem>\n <DropdownItem tag={Link} to={\"/projects\"} className={css(style.fontSizeStyle, style.colorThemeStyle)}>My Projects</DropdownItem>\n <DropdownItem divider /> \n <DropdownItem className={css(style.fontSizeStyle, style.colorThemeStyle)}>Settings</DropdownItem>\n <DropdownItem divider />\n <DropdownItem onClick={this.props.logout}>Log out</DropdownItem>\n </DropdownMenu>\n </Dropdown> \n );\n }", "function DropDown_3(el_3) {\r\n this.dd_3 = el_3;\r\n this.placeholder = this.dd_3.children('span');\r\n this.opts = this.dd_3.find('ul.dropdown > li');\r\n this.val = '';\r\n this.index = -1;\r\n this.initEvents();\r\n}", "render() {\n return (\n <UncontrolledDropdown>\n <DropdownToggle className='menu-icon icon-more'>\n </DropdownToggle>\n <DropdownMenu right >\n {/* Will delete the parent Workflow from the Workflows List */}\n <DropdownItem key={1} onClick={this.deleteOption}> \n Delete \n </DropdownItem>\n </DropdownMenu>\n </UncontrolledDropdown>\n );\n }", "handleInputClick() {\n\t\tthis.showDropdown();\n\t}", "function DropDown(el) {\n\t\t\t\tthis.dd = el;\n\t\t\t\tthis.initEvents();\n\t\t\t}", "async selectDropDown(ObjectRepo) {\n //Verifying the drop down text\n await Utility.clickOn(ObjectRepo.Register.typeOfMerchant);\n //Accepting the option\n await Utility.clickOn(ObjectRepo.Register.optionOfMerchant);\n }", "function setDropdown() {\n\n searchBar.autocomplete({\n source: availableTags, \n response: function(_, ui) {\n dropdownResponse = ui.content;\n }\n\n });\n searchBar.on(\"autocompletesearch\", function(_, ui){\n\n })\n }", "function renderDropdown(component) {\n component.$dropdown.html(templates.dropdown(getDescriptors(component)));\n updateClearAll(component);\n}", "function _dropdownAdapter(clazz) {\n return null;\n }", "get roleDropdownAPI() {\n return this.roleDropdownEl ? $(this.roleDropdownEl).data('dropdown') : undefined;\n }", "function Select(props) {\n return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__modules_Dropdown__[\"a\" /* default */], __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_extends___default()({}, props, {\n selection: true\n }));\n}", "render() {\n return (\n <Dropdown onChange={this.handleChange} id={\"instructorDropdown\"} labelText=\"Instructor:\">\n {this.createDropdownOptions(this.state.instructorData)}\n </Dropdown>\n );\n }", "function _dropdownAdapter (clazz) {\n return null;\n }", "function _dropdownAdapter (clazz) {\n return null;\n }", "function _dropdownAdapter (clazz) {\n return null;\n }", "function _dropdownAdapter (clazz) {\n return null;\n }", "function _dropdownAdapter (clazz) {\n return null;\n }", "function _dropdownAdapter (clazz) {\n return null;\n }", "function _dropdownAdapter (clazz) {\n return null;\n }", "function _dropdownAdapter (clazz) {\n return null;\n }", "function _dropdownAdapter (clazz) {\n return null;\n }", "function _dropdownAdapter (clazz) {\n return null;\n }", "function _dropdownAdapter (clazz) {\n return null;\n }", "function menuOptions() {}", "function Dropdown(props) {\n  var str = props.data.question;\n  var idx = str.indexOf(\"$CHOICES\");\n  return (\n <div className=\"question-container\">\n     <div key=\"question\" className=\"prompt-container\">\n {props.num}) {str.substring(0, idx)}\n <select required name=\"Dropdown\" className=\"dropdown\" value={props.ans} onChange={(e)=>{props.selected(e.target.value)}}>\n           {props.data.options.map((val,key)=>{\n             return <option key={key} value={val}> {val} </option>;\n           })}\n         </select> {str.substring(idx+8)}\n     </div>\n </div>\n  );\n}", "_renderDropDownPage() {\n if(this.props.item.pages && this.props.item.expand) {\n return (\n <li className={ this._isMenuItemActive() + \" dropdown\"}>\n <a title={ this.props.item.title } onClick={ e => this._bindDropMenuClick(e) }>\n { this.props.item.name } \n <span className=\"caret\"></span>\n </a>\n <Menu pages={ this.props.item.pages } styleClass={ this._isDropdownMenuOpen() }/>\n </li>\n )\n }\n }", "function _dropdownAdapter (clazz) {\r\n return null;\r\n }", "function _dropdownAdapter (clazz) {\r\n return null;\r\n }", "function getDropDowns() {\n getList('author');\n getList('tags');\n }", "get userDropDown () { return $('#userSelect') }", "function Dropdown(){\n this.createDropdown = function(dict, name, id, selected){\n this.item = document.createElement(\"select\")\n\t\tthis.name = name\n\n\t\tvar ttmp = document.createElement(\"label\")\n\t\tttmp.setAttribute(\"name\", name)\t\t\t\n\t\tttmp.innerHTML = this.name\n\t\tthis.item.appendChild(ttmp)\n\n \t\tfor(var x in dict){\n \t\tvar tmp =document.createElement(\"option\")\n \t\ttmp.setAttribute('value',dict[x])\n \t\ttmp.innerHTML= x + '<br>' \n \n \t\tthis.item.appendChild(tmp)\n \t}\n\n },\n \n this.getSelected = function(){\n this.item=document.getElementById()\n },\n\n this.addToDocument = function(){\n document.body.appendChild(this.item);\n\n }\n}", "function Select(props) {\n return _react2.default.createElement(_Dropdown2.default, (0, _extends3.default)({}, props, { selection: true }));\n}", "function Select(props) {\n return _react2.default.createElement(_Dropdown2.default, (0, _extends3.default)({}, props, { selection: true }));\n}", "function _dropdownAdapter (clazz) {\n return null;\n }", "function _dropdownAdapter (clazz) {\n return null;\n }", "function Select(props) {\n return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(_modules_Dropdown__WEBPACK_IMPORTED_MODULE_3__[\"default\"], _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, props, {\n selection: true\n }));\n}", "function Select(props) {\n return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(_modules_Dropdown__WEBPACK_IMPORTED_MODULE_3__[\"default\"], _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, props, {\n selection: true\n }));\n}", "function WoDUiGemDropDown( socketLabel, isInline ) {\n\n WodUiWidget.call(this, 'div')\n\n this.selectedIndex = 0;\n this.click = false;\n this.socketLabel = socketLabel\n\n this.isInline = isInline\n\n var cssClass = isInline\n ? 'gemselect main inline'\n : 'gemselect main'\n this.setClass( cssClass )\n\n //Erstellen der Hierarchie der Elemente\n this.selected = new WoDUiGemDropDownSelected();\n this.appendChild(this.selected);\n\n var dropdown = new WoDUiGemDropDownImage();\n this.appendChild(dropdown);\n\n this.selectable = new WoDUiGemDropDownSelectable( isInline );\n this.appendChild(this.selectable);\n this.selectable.setVisible(false);\n\n var _this = this\n\n this.setMouseOverListener(function() {\n _this.dropDownChanger(true)\n })\n\n this.setClickListener(function() {\n// _this.dropDownChanger(true)\n })\n\n this.setMouseOutListener(function() {\n _this.dropDownChanger(false)\n })\n\n this.setMouseDownListener(function() {\n //_this.dropDownChanger(false)\n })\n\n\n}", "function Dropdown(element, completer, option) {\n this.$el = Dropdown.createElement(option);\n this.completer = completer;\n this.id = completer.id + 'dropdown';\n this._data = []; // zipped data.\n this.$inputEl = $(element);\n this.option = option;\n\n // Override setPosition method.\n if (option.listPosition) { this.setPosition = option.listPosition; }\n if (option.height) { this.$el.height(option.height); }\n var self = this;\n $.each(['maxCount', 'placement', 'footer', 'header', 'noResultsMessage', 'className'], function (_i, name) {\n if (option[name] != null) { self[name] = option[name]; }\n });\n this._bindEvents(element);\n dropdownViews[this.id] = this;\n }", "function Select(props) {\n return _react[\"default\"].createElement(_Dropdown[\"default\"], (0, _extends2[\"default\"])({}, props, {\n selection: true\n }));\n}", "function DropdownObject(displayText, queryValue, iconClass) {\n this.text = displayText;\n this.value = queryValue;\n this.icon = iconClass;\n }", "function Dropdown() {\n\n \n \n return (\n <div className=\"Dropdown DropdownSM\">\n DNI <HiOutlineChevronDown className=\" {HiOutlineChevronDown} \" color={\"#EF3340\"} size={20} />\n </div>\n )\n}", "function Select(props) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(_modules_Dropdown__WEBPACK_IMPORTED_MODULE_3__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, props, {\n selection: true\n }));\n}", "function convertMarkdownDropdowns(text) {\n // find dropdowns\n return text.replace(/^\\[\\[ *(`?)(.+?)(`?) *\\]\\]/gm, function(select, tt, options) {\n var clazz = 'dropdown';\n if (/\\S/.test(tt)) {\n clazz += ' ttfont';\n }\n // convert individual options\n var options = options.split(',').map(function(option) {\n var option = /^(\\(?)(.+?)(\\)?)$/.exec(option.trim());\n var attrs = '';\n if (option[1] && option[3]) {\n attrs += ' data-form-value=\"select\"';\n } else {\n option[2] = option.slice(1).join(''); // glue singleton ( and ) back on\n }\n return $('<option' + attrs + '>').text(option[2].trim()).prop('outerHTML');\n }).join();\n var blank = '<option selected=\"selected\"></option>';\n return '<div class=\"form-group\"><div class=\"' + clazz + '\"><select class=\"form-control\">' + blank + options + '</select></div>\\n</div>';\n });\n}", "constructor(options) {\n this.trigger = options.trigger;\n this.dropdown = options.dropdownList;\n this.items = this.dropdown.querySelectorAll(dropdownItemClass);\n this.links = this.dropdown.querySelectorAll(dropdownLinkClass);\n [this.firstLink] = this.links;\n this.lastLink = this.links[this.links.length - 1];\n\n this.state = [];\n this.currentFocusedIndex = 0;\n this.isOpen = false;\n\n this.open = this.open.bind(this);\n this.toggle = this.toggle.bind(this);\n this.onClick = this.onClick.bind(this);\n this.onFocus = this.onFocus.bind(this);\n this.onKeydown = this.onKeydown.bind(this);\n }", "function _dropdownAdapter(clazz) {\n return null;\n }", "function Select(props, ref) {\n var _classNames2;\n\n var _props$prefixCls = props.prefixCls,\n prefixCls = _props$prefixCls === void 0 ? defaultPrefixCls : _props$prefixCls,\n className = props.className,\n id = props.id,\n open = props.open,\n defaultOpen = props.defaultOpen,\n options = props.options,\n children = props.children,\n mode = props.mode,\n value = props.value,\n defaultValue = props.defaultValue,\n labelInValue = props.labelInValue,\n showSearch = props.showSearch,\n inputValue = props.inputValue,\n searchValue = props.searchValue,\n filterOption = props.filterOption,\n _props$optionFilterPr = props.optionFilterProp,\n optionFilterProp = _props$optionFilterPr === void 0 ? 'value' : _props$optionFilterPr,\n _props$autoClearSearc = props.autoClearSearchValue,\n autoClearSearchValue = _props$autoClearSearc === void 0 ? true : _props$autoClearSearc,\n onSearch = props.onSearch,\n allowClear = props.allowClear,\n clearIcon = props.clearIcon,\n showArrow = props.showArrow,\n inputIcon = props.inputIcon,\n menuItemSelectedIcon = props.menuItemSelectedIcon,\n disabled = props.disabled,\n loading = props.loading,\n defaultActiveFirstOption = props.defaultActiveFirstOption,\n _props$notFoundConten = props.notFoundContent,\n notFoundContent = _props$notFoundConten === void 0 ? 'Not Found' : _props$notFoundConten,\n optionLabelProp = props.optionLabelProp,\n backfill = props.backfill,\n getInputElement = props.getInputElement,\n getPopupContainer = props.getPopupContainer,\n _props$listHeight = props.listHeight,\n listHeight = _props$listHeight === void 0 ? 200 : _props$listHeight,\n _props$listItemHeight = props.listItemHeight,\n listItemHeight = _props$listItemHeight === void 0 ? 20 : _props$listItemHeight,\n animation = props.animation,\n transitionName = props.transitionName,\n dropdownStyle = props.dropdownStyle,\n dropdownClassName = props.dropdownClassName,\n dropdownMatchSelectWidth = props.dropdownMatchSelectWidth,\n dropdownRender = props.dropdownRender,\n dropdownAlign = props.dropdownAlign,\n _props$showAction = props.showAction,\n showAction = _props$showAction === void 0 ? [] : _props$showAction,\n tokenSeparators = props.tokenSeparators,\n onPopupScroll = props.onPopupScroll,\n onDropdownVisibleChange = props.onDropdownVisibleChange,\n onFocus = props.onFocus,\n onBlur = props.onBlur,\n onKeyUp = props.onKeyUp,\n onKeyDown = props.onKeyDown,\n onMouseDown = props.onMouseDown,\n onChange = props.onChange,\n onSelect = props.onSelect,\n onDeselect = props.onDeselect,\n _props$internalProps = props.internalProps,\n internalProps = _props$internalProps === void 0 ? {} : _props$internalProps,\n restProps = _objectWithoutProperties(props, [\"prefixCls\", \"className\", \"id\", \"open\", \"defaultOpen\", \"options\", \"children\", \"mode\", \"value\", \"defaultValue\", \"labelInValue\", \"showSearch\", \"inputValue\", \"searchValue\", \"filterOption\", \"optionFilterProp\", \"autoClearSearchValue\", \"onSearch\", \"allowClear\", \"clearIcon\", \"showArrow\", \"inputIcon\", \"menuItemSelectedIcon\", \"disabled\", \"loading\", \"defaultActiveFirstOption\", \"notFoundContent\", \"optionLabelProp\", \"backfill\", \"getInputElement\", \"getPopupContainer\", \"listHeight\", \"listItemHeight\", \"animation\", \"transitionName\", \"dropdownStyle\", \"dropdownClassName\", \"dropdownMatchSelectWidth\", \"dropdownRender\", \"dropdownAlign\", \"showAction\", \"tokenSeparators\", \"onPopupScroll\", \"onDropdownVisibleChange\", \"onFocus\", \"onBlur\", \"onKeyUp\", \"onKeyDown\", \"onMouseDown\", \"onChange\", \"onSelect\", \"onDeselect\", \"internalProps\"]);\n\n var domProps = omitDOMProps ? omitDOMProps(restProps) : restProps;\n DEFAULT_OMIT_PROPS.forEach(function (prop) {\n delete domProps[prop];\n });\n var selectorRef = React.useRef(null);\n var listRef = React.useRef(null);\n /** Used for component focused management */\n\n var _useDelayReset = (0, _useDelayReset3.default)(),\n _useDelayReset2 = _slicedToArray(_useDelayReset, 3),\n mockFocused = _useDelayReset2[0],\n setMockFocused = _useDelayReset2[1],\n cancelSetMockFocused = _useDelayReset2[2]; // Inner id for accessibility usage. Only work in client side\n\n\n var _React$useState = React.useState(),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n innerId = _React$useState2[0],\n setInnerId = _React$useState2[1];\n\n React.useEffect(function () {\n setInnerId(\"rc_select_\".concat((0, _commonUtil.getUUID)()));\n }, []);\n var mergedId = id || innerId; // optionLabelProp\n\n var mergedOptionLabelProp = optionLabelProp;\n\n if (mergedOptionLabelProp === undefined) {\n mergedOptionLabelProp = options ? 'label' : 'children';\n } // labelInValue\n\n\n var mergedLabelInValue = mode === 'combobox' ? false : labelInValue;\n var isMultiple = mode === 'tags' || mode === 'multiple';\n var mergedShowSearch = showSearch !== undefined ? showSearch : isMultiple || mode === 'combobox'; // ============================== Ref ===============================\n\n React.useImperativeHandle(ref, function () {\n return {\n focus: selectorRef.current.focus,\n blur: selectorRef.current.blur\n };\n }); // ============================= Value ==============================\n\n var _React$useState3 = React.useState(value || defaultValue),\n _React$useState4 = _slicedToArray(_React$useState3, 2),\n innerValue = _React$useState4[0],\n setInnerValue = _React$useState4[1];\n\n var baseValue = value !== undefined && value !== null ? value : innerValue;\n /** Unique raw values */\n\n var mergedRawValue = React.useMemo(function () {\n return (0, _commonUtil.toInnerValue)(baseValue, {\n labelInValue: mergedLabelInValue,\n combobox: mode === 'combobox'\n });\n }, [baseValue, mergedLabelInValue]);\n /** We cache a set of raw values to speed up check */\n\n var rawValues = React.useMemo(function () {\n return new Set(mergedRawValue);\n }, [mergedRawValue]); // ============================= Option =============================\n // Set by option list active, it will merge into search input when mode is `combobox`\n\n var _React$useState5 = React.useState(null),\n _React$useState6 = _slicedToArray(_React$useState5, 2),\n activeValue = _React$useState6[0],\n setActiveValue = _React$useState6[1];\n\n var _React$useState7 = React.useState(''),\n _React$useState8 = _slicedToArray(_React$useState7, 2),\n innerSearchValue = _React$useState8[0],\n setInnerSearchValue = _React$useState8[1];\n\n var mergedSearchValue = innerSearchValue;\n\n if (searchValue !== undefined) {\n mergedSearchValue = searchValue;\n } else if (inputValue) {\n mergedSearchValue = inputValue;\n }\n\n var mergedOptions = React.useMemo(function () {\n var newOptions = options;\n\n if (newOptions === undefined) {\n newOptions = convertChildrenToData(children);\n }\n /**\n * `tags` should fill un-list item.\n * This is not cool here since TreeSelect do not need this\n */\n\n\n if (mode === 'tags' && fillOptionsWithMissingValue) {\n newOptions = fillOptionsWithMissingValue(newOptions, baseValue, mergedOptionLabelProp, labelInValue);\n }\n\n return newOptions;\n }, [options, children, mode, baseValue]);\n var mergedFlattenOptions = React.useMemo(function () {\n return flattenOptions(mergedOptions, props);\n }, [mergedOptions]); // Display options for OptionList\n\n var displayOptions = React.useMemo(function () {\n if (!mergedSearchValue) {\n return _toConsumableArray(mergedOptions);\n }\n\n var filteredOptions = filterOptions(mergedSearchValue, mergedOptions, {\n optionFilterProp: optionFilterProp,\n filterOption: mode === 'combobox' && filterOption === undefined ? function () {\n return true;\n } : filterOption\n });\n\n if (mode === 'tags' && filteredOptions.every(function (opt) {\n return opt.value !== mergedSearchValue;\n })) {\n filteredOptions.unshift({\n value: mergedSearchValue,\n label: mergedSearchValue,\n key: '__RC_SELECT_TAG_PLACEHOLDER__'\n });\n }\n\n return filteredOptions;\n }, [mergedOptions, mergedSearchValue, mode]);\n var displayFlattenOptions = React.useMemo(function () {\n return flattenOptions(displayOptions, props);\n }, [displayOptions]); // ============================ Selector ============================\n\n var displayValues = React.useMemo(function () {\n return mergedRawValue.map(function (val) {\n var displayValue = getLabeledValue(val, {\n options: mergedFlattenOptions,\n prevValue: baseValue,\n labelInValue: mergedLabelInValue,\n optionLabelProp: mergedOptionLabelProp\n });\n return _objectSpread({}, displayValue, {\n disabled: isValueDisabled(val, mergedFlattenOptions)\n });\n });\n }, [baseValue, mergedOptions]);\n\n var triggerSelect = function triggerSelect(newValue, isSelect) {\n var selectValue = mergedLabelInValue ? getLabeledValue(newValue, {\n options: mergedFlattenOptions,\n prevValue: baseValue,\n labelInValue: mergedLabelInValue,\n optionLabelProp: mergedOptionLabelProp\n }) : newValue;\n var outOption = findValueOption([newValue], mergedFlattenOptions)[0];\n\n if (isSelect && onSelect) {\n onSelect(selectValue, outOption);\n } else if (!isSelect && onDeselect) {\n onDeselect(selectValue, outOption);\n }\n };\n\n var triggerChange = function triggerChange(newRawValues) {\n var outValues = (0, _commonUtil.toOuterValues)(Array.from(newRawValues), {\n labelInValue: mergedLabelInValue,\n options: mergedFlattenOptions,\n getLabeledValue: getLabeledValue,\n prevValue: baseValue,\n optionLabelProp: mergedOptionLabelProp\n });\n var outValue = isMultiple ? outValues : outValues[0]; // Skip trigger if prev & current value is both empty\n\n if (onChange && (mergedRawValue.length !== 0 || outValues.length !== 0)) {\n var outOptions = findValueOption(newRawValues, mergedFlattenOptions);\n onChange(outValue, isMultiple ? outOptions : outOptions[0]);\n }\n\n setInnerValue(outValue);\n };\n\n var onInternalSelect = function onInternalSelect(newValue, _ref) {\n var selected = _ref.selected;\n\n if (disabled) {\n return;\n }\n\n var newRawValue;\n\n if (isMultiple) {\n newRawValue = new Set(mergedRawValue);\n\n if (selected) {\n newRawValue.add(newValue);\n } else {\n newRawValue.delete(newValue);\n }\n } else {\n newRawValue = new Set();\n newRawValue.add(newValue);\n } // Multiple always trigger change and single should change if value changed\n\n\n if (isMultiple || !isMultiple && Array.from(mergedRawValue)[0] !== newValue) {\n triggerChange(Array.from(newRawValue));\n } // Trigger `onSelect`. Single mode always trigger select\n\n\n triggerSelect(newValue, !isMultiple || selected); // Clean search value if single or configured\n\n if (mode === 'combobox') {\n setInnerSearchValue(String(newValue));\n setActiveValue('');\n } else if (!isMultiple || autoClearSearchValue) {\n setInnerSearchValue('');\n setActiveValue('');\n }\n }; // ============================= Input ==============================\n // Only works in `combobox`\n\n\n var customizeInputElement = mode === 'combobox' && getInputElement && getInputElement() || null; // ============================== Open ==============================\n\n var _React$useState9 = React.useState(defaultOpen),\n _React$useState10 = _slicedToArray(_React$useState9, 2),\n innerOpen = _React$useState10[0],\n setInnerOpen = _React$useState10[1];\n\n var mergedOpen = open !== undefined ? open : innerOpen; // Not trigger `open` in `combobox` when `notFoundContent` is empty\n\n if (mergedOpen && mode === 'combobox' && !notFoundContent && !displayOptions.length) {\n mergedOpen = false;\n }\n\n var onToggleOpen = function onToggleOpen(newOpen) {\n var nextOpen = newOpen !== undefined ? newOpen : !mergedOpen;\n\n if (mergedOpen !== nextOpen && !disabled) {\n setInnerOpen(nextOpen);\n\n if (onDropdownVisibleChange) {\n onDropdownVisibleChange(nextOpen);\n }\n }\n }; // ============================= Search =============================\n\n\n var triggerSearch = function triggerSearch(searchText) {\n var fromTyping = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var ret = true;\n var newSearchText = searchText;\n setActiveValue(null); // Check if match the `tokenSeparators`\n\n var patchLabels = (0, _valueUtil.getSeparatedContent)(searchText, tokenSeparators);\n var patchRawValues = patchLabels;\n\n if (mode === 'combobox') {\n // Only typing will trigger onChange\n if (fromTyping) {\n triggerChange([newSearchText]);\n }\n } else if (patchLabels) {\n newSearchText = '';\n\n if (mode !== 'tags') {\n patchRawValues = patchLabels.map(function (label) {\n var item = mergedFlattenOptions.find(function (_ref2) {\n var data = _ref2.data;\n return data[mergedOptionLabelProp] === label;\n });\n return item ? item.data.value : null;\n }).filter(function (val) {\n return val !== null;\n });\n }\n\n var newRawValues = Array.from(new Set([].concat(_toConsumableArray(mergedRawValue), _toConsumableArray(patchRawValues))));\n triggerChange(newRawValues);\n newRawValues.forEach(function (newRawValue) {\n triggerSelect(newRawValue, true);\n }); // Should close when paste finish\n\n onToggleOpen(false); // Tell Selector that break next actions\n\n ret = false;\n }\n\n setInnerSearchValue(newSearchText);\n\n if (onSearch && mergedSearchValue !== newSearchText) {\n onSearch(newSearchText);\n }\n\n return ret;\n }; // Close will clean up single mode search text\n\n\n React.useEffect(function () {\n if (!mergedOpen && !isMultiple && mode !== 'combobox') {\n triggerSearch('', false);\n }\n }, [mergedOpen]); // ============================ Keyboard ============================\n\n /**\n * We record input value here to check if can press to clean up by backspace\n * - null: Key is not down, this is reset by key up\n * - true: Search text is empty when first time backspace down\n * - false: Search text is not empty when first time backspace down\n */\n\n var _useLock = (0, _useLock3.default)(),\n _useLock2 = _slicedToArray(_useLock, 2),\n getClearLock = _useLock2[0],\n setClearLock = _useLock2[1];\n\n var clearLock = getClearLock(); // KeyDown\n\n var onInternalKeyDown = function onInternalKeyDown(event) {\n var which = event.which; // We only manage open state here, close logic should handle by list component\n\n if (!mergedOpen && which === _KeyCode.default.ENTER) {\n onToggleOpen(true);\n }\n\n setClearLock(!!mergedSearchValue); // Remove value by `backspace`\n\n if (which === _KeyCode.default.BACKSPACE && !clearLock && isMultiple && !mergedSearchValue && mergedRawValue.length) {\n var removeInfo = (0, _commonUtil.removeLastEnabledValue)(displayValues, mergedRawValue);\n\n if (removeInfo.removedValue !== null) {\n triggerChange(removeInfo.values);\n triggerSelect(removeInfo.removedValue, false);\n }\n }\n\n for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n rest[_key - 1] = arguments[_key];\n }\n\n if (mergedOpen && listRef.current) {\n var _listRef$current;\n\n (_listRef$current = listRef.current).onKeyDown.apply(_listRef$current, [event].concat(rest));\n }\n\n if (onKeyDown) {\n onKeyDown.apply(void 0, [event].concat(rest));\n }\n }; // KeyUp\n\n\n var onInternalKeyUp = function onInternalKeyUp(event) {\n for (var _len2 = arguments.length, rest = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n rest[_key2 - 1] = arguments[_key2];\n }\n\n if (mergedOpen && listRef.current) {\n var _listRef$current2;\n\n (_listRef$current2 = listRef.current).onKeyUp.apply(_listRef$current2, [event].concat(rest));\n }\n\n if (onKeyUp) {\n onKeyUp.apply(void 0, [event].concat(rest));\n }\n }; // ========================== Focus / Blur ==========================\n\n\n var triggerRef = React.useRef(null);\n /** Record real focus status */\n\n var focusRef = React.useRef(false);\n\n var onContainerFocus = function onContainerFocus() {\n setMockFocused(true);\n\n if (!disabled) {\n if (onFocus && !focusRef.current) {\n onFocus.apply(void 0, arguments);\n } // `showAction` should handle `focus` if set\n\n\n if (showAction.includes('focus')) {\n onToggleOpen(true);\n }\n }\n\n focusRef.current = true;\n };\n\n var onContainerBlur = function onContainerBlur() {\n setMockFocused(false, function () {\n focusRef.current = false;\n onToggleOpen(false);\n });\n\n if (disabled) {\n return;\n }\n\n if (mergedSearchValue) {\n // `tags` mode should move `searchValue` into values\n if (mode === 'tags') {\n triggerSearch('', false);\n triggerChange(Array.from(new Set([].concat(_toConsumableArray(mergedRawValue), [mergedSearchValue]))));\n } else if (mode === 'multiple') {\n // `multiple` mode only clean the search value but not trigger event\n setInnerSearchValue('');\n }\n }\n\n if (onBlur) {\n onBlur.apply(void 0, arguments);\n }\n };\n\n var onInternalMouseDown = function onInternalMouseDown(event) {\n var target = event.target;\n var popupElement = triggerRef.current && triggerRef.current.getPopupElement(); // We should give focus back to selector if clicked item is not focusable\n\n if (popupElement && popupElement.contains(target)) {\n setTimeout(function () {\n cancelSetMockFocused();\n\n if (!popupElement.contains(document.activeElement)) {\n selectorRef.current.focus();\n }\n });\n }\n\n if (onMouseDown) {\n for (var _len3 = arguments.length, restArgs = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n restArgs[_key3 - 1] = arguments[_key3];\n }\n\n onMouseDown.apply(void 0, [event].concat(restArgs));\n }\n }; // ========================= Accessibility ==========================\n\n\n var _React$useState11 = React.useState(0),\n _React$useState12 = _slicedToArray(_React$useState11, 2),\n accessibilityIndex = _React$useState12[0],\n setAccessibilityIndex = _React$useState12[1];\n\n var mergedDefaultActiveFirstOption = defaultActiveFirstOption !== undefined ? defaultActiveFirstOption : mode !== 'combobox';\n\n var onActiveValue = function onActiveValue(active, index) {\n setAccessibilityIndex(index);\n\n if (backfill && mode === 'combobox' && active !== null) {\n setActiveValue(String(active));\n }\n }; // ============================= Popup ==============================\n\n\n var containerRef = React.useRef(null);\n\n var _React$useState13 = React.useState(null),\n _React$useState14 = _slicedToArray(_React$useState13, 2),\n containerWidth = _React$useState14[0],\n setContainerWidth = _React$useState14[1];\n\n (0, _useLayoutEffect.default)(function () {\n var newWidth = Math.ceil(containerRef.current.offsetWidth);\n\n if (containerWidth !== newWidth) {\n setContainerWidth(newWidth);\n }\n });\n var popupNode = React.createElement(OptionList, {\n ref: listRef,\n prefixCls: prefixCls,\n id: mergedId,\n open: mergedOpen,\n childrenAsData: !options,\n options: displayOptions,\n flattenOptions: displayFlattenOptions,\n multiple: isMultiple,\n values: rawValues,\n height: listHeight,\n itemHeight: listItemHeight,\n onSelect: onInternalSelect,\n onToggleOpen: onToggleOpen,\n onActiveValue: onActiveValue,\n defaultActiveFirstOption: mergedDefaultActiveFirstOption,\n notFoundContent: notFoundContent,\n onScroll: onPopupScroll,\n searchValue: mergedSearchValue,\n menuItemSelectedIcon: menuItemSelectedIcon\n }); // ============================= Clear ==============================\n\n var clearNode;\n\n var onClearMouseDown = function onClearMouseDown() {\n // Trigger internal `onClear` event\n if (internalProps.mark === _generator.INTERNAL_PROPS_MARK && internalProps.onClear) {\n internalProps.onClear();\n }\n\n triggerChange([]);\n triggerSearch('', false);\n };\n\n if (allowClear && (mergedRawValue.length || mergedSearchValue)) {\n clearNode = React.createElement(_TransBtn.default, {\n className: \"\".concat(prefixCls, \"-clear\"),\n onMouseDown: onClearMouseDown,\n customizeIcon: clearIcon\n }, \"\\xD7\");\n } // ============================= Arrow ==============================\n\n\n var mergedShowArrow = showArrow !== undefined ? showArrow : loading || !isMultiple && mode !== 'combobox';\n var arrowNode;\n\n if (mergedShowArrow) {\n arrowNode = React.createElement(_TransBtn.default, {\n className: (0, _classnames.default)(\"\".concat(prefixCls, \"-arrow\"), _defineProperty({}, \"\".concat(prefixCls, \"-arrow-loading\"), loading)),\n customizeIcon: inputIcon\n });\n } // ============================ Warning =============================\n\n\n if (\"development\" !== 'production') {\n warningProps(props);\n } // ============================= Render =============================\n\n\n var mergedClassName = (0, _classnames.default)(prefixCls, className, (_classNames2 = {}, _defineProperty(_classNames2, \"\".concat(prefixCls, \"-focused\"), mockFocused), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-multiple\"), isMultiple), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-single\"), !isMultiple), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-allow-clear\"), allowClear), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-show-arrow\"), mergedShowArrow), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-disabled\"), disabled), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-loading\"), loading), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-open\"), mergedOpen), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-customize-input\"), customizeInputElement), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-show-search\"), mergedShowSearch), _classNames2));\n return React.createElement(\"div\", Object.assign({\n className: mergedClassName\n }, domProps, {\n ref: containerRef,\n onMouseDown: onInternalMouseDown,\n onKeyDown: onInternalKeyDown,\n onKeyUp: onInternalKeyUp,\n onFocus: onContainerFocus,\n onBlur: onContainerBlur\n }), mockFocused && !mergedOpen && React.createElement(\"span\", {\n style: {\n width: 0,\n height: 0,\n display: 'flex',\n overflow: 'hidden',\n opacity: 0\n },\n \"aria-live\": \"polite\"\n }, \"\".concat(mergedRawValue.join(', '))), React.createElement(_SelectTrigger.default, {\n ref: triggerRef,\n disabled: disabled,\n prefixCls: prefixCls,\n visible: mergedOpen,\n popupElement: popupNode,\n containerWidth: containerWidth,\n animation: animation,\n transitionName: transitionName,\n dropdownStyle: dropdownStyle,\n dropdownClassName: dropdownClassName,\n dropdownMatchSelectWidth: dropdownMatchSelectWidth,\n dropdownRender: dropdownRender,\n dropdownAlign: dropdownAlign,\n getPopupContainer: getPopupContainer,\n empty: !mergedOptions.length\n }, React.createElement(_Selector.default, Object.assign({}, props, {\n prefixCls: prefixCls,\n inputElement: customizeInputElement,\n ref: selectorRef,\n id: mergedId,\n showSearch: mergedShowSearch,\n mode: mode,\n accessibilityIndex: accessibilityIndex,\n multiple: isMultiple,\n values: displayValues,\n open: mergedOpen,\n onToggleOpen: onToggleOpen,\n searchValue: mergedSearchValue,\n activeValue: activeValue,\n onSearch: triggerSearch,\n onSelect: onInternalSelect\n }))), arrowNode, clearNode);\n }", "function NormalDropdown(props){\n return (\n <select\n onChange={props.handleChange}\n value={props.value}>\n <option style={{'color':'black'}} value={`${props.title}`} selected disabled hidden>{props.title}</option>\n {/* Allow special option - option which is different from others - to have different formatting*/}\n {props.specialOption?\n props.array.map(choice=>{\n return( \n // Format differently if it is the special option value (e.g. New Database)\n choice==props.specialOptionValue?<option style={{'color':'red'}} value={choice}>{choice}</option>:\n <option value={choice}>{choice}</option>)\n }):props.array.map(choice=>{\n return(<option value={choice}>{choice}</option>)})} \n </select>\n )\n}", "function createDropdownMenu() {\n return $(\"<ul>\").addClass(\"dropdown-menu\");\n }", "function DropNav(props) {\n // const [dropdown, setDropdown] = useState(false);\n\n const changeHandler =(event)=>{\n props.value(event.target.value)\n } ;\n return (\n <>\n <nav className='navbar1'>\n <Link to='/' className='navbar1-logo'>\n Visualize Graphs\n </Link>\n \n <div>\n \n <select onChange={changeHandler} >\n <option value='plot'>Plot</option>\n <option value='Exponantial'>Exponantial</option>\n <option value='EXX1'>EXX1</option>\n <option value='Linear'>Linear</option>\n <option value='Logarithm'>Logrithms</option>\n <option value='XCube'>XCube</option>\n <option value='XSqX1'>XsqX1</option>\n \n </select>\n </div>\n \n </nav>\n </>\n );\n}", "function Dropdown(){\n\n /**\n * State for whether it has been clicked or not\n */\n const [click, setClick] = useState(false);\n\n /**\n * This function toggles between clicked and not clicked\n */\n const handleClick = () => setClick(!click);\n\n return(\n <>\n <ul onClick={handleClick} className={click ? 'dropdown-menu clicked' : 'dropdown-menu'} >\n {MenuItems.map((item, index) => {\n return (\n <li key={index}>\n <Link className={item.cName} to={item.path} onClick={() => setClick(false)}>\n {item.title}\n </Link>\n </li>\n )\n })}\n </ul>\n\n </>\n );\n}", "function CuiDropdown(params) {\n cuiInitNode(this);\n\n var toggle;\n var popup;\n var self = this;\n\n this.onConstruct = function() {\n toggle = new CuiToggle({\n cssClass: \"cui_dropdown\",\n onChange: function(value) {\n if (params.uniformWidth && self.isLive()) {\n popup.get$().css('width', toggle.get$().width() + \"px\");\n }\n popup.toggle(value);\n },\n content: params.buttonContent,\n });\n popup = new CuiPopup({\n cssClass: \"cui_dropdown\",\n content: params.popupContent,\n });\n return [\n \"<div class='cui_dropdown \" + params.cssClass + \"'>\",\n toggle,\n popup,\n \"</div>\",\n ];\n }\n\n this.onRefresh = function($me, dirty, live) {\n cuiRefresh([toggle, popup], live);\n }\n}", "function Select(props, ref) {\n var _classNames2;\n\n var _props$prefixCls = props.prefixCls,\n prefixCls = _props$prefixCls === void 0 ? defaultPrefixCls : _props$prefixCls,\n className = props.className,\n id = props.id,\n open = props.open,\n defaultOpen = props.defaultOpen,\n options = props.options,\n children = props.children,\n mode = props.mode,\n value = props.value,\n defaultValue = props.defaultValue,\n labelInValue = props.labelInValue,\n showSearch = props.showSearch,\n inputValue = props.inputValue,\n searchValue = props.searchValue,\n filterOption = props.filterOption,\n _props$optionFilterPr = props.optionFilterProp,\n optionFilterProp = _props$optionFilterPr === void 0 ? 'value' : _props$optionFilterPr,\n _props$autoClearSearc = props.autoClearSearchValue,\n autoClearSearchValue = _props$autoClearSearc === void 0 ? true : _props$autoClearSearc,\n onSearch = props.onSearch,\n allowClear = props.allowClear,\n clearIcon = props.clearIcon,\n showArrow = props.showArrow,\n inputIcon = props.inputIcon,\n menuItemSelectedIcon = props.menuItemSelectedIcon,\n disabled = props.disabled,\n loading = props.loading,\n defaultActiveFirstOption = props.defaultActiveFirstOption,\n _props$notFoundConten = props.notFoundContent,\n notFoundContent = _props$notFoundConten === void 0 ? 'Not Found' : _props$notFoundConten,\n optionLabelProp = props.optionLabelProp,\n backfill = props.backfill,\n getInputElement = props.getInputElement,\n getPopupContainer = props.getPopupContainer,\n _props$listHeight = props.listHeight,\n listHeight = _props$listHeight === void 0 ? 200 : _props$listHeight,\n _props$listItemHeight = props.listItemHeight,\n listItemHeight = _props$listItemHeight === void 0 ? 20 : _props$listItemHeight,\n animation = props.animation,\n transitionName = props.transitionName,\n virtual = props.virtual,\n dropdownStyle = props.dropdownStyle,\n dropdownClassName = props.dropdownClassName,\n dropdownMatchSelectWidth = props.dropdownMatchSelectWidth,\n dropdownRender = props.dropdownRender,\n dropdownAlign = props.dropdownAlign,\n _props$showAction = props.showAction,\n showAction = _props$showAction === void 0 ? [] : _props$showAction,\n direction = props.direction,\n tokenSeparators = props.tokenSeparators,\n tagRender = props.tagRender,\n onPopupScroll = props.onPopupScroll,\n onDropdownVisibleChange = props.onDropdownVisibleChange,\n onFocus = props.onFocus,\n onBlur = props.onBlur,\n onKeyUp = props.onKeyUp,\n onKeyDown = props.onKeyDown,\n onMouseDown = props.onMouseDown,\n onChange = props.onChange,\n onSelect = props.onSelect,\n onDeselect = props.onDeselect,\n _props$internalProps = props.internalProps,\n internalProps = _props$internalProps === void 0 ? {} : _props$internalProps,\n restProps = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(props, [\"prefixCls\", \"className\", \"id\", \"open\", \"defaultOpen\", \"options\", \"children\", \"mode\", \"value\", \"defaultValue\", \"labelInValue\", \"showSearch\", \"inputValue\", \"searchValue\", \"filterOption\", \"optionFilterProp\", \"autoClearSearchValue\", \"onSearch\", \"allowClear\", \"clearIcon\", \"showArrow\", \"inputIcon\", \"menuItemSelectedIcon\", \"disabled\", \"loading\", \"defaultActiveFirstOption\", \"notFoundContent\", \"optionLabelProp\", \"backfill\", \"getInputElement\", \"getPopupContainer\", \"listHeight\", \"listItemHeight\", \"animation\", \"transitionName\", \"virtual\", \"dropdownStyle\", \"dropdownClassName\", \"dropdownMatchSelectWidth\", \"dropdownRender\", \"dropdownAlign\", \"showAction\", \"direction\", \"tokenSeparators\", \"tagRender\", \"onPopupScroll\", \"onDropdownVisibleChange\", \"onFocus\", \"onBlur\", \"onKeyUp\", \"onKeyDown\", \"onMouseDown\", \"onChange\", \"onSelect\", \"onDeselect\", \"internalProps\"]);\n\n var useInternalProps = internalProps.mark === _interface_generator__WEBPACK_IMPORTED_MODULE_10__[\"INTERNAL_PROPS_MARK\"];\n var domProps = omitDOMProps ? omitDOMProps(restProps) : restProps;\n DEFAULT_OMIT_PROPS.forEach(function (prop) {\n delete domProps[prop];\n });\n var containerRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](null);\n var triggerRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](null);\n var selectorRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](null);\n var listRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](null);\n /** Used for component focused management */\n\n var _useDelayReset = Object(_hooks_useDelayReset__WEBPACK_IMPORTED_MODULE_14__[\"default\"])(),\n _useDelayReset2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useDelayReset, 3),\n mockFocused = _useDelayReset2[0],\n setMockFocused = _useDelayReset2[1],\n cancelSetMockFocused = _useDelayReset2[2]; // Inner id for accessibility usage. Only work in client side\n\n\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](),\n _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState, 2),\n innerId = _React$useState2[0],\n setInnerId = _React$useState2[1];\n\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n setInnerId(\"rc_select_\".concat(Object(_utils_commonUtil__WEBPACK_IMPORTED_MODULE_11__[\"getUUID\"])()));\n }, []);\n var mergedId = id || innerId; // optionLabelProp\n\n var mergedOptionLabelProp = optionLabelProp;\n\n if (mergedOptionLabelProp === undefined) {\n mergedOptionLabelProp = options ? 'label' : 'children';\n } // labelInValue\n\n\n var mergedLabelInValue = mode === 'combobox' ? false : labelInValue;\n var isMultiple = mode === 'tags' || mode === 'multiple';\n var mergedShowSearch = showSearch !== undefined ? showSearch : isMultiple || mode === 'combobox'; // ============================== Ref ===============================\n\n var selectorDomRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](null);\n react__WEBPACK_IMPORTED_MODULE_4__[\"useImperativeHandle\"](ref, function () {\n return {\n focus: selectorRef.current.focus,\n blur: selectorRef.current.blur\n };\n }); // ============================= Value ==============================\n\n var _React$useState3 = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](value || defaultValue),\n _React$useState4 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState3, 2),\n innerValue = _React$useState4[0],\n setInnerValue = _React$useState4[1];\n\n var baseValue = value !== undefined ? value : innerValue; // Should reset when controlled to be uncontrolled\n\n var prevValueRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](value);\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n if (prevValueRef.current !== value && (value === undefined || value === null)) {\n setInnerValue(undefined);\n }\n\n prevValueRef.current = value;\n }, [value]);\n /** Unique raw values */\n\n var mergedRawValue = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n return Object(_utils_commonUtil__WEBPACK_IMPORTED_MODULE_11__[\"toInnerValue\"])(baseValue, {\n labelInValue: mergedLabelInValue,\n combobox: mode === 'combobox'\n });\n }, [baseValue, mergedLabelInValue]);\n /** We cache a set of raw values to speed up check */\n\n var rawValues = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n return new Set(mergedRawValue);\n }, [mergedRawValue]); // ============================= Option =============================\n // Set by option list active, it will merge into search input when mode is `combobox`\n\n var _React$useState5 = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](null),\n _React$useState6 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState5, 2),\n activeValue = _React$useState6[0],\n setActiveValue = _React$useState6[1];\n\n var _React$useState7 = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](''),\n _React$useState8 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState7, 2),\n innerSearchValue = _React$useState8[0],\n setInnerSearchValue = _React$useState8[1];\n\n var mergedSearchValue = innerSearchValue;\n\n if (mode === 'combobox' && value !== undefined) {\n mergedSearchValue = value;\n } else if (searchValue !== undefined) {\n mergedSearchValue = searchValue;\n } else if (inputValue) {\n mergedSearchValue = inputValue;\n }\n\n var mergedOptions = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n var newOptions = options;\n\n if (newOptions === undefined) {\n newOptions = convertChildrenToData(children);\n }\n /**\n * `tags` should fill un-list item.\n * This is not cool here since TreeSelect do not need this\n */\n\n\n if (mode === 'tags' && fillOptionsWithMissingValue) {\n newOptions = fillOptionsWithMissingValue(newOptions, baseValue, mergedOptionLabelProp, labelInValue);\n }\n\n return newOptions || [];\n }, [options, children, mode, baseValue]);\n var mergedFlattenOptions = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n return flattenOptions(mergedOptions, props);\n }, [mergedOptions]);\n var optionMap = Object(_hooks_useCacheOptions__WEBPACK_IMPORTED_MODULE_19__[\"default\"])(mergedRawValue, mergedFlattenOptions); // Display options for OptionList\n\n var displayOptions = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n if (!mergedSearchValue || !mergedShowSearch) {\n return Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mergedOptions);\n }\n\n var filteredOptions = filterOptions(mergedSearchValue, mergedOptions, {\n optionFilterProp: optionFilterProp,\n filterOption: mode === 'combobox' && filterOption === undefined ? function () {\n return true;\n } : filterOption\n });\n\n if (mode === 'tags' && filteredOptions.every(function (opt) {\n return opt.value !== mergedSearchValue;\n })) {\n filteredOptions.unshift({\n value: mergedSearchValue,\n label: mergedSearchValue,\n key: '__RC_SELECT_TAG_PLACEHOLDER__'\n });\n }\n\n return filteredOptions;\n }, [mergedOptions, mergedSearchValue, mode, mergedShowSearch]);\n var displayFlattenOptions = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n return flattenOptions(displayOptions, props);\n }, [displayOptions]);\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n if (listRef.current && listRef.current.scrollTo) {\n listRef.current.scrollTo(0);\n }\n }, [mergedSearchValue]); // ============================ Selector ============================\n\n var displayValues = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n return mergedRawValue.map(function (val) {\n var displayValue = getLabeledValue(val, {\n optionMap: optionMap,\n prevValue: baseValue,\n labelInValue: mergedLabelInValue,\n optionLabelProp: mergedOptionLabelProp\n });\n return _objectSpread(_objectSpread({}, displayValue), {}, {\n disabled: isValueDisabled(val, optionMap)\n });\n });\n }, [baseValue, mergedOptions]); // Polyfill with cache label\n\n displayValues = Object(_hooks_useCacheDisplayValue__WEBPACK_IMPORTED_MODULE_18__[\"default\"])(displayValues);\n\n var triggerSelect = function triggerSelect(newValue, isSelect, source) {\n var outOption = findValueOption([newValue], optionMap)[0];\n\n if (!internalProps.skipTriggerSelect) {\n // Skip trigger `onSelect` or `onDeselect` if configured\n var selectValue = mergedLabelInValue ? getLabeledValue(newValue, {\n optionMap: optionMap,\n prevValue: baseValue,\n labelInValue: mergedLabelInValue,\n optionLabelProp: mergedOptionLabelProp\n }) : newValue;\n\n if (isSelect && onSelect) {\n onSelect(selectValue, outOption);\n } else if (!isSelect && onDeselect) {\n onDeselect(selectValue, outOption);\n }\n } // Trigger internal event\n\n\n if (useInternalProps) {\n if (isSelect && internalProps.onRawSelect) {\n internalProps.onRawSelect(newValue, outOption, source);\n } else if (!isSelect && internalProps.onRawDeselect) {\n internalProps.onRawDeselect(newValue, outOption, source);\n }\n }\n };\n\n var triggerChange = function triggerChange(newRawValues) {\n if (useInternalProps && internalProps.skipTriggerChange) {\n return;\n }\n\n var outValues = Object(_utils_commonUtil__WEBPACK_IMPORTED_MODULE_11__[\"toOuterValues\"])(Array.from(newRawValues), {\n labelInValue: mergedLabelInValue,\n optionMap: optionMap,\n getLabeledValue: getLabeledValue,\n prevValue: baseValue,\n optionLabelProp: mergedOptionLabelProp\n });\n var outValue = isMultiple ? outValues : outValues[0]; // Skip trigger if prev & current value is both empty\n\n if (onChange && (mergedRawValue.length !== 0 || outValues.length !== 0)) {\n var outOptions = findValueOption(newRawValues, optionMap);\n onChange(outValue, isMultiple ? outOptions : outOptions[0]);\n }\n\n setInnerValue(outValue);\n };\n\n var onInternalSelect = function onInternalSelect(newValue, _ref) {\n var selected = _ref.selected,\n source = _ref.source;\n\n if (disabled) {\n return;\n }\n\n var newRawValue;\n\n if (isMultiple) {\n newRawValue = new Set(mergedRawValue);\n\n if (selected) {\n newRawValue.add(newValue);\n } else {\n newRawValue.delete(newValue);\n }\n } else {\n newRawValue = new Set();\n newRawValue.add(newValue);\n } // Multiple always trigger change and single should change if value changed\n\n\n if (isMultiple || !isMultiple && Array.from(mergedRawValue)[0] !== newValue) {\n triggerChange(Array.from(newRawValue));\n } // Trigger `onSelect`. Single mode always trigger select\n\n\n triggerSelect(newValue, !isMultiple || selected, source); // Clean search value if single or configured\n\n if (mode === 'combobox') {\n setInnerSearchValue(String(newValue));\n setActiveValue('');\n } else if (!isMultiple || autoClearSearchValue) {\n setInnerSearchValue('');\n setActiveValue('');\n }\n };\n\n var onInternalOptionSelect = function onInternalOptionSelect(newValue, info) {\n onInternalSelect(newValue, _objectSpread(_objectSpread({}, info), {}, {\n source: 'option'\n }));\n };\n\n var onInternalSelectionSelect = function onInternalSelectionSelect(newValue, info) {\n onInternalSelect(newValue, _objectSpread(_objectSpread({}, info), {}, {\n source: 'selection'\n }));\n }; // ============================= Input ==============================\n // Only works in `combobox`\n\n\n var customizeInputElement = mode === 'combobox' && getInputElement && getInputElement() || null; // ============================== Open ==============================\n\n var _useMergedState = Object(rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(undefined, {\n defaultValue: defaultOpen,\n value: open\n }),\n _useMergedState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useMergedState, 2),\n innerOpen = _useMergedState2[0],\n setInnerOpen = _useMergedState2[1];\n\n var mergedOpen = innerOpen; // Not trigger `open` in `combobox` when `notFoundContent` is empty\n\n var emptyListContent = !notFoundContent && !displayOptions.length;\n\n if (disabled || emptyListContent && mergedOpen && mode === 'combobox') {\n mergedOpen = false;\n }\n\n var triggerOpen = emptyListContent ? false : mergedOpen;\n\n var onToggleOpen = function onToggleOpen(newOpen) {\n var nextOpen = newOpen !== undefined ? newOpen : !mergedOpen;\n\n if (innerOpen !== nextOpen && !disabled) {\n setInnerOpen(nextOpen);\n\n if (onDropdownVisibleChange) {\n onDropdownVisibleChange(nextOpen);\n }\n }\n };\n\n Object(_hooks_useSelectTriggerControl__WEBPACK_IMPORTED_MODULE_17__[\"default\"])([containerRef.current, triggerRef.current && triggerRef.current.getPopupElement()], triggerOpen, onToggleOpen); // ============================= Search =============================\n\n var triggerSearch = function triggerSearch(searchText) {\n var fromTyping = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var ret = true;\n var newSearchText = searchText;\n setActiveValue(null); // Check if match the `tokenSeparators`\n\n var patchLabels = Object(_utils_valueUtil__WEBPACK_IMPORTED_MODULE_16__[\"getSeparatedContent\"])(searchText, tokenSeparators);\n var patchRawValues = patchLabels;\n\n if (mode === 'combobox') {\n // Only typing will trigger onChange\n if (fromTyping) {\n triggerChange([newSearchText]);\n }\n } else if (patchLabels) {\n newSearchText = '';\n\n if (mode !== 'tags') {\n patchRawValues = patchLabels.map(function (label) {\n var item = mergedFlattenOptions.find(function (_ref2) {\n var data = _ref2.data;\n return data[mergedOptionLabelProp] === label;\n });\n return item ? item.data.value : null;\n }).filter(function (val) {\n return val !== null;\n });\n }\n\n var newRawValues = Array.from(new Set([].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mergedRawValue), Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(patchRawValues))));\n triggerChange(newRawValues);\n newRawValues.forEach(function (newRawValue) {\n triggerSelect(newRawValue, true, 'input');\n }); // Should close when paste finish\n\n onToggleOpen(false); // Tell Selector that break next actions\n\n ret = false;\n }\n\n setInnerSearchValue(newSearchText);\n\n if (onSearch && mergedSearchValue !== newSearchText) {\n onSearch(newSearchText);\n }\n\n return ret;\n }; // Close dropdown when disabled change\n\n\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n if (innerOpen && !!disabled) {\n setInnerOpen(false);\n }\n }, [disabled]); // Close will clean up single mode search text\n\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n if (!mergedOpen && !isMultiple && mode !== 'combobox') {\n triggerSearch('', false);\n }\n }, [mergedOpen]); // ============================ Keyboard ============================\n\n /**\n * We record input value here to check if can press to clean up by backspace\n * - null: Key is not down, this is reset by key up\n * - true: Search text is empty when first time backspace down\n * - false: Search text is not empty when first time backspace down\n */\n\n var _useLock = Object(_hooks_useLock__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(),\n _useLock2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useLock, 2),\n getClearLock = _useLock2[0],\n setClearLock = _useLock2[1]; // KeyDown\n\n\n var onInternalKeyDown = function onInternalKeyDown(event) {\n var clearLock = getClearLock();\n var which = event.which; // We only manage open state here, close logic should handle by list component\n\n if (!mergedOpen && which === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_5__[\"default\"].ENTER) {\n onToggleOpen(true);\n }\n\n setClearLock(!!mergedSearchValue); // Remove value by `backspace`\n\n if (which === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_5__[\"default\"].BACKSPACE && !clearLock && isMultiple && !mergedSearchValue && mergedRawValue.length) {\n var removeInfo = Object(_utils_commonUtil__WEBPACK_IMPORTED_MODULE_11__[\"removeLastEnabledValue\"])(displayValues, mergedRawValue);\n\n if (removeInfo.removedValue !== null) {\n triggerChange(removeInfo.values);\n triggerSelect(removeInfo.removedValue, false, 'input');\n }\n }\n\n for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n rest[_key - 1] = arguments[_key];\n }\n\n if (mergedOpen && listRef.current) {\n var _listRef$current;\n\n (_listRef$current = listRef.current).onKeyDown.apply(_listRef$current, [event].concat(rest));\n }\n\n if (onKeyDown) {\n onKeyDown.apply(void 0, [event].concat(rest));\n }\n }; // KeyUp\n\n\n var onInternalKeyUp = function onInternalKeyUp(event) {\n for (var _len2 = arguments.length, rest = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n rest[_key2 - 1] = arguments[_key2];\n }\n\n if (mergedOpen && listRef.current) {\n var _listRef$current2;\n\n (_listRef$current2 = listRef.current).onKeyUp.apply(_listRef$current2, [event].concat(rest));\n }\n\n if (onKeyUp) {\n onKeyUp.apply(void 0, [event].concat(rest));\n }\n }; // ========================== Focus / Blur ==========================\n\n /** Record real focus status */\n\n\n var focusRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](false);\n\n var onContainerFocus = function onContainerFocus() {\n setMockFocused(true);\n\n if (!disabled) {\n if (onFocus && !focusRef.current) {\n onFocus.apply(void 0, arguments);\n } // `showAction` should handle `focus` if set\n\n\n if (showAction.includes('focus')) {\n onToggleOpen(true);\n }\n }\n\n focusRef.current = true;\n };\n\n var onContainerBlur = function onContainerBlur() {\n setMockFocused(false, function () {\n focusRef.current = false;\n onToggleOpen(false);\n });\n\n if (disabled) {\n return;\n }\n\n if (mergedSearchValue) {\n // `tags` mode should move `searchValue` into values\n if (mode === 'tags') {\n triggerSearch('', false);\n triggerChange(Array.from(new Set([].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mergedRawValue), [mergedSearchValue]))));\n } else if (mode === 'multiple') {\n // `multiple` mode only clean the search value but not trigger event\n setInnerSearchValue('');\n }\n }\n\n if (onBlur) {\n onBlur.apply(void 0, arguments);\n }\n };\n\n var activeTimeoutIds = [];\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n return function () {\n activeTimeoutIds.forEach(function (timeoutId) {\n return clearTimeout(timeoutId);\n });\n activeTimeoutIds.splice(0, activeTimeoutIds.length);\n };\n }, []);\n\n var onInternalMouseDown = function onInternalMouseDown(event) {\n var target = event.target;\n var popupElement = triggerRef.current && triggerRef.current.getPopupElement(); // We should give focus back to selector if clicked item is not focusable\n\n if (popupElement && popupElement.contains(target)) {\n var timeoutId = setTimeout(function () {\n var index = activeTimeoutIds.indexOf(timeoutId);\n\n if (index !== -1) {\n activeTimeoutIds.splice(index, 1);\n }\n\n cancelSetMockFocused();\n\n if (!popupElement.contains(document.activeElement)) {\n selectorRef.current.focus();\n }\n });\n activeTimeoutIds.push(timeoutId);\n }\n\n if (onMouseDown) {\n for (var _len3 = arguments.length, restArgs = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n restArgs[_key3 - 1] = arguments[_key3];\n }\n\n onMouseDown.apply(void 0, [event].concat(restArgs));\n }\n }; // ========================= Accessibility ==========================\n\n\n var _React$useState9 = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](0),\n _React$useState10 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState9, 2),\n accessibilityIndex = _React$useState10[0],\n setAccessibilityIndex = _React$useState10[1];\n\n var mergedDefaultActiveFirstOption = defaultActiveFirstOption !== undefined ? defaultActiveFirstOption : mode !== 'combobox';\n\n var onActiveValue = function onActiveValue(active, index) {\n setAccessibilityIndex(index);\n\n if (backfill && mode === 'combobox' && active !== null) {\n setActiveValue(String(active));\n }\n }; // ============================= Popup ==============================\n\n\n var _React$useState11 = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](null),\n _React$useState12 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState11, 2),\n containerWidth = _React$useState12[0],\n setContainerWidth = _React$useState12[1];\n\n Object(_hooks_useLayoutEffect__WEBPACK_IMPORTED_MODULE_15__[\"default\"])(function () {\n if (triggerOpen) {\n var newWidth = Math.ceil(containerRef.current.offsetWidth);\n\n if (containerWidth !== newWidth) {\n setContainerWidth(newWidth);\n }\n }\n }, [triggerOpen]);\n var popupNode = react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](OptionList, {\n ref: listRef,\n prefixCls: prefixCls,\n id: mergedId,\n open: mergedOpen,\n childrenAsData: !options,\n options: displayOptions,\n flattenOptions: displayFlattenOptions,\n multiple: isMultiple,\n values: rawValues,\n height: listHeight,\n itemHeight: listItemHeight,\n onSelect: onInternalOptionSelect,\n onToggleOpen: onToggleOpen,\n onActiveValue: onActiveValue,\n defaultActiveFirstOption: mergedDefaultActiveFirstOption,\n notFoundContent: notFoundContent,\n onScroll: onPopupScroll,\n searchValue: mergedSearchValue,\n menuItemSelectedIcon: menuItemSelectedIcon,\n virtual: virtual !== false && dropdownMatchSelectWidth !== false\n }); // ============================= Clear ==============================\n\n var clearNode;\n\n var onClearMouseDown = function onClearMouseDown() {\n // Trigger internal `onClear` event\n if (useInternalProps && internalProps.onClear) {\n internalProps.onClear();\n }\n\n triggerChange([]);\n triggerSearch('', false);\n };\n\n if (!disabled && allowClear && (mergedRawValue.length || mergedSearchValue)) {\n clearNode = react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](_TransBtn__WEBPACK_IMPORTED_MODULE_12__[\"default\"], {\n className: \"\".concat(prefixCls, \"-clear\"),\n onMouseDown: onClearMouseDown,\n customizeIcon: clearIcon\n }, \"\\xD7\");\n } // ============================= Arrow ==============================\n\n\n var mergedShowArrow = showArrow !== undefined ? showArrow : loading || !isMultiple && mode !== 'combobox';\n var arrowNode;\n\n if (mergedShowArrow) {\n arrowNode = react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](_TransBtn__WEBPACK_IMPORTED_MODULE_12__[\"default\"], {\n className: classnames__WEBPACK_IMPORTED_MODULE_6___default()(\"\".concat(prefixCls, \"-arrow\"), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, \"\".concat(prefixCls, \"-arrow-loading\"), loading)),\n customizeIcon: inputIcon,\n customizeIconProps: {\n loading: loading,\n searchValue: mergedSearchValue,\n open: mergedOpen,\n focused: mockFocused,\n showSearch: mergedShowSearch\n }\n });\n } // ============================ Warning =============================\n\n\n if (false) {} // ============================= Render =============================\n\n\n var mergedClassName = classnames__WEBPACK_IMPORTED_MODULE_6___default()(prefixCls, className, (_classNames2 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-focused\"), mockFocused), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-multiple\"), isMultiple), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-single\"), !isMultiple), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-allow-clear\"), allowClear), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-show-arrow\"), mergedShowArrow), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-disabled\"), disabled), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-loading\"), loading), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-open\"), mergedOpen), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-customize-input\"), customizeInputElement), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-show-search\"), mergedShowSearch), _classNames2));\n return react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](\"div\", Object.assign({\n className: mergedClassName\n }, domProps, {\n ref: containerRef,\n onMouseDown: onInternalMouseDown,\n onKeyDown: onInternalKeyDown,\n onKeyUp: onInternalKeyUp,\n onFocus: onContainerFocus,\n onBlur: onContainerBlur\n }), mockFocused && !mergedOpen && react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](\"span\", {\n style: {\n width: 0,\n height: 0,\n display: 'flex',\n overflow: 'hidden',\n opacity: 0\n },\n \"aria-live\": \"polite\"\n }, \"\".concat(mergedRawValue.join(', '))), react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](_SelectTrigger__WEBPACK_IMPORTED_MODULE_9__[\"default\"], {\n ref: triggerRef,\n disabled: disabled,\n prefixCls: prefixCls,\n visible: triggerOpen,\n popupElement: popupNode,\n containerWidth: containerWidth,\n animation: animation,\n transitionName: transitionName,\n dropdownStyle: dropdownStyle,\n dropdownClassName: dropdownClassName,\n direction: direction,\n dropdownMatchSelectWidth: dropdownMatchSelectWidth,\n dropdownRender: dropdownRender,\n dropdownAlign: dropdownAlign,\n getPopupContainer: getPopupContainer,\n empty: !mergedOptions.length,\n getTriggerDOMNode: function getTriggerDOMNode() {\n return selectorDomRef.current;\n }\n }, react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](_Selector__WEBPACK_IMPORTED_MODULE_8__[\"default\"], Object.assign({}, props, {\n domRef: selectorDomRef,\n prefixCls: prefixCls,\n inputElement: customizeInputElement,\n ref: selectorRef,\n id: mergedId,\n showSearch: mergedShowSearch,\n mode: mode,\n accessibilityIndex: accessibilityIndex,\n multiple: isMultiple,\n tagRender: tagRender,\n values: displayValues,\n open: mergedOpen,\n onToggleOpen: onToggleOpen,\n searchValue: mergedSearchValue,\n activeValue: activeValue,\n onSearch: triggerSearch,\n onSelect: onInternalSelectionSelect\n }))), arrowNode, clearNode);\n }", "function Select(props, ref) {\n var _classNames2;\n\n var _props$prefixCls = props.prefixCls,\n prefixCls = _props$prefixCls === void 0 ? defaultPrefixCls : _props$prefixCls,\n className = props.className,\n id = props.id,\n open = props.open,\n defaultOpen = props.defaultOpen,\n options = props.options,\n children = props.children,\n mode = props.mode,\n value = props.value,\n defaultValue = props.defaultValue,\n labelInValue = props.labelInValue,\n showSearch = props.showSearch,\n inputValue = props.inputValue,\n searchValue = props.searchValue,\n filterOption = props.filterOption,\n _props$optionFilterPr = props.optionFilterProp,\n optionFilterProp = _props$optionFilterPr === void 0 ? 'value' : _props$optionFilterPr,\n _props$autoClearSearc = props.autoClearSearchValue,\n autoClearSearchValue = _props$autoClearSearc === void 0 ? true : _props$autoClearSearc,\n onSearch = props.onSearch,\n allowClear = props.allowClear,\n clearIcon = props.clearIcon,\n showArrow = props.showArrow,\n inputIcon = props.inputIcon,\n menuItemSelectedIcon = props.menuItemSelectedIcon,\n disabled = props.disabled,\n loading = props.loading,\n defaultActiveFirstOption = props.defaultActiveFirstOption,\n _props$notFoundConten = props.notFoundContent,\n notFoundContent = _props$notFoundConten === void 0 ? 'Not Found' : _props$notFoundConten,\n optionLabelProp = props.optionLabelProp,\n backfill = props.backfill,\n getInputElement = props.getInputElement,\n getPopupContainer = props.getPopupContainer,\n _props$listHeight = props.listHeight,\n listHeight = _props$listHeight === void 0 ? 200 : _props$listHeight,\n _props$listItemHeight = props.listItemHeight,\n listItemHeight = _props$listItemHeight === void 0 ? 20 : _props$listItemHeight,\n animation = props.animation,\n transitionName = props.transitionName,\n virtual = props.virtual,\n dropdownStyle = props.dropdownStyle,\n dropdownClassName = props.dropdownClassName,\n dropdownMatchSelectWidth = props.dropdownMatchSelectWidth,\n dropdownRender = props.dropdownRender,\n dropdownAlign = props.dropdownAlign,\n _props$showAction = props.showAction,\n showAction = _props$showAction === void 0 ? [] : _props$showAction,\n direction = props.direction,\n tokenSeparators = props.tokenSeparators,\n tagRender = props.tagRender,\n onPopupScroll = props.onPopupScroll,\n onDropdownVisibleChange = props.onDropdownVisibleChange,\n onFocus = props.onFocus,\n onBlur = props.onBlur,\n onKeyUp = props.onKeyUp,\n onKeyDown = props.onKeyDown,\n onMouseDown = props.onMouseDown,\n onChange = props.onChange,\n onSelect = props.onSelect,\n onDeselect = props.onDeselect,\n _props$internalProps = props.internalProps,\n internalProps = _props$internalProps === void 0 ? {} : _props$internalProps,\n restProps = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(props, [\"prefixCls\", \"className\", \"id\", \"open\", \"defaultOpen\", \"options\", \"children\", \"mode\", \"value\", \"defaultValue\", \"labelInValue\", \"showSearch\", \"inputValue\", \"searchValue\", \"filterOption\", \"optionFilterProp\", \"autoClearSearchValue\", \"onSearch\", \"allowClear\", \"clearIcon\", \"showArrow\", \"inputIcon\", \"menuItemSelectedIcon\", \"disabled\", \"loading\", \"defaultActiveFirstOption\", \"notFoundContent\", \"optionLabelProp\", \"backfill\", \"getInputElement\", \"getPopupContainer\", \"listHeight\", \"listItemHeight\", \"animation\", \"transitionName\", \"virtual\", \"dropdownStyle\", \"dropdownClassName\", \"dropdownMatchSelectWidth\", \"dropdownRender\", \"dropdownAlign\", \"showAction\", \"direction\", \"tokenSeparators\", \"tagRender\", \"onPopupScroll\", \"onDropdownVisibleChange\", \"onFocus\", \"onBlur\", \"onKeyUp\", \"onKeyDown\", \"onMouseDown\", \"onChange\", \"onSelect\", \"onDeselect\", \"internalProps\"]);\n\n var useInternalProps = internalProps.mark === _interface_generator__WEBPACK_IMPORTED_MODULE_10__[\"INTERNAL_PROPS_MARK\"];\n var domProps = omitDOMProps ? omitDOMProps(restProps) : restProps;\n DEFAULT_OMIT_PROPS.forEach(function (prop) {\n delete domProps[prop];\n });\n var containerRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](null);\n var triggerRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](null);\n var selectorRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](null);\n var listRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](null);\n /** Used for component focused management */\n\n var _useDelayReset = Object(_hooks_useDelayReset__WEBPACK_IMPORTED_MODULE_14__[\"default\"])(),\n _useDelayReset2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useDelayReset, 3),\n mockFocused = _useDelayReset2[0],\n setMockFocused = _useDelayReset2[1],\n cancelSetMockFocused = _useDelayReset2[2]; // Inner id for accessibility usage. Only work in client side\n\n\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](),\n _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState, 2),\n innerId = _React$useState2[0],\n setInnerId = _React$useState2[1];\n\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n setInnerId(\"rc_select_\".concat(Object(_utils_commonUtil__WEBPACK_IMPORTED_MODULE_11__[\"getUUID\"])()));\n }, []);\n var mergedId = id || innerId; // optionLabelProp\n\n var mergedOptionLabelProp = optionLabelProp;\n\n if (mergedOptionLabelProp === undefined) {\n mergedOptionLabelProp = options ? 'label' : 'children';\n } // labelInValue\n\n\n var mergedLabelInValue = mode === 'combobox' ? false : labelInValue;\n var isMultiple = mode === 'tags' || mode === 'multiple';\n var mergedShowSearch = showSearch !== undefined ? showSearch : isMultiple || mode === 'combobox'; // ============================== Ref ===============================\n\n var selectorDomRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](null);\n react__WEBPACK_IMPORTED_MODULE_4__[\"useImperativeHandle\"](ref, function () {\n return {\n focus: selectorRef.current.focus,\n blur: selectorRef.current.blur\n };\n }); // ============================= Value ==============================\n\n var _React$useState3 = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](value || defaultValue),\n _React$useState4 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState3, 2),\n innerValue = _React$useState4[0],\n setInnerValue = _React$useState4[1];\n\n var baseValue = value !== undefined ? value : innerValue; // Should reset when controlled to be uncontrolled\n\n var prevValueRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](value);\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n if (prevValueRef.current !== value && (value === undefined || value === null)) {\n setInnerValue(undefined);\n }\n\n prevValueRef.current = value;\n }, [value]);\n /** Unique raw values */\n\n var mergedRawValue = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n return Object(_utils_commonUtil__WEBPACK_IMPORTED_MODULE_11__[\"toInnerValue\"])(baseValue, {\n labelInValue: mergedLabelInValue,\n combobox: mode === 'combobox'\n });\n }, [baseValue, mergedLabelInValue]);\n /** We cache a set of raw values to speed up check */\n\n var rawValues = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n return new Set(mergedRawValue);\n }, [mergedRawValue]); // ============================= Option =============================\n // Set by option list active, it will merge into search input when mode is `combobox`\n\n var _React$useState5 = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](null),\n _React$useState6 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState5, 2),\n activeValue = _React$useState6[0],\n setActiveValue = _React$useState6[1];\n\n var _React$useState7 = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](''),\n _React$useState8 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState7, 2),\n innerSearchValue = _React$useState8[0],\n setInnerSearchValue = _React$useState8[1];\n\n var mergedSearchValue = innerSearchValue;\n\n if (mode === 'combobox' && value !== undefined) {\n mergedSearchValue = value;\n } else if (searchValue !== undefined) {\n mergedSearchValue = searchValue;\n } else if (inputValue) {\n mergedSearchValue = inputValue;\n }\n\n var mergedOptions = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n var newOptions = options;\n\n if (newOptions === undefined) {\n newOptions = convertChildrenToData(children);\n }\n /**\n * `tags` should fill un-list item.\n * This is not cool here since TreeSelect do not need this\n */\n\n\n if (mode === 'tags' && fillOptionsWithMissingValue) {\n newOptions = fillOptionsWithMissingValue(newOptions, baseValue, mergedOptionLabelProp, labelInValue);\n }\n\n return newOptions || [];\n }, [options, children, mode, baseValue]);\n var mergedFlattenOptions = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n return flattenOptions(mergedOptions, props);\n }, [mergedOptions]); // Display options for OptionList\n\n var displayOptions = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n if (!mergedSearchValue || !mergedShowSearch) {\n return Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mergedOptions);\n }\n\n var filteredOptions = filterOptions(mergedSearchValue, mergedOptions, {\n optionFilterProp: optionFilterProp,\n filterOption: mode === 'combobox' && filterOption === undefined ? function () {\n return true;\n } : filterOption\n });\n\n if (mode === 'tags' && filteredOptions.every(function (opt) {\n return opt.value !== mergedSearchValue;\n })) {\n filteredOptions.unshift({\n value: mergedSearchValue,\n label: mergedSearchValue,\n key: '__RC_SELECT_TAG_PLACEHOLDER__'\n });\n }\n\n return filteredOptions;\n }, [mergedOptions, mergedSearchValue, mode, mergedShowSearch]);\n var displayFlattenOptions = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n return flattenOptions(displayOptions, props);\n }, [displayOptions]);\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n if (listRef.current && listRef.current.scrollTo) {\n listRef.current.scrollTo(0);\n }\n }, [mergedSearchValue]); // ============================ Selector ============================\n\n var displayValues = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n return mergedRawValue.map(function (val) {\n var displayValue = getLabeledValue(val, {\n options: mergedFlattenOptions,\n prevValue: baseValue,\n labelInValue: mergedLabelInValue,\n optionLabelProp: mergedOptionLabelProp\n });\n return _objectSpread(_objectSpread({}, displayValue), {}, {\n disabled: isValueDisabled(val, mergedFlattenOptions)\n });\n });\n }, [baseValue, mergedOptions]); // Polyfill with cache label\n\n displayValues = Object(_hooks_useCacheDisplayValue__WEBPACK_IMPORTED_MODULE_18__[\"default\"])(displayValues);\n\n var triggerSelect = function triggerSelect(newValue, isSelect, source) {\n var outOption = findValueOption([newValue], mergedFlattenOptions)[0];\n\n if (!internalProps.skipTriggerSelect) {\n // Skip trigger `onSelect` or `onDeselect` if configured\n var selectValue = mergedLabelInValue ? getLabeledValue(newValue, {\n options: mergedFlattenOptions,\n prevValue: baseValue,\n labelInValue: mergedLabelInValue,\n optionLabelProp: mergedOptionLabelProp\n }) : newValue;\n\n if (isSelect && onSelect) {\n onSelect(selectValue, outOption);\n } else if (!isSelect && onDeselect) {\n onDeselect(selectValue, outOption);\n }\n } // Trigger internal event\n\n\n if (useInternalProps) {\n if (isSelect && internalProps.onRawSelect) {\n internalProps.onRawSelect(newValue, outOption, source);\n } else if (!isSelect && internalProps.onRawDeselect) {\n internalProps.onRawDeselect(newValue, outOption, source);\n }\n }\n };\n\n var triggerChange = function triggerChange(newRawValues) {\n if (useInternalProps && internalProps.skipTriggerChange) {\n return;\n }\n\n var outValues = Object(_utils_commonUtil__WEBPACK_IMPORTED_MODULE_11__[\"toOuterValues\"])(Array.from(newRawValues), {\n labelInValue: mergedLabelInValue,\n options: mergedFlattenOptions,\n getLabeledValue: getLabeledValue,\n prevValue: baseValue,\n optionLabelProp: mergedOptionLabelProp\n });\n var outValue = isMultiple ? outValues : outValues[0]; // Skip trigger if prev & current value is both empty\n\n if (onChange && (mergedRawValue.length !== 0 || outValues.length !== 0)) {\n var outOptions = findValueOption(newRawValues, mergedFlattenOptions);\n onChange(outValue, isMultiple ? outOptions : outOptions[0]);\n }\n\n setInnerValue(outValue);\n };\n\n var onInternalSelect = function onInternalSelect(newValue, _ref) {\n var selected = _ref.selected,\n source = _ref.source;\n\n if (disabled) {\n return;\n }\n\n var newRawValue;\n\n if (isMultiple) {\n newRawValue = new Set(mergedRawValue);\n\n if (selected) {\n newRawValue.add(newValue);\n } else {\n newRawValue.delete(newValue);\n }\n } else {\n newRawValue = new Set();\n newRawValue.add(newValue);\n } // Multiple always trigger change and single should change if value changed\n\n\n if (isMultiple || !isMultiple && Array.from(mergedRawValue)[0] !== newValue) {\n triggerChange(Array.from(newRawValue));\n } // Trigger `onSelect`. Single mode always trigger select\n\n\n triggerSelect(newValue, !isMultiple || selected, source); // Clean search value if single or configured\n\n if (mode === 'combobox') {\n setInnerSearchValue(String(newValue));\n setActiveValue('');\n } else if (!isMultiple || autoClearSearchValue) {\n setInnerSearchValue('');\n setActiveValue('');\n }\n };\n\n var onInternalOptionSelect = function onInternalOptionSelect(newValue, info) {\n onInternalSelect(newValue, _objectSpread(_objectSpread({}, info), {}, {\n source: 'option'\n }));\n };\n\n var onInternalSelectionSelect = function onInternalSelectionSelect(newValue, info) {\n onInternalSelect(newValue, _objectSpread(_objectSpread({}, info), {}, {\n source: 'selection'\n }));\n }; // ============================= Input ==============================\n // Only works in `combobox`\n\n\n var customizeInputElement = mode === 'combobox' && getInputElement && getInputElement() || null; // ============================== Open ==============================\n\n var _useMergedState = Object(rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(undefined, {\n defaultValue: defaultOpen,\n value: open\n }),\n _useMergedState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useMergedState, 2),\n innerOpen = _useMergedState2[0],\n setInnerOpen = _useMergedState2[1];\n\n var mergedOpen = innerOpen; // Not trigger `open` in `combobox` when `notFoundContent` is empty\n\n var emptyListContent = !notFoundContent && !displayOptions.length;\n\n if (disabled || emptyListContent && mergedOpen && mode === 'combobox') {\n mergedOpen = false;\n }\n\n var triggerOpen = emptyListContent ? false : mergedOpen;\n\n var onToggleOpen = function onToggleOpen(newOpen) {\n var nextOpen = newOpen !== undefined ? newOpen : !mergedOpen;\n\n if (innerOpen !== nextOpen && !disabled) {\n setInnerOpen(nextOpen);\n\n if (onDropdownVisibleChange) {\n onDropdownVisibleChange(nextOpen);\n }\n }\n };\n\n Object(_hooks_useSelectTriggerControl__WEBPACK_IMPORTED_MODULE_17__[\"default\"])([containerRef.current, triggerRef.current && triggerRef.current.getPopupElement()], triggerOpen, onToggleOpen); // ============================= Search =============================\n\n var triggerSearch = function triggerSearch(searchText) {\n var fromTyping = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var ret = true;\n var newSearchText = searchText;\n setActiveValue(null); // Check if match the `tokenSeparators`\n\n var patchLabels = Object(_utils_valueUtil__WEBPACK_IMPORTED_MODULE_16__[\"getSeparatedContent\"])(searchText, tokenSeparators);\n var patchRawValues = patchLabels;\n\n if (mode === 'combobox') {\n // Only typing will trigger onChange\n if (fromTyping) {\n triggerChange([newSearchText]);\n }\n } else if (patchLabels) {\n newSearchText = '';\n\n if (mode !== 'tags') {\n patchRawValues = patchLabels.map(function (label) {\n var item = mergedFlattenOptions.find(function (_ref2) {\n var data = _ref2.data;\n return data[mergedOptionLabelProp] === label;\n });\n return item ? item.data.value : null;\n }).filter(function (val) {\n return val !== null;\n });\n }\n\n var newRawValues = Array.from(new Set([].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mergedRawValue), Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(patchRawValues))));\n triggerChange(newRawValues);\n newRawValues.forEach(function (newRawValue) {\n triggerSelect(newRawValue, true, 'input');\n }); // Should close when paste finish\n\n onToggleOpen(false); // Tell Selector that break next actions\n\n ret = false;\n }\n\n setInnerSearchValue(newSearchText);\n\n if (onSearch && mergedSearchValue !== newSearchText) {\n onSearch(newSearchText);\n }\n\n return ret;\n }; // Close dropdown when disabled change\n\n\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n if (innerOpen && !!disabled) {\n setInnerOpen(false);\n }\n }, [disabled]); // Close will clean up single mode search text\n\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n if (!mergedOpen && !isMultiple && mode !== 'combobox') {\n triggerSearch('', false);\n }\n }, [mergedOpen]); // ============================ Keyboard ============================\n\n /**\n * We record input value here to check if can press to clean up by backspace\n * - null: Key is not down, this is reset by key up\n * - true: Search text is empty when first time backspace down\n * - false: Search text is not empty when first time backspace down\n */\n\n var _useLock = Object(_hooks_useLock__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(),\n _useLock2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useLock, 2),\n getClearLock = _useLock2[0],\n setClearLock = _useLock2[1]; // KeyDown\n\n\n var onInternalKeyDown = function onInternalKeyDown(event) {\n var clearLock = getClearLock();\n var which = event.which; // We only manage open state here, close logic should handle by list component\n\n if (!mergedOpen && which === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_5__[\"default\"].ENTER) {\n onToggleOpen(true);\n }\n\n setClearLock(!!mergedSearchValue); // Remove value by `backspace`\n\n if (which === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_5__[\"default\"].BACKSPACE && !clearLock && isMultiple && !mergedSearchValue && mergedRawValue.length) {\n var removeInfo = Object(_utils_commonUtil__WEBPACK_IMPORTED_MODULE_11__[\"removeLastEnabledValue\"])(displayValues, mergedRawValue);\n\n if (removeInfo.removedValue !== null) {\n triggerChange(removeInfo.values);\n triggerSelect(removeInfo.removedValue, false, 'input');\n }\n }\n\n for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n rest[_key - 1] = arguments[_key];\n }\n\n if (mergedOpen && listRef.current) {\n var _listRef$current;\n\n (_listRef$current = listRef.current).onKeyDown.apply(_listRef$current, [event].concat(rest));\n }\n\n if (onKeyDown) {\n onKeyDown.apply(void 0, [event].concat(rest));\n }\n }; // KeyUp\n\n\n var onInternalKeyUp = function onInternalKeyUp(event) {\n for (var _len2 = arguments.length, rest = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n rest[_key2 - 1] = arguments[_key2];\n }\n\n if (mergedOpen && listRef.current) {\n var _listRef$current2;\n\n (_listRef$current2 = listRef.current).onKeyUp.apply(_listRef$current2, [event].concat(rest));\n }\n\n if (onKeyUp) {\n onKeyUp.apply(void 0, [event].concat(rest));\n }\n }; // ========================== Focus / Blur ==========================\n\n /** Record real focus status */\n\n\n var focusRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](false);\n\n var onContainerFocus = function onContainerFocus() {\n setMockFocused(true);\n\n if (!disabled) {\n if (onFocus && !focusRef.current) {\n onFocus.apply(void 0, arguments);\n } // `showAction` should handle `focus` if set\n\n\n if (showAction.includes('focus')) {\n onToggleOpen(true);\n }\n }\n\n focusRef.current = true;\n };\n\n var onContainerBlur = function onContainerBlur() {\n setMockFocused(false, function () {\n focusRef.current = false;\n onToggleOpen(false);\n });\n\n if (disabled) {\n return;\n }\n\n if (mergedSearchValue) {\n // `tags` mode should move `searchValue` into values\n if (mode === 'tags') {\n triggerSearch('', false);\n triggerChange(Array.from(new Set([].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(mergedRawValue), [mergedSearchValue]))));\n } else if (mode === 'multiple') {\n // `multiple` mode only clean the search value but not trigger event\n setInnerSearchValue('');\n }\n }\n\n if (onBlur) {\n onBlur.apply(void 0, arguments);\n }\n };\n\n var activeTimeoutIds = [];\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n return function () {\n activeTimeoutIds.forEach(function (timeoutId) {\n return clearTimeout(timeoutId);\n });\n activeTimeoutIds.splice(0, activeTimeoutIds.length);\n };\n }, []);\n\n var onInternalMouseDown = function onInternalMouseDown(event) {\n var target = event.target;\n var popupElement = triggerRef.current && triggerRef.current.getPopupElement(); // We should give focus back to selector if clicked item is not focusable\n\n if (popupElement && popupElement.contains(target)) {\n var timeoutId = setTimeout(function () {\n var index = activeTimeoutIds.indexOf(timeoutId);\n\n if (index !== -1) {\n activeTimeoutIds.splice(index, 1);\n }\n\n cancelSetMockFocused();\n\n if (!popupElement.contains(document.activeElement)) {\n selectorRef.current.focus();\n }\n });\n activeTimeoutIds.push(timeoutId);\n }\n\n if (onMouseDown) {\n for (var _len3 = arguments.length, restArgs = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n restArgs[_key3 - 1] = arguments[_key3];\n }\n\n onMouseDown.apply(void 0, [event].concat(restArgs));\n }\n }; // ========================= Accessibility ==========================\n\n\n var _React$useState9 = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](0),\n _React$useState10 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState9, 2),\n accessibilityIndex = _React$useState10[0],\n setAccessibilityIndex = _React$useState10[1];\n\n var mergedDefaultActiveFirstOption = defaultActiveFirstOption !== undefined ? defaultActiveFirstOption : mode !== 'combobox';\n\n var onActiveValue = function onActiveValue(active, index) {\n setAccessibilityIndex(index);\n\n if (backfill && mode === 'combobox' && active !== null) {\n setActiveValue(String(active));\n }\n }; // ============================= Popup ==============================\n\n\n var _React$useState11 = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](null),\n _React$useState12 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_React$useState11, 2),\n containerWidth = _React$useState12[0],\n setContainerWidth = _React$useState12[1];\n\n Object(_hooks_useLayoutEffect__WEBPACK_IMPORTED_MODULE_15__[\"default\"])(function () {\n if (triggerOpen) {\n var newWidth = Math.ceil(containerRef.current.offsetWidth);\n\n if (containerWidth !== newWidth) {\n setContainerWidth(newWidth);\n }\n }\n }, [triggerOpen]);\n var popupNode = react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](OptionList, {\n ref: listRef,\n prefixCls: prefixCls,\n id: mergedId,\n open: mergedOpen,\n childrenAsData: !options,\n options: displayOptions,\n flattenOptions: displayFlattenOptions,\n multiple: isMultiple,\n values: rawValues,\n height: listHeight,\n itemHeight: listItemHeight,\n onSelect: onInternalOptionSelect,\n onToggleOpen: onToggleOpen,\n onActiveValue: onActiveValue,\n defaultActiveFirstOption: mergedDefaultActiveFirstOption,\n notFoundContent: notFoundContent,\n onScroll: onPopupScroll,\n searchValue: mergedSearchValue,\n menuItemSelectedIcon: menuItemSelectedIcon,\n virtual: virtual !== false && dropdownMatchSelectWidth !== false\n }); // ============================= Clear ==============================\n\n var clearNode;\n\n var onClearMouseDown = function onClearMouseDown() {\n // Trigger internal `onClear` event\n if (useInternalProps && internalProps.onClear) {\n internalProps.onClear();\n }\n\n triggerChange([]);\n triggerSearch('', false);\n };\n\n if (!disabled && allowClear && (mergedRawValue.length || mergedSearchValue)) {\n clearNode = react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](_TransBtn__WEBPACK_IMPORTED_MODULE_12__[\"default\"], {\n className: \"\".concat(prefixCls, \"-clear\"),\n onMouseDown: onClearMouseDown,\n customizeIcon: clearIcon\n }, \"\\xD7\");\n } // ============================= Arrow ==============================\n\n\n var mergedShowArrow = showArrow !== undefined ? showArrow : loading || !isMultiple && mode !== 'combobox';\n var arrowNode;\n\n if (mergedShowArrow) {\n arrowNode = react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](_TransBtn__WEBPACK_IMPORTED_MODULE_12__[\"default\"], {\n className: classnames__WEBPACK_IMPORTED_MODULE_6___default()(\"\".concat(prefixCls, \"-arrow\"), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, \"\".concat(prefixCls, \"-arrow-loading\"), loading)),\n customizeIcon: inputIcon,\n customizeIconProps: {\n loading: loading,\n searchValue: mergedSearchValue,\n open: mergedOpen,\n focused: mockFocused,\n showSearch: mergedShowSearch\n }\n });\n } // ============================ Warning =============================\n\n\n if (false) {} // ============================= Render =============================\n\n\n var mergedClassName = classnames__WEBPACK_IMPORTED_MODULE_6___default()(prefixCls, className, (_classNames2 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-focused\"), mockFocused), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-multiple\"), isMultiple), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-single\"), !isMultiple), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-allow-clear\"), allowClear), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-show-arrow\"), mergedShowArrow), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-disabled\"), disabled), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-loading\"), loading), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-open\"), mergedOpen), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-customize-input\"), customizeInputElement), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_classNames2, \"\".concat(prefixCls, \"-show-search\"), mergedShowSearch), _classNames2));\n return react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](\"div\", Object.assign({\n className: mergedClassName\n }, domProps, {\n ref: containerRef,\n onMouseDown: onInternalMouseDown,\n onKeyDown: onInternalKeyDown,\n onKeyUp: onInternalKeyUp,\n onFocus: onContainerFocus,\n onBlur: onContainerBlur\n }), mockFocused && !mergedOpen && react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](\"span\", {\n style: {\n width: 0,\n height: 0,\n display: 'flex',\n overflow: 'hidden',\n opacity: 0\n },\n \"aria-live\": \"polite\"\n }, \"\".concat(mergedRawValue.join(', '))), react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](_SelectTrigger__WEBPACK_IMPORTED_MODULE_9__[\"default\"], {\n ref: triggerRef,\n disabled: disabled,\n prefixCls: prefixCls,\n visible: triggerOpen,\n popupElement: popupNode,\n containerWidth: containerWidth,\n animation: animation,\n transitionName: transitionName,\n dropdownStyle: dropdownStyle,\n dropdownClassName: dropdownClassName,\n direction: direction,\n dropdownMatchSelectWidth: dropdownMatchSelectWidth,\n dropdownRender: dropdownRender,\n dropdownAlign: dropdownAlign,\n getPopupContainer: getPopupContainer,\n empty: !mergedOptions.length,\n getTriggerDOMNode: function getTriggerDOMNode() {\n return selectorDomRef.current;\n }\n }, react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](_Selector__WEBPACK_IMPORTED_MODULE_8__[\"default\"], Object.assign({}, props, {\n domRef: selectorDomRef,\n prefixCls: prefixCls,\n inputElement: customizeInputElement,\n ref: selectorRef,\n id: mergedId,\n showSearch: mergedShowSearch,\n mode: mode,\n accessibilityIndex: accessibilityIndex,\n multiple: isMultiple,\n tagRender: tagRender,\n values: displayValues,\n open: mergedOpen,\n onToggleOpen: onToggleOpen,\n searchValue: mergedSearchValue,\n activeValue: activeValue,\n onSearch: triggerSearch,\n onSelect: onInternalSelectionSelect\n }))), arrowNode, clearNode);\n }", "function Select(props, ref) {\n var _classNames2;\n\n var _props$prefixCls = props.prefixCls,\n prefixCls = _props$prefixCls === void 0 ? defaultPrefixCls : _props$prefixCls,\n className = props.className,\n id = props.id,\n open = props.open,\n defaultOpen = props.defaultOpen,\n options = props.options,\n children = props.children,\n mode = props.mode,\n value = props.value,\n defaultValue = props.defaultValue,\n labelInValue = props.labelInValue,\n showSearch = props.showSearch,\n inputValue = props.inputValue,\n searchValue = props.searchValue,\n filterOption = props.filterOption,\n _props$optionFilterPr = props.optionFilterProp,\n optionFilterProp = _props$optionFilterPr === void 0 ? 'value' : _props$optionFilterPr,\n _props$autoClearSearc = props.autoClearSearchValue,\n autoClearSearchValue = _props$autoClearSearc === void 0 ? true : _props$autoClearSearc,\n onSearch = props.onSearch,\n allowClear = props.allowClear,\n clearIcon = props.clearIcon,\n showArrow = props.showArrow,\n inputIcon = props.inputIcon,\n menuItemSelectedIcon = props.menuItemSelectedIcon,\n disabled = props.disabled,\n loading = props.loading,\n defaultActiveFirstOption = props.defaultActiveFirstOption,\n _props$notFoundConten = props.notFoundContent,\n notFoundContent = _props$notFoundConten === void 0 ? 'Not Found' : _props$notFoundConten,\n optionLabelProp = props.optionLabelProp,\n backfill = props.backfill,\n getInputElement = props.getInputElement,\n getPopupContainer = props.getPopupContainer,\n _props$listHeight = props.listHeight,\n listHeight = _props$listHeight === void 0 ? 200 : _props$listHeight,\n _props$listItemHeight = props.listItemHeight,\n listItemHeight = _props$listItemHeight === void 0 ? 20 : _props$listItemHeight,\n animation = props.animation,\n transitionName = props.transitionName,\n virtual = props.virtual,\n dropdownStyle = props.dropdownStyle,\n dropdownClassName = props.dropdownClassName,\n dropdownMatchSelectWidth = props.dropdownMatchSelectWidth,\n dropdownRender = props.dropdownRender,\n dropdownAlign = props.dropdownAlign,\n _props$showAction = props.showAction,\n showAction = _props$showAction === void 0 ? [] : _props$showAction,\n direction = props.direction,\n tokenSeparators = props.tokenSeparators,\n tagRender = props.tagRender,\n onPopupScroll = props.onPopupScroll,\n onDropdownVisibleChange = props.onDropdownVisibleChange,\n onFocus = props.onFocus,\n onBlur = props.onBlur,\n onKeyUp = props.onKeyUp,\n onKeyDown = props.onKeyDown,\n onMouseDown = props.onMouseDown,\n onChange = props.onChange,\n onSelect = props.onSelect,\n onDeselect = props.onDeselect,\n _props$internalProps = props.internalProps,\n internalProps = _props$internalProps === void 0 ? {} : _props$internalProps,\n restProps = (0, _objectWithoutProperties2.default)(props, [\"prefixCls\", \"className\", \"id\", \"open\", \"defaultOpen\", \"options\", \"children\", \"mode\", \"value\", \"defaultValue\", \"labelInValue\", \"showSearch\", \"inputValue\", \"searchValue\", \"filterOption\", \"optionFilterProp\", \"autoClearSearchValue\", \"onSearch\", \"allowClear\", \"clearIcon\", \"showArrow\", \"inputIcon\", \"menuItemSelectedIcon\", \"disabled\", \"loading\", \"defaultActiveFirstOption\", \"notFoundContent\", \"optionLabelProp\", \"backfill\", \"getInputElement\", \"getPopupContainer\", \"listHeight\", \"listItemHeight\", \"animation\", \"transitionName\", \"virtual\", \"dropdownStyle\", \"dropdownClassName\", \"dropdownMatchSelectWidth\", \"dropdownRender\", \"dropdownAlign\", \"showAction\", \"direction\", \"tokenSeparators\", \"tagRender\", \"onPopupScroll\", \"onDropdownVisibleChange\", \"onFocus\", \"onBlur\", \"onKeyUp\", \"onKeyDown\", \"onMouseDown\", \"onChange\", \"onSelect\", \"onDeselect\", \"internalProps\"]);\n var useInternalProps = internalProps.mark === _generator.INTERNAL_PROPS_MARK;\n var domProps = omitDOMProps ? omitDOMProps(restProps) : restProps;\n DEFAULT_OMIT_PROPS.forEach(function (prop) {\n delete domProps[prop];\n });\n var containerRef = (0, React.useRef)(null);\n var triggerRef = (0, React.useRef)(null);\n var selectorRef = (0, React.useRef)(null);\n var listRef = (0, React.useRef)(null);\n var tokenWithEnter = (0, React.useMemo)(function () {\n return (tokenSeparators || []).some(function (tokenSeparator) {\n return ['\\n', '\\r\\n'].includes(tokenSeparator);\n });\n }, [tokenSeparators]);\n /** Used for component focused management */\n\n var _useDelayReset = (0, _useDelayReset3.default)(),\n _useDelayReset2 = (0, _slicedToArray2.default)(_useDelayReset, 3),\n mockFocused = _useDelayReset2[0],\n setMockFocused = _useDelayReset2[1],\n cancelSetMockFocused = _useDelayReset2[2]; // Inner id for accessibility usage. Only work in client side\n\n\n var _useState = (0, React.useState)(),\n _useState2 = (0, _slicedToArray2.default)(_useState, 2),\n innerId = _useState2[0],\n setInnerId = _useState2[1];\n\n (0, React.useEffect)(function () {\n setInnerId(\"rc_select_\".concat((0, _commonUtil.getUUID)()));\n }, []);\n var mergedId = id || innerId; // optionLabelProp\n\n var mergedOptionLabelProp = optionLabelProp;\n\n if (mergedOptionLabelProp === undefined) {\n mergedOptionLabelProp = options ? 'label' : 'children';\n } // labelInValue\n\n\n var mergedLabelInValue = mode === 'combobox' ? false : labelInValue;\n var isMultiple = mode === 'tags' || mode === 'multiple';\n var mergedShowSearch = showSearch !== undefined ? showSearch : isMultiple || mode === 'combobox'; // ============================== Ref ===============================\n\n var selectorDomRef = (0, React.useRef)(null);\n React.useImperativeHandle(ref, function () {\n return {\n focus: selectorRef.current.focus,\n blur: selectorRef.current.blur\n };\n }); // ============================= Value ==============================\n\n var _useMergedState = (0, _useMergedState5.default)(defaultValue, {\n value: value\n }),\n _useMergedState2 = (0, _slicedToArray2.default)(_useMergedState, 2),\n mergedValue = _useMergedState2[0],\n setMergedValue = _useMergedState2[1];\n /** Unique raw values */\n\n\n var mergedRawValue = (0, React.useMemo)(function () {\n return (0, _commonUtil.toInnerValue)(mergedValue, {\n labelInValue: mergedLabelInValue,\n combobox: mode === 'combobox'\n });\n }, [mergedValue, mergedLabelInValue]);\n /** We cache a set of raw values to speed up check */\n\n var rawValues = (0, React.useMemo)(function () {\n return new Set(mergedRawValue);\n }, [mergedRawValue]); // ============================= Option =============================\n // Set by option list active, it will merge into search input when mode is `combobox`\n\n var _useState3 = (0, React.useState)(null),\n _useState4 = (0, _slicedToArray2.default)(_useState3, 2),\n activeValue = _useState4[0],\n setActiveValue = _useState4[1];\n\n var _useState5 = (0, React.useState)(''),\n _useState6 = (0, _slicedToArray2.default)(_useState5, 2),\n innerSearchValue = _useState6[0],\n setInnerSearchValue = _useState6[1];\n\n var mergedSearchValue = innerSearchValue;\n\n if (mode === 'combobox' && mergedValue !== undefined) {\n mergedSearchValue = mergedValue;\n } else if (searchValue !== undefined) {\n mergedSearchValue = searchValue;\n } else if (inputValue) {\n mergedSearchValue = inputValue;\n }\n\n var mergedOptions = (0, React.useMemo)(function () {\n var newOptions = options;\n\n if (newOptions === undefined) {\n newOptions = convertChildrenToData(children);\n }\n /**\n * `tags` should fill un-list item.\n * This is not cool here since TreeSelect do not need this\n */\n\n\n if (mode === 'tags' && fillOptionsWithMissingValue) {\n newOptions = fillOptionsWithMissingValue(newOptions, mergedValue, mergedOptionLabelProp, labelInValue);\n }\n\n return newOptions || [];\n }, [options, children, mode, mergedValue]);\n var mergedFlattenOptions = (0, React.useMemo)(function () {\n return flattenOptions(mergedOptions, props);\n }, [mergedOptions]);\n var getValueOption = (0, _useCacheOptions.default)(mergedRawValue, mergedFlattenOptions); // Display options for OptionList\n\n var displayOptions = (0, React.useMemo)(function () {\n if (!mergedSearchValue || !mergedShowSearch) {\n return (0, _toConsumableArray2.default)(mergedOptions);\n }\n\n var filteredOptions = filterOptions(mergedSearchValue, mergedOptions, {\n optionFilterProp: optionFilterProp,\n filterOption: mode === 'combobox' && filterOption === undefined ? function () {\n return true;\n } : filterOption\n });\n\n if (mode === 'tags' && filteredOptions.every(function (opt) {\n return opt.value !== mergedSearchValue;\n })) {\n filteredOptions.unshift({\n value: mergedSearchValue,\n label: mergedSearchValue,\n key: '__RC_SELECT_TAG_PLACEHOLDER__'\n });\n }\n\n return filteredOptions;\n }, [mergedOptions, mergedSearchValue, mode, mergedShowSearch]);\n var displayFlattenOptions = (0, React.useMemo)(function () {\n return flattenOptions(displayOptions, props);\n }, [displayOptions]);\n (0, React.useEffect)(function () {\n if (listRef.current && listRef.current.scrollTo) {\n listRef.current.scrollTo(0);\n }\n }, [mergedSearchValue]); // ============================ Selector ============================\n\n var displayValues = (0, React.useMemo)(function () {\n var tmpValues = mergedRawValue.map(function (val) {\n var valueOptions = getValueOption([val]);\n var displayValue = getLabeledValue(val, {\n options: valueOptions,\n prevValue: mergedValue,\n labelInValue: mergedLabelInValue,\n optionLabelProp: mergedOptionLabelProp\n });\n return _objectSpread(_objectSpread({}, displayValue), {}, {\n disabled: isValueDisabled(val, valueOptions)\n });\n });\n\n if (!mode && tmpValues.length === 1 && tmpValues[0].value === null && tmpValues[0].label === null) {\n return [];\n }\n\n return tmpValues;\n }, [mergedValue, mergedOptions, mode]); // Polyfill with cache label\n\n displayValues = (0, _useCacheDisplayValue.default)(displayValues);\n\n var triggerSelect = function triggerSelect(newValue, isSelect, source) {\n var newValueOption = getValueOption([newValue]);\n var outOption = findValueOption([newValue], newValueOption)[0];\n\n if (!internalProps.skipTriggerSelect) {\n // Skip trigger `onSelect` or `onDeselect` if configured\n var selectValue = mergedLabelInValue ? getLabeledValue(newValue, {\n options: newValueOption,\n prevValue: mergedValue,\n labelInValue: mergedLabelInValue,\n optionLabelProp: mergedOptionLabelProp\n }) : newValue;\n\n if (isSelect && onSelect) {\n onSelect(selectValue, outOption);\n } else if (!isSelect && onDeselect) {\n onDeselect(selectValue, outOption);\n }\n } // Trigger internal event\n\n\n if (useInternalProps) {\n if (isSelect && internalProps.onRawSelect) {\n internalProps.onRawSelect(newValue, outOption, source);\n } else if (!isSelect && internalProps.onRawDeselect) {\n internalProps.onRawDeselect(newValue, outOption, source);\n }\n }\n };\n\n var triggerChange = function triggerChange(newRawValues) {\n if (useInternalProps && internalProps.skipTriggerChange) {\n return;\n }\n\n var newRawValuesOptions = getValueOption(newRawValues);\n var outValues = (0, _commonUtil.toOuterValues)(Array.from(newRawValues), {\n labelInValue: mergedLabelInValue,\n options: newRawValuesOptions,\n getLabeledValue: getLabeledValue,\n prevValue: mergedValue,\n optionLabelProp: mergedOptionLabelProp\n });\n var outValue = isMultiple ? outValues : outValues[0]; // Skip trigger if prev & current value is both empty\n\n if (onChange && (mergedRawValue.length !== 0 || outValues.length !== 0)) {\n var outOptions = findValueOption(newRawValues, newRawValuesOptions);\n onChange(outValue, isMultiple ? outOptions : outOptions[0]);\n }\n\n setMergedValue(outValue);\n };\n\n var onInternalSelect = function onInternalSelect(newValue, _ref) {\n var selected = _ref.selected,\n source = _ref.source;\n\n if (disabled) {\n return;\n }\n\n var newRawValue;\n\n if (isMultiple) {\n newRawValue = new Set(mergedRawValue);\n\n if (selected) {\n newRawValue.add(newValue);\n } else {\n newRawValue.delete(newValue);\n }\n } else {\n newRawValue = new Set();\n newRawValue.add(newValue);\n } // Multiple always trigger change and single should change if value changed\n\n\n if (isMultiple || !isMultiple && Array.from(mergedRawValue)[0] !== newValue) {\n triggerChange(Array.from(newRawValue));\n } // Trigger `onSelect`. Single mode always trigger select\n\n\n triggerSelect(newValue, !isMultiple || selected, source); // Clean search value if single or configured\n\n if (mode === 'combobox') {\n setInnerSearchValue(String(newValue));\n setActiveValue('');\n } else if (!isMultiple || autoClearSearchValue) {\n setInnerSearchValue('');\n setActiveValue('');\n }\n };\n\n var onInternalOptionSelect = function onInternalOptionSelect(newValue, info) {\n onInternalSelect(newValue, _objectSpread(_objectSpread({}, info), {}, {\n source: 'option'\n }));\n };\n\n var onInternalSelectionSelect = function onInternalSelectionSelect(newValue, info) {\n onInternalSelect(newValue, _objectSpread(_objectSpread({}, info), {}, {\n source: 'selection'\n }));\n }; // ============================= Input ==============================\n // Only works in `combobox`\n\n\n var customizeInputElement = mode === 'combobox' && getInputElement && getInputElement() || null; // ============================== Open ==============================\n\n var _useMergedState3 = (0, _useMergedState5.default)(undefined, {\n defaultValue: defaultOpen,\n value: open\n }),\n _useMergedState4 = (0, _slicedToArray2.default)(_useMergedState3, 2),\n innerOpen = _useMergedState4[0],\n setInnerOpen = _useMergedState4[1];\n\n var mergedOpen = innerOpen; // Not trigger `open` in `combobox` when `notFoundContent` is empty\n\n var emptyListContent = !notFoundContent && !displayOptions.length;\n\n if (disabled || emptyListContent && mergedOpen && mode === 'combobox') {\n mergedOpen = false;\n }\n\n var triggerOpen = emptyListContent ? false : mergedOpen;\n\n var onToggleOpen = function onToggleOpen(newOpen) {\n var nextOpen = newOpen !== undefined ? newOpen : !mergedOpen;\n\n if (innerOpen !== nextOpen && !disabled) {\n setInnerOpen(nextOpen);\n\n if (onDropdownVisibleChange) {\n onDropdownVisibleChange(nextOpen);\n }\n }\n };\n\n (0, _useSelectTriggerControl.default)([containerRef.current, triggerRef.current && triggerRef.current.getPopupElement()], triggerOpen, onToggleOpen); // ============================= Search =============================\n\n var triggerSearch = function triggerSearch(searchText, fromTyping, isCompositing) {\n var ret = true;\n var newSearchText = searchText;\n setActiveValue(null); // Check if match the `tokenSeparators`\n\n var patchLabels = isCompositing ? null : (0, _valueUtil.getSeparatedContent)(searchText, tokenSeparators);\n var patchRawValues = patchLabels;\n\n if (mode === 'combobox') {\n // Only typing will trigger onChange\n if (fromTyping) {\n triggerChange([newSearchText]);\n }\n } else if (patchLabels) {\n newSearchText = '';\n\n if (mode !== 'tags') {\n patchRawValues = patchLabels.map(function (label) {\n var item = mergedFlattenOptions.find(function (_ref2) {\n var data = _ref2.data;\n return data[mergedOptionLabelProp] === label;\n });\n return item ? item.data.value : null;\n }).filter(function (val) {\n return val !== null;\n });\n }\n\n var newRawValues = Array.from(new Set([].concat((0, _toConsumableArray2.default)(mergedRawValue), (0, _toConsumableArray2.default)(patchRawValues))));\n triggerChange(newRawValues);\n newRawValues.forEach(function (newRawValue) {\n triggerSelect(newRawValue, true, 'input');\n }); // Should close when paste finish\n\n onToggleOpen(false); // Tell Selector that break next actions\n\n ret = false;\n }\n\n setInnerSearchValue(newSearchText);\n\n if (onSearch && mergedSearchValue !== newSearchText) {\n onSearch(newSearchText);\n }\n\n return ret;\n }; // Only triggered when menu is closed & mode is tags\n // If menu is open, OptionList will take charge\n // If mode isn't tags, press enter is not meaningful when you can't see any option\n\n\n var onSearchSubmit = function onSearchSubmit(searchText) {\n var newRawValues = Array.from(new Set([].concat((0, _toConsumableArray2.default)(mergedRawValue), [searchText])));\n triggerChange(newRawValues);\n newRawValues.forEach(function (newRawValue) {\n triggerSelect(newRawValue, true, 'input');\n });\n setInnerSearchValue('');\n }; // Close dropdown when disabled change\n\n\n (0, React.useEffect)(function () {\n if (innerOpen && !!disabled) {\n setInnerOpen(false);\n }\n }, [disabled]); // Close will clean up single mode search text\n\n (0, React.useEffect)(function () {\n if (!mergedOpen && !isMultiple && mode !== 'combobox') {\n triggerSearch('', false, false);\n }\n }, [mergedOpen]); // ============================ Keyboard ============================\n\n /**\n * We record input value here to check if can press to clean up by backspace\n * - null: Key is not down, this is reset by key up\n * - true: Search text is empty when first time backspace down\n * - false: Search text is not empty when first time backspace down\n */\n\n var _useLock = (0, _useLock3.default)(),\n _useLock2 = (0, _slicedToArray2.default)(_useLock, 2),\n getClearLock = _useLock2[0],\n setClearLock = _useLock2[1]; // KeyDown\n\n\n var onInternalKeyDown = function onInternalKeyDown(event) {\n var clearLock = getClearLock();\n var which = event.which; // We only manage open state here, close logic should handle by list component\n\n if (!mergedOpen && which === _KeyCode.default.ENTER) {\n onToggleOpen(true);\n }\n\n setClearLock(!!mergedSearchValue); // Remove value by `backspace`\n\n if (which === _KeyCode.default.BACKSPACE && !clearLock && isMultiple && !mergedSearchValue && mergedRawValue.length) {\n var removeInfo = (0, _commonUtil.removeLastEnabledValue)(displayValues, mergedRawValue);\n\n if (removeInfo.removedValue !== null) {\n triggerChange(removeInfo.values);\n triggerSelect(removeInfo.removedValue, false, 'input');\n }\n }\n\n for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n rest[_key - 1] = arguments[_key];\n }\n\n if (mergedOpen && listRef.current) {\n var _listRef$current;\n\n (_listRef$current = listRef.current).onKeyDown.apply(_listRef$current, [event].concat(rest));\n }\n\n if (onKeyDown) {\n onKeyDown.apply(void 0, [event].concat(rest));\n }\n }; // KeyUp\n\n\n var onInternalKeyUp = function onInternalKeyUp(event) {\n for (var _len2 = arguments.length, rest = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n rest[_key2 - 1] = arguments[_key2];\n }\n\n if (mergedOpen && listRef.current) {\n var _listRef$current2;\n\n (_listRef$current2 = listRef.current).onKeyUp.apply(_listRef$current2, [event].concat(rest));\n }\n\n if (onKeyUp) {\n onKeyUp.apply(void 0, [event].concat(rest));\n }\n }; // ========================== Focus / Blur ==========================\n\n /** Record real focus status */\n\n\n var focusRef = (0, React.useRef)(false);\n\n var onContainerFocus = function onContainerFocus() {\n setMockFocused(true);\n\n if (!disabled) {\n if (onFocus && !focusRef.current) {\n onFocus.apply(void 0, arguments);\n } // `showAction` should handle `focus` if set\n\n\n if (showAction.includes('focus')) {\n onToggleOpen(true);\n }\n }\n\n focusRef.current = true;\n };\n\n var onContainerBlur = function onContainerBlur() {\n setMockFocused(false, function () {\n focusRef.current = false;\n onToggleOpen(false);\n });\n\n if (disabled) {\n return;\n }\n\n if (mergedSearchValue) {\n // `tags` mode should move `searchValue` into values\n if (mode === 'tags') {\n triggerSearch('', false, false);\n triggerChange(Array.from(new Set([].concat((0, _toConsumableArray2.default)(mergedRawValue), [mergedSearchValue]))));\n } else if (mode === 'multiple') {\n // `multiple` mode only clean the search value but not trigger event\n setInnerSearchValue('');\n }\n }\n\n if (onBlur) {\n onBlur.apply(void 0, arguments);\n }\n };\n\n var activeTimeoutIds = [];\n (0, React.useEffect)(function () {\n return function () {\n activeTimeoutIds.forEach(function (timeoutId) {\n return clearTimeout(timeoutId);\n });\n activeTimeoutIds.splice(0, activeTimeoutIds.length);\n };\n }, []);\n\n var onInternalMouseDown = function onInternalMouseDown(event) {\n var target = event.target;\n var popupElement = triggerRef.current && triggerRef.current.getPopupElement(); // We should give focus back to selector if clicked item is not focusable\n\n if (popupElement && popupElement.contains(target)) {\n var timeoutId = setTimeout(function () {\n var index = activeTimeoutIds.indexOf(timeoutId);\n\n if (index !== -1) {\n activeTimeoutIds.splice(index, 1);\n }\n\n cancelSetMockFocused();\n\n if (!popupElement.contains(document.activeElement)) {\n selectorRef.current.focus();\n }\n });\n activeTimeoutIds.push(timeoutId);\n }\n\n if (onMouseDown) {\n for (var _len3 = arguments.length, restArgs = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n restArgs[_key3 - 1] = arguments[_key3];\n }\n\n onMouseDown.apply(void 0, [event].concat(restArgs));\n }\n }; // ========================= Accessibility ==========================\n\n\n var _useState7 = (0, React.useState)(0),\n _useState8 = (0, _slicedToArray2.default)(_useState7, 2),\n accessibilityIndex = _useState8[0],\n setAccessibilityIndex = _useState8[1];\n\n var mergedDefaultActiveFirstOption = defaultActiveFirstOption !== undefined ? defaultActiveFirstOption : mode !== 'combobox';\n\n var onActiveValue = function onActiveValue(active, index) {\n setAccessibilityIndex(index);\n\n if (backfill && mode === 'combobox' && active !== null) {\n setActiveValue(String(active));\n }\n }; // ============================= Popup ==============================\n\n\n var _useState9 = (0, React.useState)(null),\n _useState10 = (0, _slicedToArray2.default)(_useState9, 2),\n containerWidth = _useState10[0],\n setContainerWidth = _useState10[1];\n\n var _useState11 = (0, React.useState)({}),\n _useState12 = (0, _slicedToArray2.default)(_useState11, 2),\n forceUpdate = _useState12[1]; // We need force update here since popup dom is render async\n\n\n function onPopupMouseEnter() {\n forceUpdate({});\n }\n\n (0, _useLayoutEffect.default)(function () {\n if (triggerOpen) {\n var newWidth = Math.ceil(containerRef.current.offsetWidth);\n\n if (containerWidth !== newWidth) {\n setContainerWidth(newWidth);\n }\n }\n }, [triggerOpen]);\n var popupNode = React.createElement(OptionList, {\n ref: listRef,\n prefixCls: prefixCls,\n id: mergedId,\n open: mergedOpen,\n childrenAsData: !options,\n options: displayOptions,\n flattenOptions: displayFlattenOptions,\n multiple: isMultiple,\n values: rawValues,\n height: listHeight,\n itemHeight: listItemHeight,\n onSelect: onInternalOptionSelect,\n onToggleOpen: onToggleOpen,\n onActiveValue: onActiveValue,\n defaultActiveFirstOption: mergedDefaultActiveFirstOption,\n notFoundContent: notFoundContent,\n onScroll: onPopupScroll,\n searchValue: mergedSearchValue,\n menuItemSelectedIcon: menuItemSelectedIcon,\n virtual: virtual !== false && dropdownMatchSelectWidth !== false,\n onMouseEnter: onPopupMouseEnter\n }); // ============================= Clear ==============================\n\n var clearNode;\n\n var onClearMouseDown = function onClearMouseDown() {\n // Trigger internal `onClear` event\n if (useInternalProps && internalProps.onClear) {\n internalProps.onClear();\n }\n\n triggerChange([]);\n triggerSearch('', false, false);\n };\n\n if (!disabled && allowClear && (mergedRawValue.length || mergedSearchValue)) {\n clearNode = React.createElement(_TransBtn.default, {\n className: \"\".concat(prefixCls, \"-clear\"),\n onMouseDown: onClearMouseDown,\n customizeIcon: clearIcon\n }, \"\\xD7\");\n } // ============================= Arrow ==============================\n\n\n var mergedShowArrow = showArrow !== undefined ? showArrow : loading || !isMultiple && mode !== 'combobox';\n var arrowNode;\n\n if (mergedShowArrow) {\n arrowNode = React.createElement(_TransBtn.default, {\n className: (0, _classnames.default)(\"\".concat(prefixCls, \"-arrow\"), (0, _defineProperty2.default)({}, \"\".concat(prefixCls, \"-arrow-loading\"), loading)),\n customizeIcon: inputIcon,\n customizeIconProps: {\n loading: loading,\n searchValue: mergedSearchValue,\n open: mergedOpen,\n focused: mockFocused,\n showSearch: mergedShowSearch\n }\n });\n } // ============================ Warning =============================\n\n\n if (process.env.NODE_ENV !== 'production' && warningProps) {\n warningProps(props);\n } // ============================= Render =============================\n\n\n var mergedClassName = (0, _classnames.default)(prefixCls, className, (_classNames2 = {}, (0, _defineProperty2.default)(_classNames2, \"\".concat(prefixCls, \"-focused\"), mockFocused), (0, _defineProperty2.default)(_classNames2, \"\".concat(prefixCls, \"-multiple\"), isMultiple), (0, _defineProperty2.default)(_classNames2, \"\".concat(prefixCls, \"-single\"), !isMultiple), (0, _defineProperty2.default)(_classNames2, \"\".concat(prefixCls, \"-allow-clear\"), allowClear), (0, _defineProperty2.default)(_classNames2, \"\".concat(prefixCls, \"-show-arrow\"), mergedShowArrow), (0, _defineProperty2.default)(_classNames2, \"\".concat(prefixCls, \"-disabled\"), disabled), (0, _defineProperty2.default)(_classNames2, \"\".concat(prefixCls, \"-loading\"), loading), (0, _defineProperty2.default)(_classNames2, \"\".concat(prefixCls, \"-open\"), mergedOpen), (0, _defineProperty2.default)(_classNames2, \"\".concat(prefixCls, \"-customize-input\"), customizeInputElement), (0, _defineProperty2.default)(_classNames2, \"\".concat(prefixCls, \"-show-search\"), mergedShowSearch), _classNames2));\n return React.createElement(\"div\", Object.assign({\n className: mergedClassName\n }, domProps, {\n ref: containerRef,\n onMouseDown: onInternalMouseDown,\n onKeyDown: onInternalKeyDown,\n onKeyUp: onInternalKeyUp,\n onFocus: onContainerFocus,\n onBlur: onContainerBlur\n }), mockFocused && !mergedOpen && React.createElement(\"span\", {\n style: {\n width: 0,\n height: 0,\n display: 'flex',\n overflow: 'hidden',\n opacity: 0\n },\n \"aria-live\": \"polite\"\n }, \"\".concat(mergedRawValue.join(', '))), React.createElement(_SelectTrigger.default, {\n ref: triggerRef,\n disabled: disabled,\n prefixCls: prefixCls,\n visible: triggerOpen,\n popupElement: popupNode,\n containerWidth: containerWidth,\n animation: animation,\n transitionName: transitionName,\n dropdownStyle: dropdownStyle,\n dropdownClassName: dropdownClassName,\n direction: direction,\n dropdownMatchSelectWidth: dropdownMatchSelectWidth,\n dropdownRender: dropdownRender,\n dropdownAlign: dropdownAlign,\n getPopupContainer: getPopupContainer,\n empty: !mergedOptions.length,\n getTriggerDOMNode: function getTriggerDOMNode() {\n return selectorDomRef.current;\n }\n }, React.createElement(_Selector.default, Object.assign({}, props, {\n domRef: selectorDomRef,\n prefixCls: prefixCls,\n inputElement: customizeInputElement,\n ref: selectorRef,\n id: mergedId,\n showSearch: mergedShowSearch,\n mode: mode,\n accessibilityIndex: accessibilityIndex,\n multiple: isMultiple,\n tagRender: tagRender,\n values: displayValues,\n open: mergedOpen,\n onToggleOpen: onToggleOpen,\n searchValue: mergedSearchValue,\n activeValue: activeValue,\n onSearch: triggerSearch,\n onSearchSubmit: onSearchSubmit,\n onSelect: onInternalSelectionSelect,\n tokenWithEnter: tokenWithEnter\n }))), arrowNode, clearNode);\n }", "handleEventDropdown(event, value) {\n this.props.saveActionProperty('event', value);\n this.error = ''\n }", "render() {\r\n const { props } = this; //props=this.props\r\n const dropItem = props.pop_group.map((data, index) => {\r\n return /2018/.test(data) ? (\r\n <DropdownItem\r\n style={{ fontSize: \"13px\", fontWeight: \"bold\" }}\r\n className=\"item\"\r\n key={index}\r\n >\r\n {data}\r\n </DropdownItem>\r\n ) : null;\r\n });\r\n\r\n return (\r\n //dropdown menu or measure names\r\n <React.Fragment>\r\n <Dropdown\r\n style={{ marginLeft: \"5%\", marginTop: \"3%\", backgroundColor: '#0079BE'}}\r\n isOpen={this.state.dropdownopen}\r\n toggle={this.toggle}\r\n >\r\n <DropdownToggle caret style= {{backgroundColor: '#0079BE'}}>{props.selectedMenu}</DropdownToggle>\r\n <DropdownMenu onClick={event => props.onMenuSelect(event)}>\r\n {dropItem}\r\n </DropdownMenu>\r\n </Dropdown>\r\n </React.Fragment>\r\n );\r\n }", "function drop() {\n document.getElementById(\"myDropdown\").classList.toggle(\"show\");\n }", "function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.dropdown')\n\n if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))\n if (typeof option == 'string') data[option].call($this)\n })\n }", "onToggleDropdown() {\n\t\tif(this.containerDropdownElement.className.indexOf(\"show\") == -1) {\n\t\t\tthis.containerDropdownElement.className += \" show\";\n\t\t} else {\n\t\t\tthis.containerDropdownElement.className = this.containerDropdownElement.className.replace(\" show\", \"\");\n\t\t}\n\t}", "function setDropDown() {\n KintoneConfigHelper.getFields(['SINGLE_LINE_TEXT', 'LINK', 'SPACER']).then(function(resp) {\n var $linkDropDown = $link;\n var $spaceDropDown = $space;\n\n resp.forEach(function(respField) {\n var $option = $('<option></option>');\n switch (respField.type) {\n case 'SINGLE_LINE_TEXT':\n case 'LINK':\n $option.attr('value', respField.code);\n $option.text(respField.label);\n $linkDropDown.append($option.clone());\n break;\n case 'SPACER':\n if (!respField.elementId) {\n break;\n }\n $option.attr('value', respField.elementId);\n $option.text(respField.elementId);\n $spaceDropDown.append($option.clone());\n break;\n default:\n break;\n }\n });\n\n // Set default values\n if (CONF.link) {\n $linkDropDown.val(CONF.link);\n }\n if (CONF.space) {\n $spaceDropDown.val(CONF.space);\n }\n }, function() {\n // Error\n return alert('There was an error retrieving the Link field information.');\n });\n }", "function Dropdown(options) {\n\t\tvar config = options || {},\n\t\t\tdropdown = config.item,\n\t\t\tdropdownText = dropdown.find('.js-dropdown-text'),\n\t\t\tdropdownList = dropdown.find('.js-dropdown-list'),\n\t\t\tdropdownItem = dropdown.find('.js-dropdown-list li'),\n\t\t\tthat = this;\n\t\n\t\tthis._openDD = function() {\n\t\t\tdropdownText.click(function() {\n\t\t\t\tif (dropdown.hasClass('is-active')) {\n\t\t\t\t\tthat._closeDD();\n\t\t\t\t} else {\n\t\t\t\t\tthat._closeDD();\n\t\t\t\t\tdropdown.addClass('is-active');\n\t\t\t\t};\n\t\t\t\treturn false;\n\t\t\t});\n\t\t},\n\t\tthis._closeDD = function() {\n\t\t\t$('.js-dropdown').removeClass('is-active');\n\t\t},\n\t\tthis._closeOnBody = function() {\n\t\t\tbody.click(function() {\n\t\t\t\tthat._closeDD();\n\t\t\t});\n\t\t},\n\t\tthis._changeValue = function() {\n\t\t\tdropdownItem.click(function() {\n\t\t\t\tdropdownItem.removeClass('is-active');\n\t\t\t\t$(this).addClass('is-active');\n\t\t\t\tdropdown.removeClass('is-active');\n\t\t\t\tdropdownText.text($(this).text());\n\t\t\t\treturn false;\n\t\t\t});\n\t\t},\n\t\tthis.init = function() {\n\t\t\tthat._openDD();\n\t\t\tthat._closeOnBody();\n\t\t\tthat._changeValue();\n\t\t}\n\t\n\t\tthis.init();\n\t\n\t}", "componentDidMount() {\n $('.dropdown-button').dropdown({\n inDuration: 300,\n outDuration: 225,\n constrainWidth: false, // Does not change width of dropdown to that of the activator\n hover: false, // Activate on hover\n gutter: 0, // Spacing from edge\n belowOrigin: false, // Displays dropdown below the button\n alignment: 'left', // Displays dropdown with edge aligned to the left of button\n stopPropagation: false // Stops event propagation\n }\n );\n }", "function generateDropdown(parentID,label,dropID,title,array) {\n //add select options\n var dropHtml = \"\";\n if (label != \"\") {\n dropHtml += '<label>' + label + '</label>'\n }\n dropHtml += '<select class=\"selectpicker show-tick\" id=\"'+ dropID +'\" title=\"'+title+'\" data-style=\"btn-default\" data-width=\"100%\" data-size=\"10\">'\n //build list, apply BREAKS or LABELS if words present in array\n for (i = 0; i < array.length; i++) {\n if (array[i] == 'BREAK'){\n dropHtml += '<option data-divider=\"true\"></option>';\n } else if (array[i].includes('LABEL=')) {\n dropHtml += '<optgroup label=\"' + array[i].replace('LABEL=','') + '\">';\n } else if (array[i].includes('ENDLABEL')) {\n dropHtml += '</optgroup>';\n }\n else {\n dropHtml += '<option>' + array[i] + '</option>';\n }\n }\n dropHtml += '</select>';\n //add to parent div\n document.getElementById(parentID).innerHTML = dropHtml;\n //initialise dropdown\n $('#'+dropID).selectpicker();\n //bind dropdown click handler\n $('#'+dropID).on('changed.bs.select', dropClickHandler);\n}", "function DropdownMenu(){\r\n\r\n\r\n return (\r\n <ul className=\"dropdown\">\r\n {/* Create links to main menus options in the list*/}\r\n {SideMenuInfo.map((item, index) => {\r\n return (\r\n <li key={index} className={item.classFormat}>\r\n <Link to={item.path}>\r\n {item.icon}\r\n <span>{item.title}</span>\r\n </Link>\r\n </li>\r\n )\r\n })}\r\n </ul>\r\n );\r\n\r\n}" ]
[ "0.74632454", "0.74274856", "0.6800082", "0.65475297", "0.65286446", "0.6430284", "0.64301074", "0.642787", "0.642787", "0.6388088", "0.63669276", "0.63535553", "0.6343826", "0.631651", "0.631651", "0.6260205", "0.6259108", "0.6249347", "0.6229232", "0.6229232", "0.61744714", "0.61705", "0.61694753", "0.61532944", "0.61422235", "0.61337686", "0.61337596", "0.61161005", "0.6097956", "0.6076092", "0.6076092", "0.6076092", "0.6076092", "0.6076092", "0.6070996", "0.6069781", "0.6068163", "0.60589886", "0.6048342", "0.60382086", "0.6034892", "0.602761", "0.6023519", "0.6023427", "0.6021056", "0.6016045", "0.6011818", "0.60089445", "0.6007849", "0.6007849", "0.6007849", "0.6007849", "0.6007849", "0.6007849", "0.6007849", "0.6007849", "0.6007849", "0.6007849", "0.6007849", "0.6000713", "0.59998876", "0.59942037", "0.598484", "0.598484", "0.5979949", "0.5977902", "0.5955276", "0.5933785", "0.5933785", "0.5929916", "0.5929916", "0.5909351", "0.5909351", "0.5897701", "0.58832276", "0.5871663", "0.5866017", "0.5865055", "0.5860144", "0.58583623", "0.5851429", "0.5843233", "0.5841985", "0.5835055", "0.58339596", "0.5817936", "0.581763", "0.58112127", "0.5808831", "0.5808831", "0.5808831", "0.58038807", "0.5792845", "0.57927287", "0.5780673", "0.57712305", "0.57699656", "0.5760579", "0.5755275", "0.57380825", "0.5735037" ]
0.0
-1
connect is a facade over connectAdvanced. It turns its args into a compatible selectorFactory, which has the signature: (dispatch, options) => (nextState, nextOwnProps) => nextFinalProps connect passes its args to connectAdvanced as options, which will in turn pass them to selectorFactory each time a Connect component instance is instantiated or hot reloaded. selectorFactory returns a final props selector from its mapStateToProps, mapStateToPropsFactories, mapDispatchToProps, mapDispatchToPropsFactories, mergeProps, mergePropsFactories, and pure args. The resulting final props selector is called by the Connect component instance whenever it receives new props or store state.
function match(arg, factories, name) { for (var i = factories.length - 1; i >= 0; i--) { var result = factories[i](arg); if (result) return result; } return function (dispatch, options) { throw new Error("Invalid value of type " + typeof arg + " for " + name + " argument when connecting component " + options.wrappedComponentName + "."); }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? connectAdvanced : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? connect_mapStateToProps : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? connect_mapDispatchToProps : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? connect_mergeProps : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? finalPropsSelectorFactory : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? shallowEqual : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? shallowEqual : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? shallowEqual : _ref2$areMergedPropsE,\n extraOptions = connect_objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, connect_extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? connectAdvanced : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? connect_mapStateToProps : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? connect_mapDispatchToProps : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? connect_mergeProps : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? finalPropsSelectorFactory : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? shallowEqual : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? shallowEqual : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? shallowEqual : _ref2$areMergedPropsE,\n extraOptions = connect__objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, connect__extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? connectAdvanced : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? defaultMapStateToPropsFactories : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? defaultMapDispatchToPropsFactories : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? defaultMergePropsFactories : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? finalPropsSelectorFactory : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\n var _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? shallowEqual : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? shallowEqual : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? shallowEqual : _ref2$areMergedPropsE,\n extraOptions = objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? connectAdvanced : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? defaultMapStateToPropsFactories : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? defaultMapDispatchToPropsFactories : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? defaultMergePropsFactories : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? finalPropsSelectorFactory : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\n var _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? shallowEqual : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? shallowEqual : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? shallowEqual : _ref2$areMergedPropsE,\n extraOptions = objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? connectAdvanced : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? defaultMapStateToPropsFactories : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? defaultMapDispatchToPropsFactories : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? defaultMergePropsFactories : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? finalPropsSelectorFactory : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? shallowEqual : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? shallowEqual : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? shallowEqual : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties$2(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends$4({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? connectAdvanced : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? defaultMapStateToPropsFactories : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? defaultMapDispatchToPropsFactories : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? defaultMergePropsFactories : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? finalPropsSelectorFactory : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? shallowEqual$1 : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? shallowEqual$1 : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? shallowEqual$1 : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties$3(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends$6({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n\t var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t _ref$connectHOC = _ref.connectHOC,\n\t connectHOC = _ref$connectHOC === undefined ? _connectAdvanced2.default : _ref$connectHOC,\n\t _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n\t mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps2.default : _ref$mapStateToPropsF,\n\t _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n\t mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps2.default : _ref$mapDispatchToPro,\n\t _ref$mergePropsFactor = _ref.mergePropsFactories,\n\t mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps2.default : _ref$mergePropsFactor,\n\t _ref$selectorFactory = _ref.selectorFactory,\n\t selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory2.default : _ref$selectorFactory;\n\n\t return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n\t var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n\t _ref2$pure = _ref2.pure,\n\t pure = _ref2$pure === undefined ? true : _ref2$pure,\n\t _ref2$areStatesEqual = _ref2.areStatesEqual,\n\t areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n\t _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n\t areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _shallowEqual2.default : _ref2$areOwnPropsEqua,\n\t _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n\t areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _shallowEqual2.default : _ref2$areStatePropsEq,\n\t _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n\t areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _shallowEqual2.default : _ref2$areMergedPropsE,\n\t extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n\t var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n\t var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n\t var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n\t return connectHOC(selectorFactory, _extends({\n\t // used in error messages\n\t methodName: 'connect',\n\n\t // used to compute Connect's displayName from the wrapped component's displayName.\n\t getDisplayName: function getDisplayName(name) {\n\t return 'Connect(' + name + ')';\n\t },\n\n\t // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n\t shouldHandleStateChanges: Boolean(mapStateToProps),\n\n\t // passed through to selectorFactory\n\t initMapStateToProps: initMapStateToProps,\n\t initMapDispatchToProps: initMapDispatchToProps,\n\t initMergeProps: initMergeProps,\n\t pure: pure,\n\t areStatesEqual: areStatesEqual,\n\t areOwnPropsEqual: areOwnPropsEqual,\n\t areStatePropsEqual: areStatePropsEqual,\n\t areMergedPropsEqual: areMergedPropsEqual\n\n\t }, extraOptions));\n\t };\n\t}", "function createConnect() {\n\t var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t _ref$connectHOC = _ref.connectHOC,\n\t connectHOC = _ref$connectHOC === undefined ? _connectAdvanced2.default : _ref$connectHOC,\n\t _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n\t mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps2.default : _ref$mapStateToPropsF,\n\t _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n\t mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps2.default : _ref$mapDispatchToPro,\n\t _ref$mergePropsFactor = _ref.mergePropsFactories,\n\t mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps2.default : _ref$mergePropsFactor,\n\t _ref$selectorFactory = _ref.selectorFactory,\n\t selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory2.default : _ref$selectorFactory;\n\n\t return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n\t var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n\t _ref2$pure = _ref2.pure,\n\t pure = _ref2$pure === undefined ? true : _ref2$pure,\n\t _ref2$areStatesEqual = _ref2.areStatesEqual,\n\t areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n\t _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n\t areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _shallowEqual2.default : _ref2$areOwnPropsEqua,\n\t _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n\t areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _shallowEqual2.default : _ref2$areStatePropsEq,\n\t _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n\t areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _shallowEqual2.default : _ref2$areMergedPropsE,\n\t extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n\t var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n\t var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n\t var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n\t return connectHOC(selectorFactory, _extends({\n\t // used in error messages\n\t methodName: 'connect',\n\n\t // used to compute Connect's displayName from the wrapped component's displayName.\n\t getDisplayName: function getDisplayName(name) {\n\t return 'Connect(' + name + ')';\n\t },\n\n\t // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n\t shouldHandleStateChanges: Boolean(mapStateToProps),\n\n\t // passed through to selectorFactory\n\t initMapStateToProps: initMapStateToProps,\n\t initMapDispatchToProps: initMapDispatchToProps,\n\t initMergeProps: initMergeProps,\n\t pure: pure,\n\t areStatesEqual: areStatesEqual,\n\t areOwnPropsEqual: areOwnPropsEqual,\n\t areStatePropsEqual: areStatePropsEqual,\n\t areMergedPropsEqual: areMergedPropsEqual\n\n\t }, extraOptions));\n\t };\n\t}", "function createConnect() {\n\t var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t _ref$connectHOC = _ref.connectHOC,\n\t connectHOC = _ref$connectHOC === undefined ? _connectAdvanced2.default : _ref$connectHOC,\n\t _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n\t mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps2.default : _ref$mapStateToPropsF,\n\t _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n\t mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps2.default : _ref$mapDispatchToPro,\n\t _ref$mergePropsFactor = _ref.mergePropsFactories,\n\t mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps2.default : _ref$mergePropsFactor,\n\t _ref$selectorFactory = _ref.selectorFactory,\n\t selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory2.default : _ref$selectorFactory;\n\n\t return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n\t var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n\t _ref2$pure = _ref2.pure,\n\t pure = _ref2$pure === undefined ? true : _ref2$pure,\n\t _ref2$areStatesEqual = _ref2.areStatesEqual,\n\t areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n\t _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n\t areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _shallowEqual2.default : _ref2$areOwnPropsEqua,\n\t _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n\t areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _shallowEqual2.default : _ref2$areStatePropsEq,\n\t _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n\t areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _shallowEqual2.default : _ref2$areMergedPropsE,\n\t extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n\t var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n\t var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n\t var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n\t return connectHOC(selectorFactory, _extends({\n\t // used in error messages\n\t methodName: 'connect',\n\n\t // used to compute Connect's displayName from the wrapped component's displayName.\n\t getDisplayName: function getDisplayName(name) {\n\t return 'Connect(' + name + ')';\n\t },\n\n\t // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n\t shouldHandleStateChanges: Boolean(mapStateToProps),\n\n\t // passed through to selectorFactory\n\t initMapStateToProps: initMapStateToProps,\n\t initMapDispatchToProps: initMapDispatchToProps,\n\t initMergeProps: initMergeProps,\n\t pure: pure,\n\t areStatesEqual: areStatesEqual,\n\t areOwnPropsEqual: areOwnPropsEqual,\n\t areStatePropsEqual: areStatePropsEqual,\n\t areMergedPropsEqual: areMergedPropsEqual\n\n\t }, extraOptions));\n\t };\n\t}", "function createConnect() {\n\t var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t _ref$connectHOC = _ref.connectHOC,\n\t connectHOC = _ref$connectHOC === undefined ? _connectAdvanced2.default : _ref$connectHOC,\n\t _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n\t mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps2.default : _ref$mapStateToPropsF,\n\t _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n\t mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps2.default : _ref$mapDispatchToPro,\n\t _ref$mergePropsFactor = _ref.mergePropsFactories,\n\t mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps2.default : _ref$mergePropsFactor,\n\t _ref$selectorFactory = _ref.selectorFactory,\n\t selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory2.default : _ref$selectorFactory;\n\n\t return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n\t var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n\t _ref2$pure = _ref2.pure,\n\t pure = _ref2$pure === undefined ? true : _ref2$pure,\n\t _ref2$areStatesEqual = _ref2.areStatesEqual,\n\t areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n\t _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n\t areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _shallowEqual2.default : _ref2$areOwnPropsEqua,\n\t _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n\t areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _shallowEqual2.default : _ref2$areStatePropsEq,\n\t _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n\t areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _shallowEqual2.default : _ref2$areMergedPropsE,\n\t extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n\t var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n\t var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n\t var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n\t return connectHOC(selectorFactory, _extends({\n\t // used in error messages\n\t methodName: 'connect',\n\n\t // used to compute Connect's displayName from the wrapped component's displayName.\n\t getDisplayName: function getDisplayName(name) {\n\t return 'Connect(' + name + ')';\n\t },\n\n\t // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n\t shouldHandleStateChanges: Boolean(mapStateToProps),\n\n\t // passed through to selectorFactory\n\t initMapStateToProps: initMapStateToProps,\n\t initMapDispatchToProps: initMapDispatchToProps,\n\t initMergeProps: initMergeProps,\n\t pure: pure,\n\t areStatesEqual: areStatesEqual,\n\t areOwnPropsEqual: areOwnPropsEqual,\n\t areStatePropsEqual: areStatePropsEqual,\n\t areMergedPropsEqual: areMergedPropsEqual\n\n\t }, extraOptions));\n\t };\n\t}", "function createConnect() {\n\t var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t _ref$connectHOC = _ref.connectHOC,\n\t connectHOC = _ref$connectHOC === undefined ? _connectAdvanced2.default : _ref$connectHOC,\n\t _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n\t mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps2.default : _ref$mapStateToPropsF,\n\t _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n\t mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps2.default : _ref$mapDispatchToPro,\n\t _ref$mergePropsFactor = _ref.mergePropsFactories,\n\t mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps2.default : _ref$mergePropsFactor,\n\t _ref$selectorFactory = _ref.selectorFactory,\n\t selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory2.default : _ref$selectorFactory;\n\n\t return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n\t var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n\t _ref2$pure = _ref2.pure,\n\t pure = _ref2$pure === undefined ? true : _ref2$pure,\n\t _ref2$areStatesEqual = _ref2.areStatesEqual,\n\t areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n\t _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n\t areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _shallowEqual2.default : _ref2$areOwnPropsEqua,\n\t _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n\t areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _shallowEqual2.default : _ref2$areStatePropsEq,\n\t _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n\t areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _shallowEqual2.default : _ref2$areMergedPropsE,\n\t extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n\t var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n\t var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n\t var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n\t return connectHOC(selectorFactory, _extends({\n\t // used in error messages\n\t methodName: 'connect',\n\n\t // used to compute Connect's displayName from the wrapped component's displayName.\n\t getDisplayName: function getDisplayName(name) {\n\t return 'Connect(' + name + ')';\n\t },\n\n\t // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n\t shouldHandleStateChanges: Boolean(mapStateToProps),\n\n\t // passed through to selectorFactory\n\t initMapStateToProps: initMapStateToProps,\n\t initMapDispatchToProps: initMapDispatchToProps,\n\t initMergeProps: initMergeProps,\n\t pure: pure,\n\t areStatesEqual: areStatesEqual,\n\t areOwnPropsEqual: areOwnPropsEqual,\n\t areStatePropsEqual: areStatePropsEqual,\n\t areMergedPropsEqual: areMergedPropsEqual\n\n\t }, extraOptions));\n\t };\n\t}", "function createConnect() {\n\t var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t _ref$connectHOC = _ref.connectHOC,\n\t connectHOC = _ref$connectHOC === undefined ? _connectAdvanced2.default : _ref$connectHOC,\n\t _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n\t mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps2.default : _ref$mapStateToPropsF,\n\t _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n\t mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps2.default : _ref$mapDispatchToPro,\n\t _ref$mergePropsFactor = _ref.mergePropsFactories,\n\t mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps2.default : _ref$mergePropsFactor,\n\t _ref$selectorFactory = _ref.selectorFactory,\n\t selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory2.default : _ref$selectorFactory;\n\n\t return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n\t var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n\t _ref2$pure = _ref2.pure,\n\t pure = _ref2$pure === undefined ? true : _ref2$pure,\n\t _ref2$areStatesEqual = _ref2.areStatesEqual,\n\t areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n\t _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n\t areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _shallowEqual2.default : _ref2$areOwnPropsEqua,\n\t _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n\t areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _shallowEqual2.default : _ref2$areStatePropsEq,\n\t _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n\t areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _shallowEqual2.default : _ref2$areMergedPropsE,\n\t extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n\t var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n\t var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n\t var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n\t return connectHOC(selectorFactory, _extends({\n\t // used in error messages\n\t methodName: 'connect',\n\n\t // used to compute Connect's displayName from the wrapped component's displayName.\n\t getDisplayName: function getDisplayName(name) {\n\t return 'Connect(' + name + ')';\n\t },\n\n\t // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n\t shouldHandleStateChanges: Boolean(mapStateToProps),\n\n\t // passed through to selectorFactory\n\t initMapStateToProps: initMapStateToProps,\n\t initMapDispatchToProps: initMapDispatchToProps,\n\t initMergeProps: initMergeProps,\n\t pure: pure,\n\t areStatesEqual: areStatesEqual,\n\t areOwnPropsEqual: areOwnPropsEqual,\n\t areStatePropsEqual: areStatePropsEqual,\n\t areMergedPropsEqual: areMergedPropsEqual\n\n\t }, extraOptions));\n\t };\n\t}", "function createConnect() {\n\t var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t _ref$connectHOC = _ref.connectHOC,\n\t connectHOC = _ref$connectHOC === undefined ? _connectAdvanced2.default : _ref$connectHOC,\n\t _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n\t mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps2.default : _ref$mapStateToPropsF,\n\t _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n\t mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps2.default : _ref$mapDispatchToPro,\n\t _ref$mergePropsFactor = _ref.mergePropsFactories,\n\t mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps2.default : _ref$mergePropsFactor,\n\t _ref$selectorFactory = _ref.selectorFactory,\n\t selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory2.default : _ref$selectorFactory;\n\n\t return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n\t var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n\t _ref2$pure = _ref2.pure,\n\t pure = _ref2$pure === undefined ? true : _ref2$pure,\n\t _ref2$areStatesEqual = _ref2.areStatesEqual,\n\t areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n\t _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n\t areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _shallowEqual2.default : _ref2$areOwnPropsEqua,\n\t _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n\t areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _shallowEqual2.default : _ref2$areStatePropsEq,\n\t _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n\t areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _shallowEqual2.default : _ref2$areMergedPropsE,\n\t extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n\t var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n\t var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n\t var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n\t return connectHOC(selectorFactory, _extends({\n\t // used in error messages\n\t methodName: 'connect',\n\n\t // used to compute Connect's displayName from the wrapped component's displayName.\n\t getDisplayName: function getDisplayName(name) {\n\t return 'Connect(' + name + ')';\n\t },\n\n\t // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n\t shouldHandleStateChanges: Boolean(mapStateToProps),\n\n\t // passed through to selectorFactory\n\t initMapStateToProps: initMapStateToProps,\n\t initMapDispatchToProps: initMapDispatchToProps,\n\t initMergeProps: initMergeProps,\n\t pure: pure,\n\t areStatesEqual: areStatesEqual,\n\t areOwnPropsEqual: areOwnPropsEqual,\n\t areStatePropsEqual: areStatePropsEqual,\n\t areMergedPropsEqual: areMergedPropsEqual\n\n\t }, extraOptions));\n\t };\n\t}", "function createConnect() {\n\t var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t _ref$connectHOC = _ref.connectHOC,\n\t connectHOC = _ref$connectHOC === undefined ? _connectAdvanced2.default : _ref$connectHOC,\n\t _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n\t mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps2.default : _ref$mapStateToPropsF,\n\t _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n\t mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps2.default : _ref$mapDispatchToPro,\n\t _ref$mergePropsFactor = _ref.mergePropsFactories,\n\t mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps2.default : _ref$mergePropsFactor,\n\t _ref$selectorFactory = _ref.selectorFactory,\n\t selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory2.default : _ref$selectorFactory;\n\t\n\t return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n\t var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n\t _ref2$pure = _ref2.pure,\n\t pure = _ref2$pure === undefined ? true : _ref2$pure,\n\t _ref2$areStatesEqual = _ref2.areStatesEqual,\n\t areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n\t _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n\t areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _shallowEqual2.default : _ref2$areOwnPropsEqua,\n\t _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n\t areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _shallowEqual2.default : _ref2$areStatePropsEq,\n\t _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n\t areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _shallowEqual2.default : _ref2$areMergedPropsE,\n\t extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\t\n\t var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n\t var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n\t var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\t\n\t return connectHOC(selectorFactory, _extends({\n\t // used in error messages\n\t methodName: 'connect',\n\t\n\t // used to compute Connect's displayName from the wrapped component's displayName.\n\t getDisplayName: function getDisplayName(name) {\n\t return 'Connect(' + name + ')';\n\t },\n\t\n\t // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n\t shouldHandleStateChanges: Boolean(mapStateToProps),\n\t\n\t // passed through to selectorFactory\n\t initMapStateToProps: initMapStateToProps,\n\t initMapDispatchToProps: initMapDispatchToProps,\n\t initMergeProps: initMergeProps,\n\t pure: pure,\n\t areStatesEqual: areStatesEqual,\n\t areOwnPropsEqual: areOwnPropsEqual,\n\t areStatePropsEqual: areStatePropsEqual,\n\t areMergedPropsEqual: areMergedPropsEqual\n\t\n\t }, extraOptions));\n\t };\n\t}", "function createConnect() {\n\t var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t _ref$connectHOC = _ref.connectHOC,\n\t connectHOC = _ref$connectHOC === undefined ? _connectAdvanced2.default : _ref$connectHOC,\n\t _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n\t mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps2.default : _ref$mapStateToPropsF,\n\t _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n\t mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps2.default : _ref$mapDispatchToPro,\n\t _ref$mergePropsFactor = _ref.mergePropsFactories,\n\t mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps2.default : _ref$mergePropsFactor,\n\t _ref$selectorFactory = _ref.selectorFactory,\n\t selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory2.default : _ref$selectorFactory;\n\t\n\t return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n\t var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n\t _ref2$pure = _ref2.pure,\n\t pure = _ref2$pure === undefined ? true : _ref2$pure,\n\t _ref2$areStatesEqual = _ref2.areStatesEqual,\n\t areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n\t _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n\t areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _shallowEqual2.default : _ref2$areOwnPropsEqua,\n\t _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n\t areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _shallowEqual2.default : _ref2$areStatePropsEq,\n\t _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n\t areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _shallowEqual2.default : _ref2$areMergedPropsE,\n\t extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\t\n\t var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n\t var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n\t var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\t\n\t return connectHOC(selectorFactory, _extends({\n\t // used in error messages\n\t methodName: 'connect',\n\t\n\t // used to compute Connect's displayName from the wrapped component's displayName.\n\t getDisplayName: function getDisplayName(name) {\n\t return 'Connect(' + name + ')';\n\t },\n\t\n\t // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n\t shouldHandleStateChanges: Boolean(mapStateToProps),\n\t\n\t // passed through to selectorFactory\n\t initMapStateToProps: initMapStateToProps,\n\t initMapDispatchToProps: initMapDispatchToProps,\n\t initMergeProps: initMergeProps,\n\t pure: pure,\n\t areStatesEqual: areStatesEqual,\n\t areOwnPropsEqual: areOwnPropsEqual,\n\t areStatePropsEqual: areStatePropsEqual,\n\t areMergedPropsEqual: areMergedPropsEqual\n\t\n\t }, extraOptions));\n\t };\n\t}", "function createConnect() {\n\t var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t _ref$connectHOC = _ref.connectHOC,\n\t connectHOC = _ref$connectHOC === undefined ? _connectAdvanced2.default : _ref$connectHOC,\n\t _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n\t mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps2.default : _ref$mapStateToPropsF,\n\t _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n\t mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps2.default : _ref$mapDispatchToPro,\n\t _ref$mergePropsFactor = _ref.mergePropsFactories,\n\t mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps2.default : _ref$mergePropsFactor,\n\t _ref$selectorFactory = _ref.selectorFactory,\n\t selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory2.default : _ref$selectorFactory;\n\t\n\t return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n\t var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n\t _ref2$pure = _ref2.pure,\n\t pure = _ref2$pure === undefined ? true : _ref2$pure,\n\t _ref2$areStatesEqual = _ref2.areStatesEqual,\n\t areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n\t _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n\t areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _shallowEqual2.default : _ref2$areOwnPropsEqua,\n\t _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n\t areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _shallowEqual2.default : _ref2$areStatePropsEq,\n\t _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n\t areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _shallowEqual2.default : _ref2$areMergedPropsE,\n\t extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\t\n\t var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n\t var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n\t var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\t\n\t return connectHOC(selectorFactory, _extends({\n\t // used in error messages\n\t methodName: 'connect',\n\t\n\t // used to compute Connect's displayName from the wrapped component's displayName.\n\t getDisplayName: function getDisplayName(name) {\n\t return 'Connect(' + name + ')';\n\t },\n\t\n\t // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n\t shouldHandleStateChanges: Boolean(mapStateToProps),\n\t\n\t // passed through to selectorFactory\n\t initMapStateToProps: initMapStateToProps,\n\t initMapDispatchToProps: initMapDispatchToProps,\n\t initMergeProps: initMergeProps,\n\t pure: pure,\n\t areStatesEqual: areStatesEqual,\n\t areOwnPropsEqual: areOwnPropsEqual,\n\t areStatePropsEqual: areStatePropsEqual,\n\t areMergedPropsEqual: areMergedPropsEqual\n\t\n\t }, extraOptions));\n\t };\n\t}", "function createConnect() {\n\t var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t _ref$connectHOC = _ref.connectHOC,\n\t connectHOC = _ref$connectHOC === undefined ? _connectAdvanced2.default : _ref$connectHOC,\n\t _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n\t mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps2.default : _ref$mapStateToPropsF,\n\t _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n\t mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps2.default : _ref$mapDispatchToPro,\n\t _ref$mergePropsFactor = _ref.mergePropsFactories,\n\t mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps2.default : _ref$mergePropsFactor,\n\t _ref$selectorFactory = _ref.selectorFactory,\n\t selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory2.default : _ref$selectorFactory;\n\t\n\t return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n\t var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n\t _ref2$pure = _ref2.pure,\n\t pure = _ref2$pure === undefined ? true : _ref2$pure,\n\t _ref2$areStatesEqual = _ref2.areStatesEqual,\n\t areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n\t _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n\t areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _shallowEqual2.default : _ref2$areOwnPropsEqua,\n\t _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n\t areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _shallowEqual2.default : _ref2$areStatePropsEq,\n\t _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n\t areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _shallowEqual2.default : _ref2$areMergedPropsE,\n\t extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\t\n\t var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n\t var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n\t var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\t\n\t return connectHOC(selectorFactory, _extends({\n\t // used in error messages\n\t methodName: 'connect',\n\t\n\t // used to compute Connect's displayName from the wrapped component's displayName.\n\t getDisplayName: function getDisplayName(name) {\n\t return 'Connect(' + name + ')';\n\t },\n\t\n\t // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n\t shouldHandleStateChanges: Boolean(mapStateToProps),\n\t\n\t // passed through to selectorFactory\n\t initMapStateToProps: initMapStateToProps,\n\t initMapDispatchToProps: initMapDispatchToProps,\n\t initMergeProps: initMergeProps,\n\t pure: pure,\n\t areStatesEqual: areStatesEqual,\n\t areOwnPropsEqual: areOwnPropsEqual,\n\t areStatePropsEqual: areStatePropsEqual,\n\t areMergedPropsEqual: areMergedPropsEqual\n\t\n\t }, extraOptions));\n\t };\n\t}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_0__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_0__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_0__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_0__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_0__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_1__[\"default\"] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? connectAdvanced[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? connect_mapStateToProps : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? connect_mapDispatchToProps : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? connect_mergeProps[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? connect_selectorFactory[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? shallowEqual : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? shallowEqual : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? shallowEqual : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? _connectAdvanced2.default : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps2.default : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps2.default : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps2.default : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory2.default : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _shallowEqual2.default : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _shallowEqual2.default : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _shallowEqual2.default : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? _connectAdvanced2.default : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps2.default : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps2.default : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps2.default : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory2.default : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _shallowEqual2.default : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _shallowEqual2.default : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _shallowEqual2.default : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? _connectAdvanced2.default : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps2.default : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps2.default : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps2.default : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory2.default : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _shallowEqual2.default : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _shallowEqual2.default : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _shallowEqual2.default : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? _connectAdvanced2.default : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps2.default : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps2.default : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps2.default : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory2.default : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _shallowEqual2.default : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _shallowEqual2.default : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _shallowEqual2.default : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? _connectAdvanced2.default : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps2.default : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps2.default : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps2.default : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory2.default : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _shallowEqual2.default : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _shallowEqual2.default : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _shallowEqual2.default : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? _connectAdvanced2.default : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps2.default : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps2.default : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps2.default : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory2.default : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _shallowEqual2.default : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _shallowEqual2.default : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _shallowEqual2.default : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? _connectAdvanced2.default : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? _mapStateToProps2.default : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? _mapDispatchToProps2.default : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? _mergeProps2.default : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? _selectorFactory2.default : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? _shallowEqual2.default : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? _shallowEqual2.default : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? _shallowEqual2.default : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? __WEBPACK_IMPORTED_MODULE_0__components_connectAdvanced__[\"a\" /* default */] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === undefined ? __WEBPACK_IMPORTED_MODULE_3__mapStateToProps__[\"a\" /* default */] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === undefined ? __WEBPACK_IMPORTED_MODULE_2__mapDispatchToProps__[\"a\" /* default */] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === undefined ? __WEBPACK_IMPORTED_MODULE_4__mergeProps__[\"a\" /* default */] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === undefined ? __WEBPACK_IMPORTED_MODULE_5__selectorFactory__[\"a\" /* default */] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {\n var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n _ref2$pure = _ref2.pure,\n pure = _ref2$pure === undefined ? true : _ref2$pure,\n _ref2$areStatesEqual = _ref2.areStatesEqual,\n areStatesEqual = _ref2$areStatesEqual === undefined ? strictEqual : _ref2$areStatesEqual,\n _ref2$areOwnPropsEqua = _ref2.areOwnPropsEqual,\n areOwnPropsEqual = _ref2$areOwnPropsEqua === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areOwnPropsEqua,\n _ref2$areStatePropsEq = _ref2.areStatePropsEqual,\n areStatePropsEqual = _ref2$areStatePropsEq === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areStatePropsEq,\n _ref2$areMergedPropsE = _ref2.areMergedPropsEqual,\n areMergedPropsEqual = _ref2$areMergedPropsE === undefined ? __WEBPACK_IMPORTED_MODULE_1__utils_shallowEqual__[\"a\" /* default */] : _ref2$areMergedPropsE,\n extraOptions = _objectWithoutProperties(_ref2, ['pure', 'areStatesEqual', 'areOwnPropsEqual', 'areStatePropsEqual', 'areMergedPropsEqual']);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return 'Connect(' + name + ')';\n },\n\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n\t var _ref = _temp === void 0 ? {} : _temp,\n\t _ref$connectHOC = _ref.connectHOC,\n\t connectHOC = _ref$connectHOC === void 0 ? _connectAdvanced.default : _ref$connectHOC,\n\t _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n\t mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps.default : _ref$mapStateToPropsF,\n\t _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n\t mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps.default : _ref$mapDispatchToPro,\n\t _ref$mergePropsFactor = _ref.mergePropsFactories,\n\t mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps.default : _ref$mergePropsFactor,\n\t _ref$selectorFactory = _ref.selectorFactory,\n\t selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory.default : _ref$selectorFactory;\n\t\n\t return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n\t if (_ref2 === void 0) {\n\t _ref2 = {};\n\t }\n\t\n\t var _ref3 = _ref2,\n\t _ref3$pure = _ref3.pure,\n\t pure = _ref3$pure === void 0 ? true : _ref3$pure,\n\t _ref3$areStatesEqual = _ref3.areStatesEqual,\n\t areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n\t _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n\t areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _shallowEqual.default : _ref3$areOwnPropsEqua,\n\t _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n\t areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _shallowEqual.default : _ref3$areStatePropsEq,\n\t _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n\t areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _shallowEqual.default : _ref3$areMergedPropsE,\n\t extraOptions = (0, _objectWithoutPropertiesLoose2.default)(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\t var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n\t var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n\t var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n\t return connectHOC(selectorFactory, (0, _extends2.default)({\n\t // used in error messages\n\t methodName: 'connect',\n\t // used to compute Connect's displayName from the wrapped component's displayName.\n\t getDisplayName: function getDisplayName(name) {\n\t return \"Connect(\" + name + \")\";\n\t },\n\t // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n\t shouldHandleStateChanges: Boolean(mapStateToProps),\n\t // passed through to selectorFactory\n\t initMapStateToProps: initMapStateToProps,\n\t initMapDispatchToProps: initMapDispatchToProps,\n\t initMergeProps: initMergeProps,\n\t pure: pure,\n\t areStatesEqual: areStatesEqual,\n\t areOwnPropsEqual: areOwnPropsEqual,\n\t areStatePropsEqual: areStatePropsEqual,\n\t areMergedPropsEqual: areMergedPropsEqual\n\t }, extraOptions));\n\t };\n\t}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? connectAdvanced : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? mapStateToProps : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? mapDispatchToProps : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? mergeProps : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? finalPropsSelectorFactory : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? shallowEqual : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? shallowEqual : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? shallowEqual : _ref3$areMergedPropsE,\n extraOptions = _objectWithoutPropertiesLoose(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? connectAdvanced : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? defaultMapStateToPropsFactories : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? defaultMapDispatchToPropsFactories : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? defaultMergePropsFactories : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? finalPropsSelectorFactory : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? shallowEqual : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? shallowEqual : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? shallowEqual : _ref3$areMergedPropsE,\n extraOptions = _objectWithoutPropertiesLoose(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__.default : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__.default : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__.default : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__.default : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__.default : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__.default : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__.default : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__.default : _ref3$areMergedPropsE,\n extraOptions = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__.default)(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__.default)({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__.default : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__.default : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__.default : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__.default : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__.default : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__.default : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__.default : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__.default : _ref3$areMergedPropsE,\n extraOptions = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__.default)(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__.default)({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? connectAdvanced : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? connect_mapStateToProps : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? connect_mapDispatchToProps : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? connect_mergeProps : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? finalPropsSelectorFactory : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? shallowEqual : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? shallowEqual : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? shallowEqual : _ref3$areMergedPropsE,\n extraOptions = Object(objectWithoutPropertiesLoose[\"a\" /* default */])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(esm_extends[\"a\" /* default */])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? connectAdvanced : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? connect_mapStateToProps : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? connect_mapDispatchToProps : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? connect_mergeProps : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? finalPropsSelectorFactory : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? shallowEqual : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? shallowEqual : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? shallowEqual : _ref3$areMergedPropsE,\n extraOptions = _objectWithoutPropertiesLoose(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, _extends({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}", "function createConnect(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _ref$mapStateToPropsF,\n _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,\n mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__[\"default\"] : _ref$mapDispatchToPro,\n _ref$mergePropsFactor = _ref.mergePropsFactories,\n mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$mergePropsFactor,\n _ref$selectorFactory = _ref.selectorFactory,\n selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__[\"default\"] : _ref$selectorFactory;\n\n return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {\n if (_ref2 === void 0) {\n _ref2 = {};\n }\n\n var _ref3 = _ref2,\n _ref3$pure = _ref3.pure,\n pure = _ref3$pure === void 0 ? true : _ref3$pure,\n _ref3$areStatesEqual = _ref3.areStatesEqual,\n areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,\n _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,\n areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areOwnPropsEqua,\n _ref3$areStatePropsEq = _ref3.areStatePropsEqual,\n areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areStatePropsEq,\n _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,\n areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[\"default\"] : _ref3$areMergedPropsE,\n extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, [\"pure\", \"areStatesEqual\", \"areOwnPropsEqual\", \"areStatePropsEqual\", \"areMergedPropsEqual\"]);\n\n var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');\n var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');\n var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');\n return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // used in error messages\n methodName: 'connect',\n // used to compute Connect's displayName from the wrapped component's displayName.\n getDisplayName: function getDisplayName(name) {\n return \"Connect(\" + name + \")\";\n },\n // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes\n shouldHandleStateChanges: Boolean(mapStateToProps),\n // passed through to selectorFactory\n initMapStateToProps: initMapStateToProps,\n initMapDispatchToProps: initMapDispatchToProps,\n initMergeProps: initMergeProps,\n pure: pure,\n areStatesEqual: areStatesEqual,\n areOwnPropsEqual: areOwnPropsEqual,\n areStatePropsEqual: areStatePropsEqual,\n areMergedPropsEqual: areMergedPropsEqual\n }, extraOptions));\n };\n}" ]
[ "0.7502259", "0.7500511", "0.7419837", "0.7419837", "0.74169964", "0.7414397", "0.7373869", "0.7373869", "0.7373869", "0.7373869", "0.7373869", "0.7373869", "0.7373869", "0.7371583", "0.7371583", "0.7371583", "0.7371583", "0.73289824", "0.73289824", "0.73289824", "0.73289824", "0.73289824", "0.7261928", "0.72576016", "0.72576016", "0.72576016", "0.72576016", "0.72576016", "0.72576016", "0.72576016", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.72293305", "0.71901184", "0.7178148", "0.71550256", "0.7137161", "0.7137161", "0.71192956", "0.71192956", "0.71023345", "0.71023345", "0.71023345", "0.71023345", "0.71023345", "0.71023345", "0.71023345", "0.71023345", "0.71023345", "0.71023345", "0.71023345", "0.71023345", "0.71023345", "0.71023345", "0.71023345", "0.71023345", "0.71023345", "0.71023345", "0.71023345", "0.71023345", "0.71023345", "0.71023345", "0.71023345" ]
0.0
-1
different options opens up some testing and extensibility scenarios
function createConnect(_temp) { var _ref = _temp === void 0 ? {} : _temp, _ref$connectHOC = _ref.connectHOC, connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__["default"] : _ref$connectHOC, _ref$mapStateToPropsF = _ref.mapStateToPropsFactories, mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__["default"] : _ref$mapStateToPropsF, _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories, mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__["default"] : _ref$mapDispatchToPro, _ref$mergePropsFactor = _ref.mergePropsFactories, mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__["default"] : _ref$mergePropsFactor, _ref$selectorFactory = _ref.selectorFactory, selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__["default"] : _ref$selectorFactory; return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) { if (_ref2 === void 0) { _ref2 = {}; } var _ref3 = _ref2, _ref3$pure = _ref3.pure, pure = _ref3$pure === void 0 ? true : _ref3$pure, _ref3$areStatesEqual = _ref3.areStatesEqual, areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual, _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual, areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__["default"] : _ref3$areOwnPropsEqua, _ref3$areStatePropsEq = _ref3.areStatePropsEqual, areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__["default"] : _ref3$areStatePropsEq, _ref3$areMergedPropsE = _ref3.areMergedPropsEqual, areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__["default"] : _ref3$areMergedPropsE, extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__["default"])(_ref3, ["pure", "areStatesEqual", "areOwnPropsEqual", "areStatePropsEqual", "areMergedPropsEqual"]); var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps'); var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps'); var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps'); return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ // used in error messages methodName: 'connect', // used to compute Connect's displayName from the wrapped component's displayName. getDisplayName: function getDisplayName(name) { return "Connect(" + name + ")"; }, // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes shouldHandleStateChanges: Boolean(mapStateToProps), // passed through to selectorFactory initMapStateToProps: initMapStateToProps, initMapDispatchToProps: initMapDispatchToProps, initMergeProps: initMergeProps, pure: pure, areStatesEqual: areStatesEqual, areOwnPropsEqual: areOwnPropsEqual, areStatePropsEqual: areStatePropsEqual, areMergedPropsEqual: areMergedPropsEqual }, extraOptions)); }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function testOptions ( options ) {\n\n\t\t// To prove a fix for #537, freeze options here.\n\t\t// If the object is modified, an error will be thrown.\n\t\t// Object.freeze(options);\n\n\t\tvar parsed = {\n\t\t\tmargin: 0,\n\t\t\tlimit: 0,\n\t\t\tpadding: 0,\n\t\t\tanimate: true,\n\t\t\tanimationDuration: 300,\n\t\t\tariaFormat: defaultFormatter,\n\t\t\tformat: defaultFormatter\n\t\t};\n\n\t\t// Tests are executed in the order they are presented here.\n\t\tvar tests = {\n\t\t\t'step': { r: false, t: testStep },\n\t\t\t'start': { r: true, t: testStart },\n\t\t\t'connect': { r: true, t: testConnect },\n\t\t\t'direction': { r: true, t: testDirection },\n\t\t\t'snap': { r: false, t: testSnap },\n\t\t\t'animate': { r: false, t: testAnimate },\n\t\t\t'animationDuration': { r: false, t: testAnimationDuration },\n\t\t\t'range': { r: true, t: testRange },\n\t\t\t'orientation': { r: false, t: testOrientation },\n\t\t\t'margin': { r: false, t: testMargin },\n\t\t\t'limit': { r: false, t: testLimit },\n\t\t\t'padding': { r: false, t: testPadding },\n\t\t\t'behaviour': { r: true, t: testBehaviour },\n\t\t\t'ariaFormat': { r: false, t: testAriaFormat },\n\t\t\t'format': { r: false, t: testFormat },\n\t\t\t'tooltips': { r: false, t: testTooltips },\n\t\t\t'cssPrefix': { r: false, t: testCssPrefix },\n\t\t\t'cssClasses': { r: false, t: testCssClasses }\n\t\t};\n\n\t\tvar defaults = {\n\t\t\t'connect': false,\n\t\t\t'direction': 'ltr',\n\t\t\t'behaviour': 'tap',\n\t\t\t'orientation': 'horizontal',\n\t\t\t'cssPrefix' : 'noUi-',\n\t\t\t'cssClasses': {\n\t\t\t\ttarget: 'target',\n\t\t\t\tbase: 'base',\n\t\t\t\torigin: 'origin',\n\t\t\t\thandle: 'handle',\n\t\t\t\thandleLower: 'handle-lower',\n\t\t\t\thandleUpper: 'handle-upper',\n\t\t\t\thorizontal: 'horizontal',\n\t\t\t\tvertical: 'vertical',\n\t\t\t\tbackground: 'background',\n\t\t\t\tconnect: 'connect',\n\t\t\t\tconnects: 'connects',\n\t\t\t\tltr: 'ltr',\n\t\t\t\trtl: 'rtl',\n\t\t\t\tdraggable: 'draggable',\n\t\t\t\tdrag: 'state-drag',\n\t\t\t\ttap: 'state-tap',\n\t\t\t\tactive: 'active',\n\t\t\t\ttooltip: 'tooltip',\n\t\t\t\tpips: 'pips',\n\t\t\t\tpipsHorizontal: 'pips-horizontal',\n\t\t\t\tpipsVertical: 'pips-vertical',\n\t\t\t\tmarker: 'marker',\n\t\t\t\tmarkerHorizontal: 'marker-horizontal',\n\t\t\t\tmarkerVertical: 'marker-vertical',\n\t\t\t\tmarkerNormal: 'marker-normal',\n\t\t\t\tmarkerLarge: 'marker-large',\n\t\t\t\tmarkerSub: 'marker-sub',\n\t\t\t\tvalue: 'value',\n\t\t\t\tvalueHorizontal: 'value-horizontal',\n\t\t\t\tvalueVertical: 'value-vertical',\n\t\t\t\tvalueNormal: 'value-normal',\n\t\t\t\tvalueLarge: 'value-large',\n\t\t\t\tvalueSub: 'value-sub'\n\t\t\t}\n\t\t};\n\n\t\t// AriaFormat defaults to regular format, if any.\n\t\tif ( options.format && !options.ariaFormat ) {\n\t\t\toptions.ariaFormat = options.format;\n\t\t}\n\n\t\t// Run all options through a testing mechanism to ensure correct\n\t\t// input. It should be noted that options might get modified to\n\t\t// be handled properly. E.g. wrapping integers in arrays.\n\t\tObject.keys(tests).forEach(function( name ){\n\n\t\t\t// If the option isn't set, but it is required, throw an error.\n\t\t\tif ( options[name] === undefined && defaults[name] === undefined ) {\n\n\t\t\t\tif ( tests[name].r ) {\n\t\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): '\" + name + \"' is required.\");\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\ttests[name].t( parsed, options[name] === undefined ? defaults[name] : options[name] );\n\t\t});\n\n\t\t// Forward pips options\n\t\tparsed.pips = options.pips;\n\n\t\t// All recent browsers accept unprefixed transform.\n\t\t// We need -ms- for IE9 and -webkit- for older Android;\n\t\t// Assume use of -webkit- if unprefixed and -ms- are not supported.\n\t\t// https://caniuse.com/#feat=transforms2d\n\t\tvar d = document.createElement(\"div\");\n\t\tvar msPrefix = d.style.msTransform !== undefined;\n\t\tvar noPrefix = d.style.transform !== undefined;\n\n\t\tparsed.transformRule = noPrefix ? 'transform' : (msPrefix ? 'msTransform' : 'webkitTransform');\n\n\t\t// Pips don't move, so we can place them using left/top.\n\t\tvar styles = [['left', 'top'], ['right', 'bottom']];\n\n\t\tparsed.style = styles[parsed.dir][parsed.ort];\n\n\t\treturn parsed;\n\t}", "function testOptions ( options ) {\n\n\t\t// To prove a fix for #537, freeze options here.\n\t\t// If the object is modified, an error will be thrown.\n\t\t// Object.freeze(options);\n\n\t\tvar parsed = {\n\t\t\tmargin: 0,\n\t\t\tlimit: 0,\n\t\t\tpadding: 0,\n\t\t\tanimate: true,\n\t\t\tanimationDuration: 300,\n\t\t\tariaFormat: defaultFormatter,\n\t\t\tformat: defaultFormatter\n\t\t};\n\n\t\t// Tests are executed in the order they are presented here.\n\t\tvar tests = {\n\t\t\t'step': { r: false, t: testStep },\n\t\t\t'start': { r: true, t: testStart },\n\t\t\t'connect': { r: true, t: testConnect },\n\t\t\t'direction': { r: true, t: testDirection },\n\t\t\t'snap': { r: false, t: testSnap },\n\t\t\t'animate': { r: false, t: testAnimate },\n\t\t\t'animationDuration': { r: false, t: testAnimationDuration },\n\t\t\t'range': { r: true, t: testRange },\n\t\t\t'orientation': { r: false, t: testOrientation },\n\t\t\t'margin': { r: false, t: testMargin },\n\t\t\t'limit': { r: false, t: testLimit },\n\t\t\t'padding': { r: false, t: testPadding },\n\t\t\t'behaviour': { r: true, t: testBehaviour },\n\t\t\t'ariaFormat': { r: false, t: testAriaFormat },\n\t\t\t'format': { r: false, t: testFormat },\n\t\t\t'tooltips': { r: false, t: testTooltips },\n\t\t\t'cssPrefix': { r: true, t: testCssPrefix },\n\t\t\t'cssClasses': { r: true, t: testCssClasses }\n\t\t};\n\n\t\tvar defaults = {\n\t\t\t'connect': false,\n\t\t\t'direction': 'ltr',\n\t\t\t'behaviour': 'tap',\n\t\t\t'orientation': 'horizontal',\n\t\t\t'cssPrefix' : 'noUi-',\n\t\t\t'cssClasses': {\n\t\t\t\ttarget: 'target',\n\t\t\t\tbase: 'base',\n\t\t\t\torigin: 'origin',\n\t\t\t\thandle: 'handle',\n\t\t\t\thandleLower: 'handle-lower',\n\t\t\t\thandleUpper: 'handle-upper',\n\t\t\t\thorizontal: 'horizontal',\n\t\t\t\tvertical: 'vertical',\n\t\t\t\tbackground: 'background',\n\t\t\t\tconnect: 'connect',\n\t\t\t\tconnects: 'connects',\n\t\t\t\tltr: 'ltr',\n\t\t\t\trtl: 'rtl',\n\t\t\t\tdraggable: 'draggable',\n\t\t\t\tdrag: 'state-drag',\n\t\t\t\ttap: 'state-tap',\n\t\t\t\tactive: 'active',\n\t\t\t\ttooltip: 'tooltip',\n\t\t\t\tpips: 'pips',\n\t\t\t\tpipsHorizontal: 'pips-horizontal',\n\t\t\t\tpipsVertical: 'pips-vertical',\n\t\t\t\tmarker: 'marker',\n\t\t\t\tmarkerHorizontal: 'marker-horizontal',\n\t\t\t\tmarkerVertical: 'marker-vertical',\n\t\t\t\tmarkerNormal: 'marker-normal',\n\t\t\t\tmarkerLarge: 'marker-large',\n\t\t\t\tmarkerSub: 'marker-sub',\n\t\t\t\tvalue: 'value',\n\t\t\t\tvalueHorizontal: 'value-horizontal',\n\t\t\t\tvalueVertical: 'value-vertical',\n\t\t\t\tvalueNormal: 'value-normal',\n\t\t\t\tvalueLarge: 'value-large',\n\t\t\t\tvalueSub: 'value-sub'\n\t\t\t}\n\t\t};\n\n\t\t// AriaFormat defaults to regular format, if any.\n\t\tif ( options.format && !options.ariaFormat ) {\n\t\t\toptions.ariaFormat = options.format;\n\t\t}\n\n\t\t// Run all options through a testing mechanism to ensure correct\n\t\t// input. It should be noted that options might get modified to\n\t\t// be handled properly. E.g. wrapping integers in arrays.\n\t\tObject.keys(tests).forEach(function( name ){\n\n\t\t\t// If the option isn't set, but it is required, throw an error.\n\t\t\tif ( !isSet(options[name]) && defaults[name] === undefined ) {\n\n\t\t\t\tif ( tests[name].r ) {\n\t\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): '\" + name + \"' is required.\");\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\ttests[name].t( parsed, !isSet(options[name]) ? defaults[name] : options[name] );\n\t\t});\n\n\t\t// Forward pips options\n\t\tparsed.pips = options.pips;\n\n\t\t// All recent browsers accept unprefixed transform.\n\t\t// We need -ms- for IE9 and -webkit- for older Android;\n\t\t// Assume use of -webkit- if unprefixed and -ms- are not supported.\n\t\t// https://caniuse.com/#feat=transforms2d\n\t\tvar d = document.createElement(\"div\");\n\t\tvar msPrefix = d.style.msTransform !== undefined;\n\t\tvar noPrefix = d.style.transform !== undefined;\n\n\t\tparsed.transformRule = noPrefix ? 'transform' : (msPrefix ? 'msTransform' : 'webkitTransform');\n\n\t\t// Pips don't move, so we can place them using left/top.\n\t\tvar styles = [['left', 'top'], ['right', 'bottom']];\n\n\t\tparsed.style = styles[parsed.dir][parsed.ort];\n\n\t\treturn parsed;\n\t}", "function testOptions ( options ) {\n\n\t\t// To prove a fix for #537, freeze options here.\n\t\t// If the object is modified, an error will be thrown.\n\t\t// Object.freeze(options);\n\n\t\tvar parsed = {\n\t\t\tmargin: 0,\n\t\t\tlimit: 0,\n\t\t\tpadding: 0,\n\t\t\tanimate: true,\n\t\t\tanimationDuration: 300,\n\t\t\tariaFormat: defaultFormatter,\n\t\t\tformat: defaultFormatter\n\t\t};\n\n\t\t// Tests are executed in the order they are presented here.\n\t\tvar tests = {\n\t\t\t'step': { r: false, t: testStep },\n\t\t\t'start': { r: true, t: testStart },\n\t\t\t'connect': { r: true, t: testConnect },\n\t\t\t'direction': { r: true, t: testDirection },\n\t\t\t'snap': { r: false, t: testSnap },\n\t\t\t'animate': { r: false, t: testAnimate },\n\t\t\t'animationDuration': { r: false, t: testAnimationDuration },\n\t\t\t'range': { r: true, t: testRange },\n\t\t\t'orientation': { r: false, t: testOrientation },\n\t\t\t'margin': { r: false, t: testMargin },\n\t\t\t'limit': { r: false, t: testLimit },\n\t\t\t'padding': { r: false, t: testPadding },\n\t\t\t'behaviour': { r: true, t: testBehaviour },\n\t\t\t'ariaFormat': { r: false, t: testAriaFormat },\n\t\t\t'format': { r: false, t: testFormat },\n\t\t\t'tooltips': { r: false, t: testTooltips },\n\t\t\t'cssPrefix': { r: true, t: testCssPrefix },\n\t\t\t'cssClasses': { r: true, t: testCssClasses }\n\t\t};\n\n\t\tvar defaults = {\n\t\t\t'connect': false,\n\t\t\t'direction': 'ltr',\n\t\t\t'behaviour': 'tap',\n\t\t\t'orientation': 'horizontal',\n\t\t\t'cssPrefix' : 'noUi-',\n\t\t\t'cssClasses': {\n\t\t\t\ttarget: 'target',\n\t\t\t\tbase: 'base',\n\t\t\t\torigin: 'origin',\n\t\t\t\thandle: 'handle',\n\t\t\t\thandleLower: 'handle-lower',\n\t\t\t\thandleUpper: 'handle-upper',\n\t\t\t\thorizontal: 'horizontal',\n\t\t\t\tvertical: 'vertical',\n\t\t\t\tbackground: 'background',\n\t\t\t\tconnect: 'connect',\n\t\t\t\tconnects: 'connects',\n\t\t\t\tltr: 'ltr',\n\t\t\t\trtl: 'rtl',\n\t\t\t\tdraggable: 'draggable',\n\t\t\t\tdrag: 'state-drag',\n\t\t\t\ttap: 'state-tap',\n\t\t\t\tactive: 'active',\n\t\t\t\ttooltip: 'tooltip',\n\t\t\t\tpips: 'pips',\n\t\t\t\tpipsHorizontal: 'pips-horizontal',\n\t\t\t\tpipsVertical: 'pips-vertical',\n\t\t\t\tmarker: 'marker',\n\t\t\t\tmarkerHorizontal: 'marker-horizontal',\n\t\t\t\tmarkerVertical: 'marker-vertical',\n\t\t\t\tmarkerNormal: 'marker-normal',\n\t\t\t\tmarkerLarge: 'marker-large',\n\t\t\t\tmarkerSub: 'marker-sub',\n\t\t\t\tvalue: 'value',\n\t\t\t\tvalueHorizontal: 'value-horizontal',\n\t\t\t\tvalueVertical: 'value-vertical',\n\t\t\t\tvalueNormal: 'value-normal',\n\t\t\t\tvalueLarge: 'value-large',\n\t\t\t\tvalueSub: 'value-sub'\n\t\t\t}\n\t\t};\n\n\t\t// AriaFormat defaults to regular format, if any.\n\t\tif ( options.format && !options.ariaFormat ) {\n\t\t\toptions.ariaFormat = options.format;\n\t\t}\n\n\t\t// Run all options through a testing mechanism to ensure correct\n\t\t// input. It should be noted that options might get modified to\n\t\t// be handled properly. E.g. wrapping integers in arrays.\n\t\tObject.keys(tests).forEach(function( name ){\n\n\t\t\t// If the option isn't set, but it is required, throw an error.\n\t\t\tif ( !isSet(options[name]) && defaults[name] === undefined ) {\n\n\t\t\t\tif ( tests[name].r ) {\n\t\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): '\" + name + \"' is required.\");\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\ttests[name].t( parsed, !isSet(options[name]) ? defaults[name] : options[name] );\n\t\t});\n\n\t\t// Forward pips options\n\t\tparsed.pips = options.pips;\n\n\t\t// All recent browsers accept unprefixed transform.\n\t\t// We need -ms- for IE9 and -webkit- for older Android;\n\t\t// Assume use of -webkit- if unprefixed and -ms- are not supported.\n\t\t// https://caniuse.com/#feat=transforms2d\n\t\tvar d = document.createElement(\"div\");\n\t\tvar msPrefix = d.style.msTransform !== undefined;\n\t\tvar noPrefix = d.style.transform !== undefined;\n\n\t\tparsed.transformRule = noPrefix ? 'transform' : (msPrefix ? 'msTransform' : 'webkitTransform');\n\n\t\t// Pips don't move, so we can place them using left/top.\n\t\tvar styles = [['left', 'top'], ['right', 'bottom']];\n\n\t\tparsed.style = styles[parsed.dir][parsed.ort];\n\n\t\treturn parsed;\n\t}", "function testOptions ( options ) {\n\t\n\t\t\t// To prove a fix for #537, freeze options here.\n\t\t\t// If the object is modified, an error will be thrown.\n\t\t\t// Object.freeze(options);\n\t\n\t\t\tvar parsed = {\n\t\t\t\tmargin: 0,\n\t\t\t\tlimit: 0,\n\t\t\t\tanimate: true,\n\t\t\t\tformat: defaultFormatter\n\t\t\t}, tests;\n\t\n\t\t\t// Tests are executed in the order they are presented here.\n\t\t\ttests = {\n\t\t\t\t'step': { r: false, t: testStep },\n\t\t\t\t'start': { r: true, t: testStart },\n\t\t\t\t'connect': { r: true, t: testConnect },\n\t\t\t\t'direction': { r: true, t: testDirection },\n\t\t\t\t'snap': { r: false, t: testSnap },\n\t\t\t\t'animate': { r: false, t: testAnimate },\n\t\t\t\t'range': { r: true, t: testRange },\n\t\t\t\t'orientation': { r: false, t: testOrientation },\n\t\t\t\t'margin': { r: false, t: testMargin },\n\t\t\t\t'limit': { r: false, t: testLimit },\n\t\t\t\t'behaviour': { r: true, t: testBehaviour },\n\t\t\t\t'format': { r: false, t: testFormat },\n\t\t\t\t'tooltips': { r: false, t: testTooltips },\n\t\t\t\t'cssPrefix': { r: false, t: testCssPrefix }\n\t\t\t};\n\t\n\t\t\tvar defaults = {\n\t\t\t\t'connect': false,\n\t\t\t\t'direction': 'ltr',\n\t\t\t\t'behaviour': 'tap',\n\t\t\t\t'orientation': 'horizontal'\n\t\t\t};\n\t\n\t\t\t// Run all options through a testing mechanism to ensure correct\n\t\t\t// input. It should be noted that options might get modified to\n\t\t\t// be handled properly. E.g. wrapping integers in arrays.\n\t\t\tObject.keys(tests).forEach(function( name ){\n\t\n\t\t\t\t// If the option isn't set, but it is required, throw an error.\n\t\t\t\tif ( options[name] === undefined && defaults[name] === undefined ) {\n\t\n\t\t\t\t\tif ( tests[name].r ) {\n\t\t\t\t\t\tthrow new Error(\"noUiSlider: '\" + name + \"' is required.\");\n\t\t\t\t\t}\n\t\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\n\t\t\t\ttests[name].t( parsed, options[name] === undefined ? defaults[name] : options[name] );\n\t\t\t});\n\t\n\t\t\t// Forward pips options\n\t\t\tparsed.pips = options.pips;\n\t\n\t\t\t// Pre-define the styles.\n\t\t\tparsed.style = parsed.ort ? 'top' : 'left';\n\t\n\t\t\treturn parsed;\n\t\t}", "function testOptions ( options ) {\n\n\t\t// To prove a fix for #537, freeze options here.\n\t\t// If the object is modified, an error will be thrown.\n\t\t// Object.freeze(options);\n\n\t\tvar parsed = {\n\t\t\tmargin: 0,\n\t\t\tlimit: 0,\n\t\t\tpadding: 0,\n\t\t\tanimate: true,\n\t\t\tanimationDuration: 300,\n\t\t\tariaFormat: defaultFormatter,\n\t\t\tformat: defaultFormatter\n\t\t};\n\n\t\t// Tests are executed in the order they are presented here.\n\t\tvar tests = {\n\t\t\t'step': { r: false, t: testStep },\n\t\t\t'start': { r: true, t: testStart },\n\t\t\t'connect': { r: true, t: testConnect },\n\t\t\t'direction': { r: true, t: testDirection },\n\t\t\t'snap': { r: false, t: testSnap },\n\t\t\t'animate': { r: false, t: testAnimate },\n\t\t\t'animationDuration': { r: false, t: testAnimationDuration },\n\t\t\t'range': { r: true, t: testRange },\n\t\t\t'orientation': { r: false, t: testOrientation },\n\t\t\t'margin': { r: false, t: testMargin },\n\t\t\t'limit': { r: false, t: testLimit },\n\t\t\t'padding': { r: false, t: testPadding },\n\t\t\t'behaviour': { r: true, t: testBehaviour },\n\t\t\t'multitouch': { r: true, t: testMultitouch },\n\t\t\t'ariaFormat': { r: false, t: testAriaFormat },\n\t\t\t'format': { r: false, t: testFormat },\n\t\t\t'tooltips': { r: false, t: testTooltips },\n\t\t\t'cssPrefix': { r: false, t: testCssPrefix },\n\t\t\t'cssClasses': { r: false, t: testCssClasses },\n\t\t\t'useRequestAnimationFrame': { r: false, t: testUseRaf }\n\t\t};\n\n\t\tvar defaults = {\n\t\t\t'connect': false,\n\t\t\t'direction': 'ltr',\n\t\t\t'behaviour': 'tap',\n\t\t\t'multitouch': false,\n\t\t\t'orientation': 'horizontal',\n\t\t\t'cssPrefix' : 'noUi-',\n\t\t\t'cssClasses': {\n\t\t\t\ttarget: 'target',\n\t\t\t\tbase: 'base',\n\t\t\t\torigin: 'origin',\n\t\t\t\thandle: 'handle',\n\t\t\t\thandleLower: 'handle-lower',\n\t\t\t\thandleUpper: 'handle-upper',\n\t\t\t\thorizontal: 'horizontal',\n\t\t\t\tvertical: 'vertical',\n\t\t\t\tbackground: 'background',\n\t\t\t\tconnect: 'connect',\n\t\t\t\tltr: 'ltr',\n\t\t\t\trtl: 'rtl',\n\t\t\t\tdraggable: 'draggable',\n\t\t\t\tdrag: 'state-drag',\n\t\t\t\ttap: 'state-tap',\n\t\t\t\tactive: 'active',\n\t\t\t\ttooltip: 'tooltip',\n\t\t\t\tpips: 'pips',\n\t\t\t\tpipsHorizontal: 'pips-horizontal',\n\t\t\t\tpipsVertical: 'pips-vertical',\n\t\t\t\tmarker: 'marker',\n\t\t\t\tmarkerHorizontal: 'marker-horizontal',\n\t\t\t\tmarkerVertical: 'marker-vertical',\n\t\t\t\tmarkerNormal: 'marker-normal',\n\t\t\t\tmarkerLarge: 'marker-large',\n\t\t\t\tmarkerSub: 'marker-sub',\n\t\t\t\tvalue: 'value',\n\t\t\t\tvalueHorizontal: 'value-horizontal',\n\t\t\t\tvalueVertical: 'value-vertical',\n\t\t\t\tvalueNormal: 'value-normal',\n\t\t\t\tvalueLarge: 'value-large',\n\t\t\t\tvalueSub: 'value-sub'\n\t\t\t},\n\t\t\t'useRequestAnimationFrame': true\n\t\t};\n\n\t\t// AriaFormat defaults to regular format, if any.\n\t\tif ( options.format && !options.ariaFormat ) {\n\t\t\toptions.ariaFormat = options.format;\n\t\t}\n\n\t\t// Run all options through a testing mechanism to ensure correct\n\t\t// input. It should be noted that options might get modified to\n\t\t// be handled properly. E.g. wrapping integers in arrays.\n\t\tObject.keys(tests).forEach(function( name ){\n\n\t\t\t// If the option isn't set, but it is required, throw an error.\n\t\t\tif ( options[name] === undefined && defaults[name] === undefined ) {\n\n\t\t\t\tif ( tests[name].r ) {\n\t\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): '\" + name + \"' is required.\");\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\ttests[name].t( parsed, options[name] === undefined ? defaults[name] : options[name] );\n\t\t});\n\n\t\t// Forward pips options\n\t\tparsed.pips = options.pips;\n\n\t\tvar styles = [['left', 'top'], ['right', 'bottom']];\n\n\t\t// Pre-define the styles.\n\t\tparsed.style = styles[parsed.dir][parsed.ort];\n\t\tparsed.styleOposite = styles[parsed.dir?0:1][parsed.ort];\n\n\t\treturn parsed;\n\t}", "function testOptions ( options ) {\n\n\t\t// To prove a fix for #537, freeze options here.\n\t\t// If the object is modified, an error will be thrown.\n\t\t// Object.freeze(options);\n\n\t\tvar parsed = {\n\t\t\tmargin: 0,\n\t\t\tlimit: 0,\n\t\t\tpadding: 0,\n\t\t\tanimate: true,\n\t\t\tanimationDuration: 300,\n\t\t\tariaFormat: defaultFormatter,\n\t\t\tformat: defaultFormatter\n\t\t};\n\n\t\t// Tests are executed in the order they are presented here.\n\t\tvar tests = {\n\t\t\t'step': { r: false, t: testStep },\n\t\t\t'start': { r: true, t: testStart },\n\t\t\t'connect': { r: true, t: testConnect },\n\t\t\t'direction': { r: true, t: testDirection },\n\t\t\t'snap': { r: false, t: testSnap },\n\t\t\t'animate': { r: false, t: testAnimate },\n\t\t\t'animationDuration': { r: false, t: testAnimationDuration },\n\t\t\t'range': { r: true, t: testRange },\n\t\t\t'orientation': { r: false, t: testOrientation },\n\t\t\t'margin': { r: false, t: testMargin },\n\t\t\t'limit': { r: false, t: testLimit },\n\t\t\t'padding': { r: false, t: testPadding },\n\t\t\t'behaviour': { r: true, t: testBehaviour },\n\t\t\t'multitouch': { r: true, t: testMultitouch },\n\t\t\t'ariaFormat': { r: false, t: testAriaFormat },\n\t\t\t'format': { r: false, t: testFormat },\n\t\t\t'tooltips': { r: false, t: testTooltips },\n\t\t\t'cssPrefix': { r: false, t: testCssPrefix },\n\t\t\t'cssClasses': { r: false, t: testCssClasses },\n\t\t\t'useRequestAnimationFrame': { r: false, t: testUseRaf }\n\t\t};\n\n\t\tvar defaults = {\n\t\t\t'connect': false,\n\t\t\t'direction': 'ltr',\n\t\t\t'behaviour': 'tap',\n\t\t\t'multitouch': false,\n\t\t\t'orientation': 'horizontal',\n\t\t\t'cssPrefix' : 'noUi-',\n\t\t\t'cssClasses': {\n\t\t\t\ttarget: 'target',\n\t\t\t\tbase: 'base',\n\t\t\t\torigin: 'origin',\n\t\t\t\thandle: 'handle',\n\t\t\t\thandleLower: 'handle-lower',\n\t\t\t\thandleUpper: 'handle-upper',\n\t\t\t\thorizontal: 'horizontal',\n\t\t\t\tvertical: 'vertical',\n\t\t\t\tbackground: 'background',\n\t\t\t\tconnect: 'connect',\n\t\t\t\tltr: 'ltr',\n\t\t\t\trtl: 'rtl',\n\t\t\t\tdraggable: 'draggable',\n\t\t\t\tdrag: 'state-drag',\n\t\t\t\ttap: 'state-tap',\n\t\t\t\tactive: 'active',\n\t\t\t\ttooltip: 'tooltip',\n\t\t\t\tpips: 'pips',\n\t\t\t\tpipsHorizontal: 'pips-horizontal',\n\t\t\t\tpipsVertical: 'pips-vertical',\n\t\t\t\tmarker: 'marker',\n\t\t\t\tmarkerHorizontal: 'marker-horizontal',\n\t\t\t\tmarkerVertical: 'marker-vertical',\n\t\t\t\tmarkerNormal: 'marker-normal',\n\t\t\t\tmarkerLarge: 'marker-large',\n\t\t\t\tmarkerSub: 'marker-sub',\n\t\t\t\tvalue: 'value',\n\t\t\t\tvalueHorizontal: 'value-horizontal',\n\t\t\t\tvalueVertical: 'value-vertical',\n\t\t\t\tvalueNormal: 'value-normal',\n\t\t\t\tvalueLarge: 'value-large',\n\t\t\t\tvalueSub: 'value-sub'\n\t\t\t},\n\t\t\t'useRequestAnimationFrame': true\n\t\t};\n\n\t\t// AriaFormat defaults to regular format, if any.\n\t\tif ( options.format && !options.ariaFormat ) {\n\t\t\toptions.ariaFormat = options.format;\n\t\t}\n\n\t\t// Run all options through a testing mechanism to ensure correct\n\t\t// input. It should be noted that options might get modified to\n\t\t// be handled properly. E.g. wrapping integers in arrays.\n\t\tObject.keys(tests).forEach(function( name ){\n\n\t\t\t// If the option isn't set, but it is required, throw an error.\n\t\t\tif ( options[name] === undefined && defaults[name] === undefined ) {\n\n\t\t\t\tif ( tests[name].r ) {\n\t\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): '\" + name + \"' is required.\");\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\ttests[name].t( parsed, options[name] === undefined ? defaults[name] : options[name] );\n\t\t});\n\n\t\t// Forward pips options\n\t\tparsed.pips = options.pips;\n\n\t\tvar styles = [['left', 'top'], ['right', 'bottom']];\n\n\t\t// Pre-define the styles.\n\t\tparsed.style = styles[parsed.dir][parsed.ort];\n\t\tparsed.styleOposite = styles[parsed.dir?0:1][parsed.ort];\n\n\t\treturn parsed;\n\t}", "function testOptions ( options ) {\n\n\t\t// To prove a fix for #537, freeze options here.\n\t\t// If the object is modified, an error will be thrown.\n\t\t// Object.freeze(options);\n\n\t\tvar parsed = {\n\t\t\tmargin: 0,\n\t\t\tlimit: 0,\n\t\t\tpadding: 0,\n\t\t\tanimate: true,\n\t\t\tanimationDuration: 300,\n\t\t\tariaFormat: defaultFormatter,\n\t\t\tformat: defaultFormatter\n\t\t};\n\n\t\t// Tests are executed in the order they are presented here.\n\t\tvar tests = {\n\t\t\t'step': { r: false, t: testStep },\n\t\t\t'start': { r: true, t: testStart },\n\t\t\t'connect': { r: true, t: testConnect },\n\t\t\t'direction': { r: true, t: testDirection },\n\t\t\t'snap': { r: false, t: testSnap },\n\t\t\t'animate': { r: false, t: testAnimate },\n\t\t\t'animationDuration': { r: false, t: testAnimationDuration },\n\t\t\t'range': { r: true, t: testRange },\n\t\t\t'orientation': { r: false, t: testOrientation },\n\t\t\t'margin': { r: false, t: testMargin },\n\t\t\t'limit': { r: false, t: testLimit },\n\t\t\t'padding': { r: false, t: testPadding },\n\t\t\t'behaviour': { r: true, t: testBehaviour },\n\t\t\t'multitouch': { r: true, t: testMultitouch },\n\t\t\t'ariaFormat': { r: false, t: testAriaFormat },\n\t\t\t'format': { r: false, t: testFormat },\n\t\t\t'tooltips': { r: false, t: testTooltips },\n\t\t\t'cssPrefix': { r: false, t: testCssPrefix },\n\t\t\t'cssClasses': { r: false, t: testCssClasses },\n\t\t\t'useRequestAnimationFrame': { r: false, t: testUseRaf }\n\t\t};\n\n\t\tvar defaults = {\n\t\t\t'connect': false,\n\t\t\t'direction': 'ltr',\n\t\t\t'behaviour': 'tap',\n\t\t\t'multitouch': false,\n\t\t\t'orientation': 'horizontal',\n\t\t\t'cssPrefix' : 'noUi-',\n\t\t\t'cssClasses': {\n\t\t\t\ttarget: 'target',\n\t\t\t\tbase: 'base',\n\t\t\t\torigin: 'origin',\n\t\t\t\thandle: 'handle',\n\t\t\t\thandleLower: 'handle-lower',\n\t\t\t\thandleUpper: 'handle-upper',\n\t\t\t\thorizontal: 'horizontal',\n\t\t\t\tvertical: 'vertical',\n\t\t\t\tbackground: 'background',\n\t\t\t\tconnect: 'connect',\n\t\t\t\tltr: 'ltr',\n\t\t\t\trtl: 'rtl',\n\t\t\t\tdraggable: 'draggable',\n\t\t\t\tdrag: 'state-drag',\n\t\t\t\ttap: 'state-tap',\n\t\t\t\tactive: 'active',\n\t\t\t\ttooltip: 'tooltip',\n\t\t\t\tpips: 'pips',\n\t\t\t\tpipsHorizontal: 'pips-horizontal',\n\t\t\t\tpipsVertical: 'pips-vertical',\n\t\t\t\tmarker: 'marker',\n\t\t\t\tmarkerHorizontal: 'marker-horizontal',\n\t\t\t\tmarkerVertical: 'marker-vertical',\n\t\t\t\tmarkerNormal: 'marker-normal',\n\t\t\t\tmarkerLarge: 'marker-large',\n\t\t\t\tmarkerSub: 'marker-sub',\n\t\t\t\tvalue: 'value',\n\t\t\t\tvalueHorizontal: 'value-horizontal',\n\t\t\t\tvalueVertical: 'value-vertical',\n\t\t\t\tvalueNormal: 'value-normal',\n\t\t\t\tvalueLarge: 'value-large',\n\t\t\t\tvalueSub: 'value-sub'\n\t\t\t},\n\t\t\t'useRequestAnimationFrame': true\n\t\t};\n\n\t\t// AriaFormat defaults to regular format, if any.\n\t\tif ( options.format && !options.ariaFormat ) {\n\t\t\toptions.ariaFormat = options.format;\n\t\t}\n\n\t\t// Run all options through a testing mechanism to ensure correct\n\t\t// input. It should be noted that options might get modified to\n\t\t// be handled properly. E.g. wrapping integers in arrays.\n\t\tObject.keys(tests).forEach(function( name ){\n\n\t\t\t// If the option isn't set, but it is required, throw an error.\n\t\t\tif ( options[name] === undefined && defaults[name] === undefined ) {\n\n\t\t\t\tif ( tests[name].r ) {\n\t\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): '\" + name + \"' is required.\");\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\ttests[name].t( parsed, options[name] === undefined ? defaults[name] : options[name] );\n\t\t});\n\n\t\t// Forward pips options\n\t\tparsed.pips = options.pips;\n\n\t\tvar styles = [['left', 'top'], ['right', 'bottom']];\n\n\t\t// Pre-define the styles.\n\t\tparsed.style = styles[parsed.dir][parsed.ort];\n\t\tparsed.styleOposite = styles[parsed.dir?0:1][parsed.ort];\n\n\t\treturn parsed;\n\t}", "function options(){\n\n \tswitch(userInput) {\n\n\t\tcase \"my-tweets\": \n\t\tmyTweets(); \n\t\tbreak;\n\n\t\tcase \"spotify-this-song\": \n\t\tspotifyThisSong(); \n\t\tbreak;\n\n\t\tcase \"movie-this\":\n\t\t movieThis(); \n\t\t break;\n\n\t\tcase \"do-what-it-says\": \n\t\tdoWhatItSays(); \n\t\tbreak;\n\t}\n}", "function testOptions ( options ) {\n\n\t\t// To prove a fix for #537, freeze options here.\n\t\t// If the object is modified, an error will be thrown.\n\t\t// Object.freeze(options);\n\n\t\tvar parsed = {\n\t\t\tmargin: 0,\n\t\t\tlimit: 0,\n\t\t\tpadding: 0,\n\t\t\tanimate: true,\n\t\t\tanimationDuration: 300,\n\t\t\tariaFormat: defaultFormatter,\n\t\t\tformat: defaultFormatter\n\t\t};\n\n\t\t// Tests are executed in the order they are presented here.\n\t\tvar tests = {\n\t\t\t'step': { r: false, t: testStep },\n\t\t\t'start': { r: true, t: testStart },\n\t\t\t'connect': { r: true, t: testConnect },\n\t\t\t'direction': { r: true, t: testDirection },\n\t\t\t'snap': { r: false, t: testSnap },\n\t\t\t'animate': { r: false, t: testAnimate },\n\t\t\t'animationDuration': { r: false, t: testAnimationDuration },\n\t\t\t'range': { r: true, t: testRange },\n\t\t\t'orientation': { r: false, t: testOrientation },\n\t\t\t'margin': { r: false, t: testMargin },\n\t\t\t'limit': { r: false, t: testLimit },\n\t\t\t'padding': { r: false, t: testPadding },\n\t\t\t'behaviour': { r: true, t: testBehaviour },\n\t\t\t'ariaFormat': { r: false, t: testAriaFormat },\n\t\t\t'format': { r: false, t: testFormat },\n\t\t\t'tooltips': { r: false, t: testTooltips },\n\t\t\t'cssPrefix': { r: false, t: testCssPrefix },\n\t\t\t'cssClasses': { r: false, t: testCssClasses },\n\t\t\t'useRequestAnimationFrame': { r: false, t: testUseRaf }\n\t\t};\n\n\t\tvar defaults = {\n\t\t\t'connect': false,\n\t\t\t'direction': 'ltr',\n\t\t\t'behaviour': 'tap',\n\t\t\t'orientation': 'horizontal',\n\t\t\t'cssPrefix' : 'noUi-',\n\t\t\t'cssClasses': {\n\t\t\t\ttarget: 'target',\n\t\t\t\tbase: 'base',\n\t\t\t\torigin: 'origin',\n\t\t\t\thandle: 'handle',\n\t\t\t\thandleLower: 'handle-lower',\n\t\t\t\thandleUpper: 'handle-upper',\n\t\t\t\thorizontal: 'horizontal',\n\t\t\t\tvertical: 'vertical',\n\t\t\t\tbackground: 'background',\n\t\t\t\tconnect: 'connect',\n\t\t\t\tltr: 'ltr',\n\t\t\t\trtl: 'rtl',\n\t\t\t\tdraggable: 'draggable',\n\t\t\t\tdrag: 'state-drag',\n\t\t\t\ttap: 'state-tap',\n\t\t\t\tactive: 'active',\n\t\t\t\ttooltip: 'tooltip',\n\t\t\t\tpips: 'pips',\n\t\t\t\tpipsHorizontal: 'pips-horizontal',\n\t\t\t\tpipsVertical: 'pips-vertical',\n\t\t\t\tmarker: 'marker',\n\t\t\t\tmarkerHorizontal: 'marker-horizontal',\n\t\t\t\tmarkerVertical: 'marker-vertical',\n\t\t\t\tmarkerNormal: 'marker-normal',\n\t\t\t\tmarkerLarge: 'marker-large',\n\t\t\t\tmarkerSub: 'marker-sub',\n\t\t\t\tvalue: 'value',\n\t\t\t\tvalueHorizontal: 'value-horizontal',\n\t\t\t\tvalueVertical: 'value-vertical',\n\t\t\t\tvalueNormal: 'value-normal',\n\t\t\t\tvalueLarge: 'value-large',\n\t\t\t\tvalueSub: 'value-sub'\n\t\t\t},\n\t\t\t'useRequestAnimationFrame': true\n\t\t};\n\n\t\t// AriaFormat defaults to regular format, if any.\n\t\tif ( options.format && !options.ariaFormat ) {\n\t\t\toptions.ariaFormat = options.format;\n\t\t}\n\n\t\t// Run all options through a testing mechanism to ensure correct\n\t\t// input. It should be noted that options might get modified to\n\t\t// be handled properly. E.g. wrapping integers in arrays.\n\t\tObject.keys(tests).forEach(function( name ){\n\n\t\t\t// If the option isn't set, but it is required, throw an error.\n\t\t\tif ( options[name] === undefined && defaults[name] === undefined ) {\n\n\t\t\t\tif ( tests[name].r ) {\n\t\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): '\" + name + \"' is required.\");\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\ttests[name].t( parsed, options[name] === undefined ? defaults[name] : options[name] );\n\t\t});\n\n\t\t// Forward pips options\n\t\tparsed.pips = options.pips;\n\n\t\tvar styles = [['left', 'top'], ['right', 'bottom']];\n\n\t\t// Pre-define the styles.\n\t\tparsed.style = styles[parsed.dir][parsed.ort];\n\t\tparsed.styleOposite = styles[parsed.dir?0:1][parsed.ort];\n\n\t\treturn parsed;\n\t}", "function testOptions ( options ) {\r\n\r\n\t\t\t// To prove a fix for #537, freeze options here.\r\n\t\t\t// If the object is modified, an error will be thrown.\r\n\t\t\t// Object.freeze(options);\r\n\r\n\t\t\tvar parsed = {\r\n\t\t\t\tmargin: 0,\r\n\t\t\t\tlimit: 0,\r\n\t\t\t\tanimate: true,\r\n\t\t\t\tanimationDuration: 300,\r\n\t\t\t\tformat: defaultFormatter\r\n\t\t\t}, tests;\r\n\r\n\t\t\t// Tests are executed in the order they are presented here.\r\n\t\t\ttests = {\r\n\t\t\t\t'step': { r: false, t: testStep },\r\n\t\t\t\t'start': { r: true, t: testStart },\r\n\t\t\t\t'connect': { r: true, t: testConnect },\r\n\t\t\t\t'direction': { r: true, t: testDirection },\r\n\t\t\t\t'snap': { r: false, t: testSnap },\r\n\t\t\t\t'animate': { r: false, t: testAnimate },\r\n\t\t\t\t'animationDuration': { r: false, t: testAnimationDuration },\r\n\t\t\t\t'range': { r: true, t: testRange },\r\n\t\t\t\t'orientation': { r: false, t: testOrientation },\r\n\t\t\t\t'margin': { r: false, t: testMargin },\r\n\t\t\t\t'limit': { r: false, t: testLimit },\r\n\t\t\t\t'behaviour': { r: true, t: testBehaviour },\r\n\t\t\t\t'format': { r: false, t: testFormat },\r\n\t\t\t\t'tooltips': { r: false, t: testTooltips },\r\n\t\t\t\t'cssPrefix': { r: false, t: testCssPrefix },\r\n\t\t\t\t'cssClasses': { r: false, t: testCssClasses }\r\n\t\t\t};\r\n\r\n\t\t\tvar defaults = {\r\n\t\t\t\t'connect': false,\r\n\t\t\t\t'direction': 'ltr',\r\n\t\t\t\t'behaviour': 'tap',\r\n\t\t\t\t'orientation': 'horizontal',\r\n\t\t\t\t'cssPrefix' : 'noUi-',\r\n\t\t\t\t'cssClasses': {\r\n\t\t\t\t\ttarget: 'target',\r\n\t\t\t\t\tbase: 'base',\r\n\t\t\t\t\torigin: 'origin',\r\n\t\t\t\t\thandle: 'handle',\r\n\t\t\t\t\thandleLower: 'handle-lower',\r\n\t\t\t\t\thandleUpper: 'handle-upper',\r\n\t\t\t\t\thorizontal: 'horizontal',\r\n\t\t\t\t\tvertical: 'vertical',\r\n\t\t\t\t\tbackground: 'background',\r\n\t\t\t\t\tconnect: 'connect',\r\n\t\t\t\t\tltr: 'ltr',\r\n\t\t\t\t\trtl: 'rtl',\r\n\t\t\t\t\tdraggable: 'draggable',\r\n\t\t\t\t\tdrag: 'state-drag',\r\n\t\t\t\t\ttap: 'state-tap',\r\n\t\t\t\t\tactive: 'active',\r\n\t\t\t\t\tstacking: 'stacking',\r\n\t\t\t\t\ttooltip: 'tooltip',\r\n\t\t\t\t\tpips: 'pips',\r\n\t\t\t\t\tpipsHorizontal: 'pips-horizontal',\r\n\t\t\t\t\tpipsVertical: 'pips-vertical',\r\n\t\t\t\t\tmarker: 'marker',\r\n\t\t\t\t\tmarkerHorizontal: 'marker-horizontal',\r\n\t\t\t\t\tmarkerVertical: 'marker-vertical',\r\n\t\t\t\t\tmarkerNormal: 'marker-normal',\r\n\t\t\t\t\tmarkerLarge: 'marker-large',\r\n\t\t\t\t\tmarkerSub: 'marker-sub',\r\n\t\t\t\t\tvalue: 'value',\r\n\t\t\t\t\tvalueHorizontal: 'value-horizontal',\r\n\t\t\t\t\tvalueVertical: 'value-vertical',\r\n\t\t\t\t\tvalueNormal: 'value-normal',\r\n\t\t\t\t\tvalueLarge: 'value-large',\r\n\t\t\t\t\tvalueSub: 'value-sub'\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\t// Run all options through a testing mechanism to ensure correct\r\n\t\t\t// input. It should be noted that options might get modified to\r\n\t\t\t// be handled properly. E.g. wrapping integers in arrays.\r\n\t\t\tObject.keys(tests).forEach(function( name ){\r\n\r\n\t\t\t\t// If the option isn't set, but it is required, throw an error.\r\n\t\t\t\tif ( options[name] === undefined && defaults[name] === undefined ) {\r\n\r\n\t\t\t\t\tif ( tests[name].r ) {\r\n\t\t\t\t\t\tthrow new Error(\"noUiSlider: '\" + name + \"' is required.\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttests[name].t( parsed, options[name] === undefined ? defaults[name] : options[name] );\r\n\t\t\t});\r\n\r\n\t\t\t// Forward pips options\r\n\t\t\tparsed.pips = options.pips;\r\n\r\n\t\t\t// Pre-define the styles.\r\n\t\t\tparsed.style = parsed.ort ? 'top' : 'left';\r\n\r\n\t\t\treturn parsed;\r\n\t\t}", "function ExtraOptions() {}", "function ExtraOptions() {}", "function ExtraOptions(){}", "function testOptions ( options ) {\n\n\t\t// To prove a fix for #537, freeze options here.\n\t\t// If the object is modified, an error will be thrown.\n\t\t// Object.freeze(options);\n\n\t\tvar parsed = {\n\t\t\tmargin: 0,\n\t\t\tlimit: 0,\n\t\t\tanimate: true,\n\t\t\tanimationDuration: 300,\n\t\t\tformat: defaultFormatter\n\t\t}, tests;\n\n\t\t// Tests are executed in the order they are presented here.\n\t\ttests = {\n\t\t\t'step': { r: false, t: testStep },\n\t\t\t'start': { r: true, t: testStart },\n\t\t\t'connect': { r: true, t: testConnect },\n\t\t\t'direction': { r: true, t: testDirection },\n\t\t\t'snap': { r: false, t: testSnap },\n\t\t\t'animate': { r: false, t: testAnimate },\n\t\t\t'animationDuration': { r: false, t: testAnimationDuration },\n\t\t\t'range': { r: true, t: testRange },\n\t\t\t'orientation': { r: false, t: testOrientation },\n\t\t\t'margin': { r: false, t: testMargin },\n\t\t\t'limit': { r: false, t: testLimit },\n\t\t\t'behaviour': { r: true, t: testBehaviour },\n\t\t\t'format': { r: false, t: testFormat },\n\t\t\t'tooltips': { r: false, t: testTooltips },\n\t\t\t'cssPrefix': { r: false, t: testCssPrefix },\n\t\t\t'cssClasses': { r: false, t: testCssClasses }\n\t\t};\n\n\t\tvar defaults = {\n\t\t\t'connect': false,\n\t\t\t'direction': 'ltr',\n\t\t\t'behaviour': 'tap',\n\t\t\t'orientation': 'horizontal',\n\t\t\t'cssPrefix' : 'noUi-',\n\t\t\t'cssClasses': {\n\t\t\t\ttarget: 'target',\n\t\t\t\tbase: 'base',\n\t\t\t\torigin: 'origin',\n\t\t\t\thandle: 'handle',\n\t\t\t\thandleLower: 'handle-lower',\n\t\t\t\thandleUpper: 'handle-upper',\n\t\t\t\thorizontal: 'horizontal',\n\t\t\t\tvertical: 'vertical',\n\t\t\t\tbackground: 'background',\n\t\t\t\tconnect: 'connect',\n\t\t\t\tltr: 'ltr',\n\t\t\t\trtl: 'rtl',\n\t\t\t\tdraggable: 'draggable',\n\t\t\t\tdrag: 'state-drag',\n\t\t\t\ttap: 'state-tap',\n\t\t\t\tactive: 'active',\n\t\t\t\tstacking: 'stacking',\n\t\t\t\ttooltip: 'tooltip',\n\t\t\t\tpips: 'pips',\n\t\t\t\tpipsHorizontal: 'pips-horizontal',\n\t\t\t\tpipsVertical: 'pips-vertical',\n\t\t\t\tmarker: 'marker',\n\t\t\t\tmarkerHorizontal: 'marker-horizontal',\n\t\t\t\tmarkerVertical: 'marker-vertical',\n\t\t\t\tmarkerNormal: 'marker-normal',\n\t\t\t\tmarkerLarge: 'marker-large',\n\t\t\t\tmarkerSub: 'marker-sub',\n\t\t\t\tvalue: 'value',\n\t\t\t\tvalueHorizontal: 'value-horizontal',\n\t\t\t\tvalueVertical: 'value-vertical',\n\t\t\t\tvalueNormal: 'value-normal',\n\t\t\t\tvalueLarge: 'value-large',\n\t\t\t\tvalueSub: 'value-sub'\n\t\t\t}\n\t\t};\n\n\t\t// Run all options through a testing mechanism to ensure correct\n\t\t// input. It should be noted that options might get modified to\n\t\t// be handled properly. E.g. wrapping integers in arrays.\n\t\tObject.keys(tests).forEach(function( name ){\n\n\t\t\t// If the option isn't set, but it is required, throw an error.\n\t\t\tif ( options[name] === undefined && defaults[name] === undefined ) {\n\n\t\t\t\tif ( tests[name].r ) {\n\t\t\t\t\tthrow new Error(\"noUiSlider: '\" + name + \"' is required.\");\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\ttests[name].t( parsed, options[name] === undefined ? defaults[name] : options[name] );\n\t\t});\n\n\t\t// Forward pips options\n\t\tparsed.pips = options.pips;\n\n\t\t// Pre-define the styles.\n\t\tparsed.style = parsed.ort ? 'top' : 'left';\n\n\t\treturn parsed;\n\t}", "function testOptions ( options ) {\n\n\t\t// To prove a fix for #537, freeze options here.\n\t\t// If the object is modified, an error will be thrown.\n\t\t// Object.freeze(options);\n\n\t\tvar parsed = {\n\t\t\tmargin: 0,\n\t\t\tlimit: 0,\n\t\t\tanimate: true,\n\t\t\tanimationDuration: 300,\n\t\t\tformat: defaultFormatter\n\t\t}, tests;\n\n\t\t// Tests are executed in the order they are presented here.\n\t\ttests = {\n\t\t\t'step': { r: false, t: testStep },\n\t\t\t'start': { r: true, t: testStart },\n\t\t\t'connect': { r: true, t: testConnect },\n\t\t\t'direction': { r: true, t: testDirection },\n\t\t\t'snap': { r: false, t: testSnap },\n\t\t\t'animate': { r: false, t: testAnimate },\n\t\t\t'animationDuration': { r: false, t: testAnimationDuration },\n\t\t\t'range': { r: true, t: testRange },\n\t\t\t'orientation': { r: false, t: testOrientation },\n\t\t\t'margin': { r: false, t: testMargin },\n\t\t\t'limit': { r: false, t: testLimit },\n\t\t\t'behaviour': { r: true, t: testBehaviour },\n\t\t\t'format': { r: false, t: testFormat },\n\t\t\t'tooltips': { r: false, t: testTooltips },\n\t\t\t'cssPrefix': { r: false, t: testCssPrefix },\n\t\t\t'cssClasses': { r: false, t: testCssClasses }\n\t\t};\n\n\t\tvar defaults = {\n\t\t\t'connect': false,\n\t\t\t'direction': 'ltr',\n\t\t\t'behaviour': 'tap',\n\t\t\t'orientation': 'horizontal',\n\t\t\t'cssPrefix' : 'noUi-',\n\t\t\t'cssClasses': {\n\t\t\t\ttarget: 'target',\n\t\t\t\tbase: 'base',\n\t\t\t\torigin: 'origin',\n\t\t\t\thandle: 'handle',\n\t\t\t\thandleLower: 'handle-lower',\n\t\t\t\thandleUpper: 'handle-upper',\n\t\t\t\thorizontal: 'horizontal',\n\t\t\t\tvertical: 'vertical',\n\t\t\t\tbackground: 'background',\n\t\t\t\tconnect: 'connect',\n\t\t\t\tltr: 'ltr',\n\t\t\t\trtl: 'rtl',\n\t\t\t\tdraggable: 'draggable',\n\t\t\t\tdrag: 'state-drag',\n\t\t\t\ttap: 'state-tap',\n\t\t\t\tactive: 'active',\n\t\t\t\tstacking: 'stacking',\n\t\t\t\ttooltip: 'tooltip',\n\t\t\t\tpips: 'pips',\n\t\t\t\tpipsHorizontal: 'pips-horizontal',\n\t\t\t\tpipsVertical: 'pips-vertical',\n\t\t\t\tmarker: 'marker',\n\t\t\t\tmarkerHorizontal: 'marker-horizontal',\n\t\t\t\tmarkerVertical: 'marker-vertical',\n\t\t\t\tmarkerNormal: 'marker-normal',\n\t\t\t\tmarkerLarge: 'marker-large',\n\t\t\t\tmarkerSub: 'marker-sub',\n\t\t\t\tvalue: 'value',\n\t\t\t\tvalueHorizontal: 'value-horizontal',\n\t\t\t\tvalueVertical: 'value-vertical',\n\t\t\t\tvalueNormal: 'value-normal',\n\t\t\t\tvalueLarge: 'value-large',\n\t\t\t\tvalueSub: 'value-sub'\n\t\t\t}\n\t\t};\n\n\t\t// Run all options through a testing mechanism to ensure correct\n\t\t// input. It should be noted that options might get modified to\n\t\t// be handled properly. E.g. wrapping integers in arrays.\n\t\tObject.keys(tests).forEach(function( name ){\n\n\t\t\t// If the option isn't set, but it is required, throw an error.\n\t\t\tif ( options[name] === undefined && defaults[name] === undefined ) {\n\n\t\t\t\tif ( tests[name].r ) {\n\t\t\t\t\tthrow new Error(\"noUiSlider: '\" + name + \"' is required.\");\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\ttests[name].t( parsed, options[name] === undefined ? defaults[name] : options[name] );\n\t\t});\n\n\t\t// Forward pips options\n\t\tparsed.pips = options.pips;\n\n\t\t// Pre-define the styles.\n\t\tparsed.style = parsed.ort ? 'top' : 'left';\n\n\t\treturn parsed;\n\t}", "function testOptions ( options ) {\n\n\t\t// To prove a fix for #537, freeze options here.\n\t\t// If the object is modified, an error will be thrown.\n\t\t// Object.freeze(options);\n\n\t\tvar parsed = {\n\t\t\tmargin: 0,\n\t\t\tlimit: 0,\n\t\t\tpadding: 0,\n\t\t\tanimate: true,\n\t\t\tanimationDuration: 300,\n\t\t\tformat: defaultFormatter\n\t\t};\n\n\t\t// Tests are executed in the order they are presented here.\n\t\tvar tests = {\n\t\t\t'step': { r: false, t: testStep },\n\t\t\t'start': { r: true, t: testStart },\n\t\t\t'connect': { r: true, t: testConnect },\n\t\t\t'direction': { r: true, t: testDirection },\n\t\t\t'snap': { r: false, t: testSnap },\n\t\t\t'animate': { r: false, t: testAnimate },\n\t\t\t'animationDuration': { r: false, t: testAnimationDuration },\n\t\t\t'range': { r: true, t: testRange },\n\t\t\t'orientation': { r: false, t: testOrientation },\n\t\t\t'margin': { r: false, t: testMargin },\n\t\t\t'limit': { r: false, t: testLimit },\n\t\t\t'padding': { r: false, t: testPadding },\n\t\t\t'behaviour': { r: true, t: testBehaviour },\n\t\t\t'format': { r: false, t: testFormat },\n\t\t\t'tooltips': { r: false, t: testTooltips },\n\t\t\t'cssPrefix': { r: false, t: testCssPrefix },\n\t\t\t'cssClasses': { r: false, t: testCssClasses },\n\t\t\t'useRequestAnimationFrame': { r: false, t: testUseRaf }\n\t\t};\n\n\t\tvar defaults = {\n\t\t\t'connect': false,\n\t\t\t'direction': 'ltr',\n\t\t\t'behaviour': 'tap',\n\t\t\t'orientation': 'horizontal',\n\t\t\t'cssPrefix' : 'noUi-',\n\t\t\t'cssClasses': {\n\t\t\t\ttarget: 'target',\n\t\t\t\tbase: 'base',\n\t\t\t\torigin: 'origin',\n\t\t\t\thandle: 'handle',\n\t\t\t\thandleLower: 'handle-lower',\n\t\t\t\thandleUpper: 'handle-upper',\n\t\t\t\thorizontal: 'horizontal',\n\t\t\t\tvertical: 'vertical',\n\t\t\t\tbackground: 'background',\n\t\t\t\tconnect: 'connect',\n\t\t\t\tltr: 'ltr',\n\t\t\t\trtl: 'rtl',\n\t\t\t\tdraggable: 'draggable',\n\t\t\t\tdrag: 'state-drag',\n\t\t\t\ttap: 'state-tap',\n\t\t\t\tactive: 'active',\n\t\t\t\ttooltip: 'tooltip',\n\t\t\t\tpips: 'pips',\n\t\t\t\tpipsHorizontal: 'pips-horizontal',\n\t\t\t\tpipsVertical: 'pips-vertical',\n\t\t\t\tmarker: 'marker',\n\t\t\t\tmarkerHorizontal: 'marker-horizontal',\n\t\t\t\tmarkerVertical: 'marker-vertical',\n\t\t\t\tmarkerNormal: 'marker-normal',\n\t\t\t\tmarkerLarge: 'marker-large',\n\t\t\t\tmarkerSub: 'marker-sub',\n\t\t\t\tvalue: 'value',\n\t\t\t\tvalueHorizontal: 'value-horizontal',\n\t\t\t\tvalueVertical: 'value-vertical',\n\t\t\t\tvalueNormal: 'value-normal',\n\t\t\t\tvalueLarge: 'value-large',\n\t\t\t\tvalueSub: 'value-sub'\n\t\t\t},\n\t\t\t'useRequestAnimationFrame': true\n\t\t};\n\n\t\t// Run all options through a testing mechanism to ensure correct\n\t\t// input. It should be noted that options might get modified to\n\t\t// be handled properly. E.g. wrapping integers in arrays.\n\t\tObject.keys(tests).forEach(function( name ){\n\n\t\t\t// If the option isn't set, but it is required, throw an error.\n\t\t\tif ( options[name] === undefined && defaults[name] === undefined ) {\n\n\t\t\t\tif ( tests[name].r ) {\n\t\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): '\" + name + \"' is required.\");\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\ttests[name].t( parsed, options[name] === undefined ? defaults[name] : options[name] );\n\t\t});\n\n\t\t// Forward pips options\n\t\tparsed.pips = options.pips;\n\n\t\tvar styles = [['left', 'top'], ['right', 'bottom']];\n\n\t\t// Pre-define the styles.\n\t\tparsed.style = styles[parsed.dir][parsed.ort];\n\t\tparsed.styleOposite = styles[parsed.dir?0:1][parsed.ort];\n\n\t\treturn parsed;\n\t}", "function testOptions ( options ) {\n\n\t\t// To prove a fix for #537, freeze options here.\n\t\t// If the object is modified, an error will be thrown.\n\t\t// Object.freeze(options);\n\n\t\tvar parsed = {\n\t\t\tmargin: 0,\n\t\t\tlimit: 0,\n\t\t\tpadding: 0,\n\t\t\tanimate: true,\n\t\t\tanimationDuration: 300,\n\t\t\tformat: defaultFormatter\n\t\t};\n\n\t\t// Tests are executed in the order they are presented here.\n\t\tvar tests = {\n\t\t\t'step': { r: false, t: testStep },\n\t\t\t'start': { r: true, t: testStart },\n\t\t\t'connect': { r: true, t: testConnect },\n\t\t\t'direction': { r: true, t: testDirection },\n\t\t\t'snap': { r: false, t: testSnap },\n\t\t\t'animate': { r: false, t: testAnimate },\n\t\t\t'animationDuration': { r: false, t: testAnimationDuration },\n\t\t\t'range': { r: true, t: testRange },\n\t\t\t'orientation': { r: false, t: testOrientation },\n\t\t\t'margin': { r: false, t: testMargin },\n\t\t\t'limit': { r: false, t: testLimit },\n\t\t\t'padding': { r: false, t: testPadding },\n\t\t\t'behaviour': { r: true, t: testBehaviour },\n\t\t\t'format': { r: false, t: testFormat },\n\t\t\t'tooltips': { r: false, t: testTooltips },\n\t\t\t'cssPrefix': { r: false, t: testCssPrefix },\n\t\t\t'cssClasses': { r: false, t: testCssClasses },\n\t\t\t'useRequestAnimationFrame': { r: false, t: testUseRaf }\n\t\t};\n\n\t\tvar defaults = {\n\t\t\t'connect': false,\n\t\t\t'direction': 'ltr',\n\t\t\t'behaviour': 'tap',\n\t\t\t'orientation': 'horizontal',\n\t\t\t'cssPrefix' : 'noUi-',\n\t\t\t'cssClasses': {\n\t\t\t\ttarget: 'target',\n\t\t\t\tbase: 'base',\n\t\t\t\torigin: 'origin',\n\t\t\t\thandle: 'handle',\n\t\t\t\thandleLower: 'handle-lower',\n\t\t\t\thandleUpper: 'handle-upper',\n\t\t\t\thorizontal: 'horizontal',\n\t\t\t\tvertical: 'vertical',\n\t\t\t\tbackground: 'background',\n\t\t\t\tconnect: 'connect',\n\t\t\t\tltr: 'ltr',\n\t\t\t\trtl: 'rtl',\n\t\t\t\tdraggable: 'draggable',\n\t\t\t\tdrag: 'state-drag',\n\t\t\t\ttap: 'state-tap',\n\t\t\t\tactive: 'active',\n\t\t\t\ttooltip: 'tooltip',\n\t\t\t\tpips: 'pips',\n\t\t\t\tpipsHorizontal: 'pips-horizontal',\n\t\t\t\tpipsVertical: 'pips-vertical',\n\t\t\t\tmarker: 'marker',\n\t\t\t\tmarkerHorizontal: 'marker-horizontal',\n\t\t\t\tmarkerVertical: 'marker-vertical',\n\t\t\t\tmarkerNormal: 'marker-normal',\n\t\t\t\tmarkerLarge: 'marker-large',\n\t\t\t\tmarkerSub: 'marker-sub',\n\t\t\t\tvalue: 'value',\n\t\t\t\tvalueHorizontal: 'value-horizontal',\n\t\t\t\tvalueVertical: 'value-vertical',\n\t\t\t\tvalueNormal: 'value-normal',\n\t\t\t\tvalueLarge: 'value-large',\n\t\t\t\tvalueSub: 'value-sub'\n\t\t\t},\n\t\t\t'useRequestAnimationFrame': true\n\t\t};\n\n\t\t// Run all options through a testing mechanism to ensure correct\n\t\t// input. It should be noted that options might get modified to\n\t\t// be handled properly. E.g. wrapping integers in arrays.\n\t\tObject.keys(tests).forEach(function( name ){\n\n\t\t\t// If the option isn't set, but it is required, throw an error.\n\t\t\tif ( options[name] === undefined && defaults[name] === undefined ) {\n\n\t\t\t\tif ( tests[name].r ) {\n\t\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): '\" + name + \"' is required.\");\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\ttests[name].t( parsed, options[name] === undefined ? defaults[name] : options[name] );\n\t\t});\n\n\t\t// Forward pips options\n\t\tparsed.pips = options.pips;\n\n\t\tvar styles = [['left', 'top'], ['right', 'bottom']];\n\n\t\t// Pre-define the styles.\n\t\tparsed.style = styles[parsed.dir][parsed.ort];\n\t\tparsed.styleOposite = styles[parsed.dir?0:1][parsed.ort];\n\n\t\treturn parsed;\n\t}", "function testOptions ( options ) {\r\n\r\n\t\t// To prove a fix for #537, freeze options here.\r\n\t\t// If the object is modified, an error will be thrown.\r\n\t\t// Object.freeze(options);\r\n\r\n\t\tvar parsed = {\r\n\t\t\tmargin: 0,\r\n\t\t\tlimit: 0,\r\n\t\t\tanimate: true,\r\n\t\t\tanimationDuration: 300,\r\n\t\t\tformat: defaultFormatter\r\n\t\t}, tests;\r\n\r\n\t\t// Tests are executed in the order they are presented here.\r\n\t\ttests = {\r\n\t\t\t'step': { r: false, t: testStep },\r\n\t\t\t'start': { r: true, t: testStart },\r\n\t\t\t'connect': { r: true, t: testConnect },\r\n\t\t\t'direction': { r: true, t: testDirection },\r\n\t\t\t'snap': { r: false, t: testSnap },\r\n\t\t\t'animate': { r: false, t: testAnimate },\r\n\t\t\t'animationDuration': { r: false, t: testAnimationDuration },\r\n\t\t\t'range': { r: true, t: testRange },\r\n\t\t\t'orientation': { r: false, t: testOrientation },\r\n\t\t\t'margin': { r: false, t: testMargin },\r\n\t\t\t'limit': { r: false, t: testLimit },\r\n\t\t\t'behaviour': { r: true, t: testBehaviour },\r\n\t\t\t'format': { r: false, t: testFormat },\r\n\t\t\t'tooltips': { r: false, t: testTooltips },\r\n\t\t\t'cssPrefix': { r: false, t: testCssPrefix },\r\n\t\t\t'cssClasses': { r: false, t: testCssClasses }\r\n\t\t};\r\n\r\n\t\tvar defaults = {\r\n\t\t\t'connect': false,\r\n\t\t\t'direction': 'ltr',\r\n\t\t\t'behaviour': 'tap',\r\n\t\t\t'orientation': 'horizontal',\r\n\t\t\t'cssPrefix' : 'noUi-',\r\n\t\t\t'cssClasses': {\r\n\t\t\t\ttarget: 'target',\r\n\t\t\t\tbase: 'base',\r\n\t\t\t\torigin: 'origin',\r\n\t\t\t\thandle: 'handle',\r\n\t\t\t\thandleLower: 'handle-lower',\r\n\t\t\t\thandleUpper: 'handle-upper',\r\n\t\t\t\thorizontal: 'horizontal',\r\n\t\t\t\tvertical: 'vertical',\r\n\t\t\t\tbackground: 'background',\r\n\t\t\t\tconnect: 'connect',\r\n\t\t\t\tltr: 'ltr',\r\n\t\t\t\trtl: 'rtl',\r\n\t\t\t\tdraggable: 'draggable',\r\n\t\t\t\tdrag: 'state-drag',\r\n\t\t\t\ttap: 'state-tap',\r\n\t\t\t\tactive: 'active',\r\n\t\t\t\tstacking: 'stacking',\r\n\t\t\t\ttooltip: 'tooltip',\r\n\t\t\t\tpips: 'pips',\r\n\t\t\t\tpipsHorizontal: 'pips-horizontal',\r\n\t\t\t\tpipsVertical: 'pips-vertical',\r\n\t\t\t\tmarker: 'marker',\r\n\t\t\t\tmarkerHorizontal: 'marker-horizontal',\r\n\t\t\t\tmarkerVertical: 'marker-vertical',\r\n\t\t\t\tmarkerNormal: 'marker-normal',\r\n\t\t\t\tmarkerLarge: 'marker-large',\r\n\t\t\t\tmarkerSub: 'marker-sub',\r\n\t\t\t\tvalue: 'value',\r\n\t\t\t\tvalueHorizontal: 'value-horizontal',\r\n\t\t\t\tvalueVertical: 'value-vertical',\r\n\t\t\t\tvalueNormal: 'value-normal',\r\n\t\t\t\tvalueLarge: 'value-large',\r\n\t\t\t\tvalueSub: 'value-sub'\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// Run all options through a testing mechanism to ensure correct\r\n\t\t// input. It should be noted that options might get modified to\r\n\t\t// be handled properly. E.g. wrapping integers in arrays.\r\n\t\tObject.keys(tests).forEach(function( name ){\r\n\r\n\t\t\t// If the option isn't set, but it is required, throw an error.\r\n\t\t\tif ( options[name] === undefined && defaults[name] === undefined ) {\r\n\r\n\t\t\t\tif ( tests[name].r ) {\r\n\t\t\t\t\tthrow new Error(\"noUiSlider: '\" + name + \"' is required.\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t\ttests[name].t( parsed, options[name] === undefined ? defaults[name] : options[name] );\r\n\t\t});\r\n\r\n\t\t// Forward pips options\r\n\t\tparsed.pips = options.pips;\r\n\r\n\t\t// Pre-define the styles.\r\n\t\tparsed.style = parsed.ort ? 'top' : 'left';\r\n\r\n\t\treturn parsed;\r\n\t}", "function testOptions(options) {\n // To prove a fix for #537, freeze options here.\n // If the object is modified, an error will be thrown.\n // Object.freeze(options);\n var parsed = {\n margin: null,\n limit: null,\n padding: null,\n animate: true,\n animationDuration: 300,\n ariaFormat: defaultFormatter,\n format: defaultFormatter,\n };\n // Tests are executed in the order they are presented here.\n var tests = {\n step: { r: false, t: testStep },\n keyboardPageMultiplier: { r: false, t: testKeyboardPageMultiplier },\n keyboardMultiplier: { r: false, t: testKeyboardMultiplier },\n keyboardDefaultStep: { r: false, t: testKeyboardDefaultStep },\n start: { r: true, t: testStart },\n connect: { r: true, t: testConnect },\n direction: { r: true, t: testDirection },\n snap: { r: false, t: testSnap },\n animate: { r: false, t: testAnimate },\n animationDuration: { r: false, t: testAnimationDuration },\n range: { r: true, t: testRange },\n orientation: { r: false, t: testOrientation },\n margin: { r: false, t: testMargin },\n limit: { r: false, t: testLimit },\n padding: { r: false, t: testPadding },\n behaviour: { r: true, t: testBehaviour },\n ariaFormat: { r: false, t: testAriaFormat },\n format: { r: false, t: testFormat },\n tooltips: { r: false, t: testTooltips },\n keyboardSupport: { r: true, t: testKeyboardSupport },\n documentElement: { r: false, t: testDocumentElement },\n cssPrefix: { r: true, t: testCssPrefix },\n cssClasses: { r: true, t: testCssClasses },\n handleAttributes: { r: false, t: testHandleAttributes },\n };\n var defaults = {\n connect: false,\n direction: \"ltr\",\n behaviour: \"tap\",\n orientation: \"horizontal\",\n keyboardSupport: true,\n cssPrefix: \"noUi-\",\n cssClasses: cssClasses,\n keyboardPageMultiplier: 5,\n keyboardMultiplier: 1,\n keyboardDefaultStep: 10,\n };\n // AriaFormat defaults to regular format, if any.\n if (options.format && !options.ariaFormat) {\n options.ariaFormat = options.format;\n }\n // Run all options through a testing mechanism to ensure correct\n // input. It should be noted that options might get modified to\n // be handled properly. E.g. wrapping integers in arrays.\n Object.keys(tests).forEach(function (name) {\n // If the option isn't set, but it is required, throw an error.\n if (!isSet(options[name]) && defaults[name] === undefined) {\n if (tests[name].r) {\n throw new Error(\"noUiSlider: '\" + name + \"' is required.\");\n }\n return;\n }\n tests[name].t(parsed, !isSet(options[name]) ? defaults[name] : options[name]);\n });\n // Forward pips options\n parsed.pips = options.pips;\n // All recent browsers accept unprefixed transform.\n // We need -ms- for IE9 and -webkit- for older Android;\n // Assume use of -webkit- if unprefixed and -ms- are not supported.\n // https://caniuse.com/#feat=transforms2d\n var d = document.createElement(\"div\");\n var msPrefix = d.style.msTransform !== undefined;\n var noPrefix = d.style.transform !== undefined;\n parsed.transformRule = noPrefix ? \"transform\" : msPrefix ? \"msTransform\" : \"webkitTransform\";\n // Pips don't move, so we can place them using left/top.\n var styles = [\n [\"left\", \"top\"],\n [\"right\", \"bottom\"],\n ];\n parsed.style = styles[parsed.dir][parsed.ort];\n return parsed;\n }", "function testOptions ( options ) {\r\n\r\n\t\t// To prove a fix for #537, freeze options here.\r\n\t\t// If the object is modified, an error will be thrown.\r\n\t\t// Object.freeze(options);\r\n\r\n\t\tvar parsed = {\r\n\t\t\tmargin: 0,\r\n\t\t\tlimit: 0,\r\n\t\t\tpadding: 0,\r\n\t\t\tanimate: true,\r\n\t\t\tanimationDuration: 300,\r\n\t\t\tformat: defaultFormatter\r\n\t\t};\r\n\r\n\t\t// Tests are executed in the order they are presented here.\r\n\t\tvar tests = {\r\n\t\t\t'step': { r: false, t: testStep },\r\n\t\t\t'start': { r: true, t: testStart },\r\n\t\t\t'connect': { r: true, t: testConnect },\r\n\t\t\t'direction': { r: true, t: testDirection },\r\n\t\t\t'snap': { r: false, t: testSnap },\r\n\t\t\t'animate': { r: false, t: testAnimate },\r\n\t\t\t'animationDuration': { r: false, t: testAnimationDuration },\r\n\t\t\t'range': { r: true, t: testRange },\r\n\t\t\t'orientation': { r: false, t: testOrientation },\r\n\t\t\t'margin': { r: false, t: testMargin },\r\n\t\t\t'limit': { r: false, t: testLimit },\r\n\t\t\t'padding': { r: false, t: testPadding },\r\n\t\t\t'behaviour': { r: true, t: testBehaviour },\r\n\t\t\t'format': { r: false, t: testFormat },\r\n\t\t\t'tooltips': { r: false, t: testTooltips },\r\n\t\t\t'cssPrefix': { r: false, t: testCssPrefix },\r\n\t\t\t'cssClasses': { r: false, t: testCssClasses },\r\n\t\t\t'useRequestAnimationFrame': { r: false, t: testUseRaf }\r\n\t\t};\r\n\r\n\t\tvar defaults = {\r\n\t\t\t'connect': false,\r\n\t\t\t'direction': 'ltr',\r\n\t\t\t'behaviour': 'tap',\r\n\t\t\t'orientation': 'horizontal',\r\n\t\t\t'cssPrefix' : 'noUi-',\r\n\t\t\t'cssClasses': {\r\n\t\t\t\ttarget: 'target',\r\n\t\t\t\tbase: 'base',\r\n\t\t\t\torigin: 'origin',\r\n\t\t\t\thandle: 'handle',\r\n\t\t\t\thandleLower: 'handle-lower',\r\n\t\t\t\thandleUpper: 'handle-upper',\r\n\t\t\t\thorizontal: 'horizontal',\r\n\t\t\t\tvertical: 'vertical',\r\n\t\t\t\tbackground: 'background',\r\n\t\t\t\tconnect: 'connect',\r\n\t\t\t\tltr: 'ltr',\r\n\t\t\t\trtl: 'rtl',\r\n\t\t\t\tdraggable: 'draggable',\r\n\t\t\t\tdrag: 'state-drag',\r\n\t\t\t\ttap: 'state-tap',\r\n\t\t\t\tactive: 'active',\r\n\t\t\t\ttooltip: 'tooltip',\r\n\t\t\t\tpips: 'pips',\r\n\t\t\t\tpipsHorizontal: 'pips-horizontal',\r\n\t\t\t\tpipsVertical: 'pips-vertical',\r\n\t\t\t\tmarker: 'marker',\r\n\t\t\t\tmarkerHorizontal: 'marker-horizontal',\r\n\t\t\t\tmarkerVertical: 'marker-vertical',\r\n\t\t\t\tmarkerNormal: 'marker-normal',\r\n\t\t\t\tmarkerLarge: 'marker-large',\r\n\t\t\t\tmarkerSub: 'marker-sub',\r\n\t\t\t\tvalue: 'value',\r\n\t\t\t\tvalueHorizontal: 'value-horizontal',\r\n\t\t\t\tvalueVertical: 'value-vertical',\r\n\t\t\t\tvalueNormal: 'value-normal',\r\n\t\t\t\tvalueLarge: 'value-large',\r\n\t\t\t\tvalueSub: 'value-sub'\r\n\t\t\t},\r\n\t\t\t'useRequestAnimationFrame': true\r\n\t\t};\r\n\r\n\t\t// Run all options through a testing mechanism to ensure correct\r\n\t\t// input. It should be noted that options might get modified to\r\n\t\t// be handled properly. E.g. wrapping integers in arrays.\r\n\t\tObject.keys(tests).forEach(function( name ){\r\n\r\n\t\t\t// If the option isn't set, but it is required, throw an error.\r\n\t\t\tif ( options[name] === undefined && defaults[name] === undefined ) {\r\n\r\n\t\t\t\tif ( tests[name].r ) {\r\n\t\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): '\" + name + \"' is required.\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t\ttests[name].t( parsed, options[name] === undefined ? defaults[name] : options[name] );\r\n\t\t});\r\n\r\n\t\t// Forward pips options\r\n\t\tparsed.pips = options.pips;\r\n\r\n\t\tvar styles = [['left', 'top'], ['right', 'bottom']];\r\n\r\n\t\t// Pre-define the styles.\r\n\t\tparsed.style = styles[parsed.dir][parsed.ort];\r\n\t\tparsed.styleOposite = styles[parsed.dir?0:1][parsed.ort];\r\n\r\n\t\treturn parsed;\r\n\t}", "function managerOptions() {\n inquirer.prompt([\n {\n name: \"option\",\n message: \"Hello, random manager. What would you like to do today?\",\n type: \"list\",\n choices: [\"View Products for Sale\", \"View Low Inventory\", \"Add to Inventory\", \"Add New Product\"]\n }\n ]).then(function (answer) {\n\n //Use a switch case since we have multiple scenarios\n switch (answer.option) {\n\n case \"View Products for Sale\":\n viewProducts();\n break;\n\n case \"View Low Inventory\":\n lowInventory();\n break;\n\n case \"Add to Inventory\":\n addInventory();\n break;\n\n case \"Add New Product\":\n addNew();\n break;\n };\n });\n}", "function testOptions ( options ) {\n\n\t\t// To prove a fix for #537, freeze options here.\n\t\t// If the object is modified, an error will be thrown.\n\t\t// Object.freeze(options);\n\n\t\tvar parsed = {\n\t\t\tmargin: 0,\n\t\t\tlimit: 0,\n\t\t\tanimate: true,\n\t\t\tanimationDuration: 300,\n\t\t\tformat: defaultFormatter\n\t\t}, tests;\n\n\t\t// Tests are executed in the order they are presented here.\n\t\ttests = {\n\t\t\t'step': { r: false, t: testStep },\n\t\t\t'start': { r: true, t: testStart },\n\t\t\t'connect': { r: true, t: testConnect },\n\t\t\t'direction': { r: true, t: testDirection },\n\t\t\t'snap': { r: false, t: testSnap },\n\t\t\t'animate': { r: false, t: testAnimate },\n\t\t\t'animationDuration': { r: false, t: testAnimationDuration },\n\t\t\t'range': { r: true, t: testRange },\n\t\t\t'orientation': { r: false, t: testOrientation },\n\t\t\t'margin': { r: false, t: testMargin },\n\t\t\t'limit': { r: false, t: testLimit },\n\t\t\t'behaviour': { r: true, t: testBehaviour },\n\t\t\t'format': { r: false, t: testFormat },\n\t\t\t'tooltips': { r: false, t: testTooltips },\n\t\t\t'cssPrefix': { r: false, t: testCssPrefix },\n\t\t\t'cssClasses': { r: false, t: testCssClasses },\n\t\t\t'useRequestAnimationFrame': { r: false, t: testUseRaf }\n\t\t};\n\n\t\tvar defaults = {\n\t\t\t'connect': false,\n\t\t\t'direction': 'ltr',\n\t\t\t'behaviour': 'tap',\n\t\t\t'orientation': 'horizontal',\n\t\t\t'cssPrefix' : 'noUi-',\n\t\t\t'cssClasses': {\n\t\t\t\ttarget: 'target',\n\t\t\t\tbase: 'base',\n\t\t\t\torigin: 'origin',\n\t\t\t\thandle: 'handle',\n\t\t\t\thorizontal: 'horizontal',\n\t\t\t\tvertical: 'vertical',\n\t\t\t\tbackground: 'background',\n\t\t\t\tconnect: 'connect',\n\t\t\t\tltr: 'ltr',\n\t\t\t\trtl: 'rtl',\n\t\t\t\tdraggable: 'draggable',\n\t\t\t\tdrag: 'state-drag',\n\t\t\t\ttap: 'state-tap',\n\t\t\t\tactive: 'active',\n\t\t\t\ttooltip: 'tooltip',\n\t\t\t\tpips: 'pips',\n\t\t\t\tpipsHorizontal: 'pips-horizontal',\n\t\t\t\tpipsVertical: 'pips-vertical',\n\t\t\t\tmarker: 'marker',\n\t\t\t\tmarkerHorizontal: 'marker-horizontal',\n\t\t\t\tmarkerVertical: 'marker-vertical',\n\t\t\t\tmarkerNormal: 'marker-normal',\n\t\t\t\tmarkerLarge: 'marker-large',\n\t\t\t\tmarkerSub: 'marker-sub',\n\t\t\t\tvalue: 'value',\n\t\t\t\tvalueHorizontal: 'value-horizontal',\n\t\t\t\tvalueVertical: 'value-vertical',\n\t\t\t\tvalueNormal: 'value-normal',\n\t\t\t\tvalueLarge: 'value-large',\n\t\t\t\tvalueSub: 'value-sub'\n\t\t\t},\n\t\t\t'useRequestAnimationFrame': true\n\t\t};\n\n\t\t// Run all options through a testing mechanism to ensure correct\n\t\t// input. It should be noted that options might get modified to\n\t\t// be handled properly. E.g. wrapping integers in arrays.\n\t\tObject.keys(tests).forEach(function( name ){\n\n\t\t\t// If the option isn't set, but it is required, throw an error.\n\t\t\tif ( options[name] === undefined && defaults[name] === undefined ) {\n\n\t\t\t\tif ( tests[name].r ) {\n\t\t\t\t\tthrow new Error(\"noUiSlider: '\" + name + \"' is required.\");\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\ttests[name].t( parsed, options[name] === undefined ? defaults[name] : options[name] );\n\t\t});\n\n\t\t// Forward pips options\n\t\tparsed.pips = options.pips;\n\n\t\tvar styles = [['left', 'top'], ['right', 'bottom']];\n\n\t\t// Pre-define the styles.\n\t\tparsed.style = styles[parsed.dir][parsed.ort];\n\t\tparsed.styleOposite = styles[parsed.dir?0:1][parsed.ort];\n\n\t\treturn parsed;\n\t}", "function options() {\n inquirer\n .prompt({\n name: \"departmentOfManagers\",\n type: \"list\",\n message: \"Which saleDepartment you are looking for ?\",\n choices: [\"Products of sale\", \"Low Inventory\", \"Add to Inventory\", \" Add New Product\"]\n })\n .then(function(answer) {\n // based on their answer of functions\n if (answer.options === \"Products of sale\") {\n viewSaleProduct();\n }\n else if(answer.options === \"Low Inventory\") {\n lowInventory();\n }\n else if(answer.options === \"Add to Inventory\") {\n addInventory();\n } \n else if(answer.options === \"Add New Product\") \n {\n addNewProduct();\n } else{\n connection.end();\n }\n });\n}", "function testOptions(options) {\n // To prove a fix for #537, freeze options here.\n // If the object is modified, an error will be thrown.\n // Object.freeze(options);\n\n var parsed = {\n margin: 0,\n limit: 0,\n padding: 0,\n animate: true,\n animationDuration: 300,\n ariaFormat: defaultFormatter,\n format: defaultFormatter\n };\n\n // Tests are executed in the order they are presented here.\n var tests = {\n step: { r: false, t: testStep },\n keyboardPageMultiplier: { r: false, t: testKeyboardPageMultiplier },\n keyboardDefaultStep: { r: false, t: testKeyboardDefaultStep },\n start: { r: true, t: testStart },\n connect: { r: true, t: testConnect },\n direction: { r: true, t: testDirection },\n snap: { r: false, t: testSnap },\n animate: { r: false, t: testAnimate },\n animationDuration: { r: false, t: testAnimationDuration },\n range: { r: true, t: testRange },\n orientation: { r: false, t: testOrientation },\n margin: { r: false, t: testMargin },\n limit: { r: false, t: testLimit },\n padding: { r: false, t: testPadding },\n behaviour: { r: true, t: testBehaviour },\n ariaFormat: { r: false, t: testAriaFormat },\n format: { r: false, t: testFormat },\n tooltips: { r: false, t: testTooltips },\n keyboardSupport: { r: true, t: testKeyboardSupport },\n documentElement: { r: false, t: testDocumentElement },\n cssPrefix: { r: true, t: testCssPrefix },\n cssClasses: { r: true, t: testCssClasses }\n };\n\n var defaults = {\n connect: false,\n direction: \"ltr\",\n behaviour: \"tap\",\n orientation: \"horizontal\",\n keyboardSupport: true,\n cssPrefix: \"noUi-\",\n cssClasses: cssClasses,\n keyboardPageMultiplier: 5,\n keyboardDefaultStep: 10\n };\n\n // AriaFormat defaults to regular format, if any.\n if (options.format && !options.ariaFormat) {\n options.ariaFormat = options.format;\n }\n\n // Run all options through a testing mechanism to ensure correct\n // input. It should be noted that options might get modified to\n // be handled properly. E.g. wrapping integers in arrays.\n Object.keys(tests).forEach(function(name) {\n // If the option isn't set, but it is required, throw an error.\n if (!isSet(options[name]) && defaults[name] === undefined) {\n if (tests[name].r) {\n throw new Error(\"noUiSlider (\" + VERSION + \"): '\" + name + \"' is required.\");\n }\n\n return true;\n }\n\n tests[name].t(parsed, !isSet(options[name]) ? defaults[name] : options[name]);\n });\n\n // Forward pips options\n parsed.pips = options.pips;\n\n // All recent browsers accept unprefixed transform.\n // We need -ms- for IE9 and -webkit- for older Android;\n // Assume use of -webkit- if unprefixed and -ms- are not supported.\n // https://caniuse.com/#feat=transforms2d\n var d = document.createElement(\"div\");\n var msPrefix = d.style.msTransform !== undefined;\n var noPrefix = d.style.transform !== undefined;\n\n parsed.transformRule = noPrefix ? \"transform\" : msPrefix ? \"msTransform\" : \"webkitTransform\";\n\n // Pips don't move, so we can place them using left/top.\n var styles = [[\"left\", \"top\"], [\"right\", \"bottom\"]];\n\n parsed.style = styles[parsed.dir][parsed.ort];\n\n return parsed;\n }", "get options() {}", "function testOptions(){\n\tif (mvOptions.selectLongueur === \"\" || mvOptions.selectDifficulte === \"\") {\n\n\t\tmvOptions.messageError= \"\";\n\n\t\tif (mvOptions.selectLongueur === \"\") {\n\t\t\t\tmvOptions.messageError += \"Veuillez sélectionner la longueur que vous désirez pour l'exercice \\n\";\n\t\t}\n\t\tif (mvOptions.selectDifficulte === \"\") {\n\t\t\tmvOptions.messageError += \"Veuillez sélectionner la difficulté de l'exercice\";\n\t\t}\n\t}\n\telse {\n\t\tverificationDisponibiliteImage(mvOptions.selectLongueur);\n\t}\n}", "function ExtraOptions() { }", "function ExtraOptions() { }", "function StepperOptions() {}", "function showUsage() {\n\tconsole.log(\"Usage: ./tests/testClient hostname port baseurl all|user|category|product|offer\");\n\treturn;\n}", "function options() {\n\tstorage.getf().then((props) => {\n\t\tjira.profile(props.url).then((profile) => {\n\t\t\tdirect.speak(S(MENU_OPTION_INITIAL).template({\n\t\t\t\tname: profile.displayName\n\t\t\t}).s);\n\n\t\t\tdefineOption1(props.url, props.project);\n\t\t\tdefineOption2(props.url, props.project);\n\t\t}, (error) => {\n\t\t\tcommands = {};\n\t\t\tdirect.speak(jira.errors(error));\n\t\t});\n\t});\n}", "function doSomething(opt, enable) {\r\n var defaults = { enable: false, count: 0, title: \"\", values: [1,2,3] };\r\n var options = mixIn({}, defaults, opt); //opzioni correnti con \r\n //ovverride in base all'opt passate\r\n //... logica della funzione che usa TUTTE le options\r\n console.dir(options.enable);\r\n}", "function testOptions(options) {\n // To prove a fix for #537, freeze options here.\n // If the object is modified, an error will be thrown.\n // Object.freeze(options);\n\n var parsed = {\n margin: 0,\n limit: 0,\n padding: 0,\n animate: true,\n animationDuration: 300,\n ariaFormat: defaultFormatter,\n format: defaultFormatter\n };\n\n // Tests are executed in the order they are presented here.\n var tests = {\n step: { r: false, t: testStep },\n start: { r: true, t: testStart },\n connect: { r: true, t: testConnect },\n direction: { r: true, t: testDirection },\n snap: { r: false, t: testSnap },\n animate: { r: false, t: testAnimate },\n animationDuration: { r: false, t: testAnimationDuration },\n range: { r: true, t: testRange },\n orientation: { r: false, t: testOrientation },\n margin: { r: false, t: testMargin },\n limit: { r: false, t: testLimit },\n padding: { r: false, t: testPadding },\n behaviour: { r: true, t: testBehaviour },\n ariaFormat: { r: false, t: testAriaFormat },\n format: { r: false, t: testFormat },\n tooltips: { r: false, t: testTooltips },\n keyboardSupport: { r: true, t: testKeyboardSupport },\n documentElement: { r: false, t: testDocumentElement },\n cssPrefix: { r: true, t: testCssPrefix },\n cssClasses: { r: true, t: testCssClasses }\n };\n\n var defaults = {\n connect: false,\n direction: \"ltr\",\n behaviour: \"tap\",\n orientation: \"horizontal\",\n keyboardSupport: true,\n cssPrefix: \"noUi-\",\n cssClasses: {\n target: \"target\",\n base: \"base\",\n origin: \"origin\",\n handle: \"handle\",\n handleLower: \"handle-lower\",\n handleUpper: \"handle-upper\",\n touchArea: \"touch-area\",\n horizontal: \"horizontal\",\n vertical: \"vertical\",\n background: \"background\",\n connect: \"connect\",\n connects: \"connects\",\n ltr: \"ltr\",\n rtl: \"rtl\",\n draggable: \"draggable\",\n drag: \"state-drag\",\n tap: \"state-tap\",\n active: \"active\",\n tooltip: \"tooltip\",\n pips: \"pips\",\n pipsHorizontal: \"pips-horizontal\",\n pipsVertical: \"pips-vertical\",\n marker: \"marker\",\n markerHorizontal: \"marker-horizontal\",\n markerVertical: \"marker-vertical\",\n markerNormal: \"marker-normal\",\n markerLarge: \"marker-large\",\n markerSub: \"marker-sub\",\n value: \"value\",\n valueHorizontal: \"value-horizontal\",\n valueVertical: \"value-vertical\",\n valueNormal: \"value-normal\",\n valueLarge: \"value-large\",\n valueSub: \"value-sub\"\n }\n };\n\n // AriaFormat defaults to regular format, if any.\n if (options.format && !options.ariaFormat) {\n options.ariaFormat = options.format;\n }\n\n // Run all options through a testing mechanism to ensure correct\n // input. It should be noted that options might get modified to\n // be handled properly. E.g. wrapping integers in arrays.\n Object.keys(tests).forEach(function(name) {\n // If the option isn't set, but it is required, throw an error.\n if (!isSet(options[name]) && defaults[name] === undefined) {\n if (tests[name].r) {\n throw new Error(\"noUiSlider (\" + VERSION + \"): '\" + name + \"' is required.\");\n }\n\n return true;\n }\n\n tests[name].t(parsed, !isSet(options[name]) ? defaults[name] : options[name]);\n });\n\n // Forward pips options\n parsed.pips = options.pips;\n\n // All recent browsers accept unprefixed transform.\n // We need -ms- for IE9 and -webkit- for older Android;\n // Assume use of -webkit- if unprefixed and -ms- are not supported.\n // https://caniuse.com/#feat=transforms2d\n var d = document.createElement(\"div\");\n var msPrefix = d.style.msTransform !== undefined;\n var noPrefix = d.style.transform !== undefined;\n\n parsed.transformRule = noPrefix ? \"transform\" : msPrefix ? \"msTransform\" : \"webkitTransform\";\n\n // Pips don't move, so we can place them using left/top.\n var styles = [[\"left\", \"top\"], [\"right\", \"bottom\"]];\n\n parsed.style = styles[parsed.dir][parsed.ort];\n\n return parsed;\n }", "function optionSwitch() {\r\n\t//Standard banner - no extra options; no featured targets available, so desired result mode can't be used\r\n\tif (bannerTypes[0].checked) {\r\n\t\tsimTypes[1].disabled = \"disabled\";\r\n\t\tsimTypes[0].checked = \"checked\";\r\n\t\t\r\n\t\tguarantee4StarToggle.disabled = \"disabled\";\r\n\t\tguarantee5StarToggle.disabled = \"disabled\";\r\n\t\t\r\n\t\trealNonFeat4StarOdds.disabled = \"disabled\";\r\n\t\t\r\n\t\tfor (i=0; i < eventCharTargets.length; i++) {\r\n\t\t eventCharTargets[i].disabled = \"disabled\";\r\n\t }\r\n\t for (i=0; i < epitomizedPathOpts.length; i++) {\r\n\t\t epitomizedPathOpts[i].disabled = \"disabled\";\r\n\t }\r\n\t\tfatePointInput.disabled = \"disabled\";\r\n\t for (i=0; i < eventWeapTargets.length; i++) {\r\n\t\t eventWeapTargets[i].disabled = \"disabled\";\r\n\t }\r\n\t}\r\n\t//Event character banner - character to pursue, if desired result mode is on\r\n\telse if (bannerTypes[1].checked) {\r\n\t\tsimTypes[1].removeAttribute(\"disabled\");\r\n\t\t\r\n\t\tguarantee4StarToggle.removeAttribute(\"disabled\");\r\n\t\tguarantee5StarToggle.removeAttribute(\"disabled\");\r\n\t\t\r\n\t\trealNonFeat4StarOdds.removeAttribute(\"disabled\");\r\n\t\t\r\n\t\tif (simTypes[1].checked) {\r\n\t\t for (i=0; i < eventCharTargets.length; i++) {\r\n\t\t eventCharTargets[i].removeAttribute(\"disabled\");\r\n\t }\r\n\t\t}\r\n\t\telse {\r\n\t\t\tfor (i=0; i< eventCharTargets.length; i++) {\r\n\t\t\t\teventCharTargets[i].disabled = \"disabled\";\r\n\t\t\t}\r\n\t\t}\r\n\t for (i=0; i < epitomizedPathOpts.length; i++) {\r\n\t\t epitomizedPathOpts[i].disabled = \"disabled\";\r\n\t }\r\n\t\tfatePointInput.disabled = \"disabled\";\r\n\t for (i=0; i < eventWeapTargets.length; i++) {\r\n\t\t eventWeapTargets[i].disabled = \"disabled\";\r\n\t }\r\n\t}\r\n\t//Event weapon banner - Epitomized Path; character to pursue, if desired result mode is on\r\n\telse {\r\n\t\tsimTypes[1].removeAttribute(\"disabled\");\r\n\t\t\r\n\t\tguarantee4StarToggle.removeAttribute(\"disabled\");\r\n\t\tguarantee5StarToggle.removeAttribute(\"disabled\");\r\n\t\t\r\n\t\trealNonFeat4StarOdds.removeAttribute(\"disabled\");\r\n\t\t\r\n\t\tfor (i=0; i < eventCharTargets.length; i++) {\r\n\t\t eventCharTargets[i].disabled = \"disabled\";\r\n\t }\r\n\t for (i=0; i < epitomizedPathOpts.length; i++) {\r\n\t\t epitomizedPathOpts[i].removeAttribute(\"disabled\");\r\n\t }\r\n\t\tfatePointInput.removeAttribute(\"disabled\");\r\n\t\tif (simTypes[1].checked) {\r\n\t for (i=0; i < eventWeapTargets.length; i++) {\r\n\t\t eventWeapTargets[i].removeAttribute(\"disabled\");\r\n\t }\r\n\t\t}\r\n\t\telse {\r\n\t\t\tfor (i=0; i < eventWeapTargets.length; i++) {\r\n\t\t\t\teventWeapTargets[i].disabled = \"disabled\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "function testOptions(options) {\n\n // To prove a fix for #537, freeze options here.\n // If the object is modified, an error will be thrown.\n // Object.freeze(options);\n\n var parsed = {\n margin: 0,\n limit: 0,\n padding: 0,\n animate: true,\n animationDuration: 300,\n ariaFormat: defaultFormatter,\n format: defaultFormatter\n };\n\n // Tests are executed in the order they are presented here.\n var tests = {\n 'step': {r: false, t: testStep},\n 'start': {r: true, t: testStart},\n 'connect': {r: true, t: testConnect},\n 'direction': {r: true, t: testDirection},\n 'snap': {r: false, t: testSnap},\n 'animate': {r: false, t: testAnimate},\n 'animationDuration': {r: false, t: testAnimationDuration},\n 'range': {r: true, t: testRange},\n 'orientation': {r: false, t: testOrientation},\n 'margin': {r: false, t: testMargin},\n 'limit': {r: false, t: testLimit},\n 'padding': {r: false, t: testPadding},\n 'behaviour': {r: true, t: testBehaviour},\n 'multitouch': {r: true, t: testMultitouch},\n 'ariaFormat': {r: false, t: testAriaFormat},\n 'format': {r: false, t: testFormat},\n 'tooltips': {r: false, t: testTooltips},\n 'cssPrefix': {r: false, t: testCssPrefix},\n 'cssClasses': {r: false, t: testCssClasses},\n 'useRequestAnimationFrame': {r: false, t: testUseRaf}\n };\n\n var defaults = {\n 'connect': false,\n 'direction': 'ltr',\n 'behaviour': 'tap',\n 'multitouch': false,\n 'orientation': 'horizontal',\n 'cssPrefix': 'noUi-',\n 'cssClasses': {\n target: 'target',\n base: 'base',\n origin: 'origin',\n handle: 'handle',\n handleLower: 'handle-lower',\n handleUpper: 'handle-upper',\n horizontal: 'horizontal',\n vertical: 'vertical',\n background: 'background',\n connect: 'connect',\n ltr: 'ltr',\n rtl: 'rtl',\n draggable: 'draggable',\n drag: 'state-drag',\n tap: 'state-tap',\n active: 'active',\n tooltip: 'tooltip',\n pips: 'pips',\n pipsHorizontal: 'pips-horizontal',\n pipsVertical: 'pips-vertical',\n marker: 'marker',\n markerHorizontal: 'marker-horizontal',\n markerVertical: 'marker-vertical',\n markerNormal: 'marker-normal',\n markerLarge: 'marker-large',\n markerSub: 'marker-sub',\n value: 'value',\n valueHorizontal: 'value-horizontal',\n valueVertical: 'value-vertical',\n valueNormal: 'value-normal',\n valueLarge: 'value-large',\n valueSub: 'value-sub'\n },\n 'useRequestAnimationFrame': true\n };\n\n // AriaFormat defaults to regular format, if any.\n if (options.format && !options.ariaFormat) {\n options.ariaFormat = options.format;\n }\n\n // Run all options through a testing mechanism to ensure correct\n // input. It should be noted that options might get modified to\n // be handled properly. E.g. wrapping integers in arrays.\n Object.keys(tests).forEach(function (name) {\n\n // If the option isn't set, but it is required, throw an error.\n if (options[name] === undefined && defaults[name] === undefined) {\n\n if (tests[name].r) {\n throw new Error(\"noUiSlider (\" + VERSION + \"): '\" + name + \"' is required.\");\n }\n\n return true;\n }\n\n tests[name].t(parsed, options[name] === undefined ? defaults[name] : options[name]);\n });\n\n // Forward pips options\n parsed.pips = options.pips;\n\n var styles = [['left', 'top'], ['right', 'bottom']];\n\n // Pre-define the styles.\n parsed.style = styles[parsed.dir][parsed.ort];\n parsed.styleOposite = styles[parsed.dir ? 0 : 1][parsed.ort];\n\n return parsed;\n }", "function testOptions(options) {\n // To prove a fix for #537, freeze options here.\n // If the object is modified, an error will be thrown.\n // Object.freeze(options);\n\n var parsed = {\n margin: 0,\n limit: 0,\n padding: 0,\n animate: true,\n animationDuration: 300,\n ariaFormat: defaultFormatter,\n format: defaultFormatter\n };\n\n // Tests are executed in the order they are presented here.\n var tests = {\n step: { r: false, t: testStep },\n start: { r: true, t: testStart },\n connect: { r: true, t: testConnect },\n direction: { r: true, t: testDirection },\n snap: { r: false, t: testSnap },\n animate: { r: false, t: testAnimate },\n animationDuration: { r: false, t: testAnimationDuration },\n range: { r: true, t: testRange },\n orientation: { r: false, t: testOrientation },\n margin: { r: false, t: testMargin },\n limit: { r: false, t: testLimit },\n padding: { r: false, t: testPadding },\n behaviour: { r: true, t: testBehaviour },\n ariaFormat: { r: false, t: testAriaFormat },\n format: { r: false, t: testFormat },\n tooltips: { r: false, t: testTooltips },\n keyboardSupport: { r: true, t: testKeyboardSupport },\n documentElement: { r: false, t: testDocumentElement },\n cssPrefix: { r: true, t: testCssPrefix },\n cssClasses: { r: true, t: testCssClasses }\n };\n\n var defaults = {\n connect: false,\n direction: \"ltr\",\n behaviour: \"tap\",\n orientation: \"horizontal\",\n keyboardSupport: true,\n cssPrefix: \"noUi-\",\n cssClasses: cssClasses\n };\n\n // AriaFormat defaults to regular format, if any.\n if (options.format && !options.ariaFormat) {\n options.ariaFormat = options.format;\n }\n\n // Run all options through a testing mechanism to ensure correct\n // input. It should be noted that options might get modified to\n // be handled properly. E.g. wrapping integers in arrays.\n Object.keys(tests).forEach(function(name) {\n // If the option isn't set, but it is required, throw an error.\n if (!isSet(options[name]) && defaults[name] === undefined) {\n if (tests[name].r) {\n throw new Error(\"noUiSlider (\" + VERSION + \"): '\" + name + \"' is required.\");\n }\n\n return true;\n }\n\n tests[name].t(parsed, !isSet(options[name]) ? defaults[name] : options[name]);\n });\n\n // Forward pips options\n parsed.pips = options.pips;\n\n // All recent browsers accept unprefixed transform.\n // We need -ms- for IE9 and -webkit- for older Android;\n // Assume use of -webkit- if unprefixed and -ms- are not supported.\n // https://caniuse.com/#feat=transforms2d\n var d = document.createElement(\"div\");\n var msPrefix = d.style.msTransform !== undefined;\n var noPrefix = d.style.transform !== undefined;\n\n parsed.transformRule = noPrefix ? \"transform\" : msPrefix ? \"msTransform\" : \"webkitTransform\";\n\n // Pips don't move, so we can place them using left/top.\n var styles = [[\"left\", \"top\"], [\"right\", \"bottom\"]];\n\n parsed.style = styles[parsed.dir][parsed.ort];\n\n return parsed;\n }", "function testOptions(options) {\n // To prove a fix for #537, freeze options here.\n // If the object is modified, an error will be thrown.\n // Object.freeze(options);\n\n var parsed = {\n margin: 0,\n limit: 0,\n padding: 0,\n animate: true,\n animationDuration: 300,\n ariaFormat: defaultFormatter,\n format: defaultFormatter\n };\n\n // Tests are executed in the order they are presented here.\n var tests = {\n step: { r: false, t: testStep },\n start: { r: true, t: testStart },\n connect: { r: true, t: testConnect },\n direction: { r: true, t: testDirection },\n snap: { r: false, t: testSnap },\n animate: { r: false, t: testAnimate },\n animationDuration: { r: false, t: testAnimationDuration },\n range: { r: true, t: testRange },\n orientation: { r: false, t: testOrientation },\n margin: { r: false, t: testMargin },\n limit: { r: false, t: testLimit },\n padding: { r: false, t: testPadding },\n behaviour: { r: true, t: testBehaviour },\n ariaFormat: { r: false, t: testAriaFormat },\n format: { r: false, t: testFormat },\n tooltips: { r: false, t: testTooltips },\n keyboardSupport: { r: true, t: testKeyboardSupport },\n documentElement: { r: false, t: testDocumentElement },\n cssPrefix: { r: true, t: testCssPrefix },\n cssClasses: { r: true, t: testCssClasses }\n };\n\n var defaults = {\n connect: false,\n direction: \"ltr\",\n behaviour: \"tap\",\n orientation: \"horizontal\",\n keyboardSupport: true,\n cssPrefix: \"noUi-\",\n cssClasses: cssClasses\n };\n\n // AriaFormat defaults to regular format, if any.\n if (options.format && !options.ariaFormat) {\n options.ariaFormat = options.format;\n }\n\n // Run all options through a testing mechanism to ensure correct\n // input. It should be noted that options might get modified to\n // be handled properly. E.g. wrapping integers in arrays.\n Object.keys(tests).forEach(function(name) {\n // If the option isn't set, but it is required, throw an error.\n if (!isSet(options[name]) && defaults[name] === undefined) {\n if (tests[name].r) {\n throw new Error(\"noUiSlider (\" + VERSION + \"): '\" + name + \"' is required.\");\n }\n\n return true;\n }\n\n tests[name].t(parsed, !isSet(options[name]) ? defaults[name] : options[name]);\n });\n\n // Forward pips options\n parsed.pips = options.pips;\n\n // All recent browsers accept unprefixed transform.\n // We need -ms- for IE9 and -webkit- for older Android;\n // Assume use of -webkit- if unprefixed and -ms- are not supported.\n // https://caniuse.com/#feat=transforms2d\n var d = document.createElement(\"div\");\n var msPrefix = d.style.msTransform !== undefined;\n var noPrefix = d.style.transform !== undefined;\n\n parsed.transformRule = noPrefix ? \"transform\" : msPrefix ? \"msTransform\" : \"webkitTransform\";\n\n // Pips don't move, so we can place them using left/top.\n var styles = [[\"left\", \"top\"], [\"right\", \"bottom\"]];\n\n parsed.style = styles[parsed.dir][parsed.ort];\n\n return parsed;\n }", "responsibilities() {\n return 'testing';\n }", "main() {\n if(this.options.createActions) {\n return this._private_actionPrompt()\n }\n\n return this.log('ERROR: Please select an option')\n }", "constructor(args, opts) {\n super(args, opts);\n\n console.log(args);\n // Cconsole.log(opts);\n /**\n * Set option skip welcome message\n */\n this.option('skip-welcome-msg', {\n desc: 'Skips the welcome message',\n type: Boolean\n });\n\n /**\n * Set option skip install message\n */\n this.option('skip-install-msg', {\n desc: 'Skips the message after the installation of dependencies',\n type: Boolean\n });\n\n /**\n * Set option use feature for jquery or bootstrap\n */\n this.option('use-feature', {\n desc: 'Includes bootstrap or jquery: bs-reset, bs-grid, bs-modules, jquery or none',\n type: String\n });\n\n /**\n * Set option use velocity\n */\n this.option('use-velocity', {\n desc: 'Includes velocity',\n type: Boolean\n });\n\n /**\n * Set option use vrt (visual regression testing)\n */\n this.option('use-vrt', {\n desc: 'Includes a tool for Visual Regression Testing',\n type: Boolean\n });\n }", "function test_switches(opt) {\n var test_types = ['symbols', 'strings', 'oddball', 'smi', 'heapnum'];\n\n function test(clause_type) {\n var values = clause_values[clause_type];\n\n test_types.forEach(function(test_type) {\n test_switch(clause_type, test_type, 'all', opt);\n test_switch(clause_type, test_type, 'none', opt);\n\n // Targeting specific clause feedback\n values.forEach(function(value) {\n test_switch(clause_type, test_type, [value], value, opt);\n test_switch(clause_type, test_type, value, value, opt);\n });\n });\n };\n\n test('string');\n test('smi');\n test('mixed');\n}", "function describeOptionTest (configurator, name, options) {\n describe('option: ' + name, function () {\n if (options.default) {\n it('default must be ' + options.default, function () {\n const config = configurator.load({})\n assert.strictEqual(config[name].toString(), options.default.toString())\n })\n }\n\n it('config: ' + name, function () {\n const configOptions = {}\n configOptions[name] = options.expected\n const config = configurator.load({ config: configOptions, argv: noArgs, env: noEnv })\n assert.strictEqual(config[name], options.expected)\n })\n\n it('env: ' + options.env, function () {\n const envOptions = {}\n envOptions[options.env] = options.expected\n const config = configurator.load({ env: envOptions })\n assert.strictEqual(config[name], options.expected)\n })\n\n if (options.short) {\n it('short arg: ' + options.short, function () {\n const config = configurator.load({ argv: ['', '', options.short, options.expected] })\n assert.strictEqual(config[name], options.expected)\n })\n }\n\n if (options.long) {\n it('long arg: ' + options.long, function () {\n const config = configurator.load({ argv: ['', '', options.long, options.expected] })\n assert.strictEqual(config[name], options.expected)\n })\n }\n })\n}", "function testOptions(options) {\n // To prove a fix for #537, freeze options here.\n // If the object is modified, an error will be thrown.\n // Object.freeze(options);\n var parsed = {\n margin: 0,\n limit: 0,\n animate: true,\n format: defaultFormatter\n },\n tests;\n // Tests are executed in the order they are presented here.\n tests = {\n 'step': {\n r: false,\n t: testStep\n },\n 'start': {\n r: true,\n t: testStart\n },\n 'connect': {\n r: true,\n t: testConnect\n },\n 'direction': {\n r: true,\n t: testDirection\n },\n 'snap': {\n r: false,\n t: testSnap\n },\n 'animate': {\n r: false,\n t: testAnimate\n },\n 'range': {\n r: true,\n t: testRange\n },\n 'orientation': {\n r: false,\n t: testOrientation\n },\n 'margin': {\n r: false,\n t: testMargin\n },\n 'limit': {\n r: false,\n t: testLimit\n },\n 'behaviour': {\n r: true,\n t: testBehaviour\n },\n 'format': {\n r: false,\n t: testFormat\n },\n 'tooltips': {\n r: false,\n t: testTooltips\n },\n 'cssPrefix': {\n r: false,\n t: testCssPrefix\n }\n };\n var defaults = {\n 'connect': false,\n 'direction': 'ltr',\n 'behaviour': 'tap',\n 'orientation': 'horizontal'\n };\n // Run all options through a testing mechanism to ensure correct\n // input. It should be noted that options might get modified to\n // be handled properly. E.g. wrapping integers in arrays.\n Object.keys(tests).forEach(function(name) {\n // If the option isn't set, but it is required, throw an error.\n if (options[name] === undefined && defaults[name] === undefined) {\n if (tests[name].r) {\n throw new Error(\"noUiSlider: '\" + name + \"' is required.\");\n }\n return true;\n }\n tests[name].t(parsed, options[name] === undefined ? defaults[\n name] : options[name]);\n });\n // Forward pips options\n parsed.pips = options.pips;\n // Pre-define the styles.\n parsed.style = parsed.ort ? 'top' : 'left';\n return parsed;\n }", "function userOptions() {\n inquirer\n .prompt([\n {\n type: \"list\",\n name: \"managerSelection\",\n message: \"What would you like to do?\",\n choices: [\"View Products for Sale\", \"View Low Inventory\", \"Add to Inventory\", \"Add New Product\", \"Exit\"]\n }\n ])\n .then(function (answer) {\n switch (answer.managerSelection) {\n case 'View Products for Sale':\n viewProducts();\n break;\n case 'View Low Inventory':\n viewLowInventory();\n break;\n case 'Add to Inventory':\n addToInventory();\n break;\n case 'Add New Product':\n addNewProduct();\n break;\n default:\n closeAndExit();\n }\n });\n}", "setTestOptions (callback) {\n\t\tthis.teamOptions.creatorIndex = 1;\n\t\tthis.userOptions.numRegistered = 3;\n\t\tthis.repoOptions.creatorIndex = 1;\n\t\tthis.repoOptions.numRepos = 2;\n\t\t/*\n\t\tthis.streamOptions.creatorIndex = 1;\n\t\tif (this.streamType === 'team stream') {\n\t\t\tObject.assign(this.streamOptions, {\n\t\t\t\ttype: 'channel',\n\t\t\t\tisTeamStream: true\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\tthis.streamOptions.type = this.streamType || 'channel';\n\t\t}\n\t\t*/\n\t\tObject.assign(this.postOptions, {\n\t\t\tcreatorIndex: 0,\n\t\t\twantReview: true,\n\t\t\tnumChanges: 2,\n\t\t\twantMarkers: 2\n\t\t});\n\t\tcallback();\n\t}", "function options() {\n\tconsole.clear();\n\t\n\tconsole.log('☮☮☮.⚠⚠⚠⚠⚠.⌘⌘⌘..⌘⌘⌘.⚠⚠⚠⚠⚠.☮☮☮\\n');\n\t\n\tconsole.log(' SUKUNASPAM OFICIAL v1.1'.help);\n\tconsole.log(' Powered by MP Server Inc.\\n'.help);\n\t\n\tconsole.log('☮☮☮.⚠⚠⚠⚠⚠.⌘⌘⌘..⌘⌘⌘.⚠⚠⚠⚠⚠.☮☮☮\\n');\n\t\n\tconsole.log('1 - Spam SMS [ Vivo ]'.yellow);\n\tconsole.log('2 - Spam SMS [ Claro ]'.yellow);\n\tconsole.log('3 - Spam SMS [ 99 Food ]'.yellow);\n\tconsole.log('4 - Spam SMS [ OFF ]'.yellow);\n\tconsole.log('5 - Spam SMS [ Uber Eats ]'.yellow);\n\tconsole.log('6 - Spam SMS [ OFF ]'.yellow);\n\tconsole.log('0 - Sair\\n'.yellow);\n\treturn readLine.question('Selecione uma opção: '.error);\n}", "function EnableTShirtDesignsAndColorsInteraction_ExceedingExpectations() {\n const $designSelect = $(\"#design\");\n const $colorSelect = $(\"#color\");\n const $colorSelectLabel = $(\"label[for='color']\");\n\n // Add a placeholder option\n const $placeholderOption = $('<option>Please select a T-shirt theme</option>');\n $colorSelect.prepend($placeholderOption);\n\n function MakeColorsVisibleByDesign(design) {\n let options = $colorSelect.children();\n\n /* Toggle visibility and select the first entry when selecting\n an option that is visible. */\n if (design === \"Select Theme\") { \n $colorSelect.hide(); \n $colorSelectLabel.hide();\n }\n\n for (let i = 0; i < options.length; i++ ) {\n let $option = $(options[i]);\n\n $option.toggle($option.data(\"belongstoshirt\") === design);\n }\n\n if (design !== \"Select Theme\") { \n $colorSelect.show(); \n $colorSelectLabel.show();\n $colorSelect.val($colorSelect.find(\"option:visible\")[0].value);\n }\n }\n\n // Connect & initialize interaction\n $designSelect.on(\"change\", () => { MakeColorsVisibleByDesign($designSelect.val()); });\n MakeColorsVisibleByDesign($designSelect.val());\n }", "function mainOptions() {\n inquirer\n .prompt({\n name: \"action\",\n type: \"list\",\n message: \"What would you like to do?\",\n choices: [\n \"View\",\n \"Add\",\n \"Delete\",\n \"Update\"\n ]\n })\n .then(function (answer) {\n switch (answer.action) {\n\n case \"View\":\n viewChoice();\n break;\n\n case \"Add\":\n addChoice();\n break;\n\n case \"Delete\":\n deleteChoice()\n break;\n\n case \"Update\":\n updateChoice()\n break;\n\n\n }\n });\n\n}", "function getOptions(provided)\n{\n var options = provided || {};\n\n if (!options.documentView)\n options.documentView = {};\n if (!options.documentView.closeLabel)\n options.documentView.closeLabel = \"Done\";\n\n\n if (!options.navigationView)\n options.navigationView = {};\n if (!options.navigationView.closeLabel)\n options.navigationView.closeLabel = \"Back\";\n\n\n if (!options.email)\n options.email = {};\n if (!options.email.enabled)\n options.email.enabled = false;\n\n\n if (!options.print)\n options.print = {};\n if (!options.print.enabled)\n options.print.enabled = false;\n\n\n if (!options.openWith)\n options.openWith = {};\n if (!options.openWith.enabled)\n options.openWith.enabled = false;\n\n\n if (!options.bookmarks)\n options.bookmarks = {};\n if (!options.bookmarks.enabled)\n options.bookmarks.enabled = false;\n\n\n if (!options.search)\n options.search = {};\n if (!options.search.enabled)\n options.search.enabled = false;\n\n\n if (!options.android)\n options.android = {};\n if (!options.android.viewerAppPackage)\n options.android.viewerAppPackage = 'de.sitewaerts.cleverdox.viewer';\n if (!options.android.viewerAppActivity)\n options.android.viewerAppActivity = 'DocumentViewerActivity';\n\n return options;\n}", "function executeHTests(){\n\t\n\tconsole.log(\"Hotel Tests:\");\n\ttestHSelectOption(1, 500);\n\ttestHSelectOption(2, 200);\n\ttestHSelectOption(3, 700);\n\ttestHSelectOption(4, 300);\n\ttestHSelectOption(5, 100);\n\ttestHSelectOption(6, 400);\n\ttestHSelectOption(7, 70);\n\ttestHSelectOption(8, 900);\n\ttestHSelectOption(9, 250);\n\ttestHSelectOption(10, 80);\n\tconsole.log(\"Should fail:\")\n\ttestHSelectOption(10, 800);\n\n\n}", "function Options() {\n\t\tchrome.runtime.sendMessage({\n\t\t\ttype: 'OPEN_OPTIONS'\n\t\t});\n\t}", "static Setup(options) {\n return Part_1.Part.Setup(options);\n }", "static Setup(options) {\n return Part_1.Part.Setup(options);\n }", "function offersTests({ apiGET, apiPOST }) {\n // maybe we don't need this in the API?\n it.todo(\"get offers for session\");\n // maybe we don't need this in the API?\n it.todo(\"get offers for position\");\n it.todo(\"get offer for assignment\");\n it.todo(\"accept/reject/withdraw offer\");\n it.todo(\"increment nag count\");\n it.todo(\"error when attempting to update a frozen field\");\n}", "function openOptionsPage() {\n browser.runtime.openOptionsPage().catch(err => reportError(err))\n }", "SetOption() {\n\n }", "function test_ChangeOption(scope) {\n selected_Test = scope.first_test;\n\tcurrent_test=selected_Test;\n\tscope.sample_disable=true;\n}", "function displayOptions() {\n\tinquirer.prompt([\n\t\t{\n\t\t\tname: \"options\",\n\t\t\ttype: \"list\",\n\t\t\tmessage: \"Welcome! What would you like to do today?\",\n\t\t\tchoices: [\"View Products for Sale\", \"View Low Inventory\", \"Add to Inventory\",\n\t\t\t\"Add New Product\"]\n\t\t}\n\t]).then(function(answers) {\n\t\tif (answers.options === \"View Products for Sale\") {\n\t\t\tviewProducts();\n\t\t}\n\t\telse if (answers.options === \"View Low Inventory\") {\n\t\t\tlowInventory();\n\t\t}\n\t\telse if (answers.options === \"Add to Inventory\") {\n\t\t\taddInventory();\n\t\t}\n\t\telse if (answers.options === \"Add New Product\") {\n\t\t\taddProduct();\n\t\t}\n\t});\n}", "function applyExtendedVersion() {\n\t\t//show avoid areas\n\t\t$('#avoidAreas').show();\n\t\t\n\t\t//show import/export features\n\t\t$('#exportImport').show();\n\t\t\n\t\t//show accessibility analysis\n\t\t$('#accessibilityAnalysis').show();\n\t}", "async function employeeOptions() {\n const { choice } = await inquirer.prompt([\n {\n type: \"list\",\n choices: [\"View all employees\",\n \"View employees by department\",\n \"View employees by manager\",\n \"Add a new employee\",\n \"Update employee\",\n \"Remove an employee\",\n \"Back\"\n ],\n message: \"What would you like to do?\",\n name: \"choice\"\n }\n ]);\n\n switch (choice) {\n case \"View all employees\":\n await employee.viewAllEmployees();\n break;\n case \"View employees by department\":\n await employee.viewEmployeesByDepartment();\n break;\n case \"View employees by manager\":\n await employee.viewEmployeesByManager();\n break;\n case \"Add a new employee\":\n await employee.addEmployee();\n break;\n case \"Update employee\":\n await employee.updateEmployee();\n break;\n case \"Remove an employee\":\n await employee.deleteEmployee();\n break;\n default:\n break;\n }\n askQuestions();\n}", "function managerOptions() {\n inquirer.prompt([\n {\n type: \"checkbox\",\n name: \"managerTask\",\n message: \"Hi manager. What would you like to do?\",\n choices: [\"View products for sale\", \"View low inventory\", \"Add to inventory\", \"Add New Product\"]\n }\n ]).then(function (manager) {\n var task = manager.managerTask;\n if (task == \"View products for sale\") {\n viewProducts();\n }\n else if (task == \"View low inventory\") {\n lowinventory();\n }\n else if (task == \"Add to inventory\") {\n addToInvetory();\n }\n else if (task == \"Add New Product\") {\n addProduct();\n }\n });\n}", "function openOptionsPage() {\n try {\n browser.runtime.openOptionsPage();\n }\n catch ( e ) {\n /**\n * @todo\n */\n }\n}", "function GetTestability(){}", "function options() {\n if (chrome.runtime.openOptionsPage) {\n chrome.runtime.openOptionsPage();\n } else {\n window.open(chrome.runtime.getURL('options.html'));\n }\n}", "function validateExtraFeatures(extraFeatures) { // 3 // 11\n if (extraFeatures) { // 4 // 12\n check(extraFeatures, { // 5 // 13\n // Modify options to enable ES2015 module syntax. // 6 // 14\n modules: Match.Optional(Boolean), // 7 // 15\n // Modify options to enable async/await syntax powered by Fibers. // 8 // 16\n meteorAsyncAwait: Match.Optional(Boolean), // 9 // 17\n // Modify options to enable React/JSX syntax. // 10\n react: Match.Optional(Boolean), // 11\n // Improve compatibility in older versions of Internet Explorer. // 12\n jscript: Match.Optional(Boolean) // 13\n }); // 14\n } // 15\n} // 16", "function setup()\n{\n\treturn {\n\t\t// Mandatory parameters\n\t\tdescription: \"Carte Novea\",\n\t\tproduct: \"010100AA\",\n\t\tconfig: \"config.js\",\n\t\ttests:[\n\t\t\t\t//test,//, test2, test3, test4\n\t\t\t\ttest_nested_module.my_tests\n\t\t\t],\n\t\t// Optional parameters\n\t\tadmin_pass: \"\", // leave empty == no admin mode, sinon \"caravane\"\n\t};\n}", "function testOptions ( options ) {\n\n\t\tvar parsed = {\n\t\t\tmargin: 0,\n\t\t\tlimit: 0,\n\t\t\tanimate: true,\n\t\t\tformat: defaultFormatter\n\t\t}, tests;\n\n\t\t// Tests are executed in the order they are presented here.\n\t\ttests = {\n\t\t\t'step': { r: false, t: testStep },\n\t\t\t'start': { r: true, t: testStart },\n\t\t\t'connect': { r: true, t: testConnect },\n\t\t\t'direction': { r: true, t: testDirection },\n\t\t\t'snap': { r: false, t: testSnap },\n\t\t\t'animate': { r: false, t: testAnimate },\n\t\t\t'range': { r: true, t: testRange },\n\t\t\t'orientation': { r: false, t: testOrientation },\n\t\t\t'margin': { r: false, t: testMargin },\n\t\t\t'limit': { r: false, t: testLimit },\n\t\t\t'behaviour': { r: true, t: testBehaviour },\n\t\t\t'format': { r: false, t: testFormat }\n\t\t};\n\n\t\t// Set defaults where applicable.\n\t\toptions = $.extend({\n\t\t\t'connect': false,\n\t\t\t'direction': 'ltr',\n\t\t\t'behaviour': 'tap',\n\t\t\t'orientation': 'horizontal'\n\t\t}, options);\n\n\t\t// Run all options through a testing mechanism to ensure correct\n\t\t// input. It should be noted that options might get modified to\n\t\t// be handled properly. E.g. wrapping integers in arrays.\n\t\t$.each( tests, function( name, test ){\n\n\t\t\t// If the option isn't set, but it is required, throw an error.\n\t\t\tif ( options[name] === undefined ) {\n\n\t\t\t\tif ( test.r ) {\n\t\t\t\t\tthrow new Error(\"noUiSlider: '\" + name + \"' is required.\");\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\ttest.t( parsed, options[name] );\n\t\t});\n\n\t\t// Pre-define the styles.\n\t\tparsed.style = parsed.ort ? 'top' : 'left';\n\n\t\treturn parsed;\n\t}", "function AdjustTestOptions() {\n this.hasContext = false;\n this.baseUrl = null;\n this.gdprUrl = null;\n this.subscriptionUrl = null;\n this.basePath = null;\n this.gdprPath = null;\n this.subscriptionPath = null;\n this.useTestConnectionOptions = null;\n this.timerIntervalInMilliseconds = null;\n this.timerStartInMilliseconds = null;\n this.sessionIntervalInMilliseconds = null;\n this.subsessionIntervalInMilliseconds = null;\n this.teardown = null;\n this.teardown = null;\n this.tryInstallReferrer = null;\n this.noBackoffWait = null;\n}", "function showOptions() {\n inquirer.prompt([{\n type: \"list\",\n name: \"menu\",\n message: \"Menu Options\",\n choices: [\n \"View Product Sales by Department\",\n \"Create New Department\",\n \"Exit\"\n ]\n }\n\n ]).then(function (option) {\n\n switch (option.menu) {\n case \"View Product Sales by Department\":\n viewProductSalesbyDepartment();\n break;\n case \"Create New Department\":\n createNewDepartment();\n break;\n default:\n connection.end();\n }\n });\n}", "function menuOptions() {\n\tinquirer.prompt([\n\t{\n\t\ttype: \"list\",\n\t\tmessage:\"\\nSelect a menu option from below\",\n\t\tchoices: [\"Make a new card\", \"Show existing cards\", \"Exit\"],\n\t\tname: \"menuChoices\"\n\t}\n\t\t]).then(function(useranswer){\n\n\t\t\tswitch (useranswer.menuChoices){\n\t\t\t\tcase 'Make a new card':\n\t\t\t\tconsole.log(\"Make a new flashcard\");\n\t\t\t\tBasicCard();\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'Show existing cards':\n\t\t\t\tconsole.log(\"This feature is not yet active\");\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'Exit':\n\t\t\t\tconsole.log(\"Exit\");\n\t\t\t\treturn;\n\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\treturn;\n\t\t\t\tconsole.log(\"\");\n\t\t\t\tconsole.log(\"Try Again\");\n\t\t\t\tconsole.log(\"\");\n\t\t\t} // close question selection\n\t\t});\n\t} // close function menuOptions", "setOptions() {\n let defaultObj = {numChar: 1, limitNum: 3, orderBlock: [\"suggest\",\"collection\",\"product\"]};\n if(!this.options)\n {\n this.options = defaultObj; // set default if user not put arg\n }\n else {\n for(let key in defaultObj) // \n {\n if(!this.options[key])\n {\n this.options[key] = defaultObj[key];\n }\n }\n }\n \n\n \n }", "function checkOpts() {\n for (var i = 0; i < $scope.opts.length; i++) {\n if ($scope.opts[i].toLowerCase() == $scope.ua) {\n $element.show();\n return false;\n }\n }\n }", "function testMain() {\n var mode = 'test';\n main(mode);\n}", "function getLocalOptions(config) {\n services: ['selenium-standalone']\n}", "function openOptions() {\n chromeRuntime.openOptionsPage();\n }", "function managerOptions() {\n inquirer.prompt({\n name: \"action\",\n type: \"list\",\n message: \"Please make a selection.\",\n choices: [\"View products for sale.\",\n \"View low inventory.\",\n \"Add to current inventory levels.\",\n \"Add new product.\",\n \"Exit the system.\"\n ]\n }).then(function(answer) {\n switch (answer.action) {\n case \"View products for sale.\":\n displayInventory();\n break;\n case \"View low inventory.\":\n lowInventory();\n break;\n case \"Add to current inventory levels.\":\n addInventory();\n break;\n case \"Add new product.\":\n addNewItem();\n break;\n case \"Exit the system.\":\n quitManager();\n break;\n }\n });\n}", "_optionalVRT() {\n let isVRT = false;\n if (this.props.useVRT || this.options['use-vrt']) {\n isVRT = true;\n // Config file for visual regression tests\n this.fs.copy(\n this.templatePath('test_visual-regression-tests_backstop_config.js'),\n this.destinationPath('test/visual-regression-tests/backstop_config.js')\n );\n // Config for viewports\n this.fs.copy(\n this.templatePath('test_visual-regression-tests_backstop_viewports.js'),\n this.destinationPath('test/visual-regression-tests/backstop_viewports.js')\n );\n\n // Add Tasts for VRT if this option is chosen\n this.fs.copyTpl(\n this.templatePath('felab_default_aliases.yaml'),\n this.destinationPath('felab/default/aliases.yaml'),\n {\n includeVRT: isVRT\n }\n );\n }\n }", "responsibilities() {\n return 'application development';\n }", "function main() {\n // Setup Applitools\n let eyes = setup();\n\n // Set viewports\n const viewportLandscape = { width: 1920, height: 1200 };\n const viewportPortrait = { width: 600, height: 800 };\n \n // Execute Chrome driver tests\n browserDriver(eyes, Capabilities.chrome(), viewportLandscape, viewportPortrait);\n \n // Execute FireFox driver tests\n browserDriver(eyes, Capabilities.firefox(), viewportLandscape, viewportPortrait);\n}", "function employeeOption() {\n inquirer.prompt(employeeOptionQuestions).then(response => {\n if (response.teamMember === 'Add an Engineer') {\n addEngineer();\n }\n else if (response.teamMember === 'Add an Intern') {\n addIntern();\n }\n else {\n generateHTML(team);\n }\n });\n }", "function run_selectedTests() {\r\n\tadd_UnSelectedTestsToShould_ignore();\r\n\tvar suite = framework.createTestSuite(framework.testcaseArray[\"suiteName\"]);\r\n\tfor (var tc in framework.testcaseArray) {\r\n\t\tsuite.add(framework.testcaseArray[tc]);\r\n\t}\r\n\tframework.runSuite(suite);\r\n\t//enable the four display button\r\n\tdocument.getElementById('btnXML').style.display = 'inline';\r\n\tdocument.getElementById('btnTAP').style.display = 'inline';\r\n\tdocument.getElementById('btnJUnitXML').style.display = 'inline';\r\n\tdocument.getElementById('btnJSON').style.display = 'inline';\r\n\tdocument.getElementById('btnSendReport').style.display = 'inline';\r\n}", "function jum_choose_tests(scopeobj) {\n if (jum.areTestsChosen()) {\n bu_alert(\"tests already chosen\");\n return;\n }\n\n if (arguments.length == 0 || !scopeobj) scopeobj = jum_global;\n\n var test_func_names;\n // see if user has supplied a set of desired test function names\n // a flat Array of test function names that may have alaready been provided (see testnames.pl)\n if (typeof jum.TEST_FUNCTION_NAMES !== 'undefined') {\n test_func_names = jum.TEST_FUNCTION_NAMES;\n // iterate over and ensure they are actually in the scopeobj\n var filtered = [];\n var removed = [];\n for(var i=0;i<test_func_names.length;++i) {\n var name = test_func_names[i];\n if (typeof scopeobj[name] == 'undefined') {removed.push(name)}\n else filtered.push(name);\n }\n if (removed.length > 0) bu_alert(\"removed \" + removed.length + \" non-existent test function names: \" + removed.join(','));\n test_func_names = filtered;\n }\n\n // if not, we have to do some reflection\n else {\n if (jum_are_global_functions_enumerable()) {\n test_func_names = jum_get_object_function_names(scopeobj);\n }\n else if (jum_are_scripts_parseable()) {\n test_func_names = jum_parse_window_scripts();\n }\n else {throw new Error(\"no way to determine test functions\");}\n\n // filter for ones whose names match the pattern\n //bu_alert(\"(jsunit_wrap.js) got \" + test_func_names.length + \" symbols before filtering for test functions\");\n test_func_names = jum_just_test_functions(test_func_names);\n }\n\n bu_alert(\"(jsunit_wrap.js) got \" + test_func_names.length + \" test function names\");\n\n // see if user has selected a desired group\n var groupname = jum.getChosenTestGroupName();\n if (groupname && groupname == '') groupname = null;\n\n if (groupname) {\n jum.info(\"(jsunit_wrap.js) running group \" + groupname);\n test_func_names = jum_function_names_in_group(test_func_names);\n }\n\n // append our special test at the end\n// test_func_names.push('jum_special_reportAsync');\n\n // convert to alltests\n var alltests = jum_new_alltests();\n jum_initialize_alltests(alltests, scopeobj, test_func_names);\n\n // append our special test at the end\n if (jum_has_settimeout()) {\n jum_add_test(alltests, 'special', 'reportAsync', 'jum_special_reportAsync', jum_special_reportAsync);\n }\n else {\n jum.info('no setTimeout, not checking async completion');\n bu_alert('(jsunit_wrap.js) no setTimeout, not checking async completion');\n }\n\n // set tests\n //bu_alert(\"(jsunit_wrap.js) setting tests\");\n jum.setTests(alltests);\n}", "constructor() {\n this._settings = {\n type: 'checkbox',\n title: 'hideSeedbox',\n scope: SettingGroup.Global,\n desc: 'Remove the \"Get A Seedbox\" menu item',\n };\n // An element that must exist in order for the feature to run\n this._tar = '#menu .sbDonCrypto';\n // Add 1+ valid page type. Exclude for global\n Util.startFeature(this._settings, this._tar, []).then((t) => {\n if (t) {\n this._init();\n }\n });\n }", "function options() {\n inquirer.prompt({\n type: 'list',\n name: 'menu',\n message: 'What would you like to do?',\n choices: [\n 'View All Departments',\n 'Add Department',\n 'View All Roles',\n 'Add Role',\n 'View All Employees',\n 'Add Employee',\n 'Update Employee Role',\n 'Delete Department',\n 'Delete Employee',\n 'Delete Role',\n 'Quit'\n ]\n\n })\n .then(function (answers) {\n console.log('view');\n switch (answers.menu) {\n case 'View All Departments':\n viewAllDepartments();\n break;\n case 'Add Department':\n addDepartment();\n break;\n case 'View All Roles':\n viewAllRoles();\n break;\n case 'Add Role':\n addRole();\n break;\n case 'View All Employees':\n viewAllEmployees();\n break;\n case 'Add Employee':\n addEmployee();\n break;\n case 'Update Employee Role':\n updateEmployeeRole();\n break;\n case 'Delete Department':\n deleteDepartment();\n break;\n case 'Delete Employee':\n deleteEmployee();\n break;\n case 'Delete Role':\n deleteRole();\n break;\n case 'Quit':\n quitApp();\n break;\n default:\n console.log(\"You chose wrong.\")\n }\n })\n\n}", "static Setup(options = {}) {\n return Part_1.Part.Setup(options);\n }", "function useHelps(index) {\n //Applying hint method\n $(\"#hint\").click(function(){\n index.useHint();\n $(this).hide(1000);\n });\n //Applying public method\n $(\"#public\").click(function(){\n index.usePubVote();\n $(this).hide(1000);\n });\n //Applying fifty method\n $(\"#fifty\").click(function(){\n index.useFifty();\n $(this).hide(1000);\n });\n }", "defineOptionEvent(e) {\n this.defineOption(e.detail);\n }", "function optionDefinitions(){\n const od = [\n {\n name: 'help',\n type: Boolean,\n alias: 'h'\n },\n {\n name: 'csvfile0',\n type: String\n /* The 0th file that will be converted.\n *\n *\n * The file slcsp.csv given in the slcsp.zip archive.\n * It will be converted to the sqlite3 file given by dbfile0\n */\n },\n {\n name: 'dbfile0',\n type: String\n /* The database file which was converted from csvfile0. */\n /* This is a sqlite3 db file currently. */\n },\n {\n name: 'dbtable0',\n type: String\n /* When a csv file is converted into a database file, the\n * data in the csv file needs to live in a certain table.\n * That table is given by dbtable0, for the database file\n * dbfile0, which was converted from csvfile0.\n */\n },\n {\n name: 'cwd0',\n type: String\n /*\n * The files csvfile0 and dbfile0 need to live in some\n * directory. That location is given by cwd0.\n */\n },\n {\n name: 'csvfile1',\n type: String\n /* The second csvfile (0 based) that will be converted to a db file, given by dbfile1.\n * In general, this is anticipated to be zips.csv\n * The relationship between csvfile1, dbfile1, dbtable1, cwd1\n * is much the same as elaborated upon for csvfile0.\n */\n },\n {\n name: 'dbfile1',\n type: String,\n defaultOption: true\n /* The result of converting csvfile1 to a db file. */\n },\n {\n name: 'dbtable1',\n type: String\n /* The name of the table into which the data from csvfile1 is stored.*/\n /* The table is not implied nor found in the csvfile. */\n /* dbtable1 does double duty as a specifier for the schema when attach database is done. */\n /* The immediate above is a possible @todo - have schema1 as an option.*/\n },\n {\n name:'cwd1',\n type: String\n /* The location of the files csvfile1 and dbfile1. */\n },\n {\n name:'csvfile2',\n type: String\n /* The third csvfile (0 based) that will be converted to a db file, given by dbfile2.\n * In general, this is anticipated to be plans.csv from the archive\n * slcsp.zip.\n */\n },\n {\n name:'dbfile2',\n type: String\n /* The result of converting csvfile2 to a dbfile. */\n },\n {\n name:'dbtable2',\n type: String\n /* The name of the table into which the data from csvfile2 is stored.*/\n /* The table is not implied nor found in the csvfile. */\n /* dbtable2 does double duty as a specifier for the schema when attach database is done. */\n /* The immediate above is a possible @todo - have schema2 as an option.*/\n },\n {\n name: 'cwd2',\n type: String\n /* The location of the files csvfile2 and dbfile2. */\n },\n {\n name: 'output',\n type: String\n /*\n * The name of the output database file.\n * @todo As it stands on 2020-12-26 11:51EST, the concept\n * of output is underspecified. Specifically the location\n * of that database file is needed. Providing a remedy\n * for this will insure all options are seen somewhat alike.\n */\n },\n {\n name: 'keepdbfiles',\n type: Boolean,\n /*\n * Indicates whether or not the sqlite3 database (db) files are kept\n * after execution. Since the requirements do not specify the production\n * of these artifacts, this is by default set to false.\n */\n // defaultValue: false\n }\n ];\n return od;\n}", "function GetTestability() {}", "function GetTestability() {}", "function GetTestability() {}", "constructor(name, tests, enabled = true) {\n this.name = name;\n this.tests = tests;\n this.enabled = enabled;\n }", "function BootstrapOptions() {}", "function BootstrapOptions() {}", "function BootstrapOptions() {}", "function toolsOptions(options, settings, settingsText, submit) {\n if (options || settings || settingsText) {\n options.addEventListener(\n 'click',\n function() {\n if (checked(options)) {\n enable(submit);\n showBlock(settings);\n } else {\n hide(settings);\n }\n },\n false\n );\n settingsText.addEventListener(\n 'input',\n function() {\n if (ifShowBlock(settings)) {\n enable(submit);\n }\n },\n false\n );\n }\n }", "function GetTestability() { }", "function GetTestability() { }", "function generateDisplayOptions(options) {\n\t\t//DEBUG\n\t\t\tif (getPreferenceGroup(\"rebar.appSettings\").debug == true) {\n\t\t\t\t$(`#${options.target}`).append(`\n\t\t\t\t\t<h2 class=\"headerList\">Debug</h2>\n\t\t\t\t\t<div class=\"containerItemList inset inline spacerDouble alwaysBackgroundColor\">\n\t\t\t\t\t\t<section class=\"containerSection excludePadding excludeMargin\">\n\t\t\t\t\t\t\t<div class=\"itemList fixedIconSize\">\n\t\t\t\t\t\t\t\t${iconHardware.monitorStroke}\n\t\t\t\t\t\t\t\t<div class=\"label\" id=\"increaseContrastLabel\">\n\t\t\t\t\t\t\t\t\t<span>OS Theme</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"containerContextButton\" data-setting=\"os\" data-position=\"right\" data-type=\"picker\">\n\t\t\t\t\t\t\t\t\t<button class=\"buttonContext transparent excludePadding\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"contextContainerLabel\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"contextLabel\" style=\"text-transform: none\"></span>\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"contextGripper\">${iconShapes.chevronOutwardsVerticalFill}</span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t<div class=\"contextContainerMenu\">\n\t\t\t\t\t\t\t\t\t\t<button data-name=\"default\" onclick=\"overrideOS('default')\">Default</button>\n\t\t\t\t\t\t\t\t\t\t<button data-name=\"ios\" onclick=\"overrideOS('ios')\">iOS</button>\n\t\t\t\t\t\t\t\t\t\t<button data-name=\"macos\" onclick=\"overrideOS('macos')\">macOS</button>\n\t\t\t\t\t\t\t\t\t\t<button data-name=\"android\" onclick=\"overrideOS('android')\">Android</button>\n\t\t\t\t\t\t\t\t\t\t<button data-name=\"windows\" onclick=\"overrideOS('windows')\">Windows</button>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</section>\n\t\t\t\t\t</div>\n\t\t\t\t`);\n\t\t\t}\n\t\t\t\n\t\t\tswitch (getPreferenceGroup(\"rebar.appSettings\").os) {\n\t\t\t\tcase 'default':\n\t\t\t\t\t$(`[data-setting=\"os\"] .contextLabel`).append(`Default`);\n\t\t\t\t\t$(`[data-name=\"default\"]`).addClass(`picked`);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ios':\n\t\t\t\t\t$(`[data-setting=\"os\"] .contextLabel`).append(`iOS`);\n\t\t\t\t\t$(`[data-name=\"ios\"]`).addClass(`picked`);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'macos':\n\t\t\t\t\t$(`[data-setting=\"os\"] .contextLabel`).append(`macOS`);\n\t\t\t\t\t$(`[data-name=\"macos\"]`).addClass(`picked`);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'android':\n\t\t\t\t\t$(`[data-setting=\"os\"] .contextLabel`).append(`Android`);\n\t\t\t\t\t$(`[data-name=\"android\"]`).addClass(`picked`);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'windows':\n\t\t\t\t\t$(`[data-setting=\"os\"] .contextLabel`).append(`Windows`);\n\t\t\t\t\t$(`[data-name=\"windows\"]`).addClass(`picked`);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\n\t\tif (options.themeOptions == true || options.accentOptions == true || options.contrastOptions == true || options.motionOptions == true) {\n\t\t\t//SET UP THE CONTAINER\n\t\t\t$(`#${options.target}`).append(`\n\t\t\t\t<h2 class=\"headerList\">Visuals</h2>\n\t\t\t\t<div class=\"containerItemList inset inline spacerDouble alwaysBackgroundColor\">\n\t\t\t\t\t<section class=\"containerSection excludePadding excludeMargin\" id=\"containerVisuals\"></section>\n\t\t\t\t</div>\n\t\t\t`);\n\t\t\t\n\t\t\t//THEMES\n\t\t\tif (options.themeOptions == true) {\n\t\t\t\t//SET UP THE CONTAINER\n\t\t\t\t$(`#containerVisuals`).append(`\n\t\t\t\t\t<div class=\"itemList fixedIconSize\">\n\t\t\t\t\t\t${iconObjects.paintbrushStroke}\n\t\t\t\t\t\t<div class=\"label\" id=\"increaseContrastLabel\">\n\t\t\t\t\t\t\t<span>Theme</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"containerContextButton\" data-setting=\"appearance\" data-position=\"right\" data-type=\"pickericons\">\n\t\t\t\t\t\t\t<button class=\"buttonContext transparent excludePadding\">\n\t\t\t\t\t\t\t\t<div class=\"contextContainerLabel\">\n\t\t\t\t\t\t\t\t\t<span class=\"contextLabel\"></span>\n\t\t\t\t\t\t\t\t\t<span class=\"contextGripper\">${iconShapes.chevronOutwardsVerticalFill}</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t<div class=\"contextContainerMenu\"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t`);\n\t\t\t\t\n\t\t\t\t//GENERATE THE TOKENS\n\t\t\t\t$.each( appThemes, function( key, val ) {\n\t\t\t\t\t$(`[data-setting=\"appearance\"] .contextContainerMenu`).append(`\n\t\t\t\t\t\t<button data-value=\"${key}\" data-label=\"${val.name}\" data-icongroup='${val.iconGroup}' data-iconname='${val.iconName}'>\n\t\t\t\t\t\t\t${val.name}\n\t\t\t\t\t\t\t${window[val.iconGroup][val.iconName]}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t`);\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t//SET THEME DROPDOWN\n\t\t\t\t$(`[data-setting=\"appearance\"] button[data-value='${getPreferenceGroup(\"rebar.appSettings\").appearance}']`).addClass(\"picked\");\n\t\t\t\t$(`[data-setting=\"appearance\"] .contextLabel`).append(window[appThemes[getPreferenceGroup(\"rebar.appSettings\").appearance].iconGroup][appThemes[getPreferenceGroup(\"rebar.appSettings\").appearance].iconName]);\n\t\t\t\t$(`[data-setting=\"appearance\"] .contextLabel`).append(appThemes[getPreferenceGroup(\"rebar.appSettings\").appearance].name);\n\t\t\t}\n\t\t\t\n\t\t\t//ACCENTS\n\t\t\tif (options.accentOptions == true) {\n\t\t\t\t//SET UP THE CONTAINER\n\t\t\t\t$(`#containerVisuals`).append(`\n\t\t\t\t\t<div class=\"itemList fixedIconSize\">\n\t\t\t\t\t\t${iconObjects.swatchBookRight}\n\t\t\t\t\t\t<div class=\"label\" id=\"increaseContrastLabel\">\n\t\t\t\t\t\t\t<span>Accent</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"containerContextButton\" data-setting=\"accent\" data-position=\"right\" data-type=\"popover\">\n\t\t\t\t\t\t\t<button class=\"buttonContext transparent excludePadding\">\n\t\t\t\t\t\t\t\t<div class=\"contextContainerLabel\">\n\t\t\t\t\t\t\t\t\t<span class=\"contextLabel\" style=\"text-transform: none\"><span class=\"colorChip\" data-accent=\"${getPreferenceGroup(\"rebar.appSettings\").accent}\"></span> ${appAccents[getPreferenceGroup(\"rebar.appSettings\").accent]}</span>\n\t\t\t\t\t\t\t\t\t<span class=\"contextGripper\">${iconShapes.chevronOutwardsVerticalFill}</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t<div class=\"contextContainerMenu\">\n\t\t\t\t\t\t\t\t<div class=\"containerAccents itemList fixedIconSize\" id=\"pickerAccent\" data-max=\"1\" data-setting=\"accent\"></div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t`);\n\t\t\t\t\n\t\t\t\t//GENERATE THE TOKENS\n\t\t\t\t$.each( appAccents, function( key, val ) {\n\t\t\t\t\t$(`#pickerAccent`).append(`\n\t\t\t\t\t\t<div class=\"accentChip selectionRing\" data-value=\"${key}\" data-accent=\"${key}\" title=\"${val}\"></div>\n\t\t\t\t\t`);\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t//SET THE PICKED TOKEN\n\t\t\t\t$(`#pickerAccent [data-value=\"${getPreferenceGroup(\"rebar.appSettings\").accent}\"]`).addClass(\"picked\");\n\t\t\t\t$(`#selectedAccent`).empty().append(appAccents[getPreferenceGroup(\"rebar.appSettings\").accent]);\n\t\t\t}\n\t\t\t\n\t\t\t//GENERATE INCREASED CONTRAST OPTIONS\n\t\t\tif (options.contrastOptions == true) {\n\t\t\t\t//GENERATE MENU\n\t\t\t\t$(`#containerVisuals`).append(`\n\t\t\t\t\t<div class=\"itemList fixedIconSize\">\n\t\t\t\t\t\t${iconShapes.circleHalfVerticalRightFill}\n\t\t\t\t\t\t<div class=\"label\" id=\"increaseContrastLabel\">\n\t\t\t\t\t\t\t<span>Increase Contrast</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<button class=\"switch\" data-setting=\"increaseContrast\"></button>\n\t\t\t\t\t</div>\n\t\t\t\t`);\n\t\t\t\t\n\t\t\t\t//SET SWITCH STATE\n\t\t\t\tif (getPreferenceGroup(\"rebar.appSettings\").increaseContrast == \"less\") {\n\t\t\t\t\t$('[data-setting=\"increaseContrast\"]').addClass(\"off\");\n\t\t\t\t\t$('[data-setting=\"increaseContrast\"]').attr(\"title\", \"Off\")\n\t\t\t\t} else {\n\t\t\t\t\t$('[data-setting=\"increaseContrast\"]').attr(\"title\", \"On\")\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (queryIncreasedContrast == true) {\n\t\t\t\t\t$('[data-setting=\"increaseContrast\"]').addClass(\"disabled\").removeClass(\"off\");\n\t\t\t\t\t$(\"#increaseContrastLabel\").append(`<span class=\"subtext\">Using device settings</span>`)\n\t\t\t\t\t$('[data-setting=\"increaseContrast\"]').attr(\"title\", \"On\")\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//GENERATE REDUCED MOTION OPTIONS\n\t\t\tif (options.motionOptions == true) {\n\t\t\t\t//GENERATE MENU\n\t\t\t\t$(`#containerVisuals`).append(`\n\t\t\t\t\t<div class=\"itemList fixedIconSize\">\n\t\t\t\t\t\t${iconObjects.dialOffStroke}\n\t\t\t\t\t\t<div class=\"label\" id=\"reducedMotionLabel\">\n\t\t\t\t\t\t\t<span>Reduce Motion</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<button class=\"switch\" data-setting=\"reduceMotion\"></button>\n\t\t\t\t\t</div>\n\t\t\t\t`);\n\t\t\t\t\n\t\t\t\t//SET SWITCH STATE\n\t\t\t\tif (getPreferenceGroup(\"rebar.appSettings\").reduceMotion == \"off\") {\n\t\t\t\t\t$('[data-setting=\"reduceMotion\"]').addClass(\"off\");\n\t\t\t\t\t$('[data-setting=\"reduceMotion\"]').attr(\"title\", \"Off\")\n\t\t\t\t} else {\n\t\t\t\t\t$('[data-setting=\"reduceMotion\"]').attr(\"title\", \"On\")\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (queryReducedMotion == true) {\n\t\t\t\t\t$('[data-setting=\"reduceMotion\"]').addClass(\"disabled\").removeClass(\"off\");\n\t\t\t\t\t$(\"#reducedMotionLabel\").append(`<span class=\"subtext\">Using device settings</span>`)\n\t\t\t\t\t$('[data-setting=\"reduceMotion\"]').attr(\"title\", \"On\")\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (options.textSizeOptions == true || options.textWeightOptions == true || options.textFontOptions == true) {\n\t\t\t//SET UP THE CONTAINER\n\t\t\t$(`#${options.target}`).append(`\n\t\t\t\t<h2 class=\"headerList\">Text</h2>\n\t\t\t\t<div class=\"containerItemList inset inline spacerDouble alwaysBackgroundColor\">\n\t\t\t\t\t<section class=\"containerSection excludePadding excludeMargin\" id=\"containerText\"></section>\n\t\t\t\t</div>\n\t\t\t`);\n\t\t\t\n\t\t\t//GENERATE FONT OPTIONS\n\t\t\tif (options.textFontOptions == true) {\n\t\t\t\t//GENERATE MENU\n\t\t\t\t$(`#containerText`).append(`\n\t\t\t\t\t<div class=\"itemList fixedIconSize\">\n\t\t\t\t\t\t${iconInterfaceElements.textDyslexia}\n\t\t\t\t\t\t<div class=\"label\">Font</div>\n\t\t\t\t\t\t<div class=\"containerContextButton\" data-setting=\"font\" data-position=\"right\" data-type=\"picker\">\n\t\t\t\t\t\t\t<button class=\"buttonContext transparent excludePadding\">\n\t\t\t\t\t\t\t\t<div class=\"contextContainerLabel\">\n\t\t\t\t\t\t\t\t\t<span class=\"contextLabel\"></span>\n\t\t\t\t\t\t\t\t\t<span class=\"contextGripper\">${iconShapes.chevronOutwardsVerticalFill}</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t<div class=\"contextContainerMenu\">\n\t\t\t\t\t\t\t\t<button data-value=\"system\" data-label=\"System\">\n\t\t\t\t\t\t\t\t\t<span>System<br /><span class=\"subtext\">The default font for your device</span></span>\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t<button data-value=\"opendyslexic\" data-label=\"OpenDyslexic\">\n\t\t\t\t\t\t\t\t\t<span>OpenDyslexic<br /><span class=\"subtext\">For people with Dyslexia</span></span>\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t<button data-value=\"atkinson\" data-label=\"Atkinson Hyperlegible\">\n\t\t\t\t\t\t\t\t\t<span>Atkinson Hyperlegible<br /><span class=\"subtext\">For people with low vision</span></span>\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t`);\n\t\t\t\t\n\t\t\t\tswitch (getPreferenceGroup(\"rebar.appSettings\").textFont) {\n\t\t\t\t\tcase 'system':\n\t\t\t\t\t\t$(`[data-setting=\"font\"] .contextLabel`).append(`System`);\n\t\t\t\t\t\t$(`[data-value=\"system\"]`).addClass(`picked`);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'opendyslexic':\n\t\t\t\t\t\t$(`[data-setting=\"font\"] .contextLabel`).append(`OpenDyslexic`);\n\t\t\t\t\t\t$(`[data-value=\"opendyslexic\"]`).addClass(`picked`);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'atkinson':\n\t\t\t\t\t\t$(`[data-setting=\"font\"] .contextLabel`).append(`Atkinson Hyperlegible`);\n\t\t\t\t\t\t$(`[data-value=\"atkinson\"]`).addClass(`picked`);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//GENERATE TEXT SIZE OPTIONS\n\t\t\tif (options.textSizeOptions == true) {\n\t\t\t\t//GENERATE MENU\n\t\t\t\t$(`#containerText`).append(`\n\t\t\t\t\t<div class=\"itemList fixedIconSize\">\n\t\t\t\t\t\t${iconInterfaceElements.textSize}\n\t\t\t\t\t\t<div class=\"label\">\n\t\t\t\t\t\t\t<span>Text Size</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"containerContextButton\" data-setting=\"dynamicTypeSize\" data-position=\"right\" data-type=\"picker\">\n\t\t\t\t\t\t\t<button class=\"buttonContext transparent excludePadding\">\n\t\t\t\t\t\t\t\t<div class=\"contextContainerLabel\">\n\t\t\t\t\t\t\t\t\t<span class=\"contextLabel\"></span>\n\t\t\t\t\t\t\t\t\t<span class=\"contextGripper\">${iconShapes.chevronOutwardsVerticalFill}</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t<div class=\"contextContainerMenu\"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t`);\n\t\t\t\t\n\t\t\t\t//GENERATE MENU ITEMS\n\t\t\t\t$.each( appTextSizes, function( key, val ) {\n\t\t\t\t\t$(`[data-setting=\"dynamicTypeSize\"] .contextContainerMenu`).append(`\n\t\t\t\t\t\t<button data-value=\"${key}\" data-label=\"${val}\">${val}</button>\n\t\t\t\t\t`)\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t//SET TEXT SIZE DROPDOWN\n\t\t\t\t$(`[data-setting='dynamicTypeSize'] button[data-value='${getPreferenceGroup(\"rebar.appSettings\").dynamicTypeSize.value}']`).addClass(\"picked\");\n\t\t\t\t$(\"[data-setting='dynamicTypeSize'] .contextLabel\").append(getPreferenceGroup(\"rebar.appSettings\").dynamicTypeSize.label);\n\t\t\t}\n\t\t\t\n\t\t\t//GENERATE BOLD TEXT OPTIONS\n\t\t\tif (options.textWeightOptions == true) {\n\t\t\t\t//GENERATE MENU\n\t\t\t\t$(`#containerText`).append(`\n\t\t\t\t\t<div class=\"itemList fixedIconSize\">\n\t\t\t\t\t\t${iconInterfaceElements.textWeight}\n\t\t\t\t\t\t<div class=\"label\">\n\t\t\t\t\t\t\t<span>Bold Text</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<button class=\"switch\" data-setting=\"boldText\"></button>\n\t\t\t\t\t</div>\n\t\t\t\t`);\n\t\t\t\t\n\t\t\t\tif (getPreferenceGroup(\"rebar.appSettings\").textWeight == \"regular\") {\n\t\t\t\t\t$('[data-setting=\"boldText\"]').addClass(\"off\");\n\t\t\t\t\t$('[data-setting=\"boldText\"]').attr(\"title\", \"Off\")\n\t\t\t\t} else {\n\t\t\t\t\t$('[data-setting=\"boldText\"]').attr(\"title\", \"On\")\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function optionsAlert () {\n alert(\"You can't use this command here.\")\n}", "function Requirements(options){\n this.specify(options);\n this.flags = {};\n this.status = true;\n }" ]
[ "0.6037481", "0.60318357", "0.60318357", "0.59998536", "0.5954973", "0.5954973", "0.5954973", "0.59449977", "0.59152806", "0.5906259", "0.5872966", "0.5872966", "0.58575654", "0.5854597", "0.5854597", "0.5834004", "0.5834004", "0.5827216", "0.5819405", "0.5818854", "0.58022004", "0.57842517", "0.5732377", "0.5729937", "0.57210064", "0.5720681", "0.57098687", "0.57098687", "0.57036006", "0.57018113", "0.568993", "0.5670879", "0.5660727", "0.56523234", "0.56394726", "0.5573344", "0.5573344", "0.5555019", "0.5540074", "0.5503234", "0.54986674", "0.54951155", "0.5482653", "0.5476659", "0.54731524", "0.54462755", "0.5445593", "0.5426359", "0.5412764", "0.53816885", "0.5340993", "0.5328724", "0.5328724", "0.5309628", "0.5280419", "0.5227006", "0.52246714", "0.52217567", "0.52204204", "0.52191746", "0.5214505", "0.52140987", "0.52124816", "0.52053267", "0.5203562", "0.519252", "0.5188671", "0.51810527", "0.51803744", "0.5175469", "0.51704395", "0.5167679", "0.5154691", "0.51510936", "0.51493466", "0.5142842", "0.51374173", "0.51354945", "0.51344156", "0.5130862", "0.5124781", "0.51229656", "0.51216465", "0.51155496", "0.5112915", "0.51110977", "0.51030695", "0.51021224", "0.5099473", "0.5099473", "0.5099473", "0.50970054", "0.50966513", "0.50966513", "0.50966513", "0.5092982", "0.50907564", "0.50907564", "0.50890374", "0.5086758", "0.508423" ]
0.0
-1
If pure is true, the selector returned by selectorFactory will memoize its results, allowing connectAdvanced's shouldComponentUpdate to return false if final props have not changed. If false, the selector will always return a new object and shouldComponentUpdate will always return true.
function finalPropsSelectorFactory(dispatch, _ref2) { var initMapStateToProps = _ref2.initMapStateToProps, initMapDispatchToProps = _ref2.initMapDispatchToProps, initMergeProps = _ref2.initMergeProps, options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(_ref2, ["initMapStateToProps", "initMapDispatchToProps", "initMergeProps"]); var mapStateToProps = initMapStateToProps(dispatch, options); var mapDispatchToProps = initMapDispatchToProps(dispatch, options); var mergeProps = initMergeProps(dispatch, options); if (true) { Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__["default"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName); } var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory; return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function finalPropsSelectorFactory(dispatch, _ref2) {\n\t var initMapStateToProps = _ref2.initMapStateToProps,\n\t initMapDispatchToProps = _ref2.initMapDispatchToProps,\n\t initMergeProps = _ref2.initMergeProps,\n\t options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\t\n\t var mapStateToProps = initMapStateToProps(dispatch, options);\n\t var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n\t var mergeProps = initMergeProps(dispatch, options);\n\t\n\t if (process.env.NODE_ENV !== 'production') {\n\t (0, _verifySubselectors2.default)(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n\t }\n\t\n\t var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\t\n\t return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n\t}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n\t var initMapStateToProps = _ref2.initMapStateToProps,\n\t initMapDispatchToProps = _ref2.initMapDispatchToProps,\n\t initMergeProps = _ref2.initMergeProps,\n\t options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\t\n\t var mapStateToProps = initMapStateToProps(dispatch, options);\n\t var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n\t var mergeProps = initMergeProps(dispatch, options);\n\t\n\t if (process.env.NODE_ENV !== 'production') {\n\t (0, _verifySubselectors2.default)(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n\t }\n\t\n\t var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\t\n\t return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n\t}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n\t var initMapStateToProps = _ref2.initMapStateToProps,\n\t initMapDispatchToProps = _ref2.initMapDispatchToProps,\n\t initMergeProps = _ref2.initMergeProps,\n\t options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n\t var mapStateToProps = initMapStateToProps(dispatch, options);\n\t var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n\t var mergeProps = initMergeProps(dispatch, options);\n\n\t if (process.env.NODE_ENV !== 'production') {\n\t (0, _verifySubselectors2.default)(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n\t }\n\n\t var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n\t return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n\t}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n\t var initMapStateToProps = _ref2.initMapStateToProps,\n\t initMapDispatchToProps = _ref2.initMapDispatchToProps,\n\t initMergeProps = _ref2.initMergeProps,\n\t options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n\t var mapStateToProps = initMapStateToProps(dispatch, options);\n\t var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n\t var mergeProps = initMergeProps(dispatch, options);\n\n\t if (process.env.NODE_ENV !== 'production') {\n\t (0, _verifySubselectors2.default)(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n\t }\n\n\t var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n\t return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n\t}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n\t var initMapStateToProps = _ref2.initMapStateToProps,\n\t initMapDispatchToProps = _ref2.initMapDispatchToProps,\n\t initMergeProps = _ref2.initMergeProps,\n\t options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n\t var mapStateToProps = initMapStateToProps(dispatch, options);\n\t var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n\t var mergeProps = initMergeProps(dispatch, options);\n\n\t if (process.env.NODE_ENV !== 'production') {\n\t (0, _verifySubselectors2.default)(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n\t }\n\n\t var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n\t return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n\t}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n\t var initMapStateToProps = _ref2.initMapStateToProps,\n\t initMapDispatchToProps = _ref2.initMapDispatchToProps,\n\t initMergeProps = _ref2.initMergeProps,\n\t options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n\t var mapStateToProps = initMapStateToProps(dispatch, options);\n\t var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n\t var mergeProps = initMergeProps(dispatch, options);\n\n\t if (true) {\n\t (0, _verifySubselectors2.default)(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n\t }\n\n\t var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n\t return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n\t}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n\t var initMapStateToProps = _ref2.initMapStateToProps,\n\t initMapDispatchToProps = _ref2.initMapDispatchToProps,\n\t initMergeProps = _ref2.initMergeProps,\n\t options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n\t var mapStateToProps = initMapStateToProps(dispatch, options);\n\t var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n\t var mergeProps = initMergeProps(dispatch, options);\n\n\t if (true) {\n\t (0, _verifySubselectors2.default)(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n\t }\n\n\t var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n\t return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n\t}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n\t var initMapStateToProps = _ref2.initMapStateToProps,\n\t initMapDispatchToProps = _ref2.initMapDispatchToProps,\n\t initMergeProps = _ref2.initMergeProps,\n\t options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n\t var mapStateToProps = initMapStateToProps(dispatch, options);\n\t var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n\t var mergeProps = initMergeProps(dispatch, options);\n\n\t if (true) {\n\t (0, _verifySubselectors2.default)(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n\t }\n\n\t var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n\t return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n\t}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n\t var initMapStateToProps = _ref2.initMapStateToProps,\n\t initMapDispatchToProps = _ref2.initMapDispatchToProps,\n\t initMergeProps = _ref2.initMergeProps,\n\t options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n\t var mapStateToProps = initMapStateToProps(dispatch, options);\n\t var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n\t var mergeProps = initMergeProps(dispatch, options);\n\n\t if (true) {\n\t (0, _verifySubselectors2.default)(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n\t }\n\n\t var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n\t return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n\t}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n\t var initMapStateToProps = _ref2.initMapStateToProps,\n\t initMapDispatchToProps = _ref2.initMapDispatchToProps,\n\t initMergeProps = _ref2.initMergeProps,\n\t options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\t\n\t var mapStateToProps = initMapStateToProps(dispatch, options);\n\t var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n\t var mergeProps = initMergeProps(dispatch, options);\n\t\n\t if (false) {\n\t (0, _verifySubselectors2.default)(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n\t }\n\t\n\t var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\t\n\t return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n\t}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n\t var initMapStateToProps = _ref2.initMapStateToProps,\n\t initMapDispatchToProps = _ref2.initMapDispatchToProps,\n\t initMergeProps = _ref2.initMergeProps,\n\t options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\t\n\t var mapStateToProps = initMapStateToProps(dispatch, options);\n\t var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n\t var mergeProps = initMergeProps(dispatch, options);\n\t\n\t if (false) {\n\t (0, _verifySubselectors2.default)(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n\t }\n\t\n\t var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\t\n\t return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n\t}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = selectorFactory__objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (false) {\n verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties$4(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n __WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */](mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties$1(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n {\n verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n {\n verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n\t var initMapStateToProps = _ref2.initMapStateToProps,\n\t initMapDispatchToProps = _ref2.initMapDispatchToProps,\n\t initMergeProps = _ref2.initMergeProps,\n\t options = (0, _objectWithoutPropertiesLoose2.default)(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\t var mapStateToProps = initMapStateToProps(dispatch, options);\n\t var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n\t var mergeProps = initMergeProps(dispatch, options);\n\t\n\t if (process.env.NODE_ENV !== 'production') {\n\t (0, _verifySubselectors.default)(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n\t }\n\t\n\t var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\t return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n\t}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (false) {\n verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (false) {\n verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (false) {\n verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (false) {\n verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (false) {\n verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutPropertiesLoose(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n {\n verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__[\"a\" /* default */])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_1__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__[\"a\" /* default */])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_1__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__[\"a\" /* default */])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_1__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__[\"a\" /* default */])(_ref2, [\"initMapStateToProps\", \"initMapDispatchToProps\", \"initMergeProps\"]);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (process.env.NODE_ENV !== 'production') {\n Object(__WEBPACK_IMPORTED_MODULE_1__verifySubselectors__[\"a\" /* default */])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}", "function finalPropsSelectorFactory(dispatch, _ref2) {\n var initMapStateToProps = _ref2.initMapStateToProps,\n initMapDispatchToProps = _ref2.initMapDispatchToProps,\n initMergeProps = _ref2.initMergeProps,\n options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatchToProps', 'initMergeProps']);\n\n var mapStateToProps = initMapStateToProps(dispatch, options);\n var mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n var mergeProps = initMergeProps(dispatch, options);\n\n if (true) {\n Object(_verifySubselectors__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);\n }\n\n var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;\n\n return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}" ]
[ "0.5796509", "0.5796509", "0.57829297", "0.57829297", "0.57829297", "0.5782753", "0.5782753", "0.5782753", "0.5782753", "0.57683754", "0.57683754", "0.5764924", "0.5761992", "0.5761526", "0.5761526", "0.5761526", "0.5761526", "0.5761526", "0.5761526", "0.5761526", "0.5761526", "0.5761526", "0.5761526", "0.5761526", "0.5761526", "0.5761526", "0.5761526", "0.5761526", "0.5761526", "0.5761526", "0.5761526", "0.57503915", "0.5745185", "0.5745185", "0.5745185", "0.5745185", "0.5745185", "0.5745185", "0.5745185", "0.5745185", "0.5745185", "0.5745185", "0.574025", "0.57232255", "0.57232255", "0.57232255", "0.57232255", "0.57232255", "0.57232255", "0.57232255", "0.57232255", "0.57195497", "0.57195497", "0.5710023", "0.57028687", "0.57028687", "0.57028687", "0.57028687", "0.57028687", "0.5691866", "0.5668717", "0.5668717", "0.5668717", "0.5668717", "0.56527185", "0.56527185", "0.56527185" ]
0.5665696
94
to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine whether mapToProps needs to be invoked when props have changed. A length of one signals that mapToProps does not depend on props from the parent component. A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and therefore not reporting its length accurately..
function getDependsOnOwnProps(mapToProps) { return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1; } // Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction,
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mapToProps() {\n return {};\n}", "function mapToProps() {\n return {};\n}", "function wrapMapToPropsFunc(mapToProps,methodName){return function initProxySelector(dispatch,_ref){var displayName=_ref.displayName;var proxy=function mapToPropsProxy(stateOrDispatch,ownProps){return proxy.dependsOnOwnProps?proxy.mapToProps(stateOrDispatch,ownProps):proxy.mapToProps(stateOrDispatch);};// allow detectFactoryAndVerify to get ownProps\nproxy.dependsOnOwnProps=true;proxy.mapToProps=function detectFactoryAndVerify(stateOrDispatch,ownProps){proxy.mapToProps=mapToProps;proxy.dependsOnOwnProps=getDependsOnOwnProps(mapToProps);var props=proxy(stateOrDispatch,ownProps);if(typeof props==='function'){proxy.mapToProps=props;proxy.dependsOnOwnProps=getDependsOnOwnProps(props);props=proxy(stateOrDispatch,ownProps);}if(true)Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props,displayName,methodName);return props;};return proxy;};}", "function mapDispatchToProps(dispatch, ownProps) {\n //\n return {};\n}", "function getDependsOnOwnProps(mapToProps){return mapToProps.dependsOnOwnProps!==null&&mapToProps.dependsOnOwnProps!==undefined?Boolean(mapToProps.dependsOnOwnProps):mapToProps.length!==1;}// Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction,", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\t\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t }; // allow detectFactoryAndVerify to get ownProps\n\t\n\t\n\t proxy.dependsOnOwnProps = true;\n\t\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\t\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\t\n\t if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject.default)(props, displayName, methodName);\n\t return props;\n\t };\n\t\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\t\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\t\n\t // allow detectFactoryAndVerify to get ownProps\n\t proxy.dependsOnOwnProps = true;\n\t\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\t\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\t\n\t if (false) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\t\n\t return props;\n\t };\n\t\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\t\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\t\n\t // allow detectFactoryAndVerify to get ownProps\n\t proxy.dependsOnOwnProps = true;\n\t\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\t\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\t\n\t if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\t\n\t return props;\n\t };\n\t\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) {}\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) {}\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) {}\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) {}\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) {}\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\n\t // allow detectFactoryAndVerify to get ownProps\n\t proxy.dependsOnOwnProps = true;\n\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\n\t if (true) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n\t return props;\n\t };\n\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\n\t // allow detectFactoryAndVerify to get ownProps\n\t proxy.dependsOnOwnProps = true;\n\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\n\t if (true) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n\t return props;\n\t };\n\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\n\t // allow detectFactoryAndVerify to get ownProps\n\t proxy.dependsOnOwnProps = true;\n\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\n\t if (true) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n\t return props;\n\t };\n\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\n\t // allow detectFactoryAndVerify to get ownProps\n\t proxy.dependsOnOwnProps = true;\n\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\n\t if (true) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n\t return props;\n\t };\n\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\t\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\t\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t var props = proxy(stateOrDispatch, ownProps);\n\t\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\t\n\t if (false) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\t\n\t return props;\n\t };\n\t\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\n\t // allow detectFactoryAndVerify to get ownProps\n\t proxy.dependsOnOwnProps = true;\n\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\n\t if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n\t return props;\n\t };\n\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\n\t // allow detectFactoryAndVerify to get ownProps\n\t proxy.dependsOnOwnProps = true;\n\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\n\t if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n\t return props;\n\t };\n\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\n\t // allow detectFactoryAndVerify to get ownProps\n\t proxy.dependsOnOwnProps = true;\n\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\n\t if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n\t return props;\n\t };\n\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\t\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\t\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t var props = proxy(stateOrDispatch, ownProps);\n\t\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\t\n\t if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\t\n\t return props;\n\t };\n\t\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function mapStateToProps(state, ownProps) {\n\treturn {};\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (\"development\" !== 'production') (0, _verifyPlainObject.default)(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) {}\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject.default)(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject.default)(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) (0,_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__.default)(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) (0,_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__.default)(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function mapStateToProps(state) {\n console.log(\"mapStateToProps\")\n console.log(state.events ? state.events.length : \"null\")\n return {events: state.events}\n }", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__[\"a\" /* default */])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__[\"a\" /* default */])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__[\"a\" /* default */])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__[\"a\" /* default */])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (\"production\" !== 'production') (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if ('development' !== 'production') (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__[\"a\" /* default */])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__[\"a\" /* default */])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}" ]
[ "0.64890414", "0.64890414", "0.6217227", "0.60623384", "0.5905007", "0.5816661", "0.58035856", "0.57989055", "0.5767383", "0.5767383", "0.5767383", "0.5767383", "0.5767383", "0.5762032", "0.5762032", "0.5762032", "0.5762032", "0.57457775", "0.57394403", "0.5733544", "0.5733544", "0.5733544", "0.5730044", "0.57298964", "0.57298964", "0.57298964", "0.57298964", "0.57298964", "0.57298964", "0.57298964", "0.57178193", "0.56970406", "0.56926966", "0.5689222", "0.56871206", "0.56871206", "0.56871206", "0.56871206", "0.56871206", "0.56871206", "0.56871206", "0.56871206", "0.56871206", "0.56871206", "0.56871206", "0.56871206", "0.56871206", "0.56871206", "0.56871206", "0.56871206", "0.56871206", "0.56871206", "0.56871206", "0.56871206", "0.56871206", "0.56871206", "0.56871206", "0.56871206", "0.56871206", "0.56871206", "0.56871206", "0.56871206", "0.56871206", "0.56871206", "0.56871206", "0.56871206", "0.56871206", "0.56871206", "0.56840473", "0.56840473", "0.56784457", "0.56784457", "0.56660026", "0.56660026", "0.5664455", "0.5661458", "0.5661458", "0.5661458", "0.5661458", "0.5651594", "0.5651594", "0.5651594", "0.5651594", "0.5651594", "0.5651594", "0.5650384", "0.5650384", "0.56463504", "0.56436616", "0.56436616", "0.5632858", "0.5613681", "0.5613681", "0.5613681", "0.5613681", "0.5613681", "0.56122607", "0.56115675", "0.56115675", "0.5597472", "0.5597472" ]
0.0
-1
this function wraps mapToProps in a proxy function which does several things: Detects whether the mapToProps function being called depends on props, which is used by selectorFactory to decide if it should reinvoke on props changes. On first call, handles mapToProps if returns another function, and treats that new function as the true mapToProps for subsequent calls. On first call, verifies the first result is a plain object, in order to warn the developer that their mapToProps function is not returning a valid result.
function wrapMapToPropsFunc(mapToProps, methodName) { return function initProxySelector(dispatch, _ref) { var displayName = _ref.displayName; var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) { return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch); }; // allow detectFactoryAndVerify to get ownProps proxy.dependsOnOwnProps = true; proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) { proxy.mapToProps = mapToProps; proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps); var props = proxy(stateOrDispatch, ownProps); if (typeof props === 'function') { proxy.mapToProps = props; proxy.dependsOnOwnProps = getDependsOnOwnProps(props); props = proxy(stateOrDispatch, ownProps); } if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__["default"])(props, displayName, methodName); return props; }; return proxy; }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) {}\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) {}\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) {}\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) {}\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) {}\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\t\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t }; // allow detectFactoryAndVerify to get ownProps\n\t\n\t\n\t proxy.dependsOnOwnProps = true;\n\t\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\t\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\t\n\t if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject.default)(props, displayName, methodName);\n\t return props;\n\t };\n\t\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\t\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\t\n\t // allow detectFactoryAndVerify to get ownProps\n\t proxy.dependsOnOwnProps = true;\n\t\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\t\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\t\n\t if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\t\n\t return props;\n\t };\n\t\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) {}\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\t\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\t\n\t // allow detectFactoryAndVerify to get ownProps\n\t proxy.dependsOnOwnProps = true;\n\t\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\t\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\t\n\t if (false) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\t\n\t return props;\n\t };\n\t\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\t\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\t\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t var props = proxy(stateOrDispatch, ownProps);\n\t\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\t\n\t if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\t\n\t return props;\n\t };\n\t\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps,methodName){return function initProxySelector(dispatch,_ref){var displayName=_ref.displayName;var proxy=function mapToPropsProxy(stateOrDispatch,ownProps){return proxy.dependsOnOwnProps?proxy.mapToProps(stateOrDispatch,ownProps):proxy.mapToProps(stateOrDispatch);};// allow detectFactoryAndVerify to get ownProps\nproxy.dependsOnOwnProps=true;proxy.mapToProps=function detectFactoryAndVerify(stateOrDispatch,ownProps){proxy.mapToProps=mapToProps;proxy.dependsOnOwnProps=getDependsOnOwnProps(mapToProps);var props=proxy(stateOrDispatch,ownProps);if(typeof props==='function'){proxy.mapToProps=props;proxy.dependsOnOwnProps=getDependsOnOwnProps(props);props=proxy(stateOrDispatch,ownProps);}if(true)Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props,displayName,methodName);return props;};return proxy;};}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (\"development\" !== 'production') (0, _verifyPlainObject.default)(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\t\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\t\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t var props = proxy(stateOrDispatch, ownProps);\n\t\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\t\n\t if (false) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\t\n\t return props;\n\t };\n\t\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject.default)(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject.default)(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) verifyPlainObject(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) (0,_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__.default)(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) (0,_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__.default)(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\n\t // allow detectFactoryAndVerify to get ownProps\n\t proxy.dependsOnOwnProps = true;\n\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\n\t if (true) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n\t return props;\n\t };\n\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\n\t // allow detectFactoryAndVerify to get ownProps\n\t proxy.dependsOnOwnProps = true;\n\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\n\t if (true) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n\t return props;\n\t };\n\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\n\t // allow detectFactoryAndVerify to get ownProps\n\t proxy.dependsOnOwnProps = true;\n\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\n\t if (true) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n\t return props;\n\t };\n\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\n\t // allow detectFactoryAndVerify to get ownProps\n\t proxy.dependsOnOwnProps = true;\n\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\n\t if (true) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n\t return props;\n\t };\n\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\n\t // allow detectFactoryAndVerify to get ownProps\n\t proxy.dependsOnOwnProps = true;\n\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\n\t if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n\t return props;\n\t };\n\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\n\t // allow detectFactoryAndVerify to get ownProps\n\t proxy.dependsOnOwnProps = true;\n\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\n\t if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n\t return props;\n\t };\n\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n\t return function initProxySelector(dispatch, _ref) {\n\t var displayName = _ref.displayName;\n\n\t var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n\t return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n\t };\n\n\t // allow detectFactoryAndVerify to get ownProps\n\t proxy.dependsOnOwnProps = true;\n\n\t proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n\t proxy.mapToProps = mapToProps;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n\t var props = proxy(stateOrDispatch, ownProps);\n\n\t if (typeof props === 'function') {\n\t proxy.mapToProps = props;\n\t proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n\t props = proxy(stateOrDispatch, ownProps);\n\t }\n\n\t if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n\t return props;\n\t };\n\n\t return proxy;\n\t };\n\t}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (\"production\" !== 'production') (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__[\"a\" /* default */])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__[\"a\" /* default */])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__[\"a\" /* default */])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n }; // allow detectFactoryAndVerify to get ownProps\n\n\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__[\"a\" /* default */])(props, displayName, methodName);\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (false) (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if ('development' !== 'production') (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject2.default)(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__[\"a\" /* default */])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__[\"a\" /* default */])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__[\"a\" /* default */])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__[\"a\" /* default */])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__[\"a\" /* default */])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__[\"a\" /* default */])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__[\"a\" /* default */])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}", "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);\n };\n\n // allow detectFactoryAndVerify to get ownProps\n proxy.dependsOnOwnProps = true;\n\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n var props = proxy(stateOrDispatch, ownProps);\n\n if (typeof props === 'function') {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n\n if (true) Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__[\"a\" /* default */])(props, displayName, methodName);\n\n return props;\n };\n\n return proxy;\n };\n}" ]
[ "0.7835123", "0.7835123", "0.7835123", "0.7835123", "0.7835123", "0.780906", "0.7791362", "0.7778833", "0.77716106", "0.7768862", "0.7763944", "0.7763944", "0.7763944", "0.7763944", "0.7763944", "0.7763944", "0.7763944", "0.7735503", "0.77349806", "0.7729277", "0.7728167", "0.7728167", "0.7723876", "0.77224463", "0.77212626", "0.77212626", "0.7706603", "0.7706603", "0.7695093", "0.7695093", "0.7695093", "0.7695093", "0.7695093", "0.7695093", "0.7676436", "0.7676436", "0.76700896", "0.76700896", "0.76700896", "0.76700896", "0.7663624", "0.7663624", "0.7662226", "0.7662226", "0.7662226", "0.76579726", "0.76493835", "0.76493835", "0.76493835", "0.76493835", "0.7644761", "0.76396257", "0.7635686", "0.7635686", "0.7605321", "0.7605321", "0.7605321", "0.7605321", "0.7605321", "0.759485", "0.759485", "0.759485", "0.759485", "0.759485", "0.759485", "0.759485", "0.759485" ]
0.7669403
71
Name the function so it is clearer in the documentation
function noop() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function name() {}", "function NamedFunction() {\n\treturn \"I was called\";\n}", "function fuction() {\n\n}", "function name() {\u000b \n //code to be executed\u000b\n }", "api_name() {\n\n }", "function AnyName() {}", "function miFuncion (){}", "function myFunction(name){\n console.log(\"name\", name);\n}", "function getName(){\n console.log('THIS IS MY FUNCTION');\n}", "function miFuncion(){}", "function miFuncion(){}", "function miFuncion(){}", "function my_function(name) {\n return \"Hello \" + name;\n}", "\"function name\"(){\n //do thing\n }", "function example(fruit) {\r\n // function name\r\n // params (a.k.a. \"function signature\" -- this is where you name your params\r\n} // function body", "function nameSomeoneGaveMe () { return \"Chris\"; }", "function functionName() { console.log('I am a function') }", "function miFuncion(){\n\n}", "function myName() {\r\n console.log(\"Rich\");\r\n}", "function fuctionPanier(){\n\n}", "function name(parameters) {\n // function body\n}", "function namestatus(){}", "function Func_s() {\n}", "function MyNameE() {\n return \"Carles\";\n}", "function blabla() {\n\n}", "function sayName(name)\n{\n console.log(\"Hello \" + name());\n}", "function getName() {\n return \"John\";\n}", "function printMyName(name) {\n console.log(\"Printing name through normal function \" + name);\n}", "function hello(name) {\n\n // ADD YOUR CODE HERE\n return name;\n}", "function nameOfFunction(paramater) {\n //body of our code\n}", "function PrintName(name){ // the set of a parameters.\n console.log(name);\n}", "function functionName(arguments) {\n //code here\n}", "function myName(name){\n\treturn \"Hello \" + name + \". \";\n}", "function greetFn1(name) {\n console.log(name+ \" iam from greetfn 1 function \");\n}", "function hello(name) {\n console.log(name);\n}", "function functionName (parameter1, parameter2) {\n // do something;\n}", "name() { }", "getName() {}", "function myFunction() {\n \n}", "function foo() {...}", "function funcName() {\n\tconsole.log(\"funcName 1 called\")\n}", "function myName2(name){\n\treturn \"Hello \" + name + \". \";\n}", "function nombreFuncion(){\n \n}", "function Help() {\n}", "function Help() {\n}", "function PrintName(name) {\n console.log(name); \n}", "function myFunc(name) {\n return 'Hello' + name;\n}", "function GetName() {\n return \"Hello, my name is jokosu\";\n}", "function FileName() { }", "function myName(name) {\n return name;\n}", "function Tombola() {\n}", "function About() {\n\n}", "function Basic1() {\n}", "function MyNameReturn(name) {\n return \"Hello \" + name;\n}", "function myName () {\r\n alert(\"Hey man\");\r\n}", "function Xuice() {\r\n}", "function myName(name) {\n console.log(\"Old JS -> this is my name: \", name);\n}", "function myFunc2(name) {\nreturn (\"Hello \" + name + \".\")\n}", "function printMyName(name) {\n console.log(name);\n}", "function foo() {\r\n}", "function exampleFunction1() {\n /* SOME CODE */\n }", "function foo() {\n\n}", "function lalalala() {\n\n}", "function myFunction() {\n}", "function getName() {\n return \"Hello, my name is Irvan\";\n}", "function myName(name) {\n console.log(`My name is ${name}`);\n}", "function myName (name) {\n console.log(`My name is ${name}`);\n}", "function sayBye(name) { // parameters\n console.log('good bye ',name);\n}", "function __func(){}", "function sayHello(name) {\n return name;\n}", "function helloYou(name){\r\n console.log(\"hello \"+name)\r\n}", "function sayHello(name) {\r\n return \"Hello \" + name;\r\n}", "function fn() {\n\t\t }", "function hello(name) {\n console.log(\"hello \" + name);\n}", "exampleMethod() {\n\n }", "function sayName(name) {\n return name;\n}", "function FunctionProfile() {\r\n}", "function.greet(firstName, lastName) {\n console.log (\"Hello\" + firstName + \" \" + lastName);\n}", "function helloWorld(name) {\r\n return \"hello world, \" + name\r\n}", "function nameOfFunction() {\n console.log(\"Hello\");\n console.log(\"Hello\");\n console.log(\"Hello\");\n}", "function Carnivorus(){\n\n}", "function returnName() {\n return 'Stuart Hamblin';\n}", "function sayHello(firstName){\n // function body goes here!\n return \"Hello, \" + firstName + \"!\"\n }", "function hello(name) {\n console.log('Hello ' + name)\n}", "function functionName() {\n console.log(\"Hello World\");\n}", "function functionName() {\n console.log(\"Hello World\");\n}", "function myFunction() {}", "function helloName( name ) {\n console.log('Hello,', name);\n return name;\n}", "function myFunc() { \n\n}", "function funcName(func) {\n return func.name || \"{anonymous}\"\n }", "function sayMyName(name) {\n console.log(\"Your name is \"+name);\n}", "function functionName() {\n return 4;\n}", "function Fruit(){\n \n}", "function sayHello(name) {\n return \"Hello, \" + name + \"!\"\n\n}", "function funname() {} //literals", "function sayHi(name){\n console.log(name + \"says hi!!!\");\n}", "function getName() {\n return \"Hello my name is Arief muhamad\";\n}", "function getName() {\n return \"Hai Aku Sam\";\n}", "function namstey() {\n return \"Hello in India\";\n}", "function hello() {\r\n // do something...\r\n}", "function hello(name) {\nreturn `Hello ${this.name}`;\n}" ]
[ "0.7609658", "0.69970065", "0.69560003", "0.68476486", "0.679216", "0.6732367", "0.6708296", "0.6707051", "0.6672726", "0.66425234", "0.66425234", "0.66425234", "0.66130847", "0.6609925", "0.6607837", "0.65959007", "0.65702367", "0.6567782", "0.65613097", "0.65542525", "0.6541875", "0.653903", "0.65205765", "0.6490649", "0.6468628", "0.64316607", "0.6407394", "0.64055425", "0.6379508", "0.63781494", "0.6368587", "0.6364415", "0.6361863", "0.6354958", "0.6349521", "0.6345535", "0.6322192", "0.63179046", "0.6304806", "0.6302446", "0.6299126", "0.6298311", "0.62965035", "0.62696475", "0.62696475", "0.626624", "0.62652534", "0.6263655", "0.62628955", "0.6254813", "0.62479883", "0.62459505", "0.62440795", "0.623345", "0.6232389", "0.6228817", "0.6224579", "0.6224091", "0.62217593", "0.620383", "0.62024784", "0.6200802", "0.6197029", "0.6195179", "0.6186961", "0.6178712", "0.61742413", "0.6172338", "0.61701536", "0.6167297", "0.61637014", "0.6163052", "0.61628056", "0.61608964", "0.61603165", "0.6152292", "0.6150604", "0.61488837", "0.61469996", "0.6140768", "0.6139966", "0.61318505", "0.61305374", "0.6129458", "0.61204875", "0.61204875", "0.61197263", "0.6112375", "0.61078376", "0.6106736", "0.61033064", "0.60986394", "0.60868245", "0.60843945", "0.60809493", "0.6078242", "0.60688645", "0.60487133", "0.6045694", "0.60453635", "0.6038659" ]
0.0
-1
by calls to these methods by a Babel plugin. In PROD (or in packages without access to React internals), they are left as they are instead.
function warn(format) { { for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } printWarning('warn', format, args); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetIfUsingPreact() {\n if (window.preact !== undefined) {\n jsxLoader.compiler.pragma = 'React.createElement';\n jsxLoader.compiler.pragmaFrag = 'React.Fragment';\n }\n }", "react() {\n return;\n }", "function globalizeReact() {\n var global = (function () {\n return this;\n })();\n global.React = global.React || react;\n }", "function shim() {\n (0, _invariant2.default)(false, 'The current renderer does not support persistence. ' + 'This error is likely caused by a bug in React. ' + 'Please file an issue.');\n}", "function shim() {\n (0, _invariant2.default)(false, 'The current renderer does not support persistence. ' + 'This error is likely caused by a bug in React. ' + 'Please file an issue.');\n}", "exit(programPath, state) {\n // Babel 6 only let's you read plugin options inside visitors,\n // so we can't warn about an invalid config until the first file is hit.\n // TODO: In Babel 7, use config passed in when plugin is first created\n const {\n config,\n prod = false,\n onWarning = noop,\n onError = noop\n } = state.opts;\n\n if (!validationRan) {\n validationRan = true;\n if (typeof prod !== 'boolean') {\n onError(\n `Expected \"prod\" to be a boolean, but received \"${typeof prod}\"`\n );\n }\n if (typeof config !== 'object') {\n onError(\n `Expected \"config\" to be an object, but received \"${typeof config}\"`\n );\n }\n\n const { passed, error } = validateConfig(config);\n if (!passed) {\n // Warn about invalid config, but let the compilation\n // keep going\n onWarning(error);\n }\n }\n\n // We need to find any identifiers in scope that could be used to call\n // React's `createElement` function.\n const reactModuleImports = identifiersInScopeFromModule(\n programPath,\n /^react$/\n );\n const {\n reactIdentifier,\n createElementIdentifier\n } = reactModuleImports.reduce((acc, importData) => {\n if (importData.bindingName === 'default') {\n acc.reactIdentifier = importData.local;\n }\n if (importData.bindingName === 'createElement') {\n acc.createElementIdentifier = importData.local;\n }\n return acc;\n }, {});\n\n // No element creation in this file, so we bail\n if (!(reactIdentifier || createElementIdentifier)) {\n return;\n }\n\n // Start the transformation traversal\n programPath.traverse({\n CallExpression(path) {\n const isCECall = isCreateElementCall(\n path,\n reactIdentifier,\n createElementIdentifier\n );\n if (!isCECall) return;\n\n const [element] = path.get('arguments');\n const dataMIDPropNode = getProp(path, 'data-mid');\n if (!dataMIDPropNode) return;\n\n const { value: dataMID, type } = dataMIDPropNode;\n if (type !== 'StringLiteral') {\n onWarning(\n 'Expected \"data-mid\" to be a literal string, ' +\n `but instead found a value of type \"${type}\"`\n );\n }\n\n if (!t.isStringLiteral(element)) {\n onWarning(\n '\"data-mid\" found on a Composite Component.' +\n 'Only DOM elements(div/span/etc) can be a Layout Container'\n );\n }\n\n const operations = config[dataMID];\n // No operations were registered for this Container\n if (!(operations && operations.length)) {\n return;\n }\n\n new ContainerOperationsProcessor({\n types: t,\n operations,\n containerPath: path,\n containerMID: dataMID,\n program: programPath,\n reactIdentifier,\n createElementIdentifier,\n onWarning,\n onError\n }).execute();\n }\n });\n }", "function shim() {\n (0, _invariant2.default)(false, 'The current renderer does not support hyration. ' + 'This error is likely caused by a bug in React. ' + 'Please file an issue.');\n}", "function shim() {\n (0, _invariant2.default)(false, 'The current renderer does not support hyration. ' + 'This error is likely caused by a bug in React. ' + 'Please file an issue.');\n}", "function hooks() {\n \"use strict\";\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n }", "function shim() {\n (function () {\n {\n {\n throw ReactError(Error('The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.'));\n }\n }\n })();\n}", "function shim() {\n (function () {\n {\n {\n throw ReactError(Error('The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.'));\n }\n }\n })();\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n}", "babelConfig() {\n return {\n presets: ['@babel/preset-react']\n };\n }", "function shim() {\n (function () {\n {\n {\n throw ReactError(Error(\"The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.\"));\n }\n }\n })();\n } // Persistence (when unsupported)", "componentWillUnmount() {\n\t\t// Stub\n\t}", "function shim() {\n (function () {\n {\n {\n throw ReactError(Error(\"The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.\"));\n }\n }\n })();\n} // Persistence (when unsupported)", "function shim() {\n (function () {\n {\n {\n throw ReactError(Error(\"The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.\"));\n }\n }\n })();\n} // Persistence (when unsupported)", "UNSAFE_componentWillReceiveProps(nextProps) {\n \n }", "prependPolyfills() {\n\t\tif ((Utils.isServerSide && !global._babelPolyfill) || (Utils.isBrowserSide && !window._babelPolyfill))\n\t\t\trequire('@babel/polyfill')\n\t}", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n } // Persistence (when unsupported)", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n } // Persistence (when unsupported)", "function shim() {\n invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');\n } // Persistence (when unsupported)", "dependencies() {\n return ['@babel/preset-react'];\n }", "function shim(){invariant(false,'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');}// Persistence (when unsupported)", "function shim(){invariant(false,'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');}// Persistence (when unsupported)", "function shim(){invariant(false,'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');}// Persistence (when unsupported)", "function shim(){invariant(false,'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');}// Persistence (when unsupported)", "getBabelPlugins() {\n return null;\n }", "function useDocusaurusContext(){return Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(_context__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"]);}", "function checkIfInsideAStrictModeTree(reactComponentInstance) {\n var reactInternalFiber = reactComponentInstance && (reactComponentInstance._reactInternalFiber || reactComponentInstance._reactInternals);\n\n while (reactInternalFiber) {\n if (reactInternalFiber.mode & StrictMode) {\n return true;\n }\n\n reactInternalFiber = reactInternalFiber[\"return\"];\n }\n\n return false;\n }", "componentWillMount(){\n this.setState({ React: false })\n}", "function isAsyncMode(object){{if(!hasWarnedAboutDeprecatedIsAsyncMode){hasWarnedAboutDeprecatedIsAsyncMode=true;// Using console['warn'] to evade Babel and ESLint\nconsole['warn']('The ReactIs.isAsyncMode() alias has been deprecated, '+'and will be removed in React 17+. Update your code to use '+'ReactIs.isConcurrentMode() instead. It has the exact same API.');}}return isConcurrentMode(object)||typeOf(object)===REACT_ASYNC_MODE_TYPE;}", "function a(e){return e&&e.__esModule?e:{default:e}}", "if (prevProps.isActive && !this.props.isActive) {\n this.props.onLoadEventsFunctionsExtensions();\n }", "preset () { return false }", "function shim() {\n {\n {\n throw Error(\"The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n} // Persistence (when unsupported)", "function shim() {\n {\n {\n throw Error(\"The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n} // Persistence (when unsupported)", "function shim() {\n {\n {\n throw Error(\"The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n} // Persistence (when unsupported)", "function shim() {\n {\n {\n throw Error(\"The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n} // Persistence (when unsupported)", "function checkInstrumented() {\n if (proto['__gl_wrapped__']) {\n return false;\n }\n Object.defineProperty(proto, '__gl_wrapped__', {\n 'configurable': true,\n 'enumerable': false,\n 'value': true\n });\n contextRestoreFns.push(function() {\n delete proto['__gl_wrapped__'];\n });\n return true;\n }", "function processChild(element,Component){var isClass=shouldConstruct$1(Component);var publicContext=processContext(Component,context,threadID,isClass);var queue=[];var replace=false;var updater={isMounted:function(publicInstance){return false;},enqueueForceUpdate:function(publicInstance){if(queue===null){warnNoop(publicInstance,'forceUpdate');return null;}},enqueueReplaceState:function(publicInstance,completeState){replace=true;queue=[completeState];},enqueueSetState:function(publicInstance,currentPartialState){if(queue===null){warnNoop(publicInstance,'setState');return null;}queue.push(currentPartialState);}};var inst;if(isClass){inst=new Component(element.props,publicContext,updater);if(typeof Component.getDerivedStateFromProps==='function'){{if(inst.state===null||inst.state===undefined){var componentName=getComponentName(Component)||'Unknown';if(!didWarnAboutUninitializedState[componentName]){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);didWarnAboutUninitializedState[componentName]=true;}}}var partialState=Component.getDerivedStateFromProps.call(null,element.props,inst.state);{if(partialState===undefined){var _componentName=getComponentName(Component)||'Unknown';if(!didWarnAboutUndefinedDerivedState[_componentName]){error('%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. '+'You have returned undefined.',_componentName);didWarnAboutUndefinedDerivedState[_componentName]=true;}}}if(partialState!=null){inst.state=_assign({},inst.state,partialState);}}}else {{if(Component.prototype&&typeof Component.prototype.render==='function'){var _componentName2=getComponentName(Component)||'Unknown';if(!didWarnAboutBadClass[_componentName2]){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);didWarnAboutBadClass[_componentName2]=true;}}}var componentIdentity={};prepareToUseHooks(componentIdentity);inst=Component(element.props,publicContext,updater);inst=finishHooks(Component,element.props,inst,publicContext);{// Support for module components is deprecated and is removed behind a flag.\n// Whether or not it would crash later, we want to show a good message in DEV first.\nif(inst!=null&&inst.render!=null){var _componentName3=getComponentName(Component)||'Unknown';if(!didWarnAboutModulePatternComponent[_componentName3]){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);didWarnAboutModulePatternComponent[_componentName3]=true;}}}// If the flag is on, everything is assumed to be a function component.\n// Otherwise, we also do the unfortunate dynamic checks.\nif(inst==null||inst.render==null){child=inst;validateRenderResult(child,Component);return;}}inst.props=element.props;inst.context=publicContext;inst.updater=updater;var initialState=inst.state;if(initialState===undefined){inst.state=initialState=null;}if(typeof inst.UNSAFE_componentWillMount==='function'||typeof inst.componentWillMount==='function'){if(typeof inst.componentWillMount==='function'){{if(inst.componentWillMount.__suppressDeprecationWarning!==true){var _componentName4=getComponentName(Component)||'Unknown';if(!didWarnAboutDeprecatedWillMount[_componentName4]){warn(// keep this warning in sync with ReactStrictModeWarning.js\n'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);didWarnAboutDeprecatedWillMount[_componentName4]=true;}}}// In order to support react-lifecycles-compat polyfilled components,\n// Unsafe lifecycles should not be invoked for any component with the new gDSFP.\nif(typeof Component.getDerivedStateFromProps!=='function'){inst.componentWillMount();}}if(typeof inst.UNSAFE_componentWillMount==='function'&&typeof Component.getDerivedStateFromProps!=='function'){// In order to support react-lifecycles-compat polyfilled components,\n// Unsafe lifecycles should not be invoked for any component with the new gDSFP.\ninst.UNSAFE_componentWillMount();}if(queue.length){var oldQueue=queue;var oldReplace=replace;queue=null;replace=false;if(oldReplace&&oldQueue.length===1){inst.state=oldQueue[0];}else {var nextState=oldReplace?oldQueue[0]:inst.state;var dontMutate=true;for(var i=oldReplace?1:0;i<oldQueue.length;i++){var partial=oldQueue[i];var _partialState=typeof partial==='function'?partial.call(inst,nextState,element.props,publicContext):partial;if(_partialState!=null){if(dontMutate){dontMutate=false;nextState=_assign({},nextState,_partialState);}else {_assign(nextState,_partialState);}}}inst.state=nextState;}}else {queue=null;}}child=inst.render();{if(child===undefined&&inst.render._isMockFunction){// This is probably bad practice. Consider warning here and\n// deprecating this convenience.\nchild=null;}}validateRenderResult(child,Component);var childContext;{if(typeof inst.getChildContext==='function'){var _childContextTypes=Component.childContextTypes;if(typeof _childContextTypes==='object'){childContext=inst.getChildContext();for(var contextKey in childContext){if(!(contextKey in _childContextTypes)){{throw Error((getComponentName(Component)||'Unknown')+\".getChildContext(): key \\\"\"+contextKey+\"\\\" is not defined in childContextTypes.\");}}}}else {{error('%s.getChildContext(): childContextTypes must be defined in order to '+'use getChildContext().',getComponentName(Component)||'Unknown');}}}if(childContext){context=_assign({},context,childContext);}}}", "function disableClearConsole() {\n require('react-dev-utils/clearConsole');\n require.cache[require.resolve('react-dev-utils/clearConsole')].exports = function() {}\n}", "function useThemeContext(){return Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(_theme_ThemeContext__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"]);}", "function setDeprecatedOptions(env, config, options) {\n var _a, _b, _c, _d, _e, _f;\n if (!options) {\n return config;\n }\n var newObj = config ? JSON.parse(JSON.stringify(config)) : {};\n var filename = options.filename, chunkFilename = options.chunkFilename, react = options.react, reactDOM = options.reactDOM;\n var useSplit = hasOptions('split', env);\n var useVendor = hasOptions('vendor', env);\n if (filename && !((_a = newObj.build) === null || _a === void 0 ? void 0 : _a.filename)) {\n if (!newObj.build) {\n newObj.build = { filename: filename };\n }\n else {\n newObj.build.filename = filename;\n }\n }\n if (chunkFilename && !((_b = newObj.build) === null || _b === void 0 ? void 0 : _b.chunkFilename)) {\n if (!newObj.build) {\n newObj.build = { chunkFilename: chunkFilename };\n }\n else {\n newObj.build.chunkFilename = chunkFilename;\n }\n }\n if (useSplit && !((_c = newObj.build) === null || _c === void 0 ? void 0 : _c.split)) {\n if (!newObj.build) {\n newObj.build = { split: useSplit };\n }\n else {\n newObj.build.split = useSplit;\n }\n }\n if (useVendor && !((_d = newObj.build) === null || _d === void 0 ? void 0 : _d.vendor)) {\n if (!newObj.build) {\n newObj.build = { vendor: useVendor };\n }\n else {\n newObj.build.vendor = useVendor;\n }\n }\n if (react && !((_e = newObj.modules) === null || _e === void 0 ? void 0 : _e.react)) {\n if (!newObj.modules) {\n newObj.modules = { react: react };\n }\n else {\n newObj.modules.react = react;\n }\n }\n if (reactDOM && !((_f = newObj.modules) === null || _f === void 0 ? void 0 : _f.reactDOM)) {\n if (!newObj.modules) {\n newObj.modules = { reactDOM: reactDOM };\n }\n else {\n newObj.modules.reactDOM = reactDOM;\n }\n }\n return newObj;\n}", "function s(e){return e&&e.__esModule?e:{default:e}}", "function s(e){return e&&e.__esModule?e:{default:e}}", "function reactProdInvariant(code){var argCount=arguments.length-1;var message='Minified React error #'+code+'; visit '+'http://facebook.github.io/react/docs/error-decoder.html?invariant='+code;for(var argIdx=0;argIdx<argCount;argIdx++){message+='&args[]='+encodeURIComponent(arguments[argIdx+1]);}message+=' for the full message or use the non-minified dev environment'+' for full errors and additional helpful warnings.';var error=new Error(message);error.name='Invariant Violation';error.framesToPop=1;// we don't care about reactProdInvariant's own frame\nthrow error;}", "function reactProdInvariant(code){var argCount=arguments.length-1;var message='Minified React error #'+code+'; visit '+'http://facebook.github.io/react/docs/error-decoder.html?invariant='+code;for(var argIdx=0;argIdx<argCount;argIdx++){message+='&args[]='+encodeURIComponent(arguments[argIdx+1]);}message+=' for the full message or use the non-minified dev environment'+' for full errors and additional helpful warnings.';var error=new Error(message);error.name='Invariant Violation';error.framesToPop=1;// we don't care about reactProdInvariant's own frame\nthrow error;}", "async _handlePreviouslyNestedCurrentlyImportedCase() {\n if (!this.consumer) return; // $FlowFixMe this.component.componentMap is set\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n\n if (this.origin === _constants().COMPONENT_ORIGINS.IMPORTED && this.component.componentMap.origin === _constants().COMPONENT_ORIGINS.NESTED) {\n await this._cleanOldNestedComponent();\n this.component.componentMap = this.addComponentToBitMap(this.writeToPath);\n }\n }", "function restoreContextAfterImports () {\n try {\n global.define = __define\n } catch (_) {\n console.warn('IXO Keysafe - global.define could not be overwritten.')\n }\n}", "initComponents() {\n // precomputed\n const components = this._withPrecomputeRenderer(this.reactClass, this.el, this.log, MemoizingSnapshotOptimizer);\n\n // isolated\n // const partially = this._withIsolatedComponents.bind(this, this.reactClass, this.el, this.log);\n // const components = partially(NoopOptimizer, NaiveReactRenderer);\n // const components = partially(MemoizingSnapshotOptimizer, NaiveReactRenderer);\n\n // const components = partially(NoopOptimizer, RafReactRenderer);\n // const components = partially(MemoizingOptimizer, RafReactRenderer);\n // const components = partially(MemoizingSnapshotOptimizer, RafReactRenderer);\n \n console.info('initComponents:', components);\n this.renderer = components.renderer;\n this.optimizer = components.optimizer;\n this.loggit = components.loggit;\n }", "render() {\n return (\n <div className=\"BorderBoxSubrouting\">\n Hello {this.props.name}\n <div className={this.defaultParams() ? '' : 'babel-error'}>\n Default parameters work: {this.defaultParams().toString()}\n </div>\n <div className={this.restParams() ? '' : 'babel-error'}>\n Rest parameters work: {this.restParams().toString()}\n </div>\n <div className={this.spreadOperator() ? '' : 'babel-error'}>\n Spread Operator works for array and objects (obj needs stage 2): {this.spreadOperator().toString()}\n </div>\n <div className={this.templateLiteralString() ? '' : 'babel-error'}>\n Template literal string works: {this.templateLiteralString().toString()}\n </div>\n <div className={this.objectDestructuring() ? '' : 'babel-error'}>\n Object destructuring works: {this.objectDestructuring().toString()}\n </div>\n <div className={this.arrayDestructuring() ? '' : 'babel-error'}>\n Array destructuring works: {this.arrayDestructuring().toString()}\n </div>\n <div className={this.enhancedObjectLiterals() ? '' : 'babel-error'}>\n Enhanced Object Literals work: {this.enhancedObjectLiterals().toString()}\n </div>\n <div className={this.arrowFunctions() ? '' : 'babel-error'}>\n Arrow functions: {this.arrowFunctions().toString()}\n </div>\n <div className={this.promises() ? '' : 'babel-error'}>Promises work: {this.promises().toString()}</div>\n <div className={this.letKeyword() ? '' : 'babel-error'}>\n 'let' keywork works: {this.letKeyword().toString()}\n </div>\n <div className={this.isInteger() ? '' : 'babel-error'}>\n Number.isInteger works: {this.isInteger().toString()}\n </div>\n <div className={this.stringIncludes() ? '' : 'babel-error'}>\n String.prototype.includes works: {this.stringIncludes().toString()}\n </div>\n <div className={this.forOf() ? '' : 'babel-error'}>For of works: {this.forOf().toString()}</div>\n <div className={this.maps() ? '' : 'babel-error'}>Maps work: {this.maps().toString()}</div>\n <div className={this.sets() ? '' : 'babel-error'}>Sets work: {this.sets().toString()}</div>\n <div className={this.arrayFrom() ? '' : 'babel-error'}>Array.from() works: {this.arrayFrom().toString()}</div>\n <div className={this.arrayIncludes() ? '' : 'babel-error'}>\n Array.prototype.includes works: {this.arrayIncludes().toString()}\n </div>\n <div className={this.exponentiation() ? '' : 'babel-error'}>\n Exponentiation operator works: {this.exponentiation().toString()}\n </div>\n <div className={this.state.asyncAwaitWorks ? '' : 'babel-error'}>\n Async await: check console for AsyncAwait errors\n </div>\n <div className={this.objectValues() ? '' : 'babel-error'}>\n Object.values works: {this.objectValues().toString()}\n </div>\n </div>\n );\n }", "componentDidMount() {\n this.onQuerySubmiT('React development');\n }", "function cloneElement(element,config,children){!!(element===null||element===undefined)?invariant(false,'React.cloneElement(...): The argument must be a React element, but you passed %s.',element):void 0;var propName=void 0;// Original props are copied\nvar props=_assign({},element.props);// Reserved names are extracted\nvar key=element.key;var ref=element.ref;// Self is preserved since the owner is preserved.\nvar self=element._self;// Source is preserved since cloneElement is unlikely to be targeted by a\n// transpiler, and the original source is probably a better indicator of the\n// true owner.\nvar source=element._source;// Owner will be preserved, unless ref is overridden\nvar owner=element._owner;if(config!=null){if(hasValidRef(config)){// Silently steal the ref from the parent.\nref=config.ref;owner=ReactCurrentOwner.current;}if(hasValidKey(config)){key=''+config.key;}// Remaining properties override existing props\nvar defaultProps=void 0;if(element.type&&element.type.defaultProps){defaultProps=element.type.defaultProps;}for(propName in config){if(hasOwnProperty.call(config,propName)&&!RESERVED_PROPS.hasOwnProperty(propName)){if(config[propName]===undefined&&defaultProps!==undefined){// Resolve default props\nprops[propName]=defaultProps[propName];}else{props[propName]=config[propName];}}}}// Children can be more than one argument, and those are transferred onto\n// the newly allocated props object.\nvar childrenLength=arguments.length-2;if(childrenLength===1){props.children=children;}else if(childrenLength>1){var childArray=Array(childrenLength);for(var i=0;i<childrenLength;i++){childArray[i]=arguments[i+2];}props.children=childArray;}return ReactElement(element.type,key,ref,self,source,owner,props);}", "config(cfg) {\n // if (cfg.hasFilesystemConfig()) {\n // // Use the normal config\n // return cfg.options;\n // }\n\n const {\n __createDll,\n __react,\n __typescript = false,\n __server = false,\n __spaTemplateInject = false,\n __routes,\n } = customOptions;\n const { presets, plugins, ...options } = cfg.options;\n const isServer =\n __server || process.env.WEBPACK_BUILD_STAGE === 'server';\n // console.log({ options });\n\n // presets ========================================================\n const newPresets = [...presets];\n if (__typescript) {\n newPresets.unshift([\n require('@babel/preset-typescript').default,\n __react\n ? {\n isTSX: true,\n allExtensions: true,\n }\n : {},\n ]);\n // console.log(newPresets);\n }\n newPresets.forEach((preset, index) => {\n if (\n typeof preset.file === 'object' &&\n /^@babel\\/preset-env$/.test(preset.file.request)\n ) {\n const thisPreset = newPresets[index];\n if (typeof thisPreset.options !== 'object')\n thisPreset.options = {};\n thisPreset.options.modules = false;\n thisPreset.options.exclude = [\n // '@babel/plugin-transform-regenerator',\n // '@babel/plugin-transform-async-to-generator'\n ];\n if (isServer || __spaTemplateInject) {\n thisPreset.options.targets = {\n node: true,\n };\n thisPreset.options.ignoreBrowserslistConfig = true;\n thisPreset.options.exclude.push(\n '@babel/plugin-transform-regenerator'\n );\n thisPreset.options.exclude.push(\n '@babel/plugin-transform-async-to-generator'\n );\n }\n // console.log(__spaTemplateInject, thisPreset);\n }\n });\n\n // plugins ========================================================\n // console.log('\\n ');\n // console.log('before', plugins.map(plugin => plugin.file.request));\n\n const newPlugins = plugins.filter((plugin) => {\n // console.log(plugin.file.request);\n if (testPluginName(plugin, /^extract-hoc(\\/|\\\\)babel$/))\n return false;\n if (testPluginName(plugin, /^react-hot-loader(\\/|\\\\)babel$/))\n return false;\n if (testPluginName(plugin, 'transform-regenerator'))\n return false;\n\n return true;\n });\n\n // console.log('after', newPlugins.map(plugin => plugin.file.request));\n\n if (\n !__createDll &&\n __react &&\n process.env.WEBPACK_BUILD_ENV === 'dev'\n ) {\n // newPlugins.push(require('extract-hoc/babel'));\n newPlugins.push(require('react-hot-loader/babel'));\n }\n\n if (!__createDll && !isServer) {\n let pathname = path.resolve(getCwd(), __routes);\n if (fs.lstatSync(pathname).isDirectory()) pathname += '/index';\n if (!fs.existsSync(pathname)) {\n const exts = ['.js', '.ts'];\n exts.some((ext) => {\n const newPathname = path.resolve(pathname + ext);\n if (fs.existsSync(newPathname)) {\n pathname = newPathname;\n return true;\n }\n return false;\n });\n }\n newPlugins.push([\n path.resolve(\n __dirname,\n './plugins/client-sanitize-code-spliting-name.js'\n ),\n {\n routesConfigFile: pathname,\n },\n ]);\n // console.log(newPlugins);\n }\n\n const thisOptions = {\n ...options,\n presets: newPresets,\n plugins: newPlugins,\n };\n // console.log(isServer);\n\n return thisOptions;\n }", "function rewirePreact(config, env) {\n config.resolve = {\n alias: {\n react: \"preact-compat\",\n \"react-dom\": \"preact-compat\",\n \"create-react-class\": \"preact-compat/lib/create-react-class\"\n }\n };\n return config;\n}", "function wasComposedPreviously(input) {\n var isForwardRef = input.$$typeof === react_is__WEBPACK_IMPORTED_MODULE_1__[\"ForwardRef\"];\n return isForwardRef && !!input.fluentComposeConfig;\n}", "function isAsyncMode(object){{if(!hasWarnedAboutDeprecatedIsAsyncMode){hasWarnedAboutDeprecatedIsAsyncMode=true;lowPriorityWarning$1(false,'The ReactIs.isAsyncMode() alias has been deprecated, '+'and will be removed in React 17+. Update your code to use '+'ReactIs.isConcurrentMode() instead. It has the exact same API.');}}return isConcurrentMode(object)||typeOf(object)===REACT_ASYNC_MODE_TYPE;}", "function isAsyncMode(object){{if(!hasWarnedAboutDeprecatedIsAsyncMode){hasWarnedAboutDeprecatedIsAsyncMode=true;lowPriorityWarning$1(false,'The ReactIs.isAsyncMode() alias has been deprecated, '+'and will be removed in React 17+. Update your code to use '+'ReactIs.isConcurrentMode() instead. It has the exact same API.');}}return isConcurrentMode(object)||typeOf(object)===REACT_ASYNC_MODE_TYPE;}", "function isAsyncMode(object){{if(!hasWarnedAboutDeprecatedIsAsyncMode){hasWarnedAboutDeprecatedIsAsyncMode=true;lowPriorityWarning$1(false,'The ReactIs.isAsyncMode() alias has been deprecated, '+'and will be removed in React 17+. Update your code to use '+'ReactIs.isConcurrentMode() instead. It has the exact same API.');}}return isConcurrentMode(object)||typeOf(object)===REACT_ASYNC_MODE_TYPE;}" ]
[ "0.6232017", "0.5989827", "0.59513646", "0.5714014", "0.5714014", "0.5707565", "0.5690933", "0.5690933", "0.55861586", "0.5557413", "0.5545285", "0.5545285", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5512178", "0.5506975", "0.5485487", "0.5476288", "0.5457707", "0.5457707", "0.54445094", "0.54244953", "0.54123217", "0.54123217", "0.54123217", "0.53574234", "0.5339129", "0.5339129", "0.5339129", "0.5339129", "0.5275687", "0.5235098", "0.52270365", "0.5223542", "0.5210891", "0.5183197", "0.5164678", "0.5157042", "0.5148114", "0.5148114", "0.5148114", "0.5148114", "0.51254827", "0.51111203", "0.5099554", "0.50683856", "0.50621563", "0.5052422", "0.5052422", "0.5051509", "0.5051509", "0.5017337", "0.50123584", "0.50022805", "0.49922666", "0.4990125", "0.49801147", "0.49629727", "0.49575934", "0.49564216", "0.49555078", "0.49555078", "0.49555078" ]
0.0
-1
Base class helpers for the updating state of a component.
function Component(props, context, updater) { this.props = props; this.context = context; // If a component has string refs, we will assign a different object later. this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the // renderer. this.updater = updater || ReactNoopUpdateQueue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "update() {\n BaseState.update.call(this);\n }", "_update() {\n // Call subclass lifecycle method\n const stateNeedsUpdate = this.needsUpdate();\n // End lifecycle method\n debug(TRACE_UPDATE, this, stateNeedsUpdate);\n\n if (stateNeedsUpdate) {\n this._updateState();\n }\n }", "function _update() {\r\n this.component[this.prop] = this.control[this.prop];\r\n }", "_handleComponentChange() {\n this.setState(this._getStateFromStore());\n }", "update(data={}) {\n this.state = Object.assign(this.state, data);\n\n // notify all the Listeners of updated state\n this.notifyObervers(this.state);\n }", "constructor() {\n super(); // Gives context for \"this\" within component.\n this.state = { txt: \"Hi There\"};\n this.update = this.update.bind(this);\n }", "update(data = {}) {\n this.state = Object.assign(this.state, data);\n this.notify(this.state);\n }", "updateState() {\n\t\tthis.trigger(this.state);\n\t}", "constructor() {\n super(); // Gives context for \"this\" within component.\n this.state = { \n red: 0,\n green: 0,\n blue: 0,\n myTxt: \"--\"\n };\n this.update = this.update.bind(this);\n }", "updateState(stateChange){\n this.setState(stateChange);\n }", "updateState(state) {\n this.updateStateInner(state, this._props);\n }", "setStateInternal(id, value) {\n var obj = id;\n if (! obj.startsWith(this.namespace + '.'))\n obj = this.namespace + '.' + id;\n this.log.info('update state ' + obj + ' with value:' + value);\n currentStateValues[obj] = value;\n }", "handler(update) {\n this.setState(update)\n }", "update(data = {}) {\r\n console.log(data);\r\n this.state = Object.assign(this.state, data);\r\n this.notify(this.state);\r\n }", "setState(updateObject) {\n this.setChangeFlags({stateChanged: true});\n Object.assign(this.state, updateObject);\n this.setNeedsRedraw();\n }", "_updateStateValue(prop, v) {\n return new Promise((resolve, reject) => {\n var c = this._component\n if(c.state && c.state[prop] !== undefined){\n var state = {}\n state[prop] = v\n c.setState(state, resolve)\n }else{\n c[prop] = v\n c.forceUpdate()\n resolve()\n }\n })\n }", "stateChanged(state) { }", "setState(newState) {\n this.state = {\n ...this.state,\n ...newState\n }\n this.#updater()\n }", "update() {\n // Subclasses should override\n }", "function updateValue( value ) \n{\n \n updateComponentValue( value );\n \n}", "updateItem() {\n this.setState(this.state);\n }", "stateChanged(_state) { }", "update() {\r\n throw new Error('must be set in subclass');\r\n }", "update() {\n const state = this.store.getState();\n\n if (this.isPresenting !== state.webvr.isPresenting) {\n this.vrEffect.setFullScreen(state.webvr.isPresenting);\n this.isPresenting = state.webvr.isPresenting;\n }\n\n if (this.isPresenting) {\n this.vrControls.update();\n } else {\n const dt = (state.app.timestamp - this.timestamp) || 0;\n this.timestamp = state.app.timestamp;\n\n this.flyControls.update(dt);\n }\n\n // update all components with their state\n const componentState = this.select(state);\n Object.keys(this.components)\n .forEach(id => this.components[id].update(componentState[id]));\n }", "updateState(newState) {\n this.setState(newState);\n }", "update(object) {\n for (const prop in object){\n this.state[prop] = object[prop];\n }\n //change has been made to data so call handler\n this.fire();\n\n }", "update(object) {\n for (const prop in object){\n this.state[prop] = object[prop];\n }\n //change has been made to data so call handler\n this.fire();\n\n }", "update(...props) {\n if (this.onUpdate && this._) {\n return this.onUpdate(...props);\n }\n }", "updateComponentState(componentUpdate, sectionIndex, gridSectionIndex, componentStateIndex) {\n if (!this.state.globalContextObj.editing) return\n\n this.setState((state, props) => {\n let component = state.pages[state.globalContextObj.editing].sections[sectionIndex].gridSections[gridSectionIndex].componentStates[componentStateIndex]\n state.pages[state.globalContextObj.editing].sections[sectionIndex].gridSections[gridSectionIndex].componentStates[componentStateIndex] = deepStyleMerge(component, componentUpdate)\n return {\n pages: state.pages\n }\n })\n }", "setState(newState, cb) {\n // Merge both new and old state to replace whats new an keep whats old.\n this.state = {...this.state, ...newState};\n\n // re-render the element with a given renderer callback\n if (cb) cb(this.state, this.element);\n }", "_triggerComponentUpdate(value) {\n if (has(this.props, 'valueLink')) {\n this.props.valueLink.requestChange(value);\n this.setState({\n focusedValue: undefined,\n isActive: false,\n });\n } else if (has(this.props, 'value')) {\n this.setState({\n focusedValue: undefined,\n isActive: false,\n });\n } else {\n this.setState({\n focusedValue: undefined,\n isActive: false,\n value,\n });\n }\n\n if (this.props.onUpdate) {\n this.props.onUpdate({ value });\n }\n }", "_onChangeState() {\n\n\n }", "update (descriptor) {\n // update helper's own UI if needed\n // etc\n }", "componentWillUpdate() {}", "constructor(props) {\n super(props);\n this.shouldComponentUpdate = PureRenderMixin.shouldComponentUpdate.bind(this);\n }", "function setComponentState(componentId, key, value) {\n var componentState = getViewState(componentId);\n if (!componentState) {\n componentState = new Object();\n setViewState(componentId, componentState);\n }\n componentState[key] = value;\n}", "_stateChanged(_state) {\n throw new Error('_stateChanged() not implemented');\n }", "onUpdate(data) {\n this.setState(data);\n }", "handleUpdatedState(state) {\n this.lastTechnology = state.selectedTechnology;\n this.totalClicks = state.clickCounter;\n }", "stateUpdate() {\n this.handlestateVariable();\n this.handlestateVariable2();\n this.handleCChange();\n this.handleAChange();\n this.handleidCapture();\n this.handleimgCapture();\n this.handleConfigChange();\n this.idcaptureVal();\n this.imgcaptureVal();\n }", "componentDidUpdate() {\n this.props.actions.updateQuestionSuccess({id: this.state.id, value: this.state.question});\n }", "update(key, value) {\n let property = {};\n property[key] = value;\n // Change state\n this.setState(property, () => this.getData());\n }", "componentWillUpdate () {}", "_UpdateComponents() {\n this.loadedComponents.forEach((component) => {\n if(component.binding) {\n // Update the component from its bound value if the value has changed\n if(component.binding.object[component.binding.property] != component.oldValue) {\n component.SetValue(component.binding.object[component.binding.property]);\n component.oldValue = component.binding.object[component.binding.property];\n }\n }\n });\n\n setTimeout(() => {\n window.requestAnimationFrame(() => {\n this._UpdateComponents();\n });\n }, this.opts.pollRateMS);\n\n }", "_updateState() {\n const currentProps = this.props;\n const currentViewport = this.context.viewport;\n const propsInTransition = this._updateUniformTransition();\n this.internalState.propsInTransition = propsInTransition;\n // Overwrite this.context.viewport during update to use the last activated viewport on this layer\n // In multi-view applications, a layer may only be drawn in one of the views\n // Which would make the \"active\" viewport different from the shared context\n this.context.viewport = this.internalState.viewport || currentViewport;\n // Overwrite this.props during update to use in-transition prop values\n this.props = propsInTransition;\n\n try {\n const updateParams = this._getUpdateParams();\n const oldModels = this.getModels();\n\n // Safely call subclass lifecycle methods\n if (this.context.gl) {\n this.updateState(updateParams);\n } else {\n try {\n this.updateState(updateParams);\n } catch (error) {\n // ignore error if gl context is missing\n }\n }\n // Execute extension updates\n for (const extension of this.props.extensions) {\n extension.updateState.call(this, updateParams, extension);\n }\n\n const modelChanged = this.getModels()[0] !== oldModels[0];\n this._updateModules(updateParams, modelChanged);\n // End subclass lifecycle methods\n\n if (this.isComposite) {\n // Render or update previously rendered sublayers\n this._renderLayers(updateParams);\n } else {\n this.setNeedsRedraw();\n // Add any subclass attributes\n this._updateAttributes(this.props);\n\n // Note: Automatic instance count update only works for single layers\n if (this.state.model) {\n this.state.model.setInstanceCount(this.getNumInstances());\n }\n }\n } finally {\n // Restore shared context\n this.context.viewport = currentViewport;\n this.props = currentProps;\n this.clearChangeFlags();\n this.internalState.needsUpdate = false;\n this.internalState.resetOldProps();\n }\n }", "componentDidUpdate() {\n this.props.actions.updateAnswerSuccess({\n questionId: this.state.questionId,\n id: this.state.id,\n label: this.state.answer,\n isTrue: this.props.isTrue\n });\n }", "stateChanged(state) {\n }", "handleUpdate(data) {\n this.setState({ data });\n}", "constructor(...args){\n super(...args)\n this.shouldComponentUpdate=PureRenderMixin.shouldComponentUpdate\n this.state={\n userName:''\n }\n }", "constructor(...args){\n super(...args)\n this.shouldComponentUpdate=PureRenderMixin.shouldComponentUpdate\n this.state={\n userName:''\n }\n }", "componentWillUpdate(np,ns){ }", "componentDidUpdate(preProps,preState,a){\n console.log(\"componentDidUpdate\",a)\n }", "setState(newProps) {\n let stateChanged = false;\n\n Object.entries(newProps).forEach(([key, val]) => {\n if (val !== this.state[key]) {\n stateChanged = true;\n }\n\n this.state[key] = val;\n });\n\n if (stateChanged) {\n this.render();\n }\n }", "function update() {\n // ... no implementation required\n }", "function updater(prevState){var state=this.constructor.getDerivedStateFromProps(nextProps,prevState);return state!==null&&state!==undefined?state:null;}// Binding \"this\" is important for shallow renderer support.", "componentDidUpdate(){\r\n console.log(\"Update\", this.state);\r\n }", "updateData(config) {\r\n this.setState(config);\r\n }", "updateState (val, key) {\n this.state[key] = val\n this.updateUI()\n }", "componentWillUpdate(e, state) {\n if (state.x) {\n this.xElement.innerHTML = ' x: ' + state.x\n } \n if (state.y) {\n this.yElement.innerHTML = ' y: ' + state.y\n } \n }", "refresh_() {\n // Can be overridden in sub-component.\n }", "stateChanged(state) {\n \n throw new Error('stateChanged() not implemented', this);\n }", "setState(state, callback) {\n if (!this.prevState) this.prevState = this.state;\n this.state = this._extend(\n this._extend({}, this.state),\n typeof state === 'function' ? state(this.state, this.props) : state\n );\n let dom = this.getDomElement();\n let container = dom.parentNode;\n let newVDom = this.render(); // This will invoke the derived class render menthod\n newVDom.component = this;\n diff (newVDom, container, dom);\n }", "handleUpdateBox(id, title) {\n this.setState({updatedId: id, updatedTitle: title});\n }", "setState (state) {\r\n this.state = state;\r\n }", "componentDidUpdate(props_) {}", "constructor(props) {\n \t//calling parent method with super\n \tsuper(props);\n//functional components don't have state, only class-based components do\n//term is property on which we want to record change\n \tthis.state = { term: ''};\n //the above live can only be in the constructor, so every instance will take a copy of the current state\n }", "updateComponents () {\n\t\tfor (let component in this.components) {\n\t\t\tthis.components[component].update();\n\t\t}\n\t}", "componentDidUpdate(prevProps, prevState, snapshot){\n console.info(this.constructor.name+' Did my component updated?');\n\n }", "update( e ){\n // Assign to let changedID ID of slider which has been changed\n let changedID = e.target.id;\n let value = e.target.value;\n if (changedID === 'sliderAmount') {\n this.setState({valueAmount: e.target.value});\n }\n if (changedID === 'sliderDuration'){\n this.setState({valueDuration: e.target.value});\n }\n\n\n this.calculate(changedID, value);\n }", "setState(_state, _args) {\n\t // This has to be handled at a higher level since we can't\n\t // replace the whole tree here however we still need a method here\n\t // so it appears on the proxy Actions class.\n\t throw new Error('Called setState on StateActions.');\n\t }", "componentWillUpdate(nextProps) {\n if (this.props.value !== nextProps.value) {\n this.setState({ value: this.props.value });\n }\n }", "componentWillUpdate() {\n console.log('Before updating a component');\n }", "updateFormFieldInState(formField, value) {\n\n }", "onChangeStatus(newStatus) {\n return () => {\n this.props.changeStatus(newStatus)\n };\n }", "componentDidUpdate(prevProps) {\n if (\n prevProps.currentIndex != this.props.currentIndex ||\n prevProps.list.length != this.props.list.length\n )\n this.setState({\n ...this.EditStateFunction()\n });\n }", "updateState(e, val) {\n val === undefined ? val = e.target.value : val; // catch location input field value since it behaves differently\n let key = e.target.name;\n // you must use a function to set state if the key is a variable\n let stateObj = function() {\n var obj = {};\n obj[key] = val;\n return obj;\n }.bind(e)();\n this.setState( stateObj );\n\n }", "componentDidUpdate() {\n\t\t/* preserve context */\n\t\tconst _this = this;\n\t}", "componentDidUpdate() {\n\t\t/* preserve context */\n\t\tconst _this = this;\n\t}", "state (...args) {\n return MVC.ComponentJS(this).state(...args)\n }", "_updateInput (input) {\n this.setState({ input })\n }", "_update() {\n }", "shouldComponentUpdate(newProps, newState) {\n // console.log(\"=========================> shouldComponentUpdate\", newProps, newState);\n return true;\n }", "_requestUpdate(name,oldValue){let shouldRequestUpdate=!0;// If we have a property key, perform property update steps.\nif(name!==void 0){const ctor=this.constructor,options=ctor._classProperties.get(name)||defaultPropertyDeclaration;if(ctor._valueHasChanged(this[name],oldValue,options.hasChanged)){if(!this._changedProperties.has(name)){this._changedProperties.set(name,oldValue)}// Add to reflecting properties set.\n// Note, it's important that every change has a chance to add the\n// property to `_reflectingProperties`. This ensures setting\n// attribute + property reflects correctly.\nif(!0===options.reflect&&!(this._updateState&STATE_IS_REFLECTING_TO_PROPERTY)){if(this._reflectingProperties===void 0){this._reflectingProperties=new Map}this._reflectingProperties.set(name,options)}}else{// Abort the request if the property should not be considered changed.\nshouldRequestUpdate=!1}}if(!this._hasRequestedUpdate&&shouldRequestUpdate){this._enqueueUpdate()}}", "componentDidUpdate(prepProps, prevState) {\n if (!this.props.onChange) return;\n if (_.isEqual(prevState, this.state)) return;\n\n const stateNow = {...this.state};\n this.debouncedOnChange(stateNow);\n }", "function newState(state) {\n alert(\"This functionality is yet to be implemented!\");\n }", "update()\n\t{ \n\t\tthrow new Error(\"update() method not implemented\");\n\t}", "setState (newState) {\n this._state = assign({}, this._state, newState);\n this.trigger(assign({}, this._state));\n }", "update() {\n this.setState({\n numberOfGuests: this.props.model.getNumberOfGuests(),\n menu: this.props.model.getMenu(),\n menuPrice: this.props.model.calcCost(),\n });\n }", "update(props) {\n if (props.handleDOMEvents != this._props.handleDOMEvents)\n ensureListeners(this);\n let prevProps = this._props;\n this._props = props;\n if (props.plugins) {\n props.plugins.forEach(checkStateComponent);\n this.directPlugins = props.plugins;\n }\n this.updateStateInner(props.state, prevProps);\n }", "setState (newState) {\n this.state = {...newState};\n if (this.updaterWin) {\n this.updaterWin.send('update-state-change', this.state);\n }\n }", "componentUpdated(el, binding, vnode) {\n const self = vnode.context\n const instanceName = getInstanceName(el, binding, vnode)\n const options = binding.value || {}\n const quill = self[instanceName]\n if (quill) {\n const model = vnode.data.model\n const _value = vnode.data.attrs ? vnode.data.attrs.value : null\n const _content = vnode.data.attrs ? vnode.data.attrs.content : null\n const disabled = vnode.data.attrs ? vnode.data.attrs.disabled : null\n const content = model ? model.value : (_value || _content)\n const newData = content\n const oldData = el.children[0].innerHTML\n quill.enable(!disabled)\n if (newData) {\n if (newData != oldData) {\n const range = quill.getSelection()\n quill.root.innerHTML = newData\n setTimeout(() => {\n quill.setSelection(range)\n })\n }\n } else {\n quill.setText('')\n }\n }\n }", "componentUpdated(el, binding, vnode) {\n const self = vnode.context\n const instanceName = getInstanceName(el, binding, vnode)\n const options = binding.value || {}\n const quill = self[instanceName]\n if (quill) {\n const model = vnode.data.model\n const _value = vnode.data.attrs ? vnode.data.attrs.value : null\n const _content = vnode.data.attrs ? vnode.data.attrs.content : null\n const disabled = vnode.data.attrs ? vnode.data.attrs.disabled : null\n const content = model ? model.value : (_value || _content)\n const newData = content\n const oldData = el.children[0].innerHTML\n quill.enable(!disabled)\n if (newData) {\n if (newData != oldData) {\n const range = quill.getSelection()\n quill.root.innerHTML = newData\n setTimeout(() => {\n quill.setSelection(range)\n })\n }\n } else {\n quill.setText('')\n }\n }\n }", "privateSendUpdate () {\n this.emit('update', this.getState())\n }", "componentDidUpdate(prevProps) {\n // Is called when the corresponding state is changed in parent class (indirect trigger)\n // Is also called a 2nd time when setState{open:true} is called inside this function\n if (prevProps != this.props) {\n this.state.type = this.props.popUp.type;\n this.state.message = this.props.popUp.message;\n this.state.open = this.props.popUp.openPopUp;\n this.checkAction();\n }\n }", "_onChange() {\n if (this.isMounted()) {\n this.setState({ value: ButtonStore.getValue() });\n this.setState({ session: AuthStore.getSession() });\n }\n }", "componentDidUpdate(prevProps, prevState) { // eslint-disable-line\n if (this.state.value !== prevState.value) {\n this.props.setValue(this.state.value);\n if (this.state.manualChangeKey !== prevState.manualChangeKey || this.props.shouldUpdateAlways) {\n this.props.onChangeInput(this.props.name, this.state.value);\n }\n }\n }", "componentDidUpdate(preProps, preState, a) {\n console.log('componentDidUpdate', a);\n\n }", "_requestUpdate(e,t){let n=!0;// If we have a property key, perform property update steps.\nif(e!==void 0){const r=this.constructor,a=r._classProperties.get(e)||defaultPropertyDeclaration;r._valueHasChanged(this[e],t,a.hasChanged)?(!this._changedProperties.has(e)&&this._changedProperties.set(e,t),!0===a.reflect&&!(this._updateState&STATE_IS_REFLECTING_TO_PROPERTY)&&(this._reflectingProperties===void 0&&(this._reflectingProperties=new Map),this._reflectingProperties.set(e,a))):n=!1}!this._hasRequestedUpdate&&n&&this._enqueueUpdate()}", "_onChange() {\n this.setState(getUserState());\n }", "componentWillUpdate(){\n }", "update() {\n throw new Error(\"Not Implemented\");\n }" ]
[ "0.7217708", "0.6761068", "0.6674957", "0.6611355", "0.6540057", "0.65267175", "0.6489628", "0.6470186", "0.64590305", "0.6384313", "0.6354146", "0.6334614", "0.63050985", "0.63048834", "0.6271505", "0.62657493", "0.6216846", "0.62140334", "0.61935604", "0.6188305", "0.6158289", "0.6145885", "0.6144939", "0.6140347", "0.61383444", "0.6136607", "0.6136607", "0.6125991", "0.61232597", "0.61229163", "0.61228085", "0.611871", "0.61111325", "0.61109495", "0.60961854", "0.60892063", "0.60837233", "0.6054958", "0.6053651", "0.60441345", "0.6035904", "0.60311943", "0.6023608", "0.60200757", "0.6013365", "0.601125", "0.5998589", "0.5996711", "0.5990147", "0.5990147", "0.5985766", "0.5977313", "0.5971279", "0.5967477", "0.5959689", "0.5940415", "0.5939656", "0.5929586", "0.59294873", "0.59247476", "0.5901665", "0.5899335", "0.5890584", "0.58861554", "0.5877269", "0.58758825", "0.58697253", "0.5866917", "0.58622193", "0.5861432", "0.58545923", "0.5852408", "0.5831525", "0.58306074", "0.5826108", "0.5824695", "0.5817856", "0.5817856", "0.58163893", "0.58058107", "0.5800977", "0.5800487", "0.5799989", "0.5799238", "0.5796001", "0.5795108", "0.5794017", "0.57939917", "0.57892", "0.5786858", "0.57816267", "0.57816267", "0.5778916", "0.57753766", "0.5774418", "0.577387", "0.5768126", "0.5758182", "0.5756943", "0.5749878", "0.5745682" ]
0.0
-1
Convenience component with default shallow equality check for sCU.
function PureComponent(props, context, updater) { this.props = props; this.context = context; // If a component has string refs, we will assign a different object later. this.refs = emptyObject; this.updater = updater || ReactNoopUpdateQueue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function useStrictEquality(b, a) {\n return a === b;\n }", "get shallowCopy() {\n return this.shallowCopy$();\n }", "function defaultEqualityCheck(a, b) {\n return !a && !b || a === b;\n }", "equals() {\n return false;\n }", "equals() {\n return false;\n }", "function looseEqual(a, b) {\n return true;\n }", "Equals() {\n\n }", "Equals() {\n\n }", "function areEqualShallow(a, b) {\n var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n _ref$ignore = _ref.ignore,\n ignore = _ref$ignore === undefined ? {} : _ref$ignore;\n\n if (a === b) {\n return true;\n }\n\n if ((typeof a === 'undefined' ? 'undefined' : _typeof(a)) !== 'object' || a === null || (typeof b === 'undefined' ? 'undefined' : _typeof(b)) !== 'object' || b === null) {\n return false;\n }\n\n if (Object.keys(a).length !== Object.keys(b).length) {\n return false;\n }\n\n for (var key in a) {\n if (!(key in ignore) && (!(key in b) || a[key] !== b[key])) {\n return false;\n }\n }\n for (var _key in b) {\n if (!(_key in ignore) && !(_key in a)) {\n return false;\n }\n }\n return true;\n}", "function useStrictEquality( b, a ) {\n\t\t\t\tif ( b instanceof a.constructor || a instanceof b.constructor ) {\n\t\t\t\t\t// to catch short annotaion VS 'new' annotation of a\n\t\t\t\t\t// declaration\n\t\t\t\t\t// e.g. var i = 1;\n\t\t\t\t\t// var j = new Number(1);\n\t\t\t\t\treturn a == b;\n\t\t\t\t} else {\n\t\t\t\t\treturn a === b;\n\t\t\t\t}\n\t\t\t}", "function useStrictEquality(b, a) {\n\t\t\tif (b instanceof a.constructor || a instanceof b.constructor) {\n\t\t\t\t// to catch short annotaion VS 'new' annotation of a declaration\n\t\t\t\t// e.g. var i = 1;\n\t\t\t\t// var j = new Number(1);\n\t\t\t\treturn a == b;\n\t\t\t} else {\n\t\t\t\treturn a === b;\n\t\t\t}\n\t\t}", "function callObjectEqual(a, b) {\n if (!isDefaultMode() && !canTestPrimitiveScope) {\n // If the environment doesn't allow null scope, then there's no way\n // to predict how the scope will be mangled by running \"a\" through it,\n // so run isEqual as a static method instead. This is simulating a real\n // world situation as well as there is no way to map isEqual to Object\n // prototype and have it work for string primitives when strict mode is\n // not available, so the user will in that case have to go through the\n // static method as well. Similarly, chainables would have to go through\n // a significant tapdance to get working right with null scope issues,\n // and the performance penalties and indescrepancy with extended mode\n // is not worth the benefits.\n return run(Object, 'isEqual', [a, b]);\n }\n return run(a, 'isEqual', [b]);\n }", "function useStrictEquality(b, a) {\n if (b instanceof a.constructor || a instanceof b.constructor) {\n // to catch short annotaion VS 'new' annotation of a declaration\n // e.g. var i = 1;\n // var j = new Number(1);\n return a == b;\n } else {\n return a === b;\n }\n }", "function useStrictEquality(b, a) {\n if (b instanceof a.constructor || a instanceof b.constructor) {\n // to catch short annotaion VS 'new' annotation of a declaration\n // e.g. var i = 1;\n // var j = new Number(1);\n return a == b;\n } else {\n return a === b;\n }\n }", "function looseEqual (a, b) {\n\t /* eslint-disable eqeqeq */\n\t return a == b || (\n\t isObject(a) && isObject(b)\n\t ? JSON.stringify(a) === JSON.stringify(b)\n\t : false\n\t )\n\t /* eslint-enable eqeqeq */\n\t}", "function looseEqual (a, b) {\n\t /* eslint-disable eqeqeq */\n\t return a == b || (\n\t isObject(a) && isObject(b)\n\t ? JSON.stringify(a) === JSON.stringify(b)\n\t : false\n\t )\n\t /* eslint-enable eqeqeq */\n\t}", "function looseEqual (a, b) {\n\t /* eslint-disable eqeqeq */\n\t return a == b || (\n\t isObject(a) && isObject(b)\n\t ? JSON.stringify(a) === JSON.stringify(b)\n\t : false\n\t )\n\t /* eslint-enable eqeqeq */\n\t}", "function looseEqual (a, b) {\n /* eslint-disable eqeqeq */\n return a == b || (\n isObject(a) && isObject(b)\n ? JSON.stringify(a) === JSON.stringify(b)\n : false\n )\n /* eslint-enable eqeqeq */\n}", "function looseEqual (a, b) {\n /* eslint-disable eqeqeq */\n return a == b || (\n isObject(a) && isObject(b)\n ? JSON.stringify(a) === JSON.stringify(b)\n : false\n )\n /* eslint-enable eqeqeq */\n}", "function shallowCompare(instance,nextProps,nextState){return!shallowEqual(instance.props,nextProps)||!shallowEqual(instance.state,nextState);}", "equals(S) {\n return XSet.equality(this.S);\n }", "_equal(a, b) {\n return a === b;\n }", "isEqual(currentValue, newValue) {\n throw new Error(\"Abstract method\");\n }", "function looseEqual(a,b){var isObjectA=isObject(a);var isObjectB=isObject(b);if(isObjectA&&isObjectB){return JSON.stringify(a)===JSON.stringify(b);}else if(!isObjectA&&!isObjectB){return String(a)===String(b);}else{return false;}}", "function shallowCompare(instance, nextProps, nextState) {\n\t\t return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t\t}", "function checkEquality(a, b) {\n return a === b;\n }", "isEqual(x, y) {\n return this.x === x && this.y === y;\n }", "eq(other) { return this == other; }", "function eq(a, b) {\n return a === b;\n }", "function sameObject(a, b) {\n return a === b\n}", "eq_(one, another) {\n return one === another;\n }", "function shallowCompare(instance, nextProps, nextState) {\n\t\t\treturn !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t\t}", "function isCoerced(a,b) {\n if (a===b) {\n return false\n } else if(a==b){\n return true\n } else if (a !=b) {\n return false\n }\n}", "function looseEqual (a, b) {\n\t var isObjectA = isObject(a);\n\t var isObjectB = isObject(b);\n\t if (isObjectA && isObjectB) {\n\t try {\n\t return JSON.stringify(a) === JSON.stringify(b)\n\t } catch (e) {\n\t // possible circular reference\n\t return a === b\n\t }\n\t } else if (!isObjectA && !isObjectB) {\n\t return String(a) === String(b)\n\t } else {\n\t return false\n\t }\n\t}", "function looseEqual (a, b) {\n\t var isObjectA = isObject(a);\n\t var isObjectB = isObject(b);\n\t if (isObjectA && isObjectB) {\n\t try {\n\t return JSON.stringify(a) === JSON.stringify(b)\n\t } catch (e) {\n\t // possible circular reference\n\t return a === b\n\t }\n\t } else if (!isObjectA && !isObjectB) {\n\t return String(a) === String(b)\n\t } else {\n\t return false\n\t }\n\t}", "function looseEqual (a, b) {\n\t var isObjectA = isObject(a);\n\t var isObjectB = isObject(b);\n\t if (isObjectA && isObjectB) {\n\t try {\n\t return JSON.stringify(a) === JSON.stringify(b)\n\t } catch (e) {\n\t // possible circular reference\n\t return a === b\n\t }\n\t } else if (!isObjectA && !isObjectB) {\n\t return String(a) === String(b)\n\t } else {\n\t return false\n\t }\n\t}", "function _equals(a, b) {\n if (a === b || (a !== a && b !== b)) { // true for NaNs\n return true;\n }\n\n if (!a || !b) {\n return false;\n }\n\n // There is probably a cleaner way to do this check\n // Blame TDD :)\n if (a && typeof a.constructor === 'function' &&\n a.constructor.unionFactory === Union) {\n if (!(b && typeof b.constructor === 'function' &&\n b.constructor.unionFactory === Union)) {\n return false;\n }\n if (a.constructor !== b.constructor) {\n return false;\n }\n if (a.name !== b.name) {\n return false;\n }\n return _equals(a.payload, b.payload);\n }\n\n // I hate this block. Blame immutablejs :)\n if (typeof a.valueOf === 'function' &&\n typeof b.valueOf === 'function') {\n a = a.valueOf();\n b = b.valueOf();\n if (a === b || (a !== a && b !== b)) {\n return true;\n }\n if (!a || !b) {\n return false;\n }\n }\n if (typeof a.equals === 'function' &&\n typeof b.equals === 'function') {\n return a.equals(b);\n }\n return false;\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n return JSON.stringify(a) === JSON.stringify(b)\n } catch (e) {\n // possible circular reference\n return a === b\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n return JSON.stringify(a) === JSON.stringify(b)\n } catch (e) {\n // possible circular reference\n return a === b\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n return JSON.stringify(a) === JSON.stringify(b)\n } catch (e) {\n // possible circular reference\n return a === b\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n return JSON.stringify(a) === JSON.stringify(b)\n } catch (e) {\n // possible circular reference\n return a === b\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n return JSON.stringify(a) === JSON.stringify(b)\n } catch (e) {\n // possible circular reference\n return a === b\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n return JSON.stringify(a) === JSON.stringify(b)\n } catch (e) {\n // possible circular reference\n return a === b\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n return JSON.stringify(a) === JSON.stringify(b)\n } catch (e) {\n // possible circular reference\n return a === b\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n return JSON.stringify(a) === JSON.stringify(b)\n } catch (e) {\n // possible circular reference\n return a === b\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n return JSON.stringify(a) === JSON.stringify(b)\n } catch (e) {\n // possible circular reference\n return a === b\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n return JSON.stringify(a) === JSON.stringify(b)\n } catch (e) {\n // possible circular reference\n return a === b\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n return JSON.stringify(a) === JSON.stringify(b)\n } catch (e) {\n // possible circular reference\n return a === b\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function StrictEqualityComparer(x, y) {\n return x === y;\n}", "isEqual(other) {\n if (!other) {\n return false;\n } else {\n return equals(this.underlying, other.underlying);\n }\n }", "function looseEqual (a, b) {\n\t var isObjectA = isObject(a);\n\t var isObjectB = isObject(b);\n\t if (isObjectA && isObjectB) {\n\t return JSON.stringify(a) === JSON.stringify(b)\n\t } else if (!isObjectA && !isObjectB) {\n\t return String(a) === String(b)\n\t } else {\n\t return false\n\t }\n\t}", "function looseEqual (a, b) {\n\t var isObjectA = isObject(a);\n\t var isObjectB = isObject(b);\n\t if (isObjectA && isObjectB) {\n\t return JSON.stringify(a) === JSON.stringify(b)\n\t } else if (!isObjectA && !isObjectB) {\n\t return String(a) === String(b)\n\t } else {\n\t return false\n\t }\n\t}", "function printSomthingWorthless(){\r\n console.log('my object is does(not) equal to cole');\r\n console.log(this === cole);\r\n}", "function looseEqual(a, b) {\n\t var isObjectA = isObject(a);\n\t var isObjectB = isObject(b);\n\t if (isObjectA && isObjectB) {\n\t try {\n\t return JSON.stringify(a) === JSON.stringify(b);\n\t } catch (e) {\n\t // possible circular reference\n\t return a === b;\n\t }\n\t } else if (!isObjectA && !isObjectB) {\n\t return String(a) === String(b);\n\t } else {\n\t return false;\n\t }\n\t}", "isObjectEqual(a, b) {\n return a && b && a.foo === b.foo;\n }", "function looseEqual(a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n return JSON.stringify(a) === JSON.stringify(b);\n } catch (e) {\n // possible circular reference\n return a === b;\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b);\n } else {\n return false;\n }\n}", "get d812() { return this.c1.same(this.c8) && this.c2.same(this.c8) }", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n return JSON.stringify(a) === JSON.stringify(b)\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n return JSON.stringify(a) === JSON.stringify(b)\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n return JSON.stringify(a) === JSON.stringify(b)\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n return JSON.stringify(a) === JSON.stringify(b)\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual (a, b) {\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n return JSON.stringify(a) === JSON.stringify(b)\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}", "function looseEqual(a, b) {\n\t var isObjectA = isObject(a);\n\t var isObjectB = isObject(b);\n\t if (isObjectA && isObjectB) {\n\t return JSON.stringify(a) === JSON.stringify(b);\n\t } else if (!isObjectA && !isObjectB) {\n\t return String(a) === String(b);\n\t } else {\n\t return false;\n\t }\n\t}", "function shallowCompare(instance, nextProps, nextState) {\n\t return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t}", "function shallowCompare(instance, nextProps, nextState) {\n\t return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t}", "function shallowCompare(instance, nextProps, nextState) {\n\t return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t}", "function shallowCompare(instance, nextProps, nextState) {\n\t return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t}", "function shallowCompare(instance, nextProps, nextState) {\n\t return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t}", "function shallowCompare(instance, nextProps, nextState) {\n\t return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t}", "function shallowCompare(instance, nextProps, nextState) {\n\t return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t}", "function shallowCompare(instance, nextProps, nextState) {\n\t return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t}", "function shallowCompare(instance, nextProps, nextState) {\n\t return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t}", "function shallowCompare(instance, nextProps, nextState) {\n\t return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t}", "function shallowCompare(instance, nextProps, nextState) {\n\t return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);\n\t}", "function strictEquals(a) {\n return b => a === b;\n}", "function sc_isEqual(o1, o2) {\n return ((o1 === o2) ||\n\t (sc_isPair(o1) && sc_isPair(o2)\n\t && sc_isPairEqual(o1, o2, sc_isEqual)) ||\n\t (sc_isVector(o1) && sc_isVector(o2)\n\t && sc_isVectorEqual(o1, o2, sc_isEqual)));\n}", "function eq(x, y) {\n return util.inspect(x, true, null) === util.inspect(y, true, null);\n }", "function shallowCompare(a, b) {\r\n return checkProperties(a, b) && checkProperties(b, a);\r\n}", "function shallowCompare(a, b) {\r\n return checkProperties(a, b) && checkProperties(b, a);\r\n}", "eq(other) { return false; }", "isEqual(other, ignoreAttrs = ['_id', '_rev'], strict = false) {\n return isEqualWith(\n omit(this, ignoreAttrs),\n omit(other, ignoreAttrs),\n !strict && looseDates\n )\n }", "function defaultEquals(a, b) {\n return a === b;\n }", "function looseEqual(a,b){if(a===b){return true;}var isObjectA=isObject(a);var isObjectB=isObject(b);if(isObjectA&&isObjectB){try{var isArrayA=Array.isArray(a);var isArrayB=Array.isArray(b);if(isArrayA&&isArrayB){return a.length===b.length&&a.every(function(e,i){return looseEqual(e,b[i]);});}else if(!isArrayA&&!isArrayB){var keysA=Object.keys(a);var keysB=Object.keys(b);return keysA.length===keysB.length&&keysA.every(function(key){return looseEqual(a[key],b[key]);});}else{/* istanbul ignore next */return false;}}catch(e){/* istanbul ignore next */return false;}}else if(!isObjectA&&!isObjectB){return String(a)===String(b);}else{return false;}}", "function looseEqual(a,b){if(a===b){return true;}var isObjectA=isObject(a);var isObjectB=isObject(b);if(isObjectA&&isObjectB){try{var isArrayA=Array.isArray(a);var isArrayB=Array.isArray(b);if(isArrayA&&isArrayB){return a.length===b.length&&a.every(function(e,i){return looseEqual(e,b[i]);});}else if(!isArrayA&&!isArrayB){var keysA=Object.keys(a);var keysB=Object.keys(b);return keysA.length===keysB.length&&keysA.every(function(key){return looseEqual(a[key],b[key]);});}else{/* istanbul ignore next */return false;}}catch(e){/* istanbul ignore next */return false;}}else if(!isObjectA&&!isObjectB){return String(a)===String(b);}else{return false;}}", "function isEqual(a, b) {\n if (typeof a === 'function' && typeof b === 'function') {\n return true;\n }\n\n if ((0, _react.isValidElement)(a) && (0, _react.isValidElement)(b)) {\n return true;\n }\n\n if (a instanceof Array && b instanceof Array) {\n if (a.length !== b.length) {\n return false;\n }\n\n for (var i = 0; i !== a.length; i++) {\n if (!isEqual(a[i], b[i])) {\n return false;\n }\n }\n\n return true;\n }\n\n if (isObject(a) && isObject(b)) {\n if (Object.keys(a).length !== Object.keys(b).length) {\n return false;\n }\n\n for (var _i3 = 0, _Object$keys = Object.keys(a); _i3 < _Object$keys.length; _i3++) {\n var key = _Object$keys[_i3];\n\n if (!isEqual(a[key], b[key])) {\n return false;\n }\n }\n\n return true;\n }\n\n return a === b;\n}", "function equal$1(a,b){// START: fast-deep-equal es6/index.js 3.1.1\nif(a===b)return true;if(a&&b&&typeof a=='object'&&typeof b=='object'){if(a.constructor!==b.constructor)return false;var length,i,keys;if(Array.isArray(a)){length=a.length;if(length!=b.length)return false;for(i=length;i--!==0;)if(!equal$1(a[i],b[i]))return false;return true;}// START: Modifications:\n// 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n// to co-exist with es5.\n// 2. Replace `for of` with es5 compliant iteration using `for`.\n// Basically, take:\n//\n// ```js\n// for (i of a.entries())\n// if (!b.has(i[0])) return false;\n// ```\n//\n// ... and convert to:\n//\n// ```js\n// it = a.entries();\n// while (!(i = it.next()).done)\n// if (!b.has(i.value[0])) return false;\n// ```\n//\n// **Note**: `i` access switches to `i.value`.\nvar it;if(hasMap&&a instanceof Map&&b instanceof Map){if(a.size!==b.size)return false;it=a.entries();while(!(i=it.next()).done)if(!b.has(i.value[0]))return false;it=a.entries();while(!(i=it.next()).done)if(!equal$1(i.value[1],b.get(i.value[0])))return false;return true;}if(hasSet&&a instanceof Set&&b instanceof Set){if(a.size!==b.size)return false;it=a.entries();while(!(i=it.next()).done)if(!b.has(i.value[0]))return false;return true;}// END: Modifications\nif(hasArrayBuffer&&ArrayBuffer.isView(a)&&ArrayBuffer.isView(b)){length=a.length;if(length!=b.length)return false;for(i=length;i--!==0;)if(a[i]!==b[i])return false;return true;}if(a.constructor===RegExp)return a.source===b.source&&a.flags===b.flags;if(a.valueOf!==Object.prototype.valueOf)return a.valueOf()===b.valueOf();if(a.toString!==Object.prototype.toString)return a.toString()===b.toString();keys=Object.keys(a);length=keys.length;if(length!==Object.keys(b).length)return false;for(i=length;i--!==0;)if(!Object.prototype.hasOwnProperty.call(b,keys[i]))return false;// END: fast-deep-equal\n// START: react-fast-compare\n// custom handling for DOM elements\nif(hasElementType&&a instanceof Element)return false;// custom handling for React/Preact\nfor(i=length;i--!==0;){if((keys[i]==='_owner'||keys[i]==='__v'||keys[i]==='__o')&&a.$$typeof){// React-specific: avoid traversing React elements' _owner\n// Preact-specific: avoid traversing Preact elements' __v and __o\n// __v = $_original / $_vnode\n// __o = $_owner\n// These properties contain circular references and are not needed when\n// comparing the actual elements (and not their owners)\n// .$$typeof and ._store on just reasonable markers of elements\ncontinue;}// all other properties should be traversed as usual\nif(!equal$1(a[keys[i]],b[keys[i]]))return false;}// END: react-fast-compare\n// START: fast-deep-equal\nreturn true;}return a!==a&&b!==b;}// end fast-deep-equal", "function sameValue(a, b) {\n return a == b\n}", "static EqualContents() {}", "function $i__NM$$fbjs$lib$shallowEqual__is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n // Added the nonzero y check to make Flow happy, but it is redundant\n return x !== 0 || y !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n}", "function shallowEqual(objA,objB){if(is(objA,objB)){return true;}if((typeof objA==='undefined'?'undefined':_typeof(objA))!=='object'||objA===null||(typeof objB==='undefined'?'undefined':_typeof(objB))!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\nfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty.call(objB,keysA[i])||!is(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "function ComparedObject(value) {\n this.value = value;\n }", "function immutableObjectTest(){\n\nlet test= {'name': 'vishal', 'age':27};\n//Object.freeze(test);\nlet test2= test;\n\ntest.age = 26;\nconsole.log(test);\nconsole.log(test2);\nconsole.log(test === test2);\n\n\n\n\n}", "function sameValue(a, b) {\n return a === b\n}", "function shallowCompare(a, b) {\n return checkProperties(a, b) && checkProperties(b, a);\n}", "function shallowCompare(a, b) {\n return checkProperties(a, b) && checkProperties(b, a);\n}", "function shallowCompare(a, b) {\n return checkProperties(a, b) && checkProperties(b, a);\n}", "function shallowCompare(a, b) {\n return checkProperties(a, b) && checkProperties(b, a);\n}", "function shallowEqual(objA,objB){if(is(objA,objB)){return true;}if((typeof objA==='undefined'?'undefined':_typeof(objA))!=='object'||objA===null||(typeof objB==='undefined'?'undefined':_typeof(objB))!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\nfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty$1.call(objB,keysA[i])||!is(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "function defaultCheckValueEquality (a, b) {\n return a === b;\n}", "function defaultCheckValueEquality (a, b) {\n return a === b;\n}", "isEqual(comp) {\n return this.die1 === comp.die1 && this.die2 === comp.die2;\n }" ]
[ "0.6083867", "0.579746", "0.5670586", "0.5658718", "0.5658718", "0.56325066", "0.5591085", "0.5591085", "0.55860513", "0.5547111", "0.5488236", "0.5485746", "0.5482598", "0.5482598", "0.5473519", "0.5473519", "0.5473519", "0.5453362", "0.5453362", "0.54406023", "0.54001933", "0.53928745", "0.53733754", "0.53622913", "0.534413", "0.5332799", "0.53065526", "0.5299536", "0.5293786", "0.5288014", "0.5286842", "0.52768755", "0.527044", "0.5262714", "0.5262714", "0.5262714", "0.52615136", "0.5249322", "0.5249322", "0.5249322", "0.5249322", "0.5249322", "0.5249322", "0.5249322", "0.5249322", "0.5249322", "0.5249322", "0.5249322", "0.5243034", "0.5234837", "0.52344584", "0.52344584", "0.52301806", "0.52282286", "0.52226776", "0.52143747", "0.5207296", "0.5205281", "0.5205281", "0.5205281", "0.5205281", "0.5205281", "0.51981616", "0.5193946", "0.5193946", "0.5193946", "0.5193946", "0.5193946", "0.5193946", "0.5193946", "0.5193946", "0.5193946", "0.5193946", "0.5193946", "0.5193474", "0.5192239", "0.51879793", "0.5180632", "0.5180632", "0.51663166", "0.51580524", "0.51503175", "0.51425755", "0.51425755", "0.5130557", "0.5127663", "0.51272935", "0.5122686", "0.51208407", "0.51193756", "0.5116203", "0.51151943", "0.51146895", "0.5102211", "0.5102211", "0.5102211", "0.5102211", "0.5095421", "0.5089882", "0.5089882", "0.50893307" ]
0.0
-1
an immutable object with a single mutable value
function createRef() { var refObject = { current: null }; { Object.seal(refObject); } return refObject; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function immutableObjectTest(){\n\nlet test= {'name': 'vishal', 'age':27};\n//Object.freeze(test);\nlet test2= test;\n\ntest.age = 26;\nconsole.log(test);\nconsole.log(test2);\nconsole.log(test === test2);\n\n\n\n\n}", "static set one(value) {}", "function makeImmutableObject(obj) {\n\t if (!globalConfig.use_static) {\n\t addPropertyTo(obj, \"merge\", merge);\n\t addPropertyTo(obj, \"replace\", objectReplace);\n\t addPropertyTo(obj, \"without\", without);\n\t addPropertyTo(obj, \"asMutable\", asMutableObject);\n\t addPropertyTo(obj, \"set\", objectSet);\n\t addPropertyTo(obj, \"setIn\", objectSetIn);\n\t addPropertyTo(obj, \"update\", update);\n\t addPropertyTo(obj, \"updateIn\", updateIn);\n\t addPropertyTo(obj, \"getIn\", getIn);\n\t }\n\t\n\t return makeImmutable(obj, mutatingObjectMethods);\n\t }", "function makeImmutableObject(obj) {\n\t if (!globalConfig.use_static) {\n\t addPropertyTo(obj, \"merge\", merge);\n\t addPropertyTo(obj, \"replace\", objectReplace);\n\t addPropertyTo(obj, \"without\", without);\n\t addPropertyTo(obj, \"asMutable\", asMutableObject);\n\t addPropertyTo(obj, \"set\", objectSet);\n\t addPropertyTo(obj, \"setIn\", objectSetIn);\n\t addPropertyTo(obj, \"update\", update);\n\t addPropertyTo(obj, \"updateIn\", updateIn);\n\t addPropertyTo(obj, \"getIn\", getIn);\n\t }\n\n\t return makeImmutable(obj, mutatingObjectMethods);\n\t }", "function makeImmutableObject(obj) {\n\t if (!globalConfig.use_static) {\n\t addPropertyTo(obj, \"merge\", merge);\n\t addPropertyTo(obj, \"replace\", objectReplace);\n\t addPropertyTo(obj, \"without\", without);\n\t addPropertyTo(obj, \"asMutable\", asMutableObject);\n\t addPropertyTo(obj, \"set\", objectSet);\n\t addPropertyTo(obj, \"setIn\", objectSetIn);\n\t addPropertyTo(obj, \"update\", update);\n\t addPropertyTo(obj, \"updateIn\", updateIn);\n\t addPropertyTo(obj, \"getIn\", getIn);\n\t }\n\n\t return makeImmutable(obj, mutatingObjectMethods);\n\t }", "function manipulationBareObj( value ) {\n\treturn value;\n}", "function toImmutable(arg) {\n\t\t return (isImmutable(arg))\n\t\t ? arg\n\t\t : Immutable.fromJS(arg)\n\t\t}", "function makeImmutableObject(obj) {\n if (!globalConfig.use_static) {\n addPropertyTo(obj, \"merge\", merge);\n addPropertyTo(obj, \"replace\", objectReplace);\n addPropertyTo(obj, \"without\", without);\n addPropertyTo(obj, \"asMutable\", asMutableObject);\n addPropertyTo(obj, \"set\", objectSet);\n addPropertyTo(obj, \"setIn\", objectSetIn);\n addPropertyTo(obj, \"update\", update);\n addPropertyTo(obj, \"updateIn\", updateIn);\n addPropertyTo(obj, \"getIn\", getIn);\n }\n\n return makeImmutable(obj, mutatingObjectMethods);\n }", "function toImmutable(arg) {\n\t return (isImmutable(arg))\n\t ? arg\n\t : Immutable.fromJS(arg)\n\t}", "function castImmutable(value) {\n return value;\n}", "function set(obj, key, val, immutable) {\n if (immutable)\n return _set(assign({}, obj), key, val);\n return _set(obj, key, val);\n}", "function constObjects() {\n const name = {\n person: \"reefath\"\n }\n \n name.person = \"tesla\"\n \n return name.person;\n}", "function makeImmutableProperty (self, schema, values, propName) {\n var Model, dateCopy;\n\n if (schema[propName].__immutableCtor && is.function(schema[propName])) {\n // this is a nested immutable\n Model = schema[propName];\n self[propName] = new Model(values[propName]);\n } else if (isDate(values[propName])) {\n dateCopy = new Date(values[propName]);\n\n Object.defineProperty(self, propName, {\n get: function () {\n return new Date(dateCopy);\n },\n enumerable: true,\n configurable: false\n });\n\n Object.freeze(self[propName]);\n } else {\n objectHelper.setReadOnlyProperty(\n self,\n propName,\n // TODO: is it really necessary to clone the value if it isn't an object?\n objectHelper.copyValue(values[propName]),\n // typeof values[propName] === 'object' ? objectHelper.copyValue(values[propName]) : values[propName],\n makeSetHandler(propName)\n );\n\n if (Array.isArray(values[propName])) {\n Object.freeze(self[propName]);\n }\n }\n }", "set(name, value) {\n return this.clone({\n name,\n value,\n op: 's'\n });\n }", "set Baked(value) {}", "set x(value = 42) {}", "set x(value) {}", "copyable(newValue = true) {\n this.value.copyable = newValue;\n return this;\n }", "function put(obj, key, val, immutable) {\n if (immutable)\n return _put(assign({}, obj), key, val);\n return _put(obj, key, val);\n}", "set(name, value) {\n return this.clone({ name, value, op: 's' });\n }", "set(name, value) {\n return this.clone({ name, value, op: 's' });\n }", "set(name, value) {\n return this.clone({ name, value, op: 's' });\n }", "set(name, value) {\n return this.clone({ name, value, op: 's' });\n }", "set(name, value) {\n return this.clone({ name, value, op: 's' });\n }", "set(index, object) {\n return object;\n }", "set value(value) {}", "build() {\n const state = Immutable.from(this.state);\n this.setState(state);\n return state.asMutable();\n }", "set(obj, value) {\n return this.update(obj, () => value);\n }", "static foo (a) { return { ...a, b: 2 } }", "function constantobjects() {\n const user = {\n name: \"John\"\n };\n\n console.log(user.name);\n\n // does it work? // yes\n user.name = \"Pete\";\n console.log(user.name);\n}", "set(value) {\n if (value === this._value) {\n return this;\n }\n\n return new ImmutableAccessor(value, this.path);\n }", "function example6() {\n var o = { a: 1 };\n o.a = 2; //allowed: change ref object\n o.b = 1; //allowed: change ref object\n\n // o = {a: 1} //not allowed: change referece itself\n}", "static set zero(value) {}", "copy() {\n return Object.assign(Object.create(this), JSON.parse(JSON.stringify(this)))\n }", "set(v) { /* empty */ }", "set(value) {\n this.value = value\n if (this.autoUpdate) {\n this.update()\n }\n return this // chain me up baby\n }", "copy({ type = this.type, value = this.value } = {}) {\n const { id, lbp, rules, unknown, ignored } = this;\n return new this.constructor(id, {\n lbp,\n rules,\n unknown,\n ignored,\n type,\n value,\n original: this,\n });\n }", "function identity(val){\n\t return val;\n\t }", "one() {\r\n this.data.fill(0);\r\n this.data[0] = 1;\r\n }", "function cumpleanosClonandoObjeto(persona){\n return {\n ...persona,\n edad: persona.edad += 1\n }\n}", "function objSeal(){\n var digits = {\n 1:'one',\n 2:'two',\n 3:'three',\n }\n // Object.defineProperty(digits,2,{\n // writable:false\n // })\n console.log(digits);\n Object.seal(digits);\n digits[2] = 'TWO';\n console.log(digits);\n}", "set x(x) {\n this[0] = x;\n }", "set(param, value) {\n return this.clone({\n param,\n value,\n op: 's'\n });\n }", "function changing(obj){\n obj.greeting = 'hola'; //mutate\n}", "set() {}", "function ComparedObject(value) {\n this.value = value;\n }", "function changeGreeting(obj) {\n obj.greeting = 'Hola'; // mutate \n}", "function M(){this.a={}}", "function snapshot(value, merged = 1) {\n return { value, merged };\n}", "function identity(val){\n return val;\n }", "function identity(val){\n return val;\n }", "function identity(val){\n return val;\n }", "constructor () {\n this.storage = immutable.Map()\n }", "static initialize(obj, id, value) { \n obj['id'] = id;\n obj['value'] = value;\n }", "copy() {\n return new this.constructor(\n this.power,\n this.value,\n (this.next != null) ? this.next.copy() : null,\n );\n }", "function identity(value) {\n return value;\n }", "function identity(value) {\n return value;\n }", "function identity(value) {\n return value;\n }", "function identity(value) {\n return value;\n }", "function identity(value) {\n return value;\n }", "function identity(value) {\n return value;\n }", "function identity(value) {\n return value;\n }", "function identity(value) {\n return value;\n }", "function identity(value) {\n return value;\n }", "function shallowReadonly(target) {\r\n return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);\r\n}", "function shallowReadonly(target) {\r\n return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);\r\n}", "function shallowReadonly(target) {\r\n return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);\r\n}", "function M() {\n this.a = {};\n }", "function changeGreeting (obj) {\n obj.greeting = 'Hola' // mutate\n}", "function changeGreeting(obj) {\n\tobj.greeting = 'Hola'; //mutate\n}", "s(_value) {\n this.value = _value;\n this.refresh();\n }", "s(_value) {\n this.value = _value;\n this.refresh();\n }", "function changeGreeting(obj) {\n obj.greeting = \"hola\" //mutate\n}", "function memo (newParameterValue) {\n return initialize.observable({\n observableState,\n newParameterValue\n })\n }", "function destructivelyUpdateObjectWithKeyAndValue(object,key,value){\n object[key]=value;\n return object;\n}", "function deepCopy(value) {\r\n return deepExtend(undefined, value);\r\n}", "function deepCopy(value) {\r\n return deepExtend(undefined, value);\r\n}", "set(param, value) {\n return this.clone({ param, value, op: 's' });\n }", "set(param, value) {\n return this.clone({ param, value, op: 's' });\n }", "set(param, value) {\n return this.clone({ param, value, op: 's' });\n }", "set(param, value) {\n return this.clone({ param, value, op: 's' });\n }", "set(param, value) {\n return this.clone({ param, value, op: 's' });\n }", "function shallowReadonly(target) {\n return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);\n}", "function shallowReadonly(target) {\n return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);\n}", "function shallowReadonly(target) {\n return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);\n}", "function shallowReadonly(target) {\n return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);\n}", "function shallowReadonly(target) {\n return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);\n}", "function shallowReadonly(target) {\n return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);\n}", "function shallowReadonly(target) {\n return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);\n}", "constant(name, value) {\n return this.singleton(name, () => value);\n }", "function setA(o, val) {\n o.a = val;\n}", "constructor() {\n this.value = {};\n this.num = 0;\n }", "get value() { return this._value; }", "get value() { return this._value; }", "get value() { return this._value; }", "get value() { return this._value; }", "get value() { return this._value; }", "get value() { return this._value; }", "get value() { return this._value; }", "get value() { return this._value; }", "get value() { return this._value; }" ]
[ "0.6674448", "0.66609514", "0.6358345", "0.6347869", "0.6347869", "0.6263268", "0.6230736", "0.6136926", "0.61048114", "0.5915378", "0.5889688", "0.580687", "0.5776291", "0.5763881", "0.57248324", "0.56947106", "0.566211", "0.5636481", "0.56181127", "0.5606209", "0.5606209", "0.5606209", "0.5606209", "0.5606209", "0.5586234", "0.557178", "0.55356383", "0.55104053", "0.55075973", "0.550587", "0.54879093", "0.54802936", "0.5433998", "0.5431201", "0.54187083", "0.5394902", "0.53887403", "0.53795755", "0.5371964", "0.5357756", "0.53558546", "0.5347443", "0.5346903", "0.53416175", "0.53413206", "0.533415", "0.53338236", "0.53209484", "0.5320444", "0.5318093", "0.5318093", "0.5318093", "0.5310658", "0.53033954", "0.5293375", "0.52826554", "0.52826554", "0.52826554", "0.52826554", "0.52826554", "0.52826554", "0.52826554", "0.52826554", "0.52826554", "0.52801293", "0.52801293", "0.52801293", "0.5260411", "0.5250951", "0.52408385", "0.5236158", "0.5236158", "0.523219", "0.5231279", "0.5225852", "0.5224158", "0.5224158", "0.5219042", "0.5219042", "0.5219042", "0.5219042", "0.5219042", "0.5208099", "0.5208099", "0.5208099", "0.5208099", "0.5208099", "0.5208099", "0.5208099", "0.52074826", "0.52008766", "0.51992226", "0.519395", "0.519395", "0.519395", "0.519395", "0.519395", "0.519395", "0.519395", "0.519395", "0.519395" ]
0.0
-1
Create and return a new ReactElement of the given type. See
function createElement(type, config, children) { var propName; // Reserved names are extracted var props = {}; var key = null; var ref = null; var self = null; var source = null; if (config != null) { if (hasValidRef(config)) { ref = config.ref; { warnIfStringRefCannotBeAutoConverted(config); } } if (hasValidKey(config)) { key = '' + config.key; } self = config.__self === undefined ? null : config.__self; source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object for (propName in config) { if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { props[propName] = config[propName]; } } } // Children can be more than one argument, and those are transferred onto // the newly allocated props object. var childrenLength = arguments.length - 2; if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 2]; } { if (Object.freeze) { Object.freeze(childArray); } } props.children = childArray; } // Resolve default props if (type && type.defaultProps) { var defaultProps = type.defaultProps; for (propName in defaultProps) { if (props[propName] === undefined) { props[propName] = defaultProps[propName]; } } } { if (key || ref) { var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; if (key) { defineKeyPropWarningGetter(props, displayName); } if (ref) { defineRefPropWarningGetter(props, displayName); } } } return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createElement(type,config,children){var propName;// Reserved names are extracted\nvar props={};var key=null;var ref=null;var self=null;var source=null;if(config!=null){if(hasValidRef(config)){ref=config.ref;{warnIfStringRefCannotBeAutoConverted(config);}}if(hasValidKey(config)){key=''+config.key;}self=config.__self===undefined?null:config.__self;source=config.__source===undefined?null:config.__source;// Remaining properties are added to a new props object\nfor(propName in config){if(hasOwnProperty.call(config,propName)&&!RESERVED_PROPS.hasOwnProperty(propName)){props[propName]=config[propName];}}}// Children can be more than one argument, and those are transferred onto\n// the newly allocated props object.\nvar childrenLength=arguments.length-2;if(childrenLength===1){props.children=children;}else if(childrenLength>1){var childArray=Array(childrenLength);for(var i=0;i<childrenLength;i++){childArray[i]=arguments[i+2];}{if(Object.freeze){Object.freeze(childArray);}}props.children=childArray;}// Resolve default props\nif(type&&type.defaultProps){var defaultProps=type.defaultProps;for(propName in defaultProps){if(props[propName]===undefined){props[propName]=defaultProps[propName];}}}{if(key||ref){var displayName=typeof type==='function'?type.displayName||type.name||'Unknown':type;if(key){defineKeyPropWarningGetter(props,displayName);}if(ref){defineRefPropWarningGetter(props,displayName);}}}return ReactElement(type,key,ref,self,source,ReactCurrentOwner.current,props);}", "function createElement(type,config,children){var propName=void 0;// Reserved names are extracted\nvar props={};var key=null;var ref=null;var self=null;var source=null;if(config!=null){if(hasValidRef(config)){ref=config.ref;}if(hasValidKey(config)){key=''+config.key;}self=config.__self===undefined?null:config.__self;source=config.__source===undefined?null:config.__source;// Remaining properties are added to a new props object\nfor(propName in config){if(hasOwnProperty.call(config,propName)&&!RESERVED_PROPS.hasOwnProperty(propName)){props[propName]=config[propName];}}}// Children can be more than one argument, and those are transferred onto\n// the newly allocated props object.\nvar childrenLength=arguments.length-2;if(childrenLength===1){props.children=children;}else if(childrenLength>1){var childArray=Array(childrenLength);for(var i=0;i<childrenLength;i++){childArray[i]=arguments[i+2];}{if(Object.freeze){Object.freeze(childArray);}}props.children=childArray;}// Resolve default props\nif(type&&type.defaultProps){var defaultProps=type.defaultProps;for(propName in defaultProps){if(props[propName]===undefined){props[propName]=defaultProps[propName];}}}{if(key||ref){var displayName=typeof type==='function'?type.displayName||type.name||'Unknown':type;if(key){defineKeyPropWarningGetter(props,displayName);}if(ref){defineRefPropWarningGetter(props,displayName);}}}return ReactElement(type,key,ref,self,source,ReactCurrentOwner.current,props);}", "function createElement(type) {\n return document.createElement(type);\n }", "function makeElement(type) {\n\t\treturn document.createElement(type);\n\t}", "function createDOMFactory(type) {\n var factory = React.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n }", "function createDOMFactory(type) {\n var factory = React.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n }", "function createDOMFactory(type) {\n var factory = React.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n }", "function createDOMFactory(type) {\n var factory = React.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n }", "function createDOMFactory(type) {\n var factory = React.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n }", "function createDOMFactory(type) {\n var factory = React.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n }", "function createDOMFactory(type) {\n var factory = React.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n }", "function createDOMFactory(type) {\n var factory = React.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n }", "function createDOMFactory(type) {\n var factory = React.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n }", "function createElement (type, props, ...children) {\n if (props.class) {\n processClasses(props.class)\n }\n return createDOMElement(type, props, ...children)\n}", "function make(type) {\n\treturn document.createElement(type);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE$1) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE$1) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE$1) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE$1) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE$1) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createReactElement(component) {\n\treturn {\n\t\ttype: component.constructor,\n\t\tkey: component.key,\n\t\tref: null, // Unsupported\n\t\tprops: component.props\n\t};\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName; // Reserved names are extracted\n var props = {\n };\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n warnIfStringRefCannotBeAutoConverted(config);\n }\n if (hasValidKey(config)) key = '' + config.key;\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n for(propName in config)if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) props[propName] = config[propName];\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) props.children = children;\n else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for(var i = 0; i < childrenLength; i++)childArray[i] = arguments[i + 2];\n if (Object.freeze) Object.freeze(childArray);\n props.children = childArray;\n } // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for(propName in defaultProps)if (props[propName] === undefined) props[propName] = defaultProps[propName];\n }\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) defineKeyPropWarningGetter(props, displayName);\n if (ref) defineRefPropWarningGetter(props, displayName);\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n }", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function createElement(type, config, children) {\n var propName = void 0;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n {\n if (key || ref) {\n if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}", "function element(type, props, ...children) {\n let e = document.createElement(type);\n if (typeof props != \"undefined\" && props != null) {\n Object.keys(props).forEach(key => e.setAttribute(key, props[key]));\n }\n if (typeof children != \"undefined\" && children != null) {\n children.forEach(child => e.appendChild(child));\n }\n return e;\n}", "getElementConstructor(type) {\n return JSXElement;\n }", "function createElement(type, config, children) {\n\t var propName;\n\t\n\t // Reserved names are extracted\n\t var props = {};\n\t\n\t var key = null;\n\t var ref = null;\n\t var self = null;\n\t var source = null;\n\t\n\t if (config != null) {\n\t if (hasValidRef(config)) {\n\t ref = config.ref;\n\t }\n\t if (hasValidKey(config)) {\n\t key = '' + config.key;\n\t }\n\t\n\t self = config.__self === undefined ? null : config.__self;\n\t source = config.__source === undefined ? null : config.__source;\n\t // Remaining properties are added to a new props object\n\t for (propName in config) {\n\t if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n\t props[propName] = config[propName];\n\t }\n\t }\n\t }\n\t\n\t // Children can be more than one argument, and those are transferred onto\n\t // the newly allocated props object.\n\t var childrenLength = arguments.length - 2;\n\t if (childrenLength === 1) {\n\t props.children = children;\n\t } else if (childrenLength > 1) {\n\t var childArray = Array(childrenLength);\n\t for (var i = 0; i < childrenLength; i++) {\n\t childArray[i] = arguments[i + 2];\n\t }\n\t {\n\t if (Object.freeze) {\n\t Object.freeze(childArray);\n\t }\n\t }\n\t props.children = childArray;\n\t }\n\t\n\t // Resolve default props\n\t if (type && type.defaultProps) {\n\t var defaultProps = type.defaultProps;\n\t for (propName in defaultProps) {\n\t if (props[propName] === undefined) {\n\t props[propName] = defaultProps[propName];\n\t }\n\t }\n\t }\n\t {\n\t if (key || ref) {\n\t if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {\n\t var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\t if (key) {\n\t defineKeyPropWarningGetter(props, displayName);\n\t }\n\t if (ref) {\n\t defineRefPropWarningGetter(props, displayName);\n\t }\n\t }\n\t }\n\t }\n\t return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n\t}", "function el(type, ...value) {\n const newElement = document.createElement(type);\n if (typeof value[0] === 'string') {\n newElement.textContent = value[0];\n } else {\n value.forEach(e => newElement.appendChild(e));\n }\n return newElement;\n }" ]
[ "0.68920434", "0.6835192", "0.6767826", "0.6757532", "0.6745889", "0.6745889", "0.6745889", "0.6745889", "0.6745889", "0.6745889", "0.6745889", "0.6745889", "0.6745889", "0.65640503", "0.65581757", "0.6406998", "0.6406998", "0.6406998", "0.6406998", "0.6406998", "0.63805515", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.637205", "0.6369105", "0.6344786", "0.6344786", "0.6344786", "0.6344786", "0.6344786", "0.6344786", "0.6344786", "0.6344786", "0.6344786", "0.6344786", "0.6344786", "0.6344786", "0.6344786", "0.6344786", "0.6344786", "0.6344786", "0.6344786", "0.6344786", "0.6344786", "0.6344786", "0.6335276", "0.6318601", "0.62708944", "0.6232016" ]
0.0
-1
Clone and return a new ReactElement using element as the starting point. See
function cloneElement(element, config, children) { if (!!(element === null || element === undefined)) { { throw Error( "React.cloneElement(...): The argument must be a React element, but you passed " + element + "." ); } } var propName; // Original props are copied var props = _assign({}, element.props); // Reserved names are extracted var key = element.key; var ref = element.ref; // Self is preserved since the owner is preserved. var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a // transpiler, and the original source is probably a better indicator of the // true owner. var source = element._source; // Owner will be preserved, unless ref is overridden var owner = element._owner; if (config != null) { if (hasValidRef(config)) { // Silently steal the ref from the parent. ref = config.ref; owner = ReactCurrentOwner.current; } if (hasValidKey(config)) { key = '' + config.key; } // Remaining properties override existing props var defaultProps; if (element.type && element.type.defaultProps) { defaultProps = element.type.defaultProps; } for (propName in config) { if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { if (config[propName] === undefined && defaultProps !== undefined) { // Resolve default props props[propName] = defaultProps[propName]; } else { props[propName] = config[propName]; } } } } // Children can be more than one argument, and those are transferred onto // the newly allocated props object. var childrenLength = arguments.length - 2; if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i = 0; i < childrenLength; i++) { childArray[i] = arguments[i + 2]; } props.children = childArray; } return ReactElement(element.type, key, ref, self, source, owner, props); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cloneElement(element,config,children){if(!!(element===null||element===undefined)){{throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \"+element+\".\");}}var propName;// Original props are copied\nvar props=_assign({},element.props);// Reserved names are extracted\nvar key=element.key;var ref=element.ref;// Self is preserved since the owner is preserved.\nvar self=element._self;// Source is preserved since cloneElement is unlikely to be targeted by a\n// transpiler, and the original source is probably a better indicator of the\n// true owner.\nvar source=element._source;// Owner will be preserved, unless ref is overridden\nvar owner=element._owner;if(config!=null){if(hasValidRef(config)){// Silently steal the ref from the parent.\nref=config.ref;owner=ReactCurrentOwner.current;}if(hasValidKey(config)){key=''+config.key;}// Remaining properties override existing props\nvar defaultProps;if(element.type&&element.type.defaultProps){defaultProps=element.type.defaultProps;}for(propName in config){if(hasOwnProperty.call(config,propName)&&!RESERVED_PROPS.hasOwnProperty(propName)){if(config[propName]===undefined&&defaultProps!==undefined){// Resolve default props\nprops[propName]=defaultProps[propName];}else {props[propName]=config[propName];}}}}// Children can be more than one argument, and those are transferred onto\n// the newly allocated props object.\nvar childrenLength=arguments.length-2;if(childrenLength===1){props.children=children;}else if(childrenLength>1){var childArray=Array(childrenLength);for(var i=0;i<childrenLength;i++){childArray[i]=arguments[i+2];}props.children=childArray;}return ReactElement(element.type,key,ref,self,source,owner,props);}", "function cloneElement(element,config,children){!!(element===null||element===undefined)?invariant(false,'React.cloneElement(...): The argument must be a React element, but you passed %s.',element):void 0;var propName=void 0;// Original props are copied\nvar props=_assign({},element.props);// Reserved names are extracted\nvar key=element.key;var ref=element.ref;// Self is preserved since the owner is preserved.\nvar self=element._self;// Source is preserved since cloneElement is unlikely to be targeted by a\n// transpiler, and the original source is probably a better indicator of the\n// true owner.\nvar source=element._source;// Owner will be preserved, unless ref is overridden\nvar owner=element._owner;if(config!=null){if(hasValidRef(config)){// Silently steal the ref from the parent.\nref=config.ref;owner=ReactCurrentOwner.current;}if(hasValidKey(config)){key=''+config.key;}// Remaining properties override existing props\nvar defaultProps=void 0;if(element.type&&element.type.defaultProps){defaultProps=element.type.defaultProps;}for(propName in config){if(hasOwnProperty.call(config,propName)&&!RESERVED_PROPS.hasOwnProperty(propName)){if(config[propName]===undefined&&defaultProps!==undefined){// Resolve default props\nprops[propName]=defaultProps[propName];}else{props[propName]=config[propName];}}}}// Children can be more than one argument, and those are transferred onto\n// the newly allocated props object.\nvar childrenLength=arguments.length-2;if(childrenLength===1){props.children=children;}else if(childrenLength>1){var childArray=Array(childrenLength);for(var i=0;i<childrenLength;i++){childArray[i]=arguments[i+2];}props.children=childArray;}return ReactElement(element.type,key,ref,self,source,owner,props);}", "function cloneElement(element, config, children) {\n (function () {\n if (!!(element === null || element === undefined)) {\n {\n throw ReactError(Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\"));\n }\n }\n })();\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n (function () {\n if (!!(element === null || element === undefined)) {\n {\n throw ReactError(Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\"));\n }\n }\n })();\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n (function () {\n if (!!(element === null || element === undefined)) {\n {\n throw ReactError(Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\"));\n }\n }\n })();\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\n 'React.cloneElement(...): The argument must be a React element, but you passed ' +\n element +\n '.',\n );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (\n hasOwnProperty.call(config, propName) &&\n !RESERVED_PROPS.hasOwnProperty(propName)\n ) {\n if (\n config[propName] === undefined &&\n defaultProps !== undefined\n ) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(\n element.type,\n key,\n ref,\n self,\n source,\n owner,\n props,\n );\n }", "function cloneElement(element, config, children) {\n !!(element === null || element === undefined) ? invariant(false, 'React.cloneElement(...): The argument must be a React element, but you passed %s.', element) : void 0;\n var propName = void 0; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps = void 0;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n !!(element === null || element === undefined) ? invariant(false, 'React.cloneElement(...): The argument must be a React element, but you passed %s.', element) : void 0;\n var propName = void 0; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps = void 0;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n !!(element === null || element === undefined) ? invariant(false, 'React.cloneElement(...): The argument must be a React element, but you passed %s.', element) : void 0;\n var propName = void 0; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps = void 0;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n if (element === null || element === undefined) {\n throw new Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n\n var propName; // Original props are copied\n\n var props = assign({}, element.props); // Reserved names are extracted\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n }\n var propName;\n // Original props are copied\n var props = _assign({}, element.props);\n // Reserved names are extracted\n var key = element.key;\n var ref = element.ref;\n // Self is preserved since the owner is preserved.\n var self = element._self;\n // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n var source = element._source;\n // Owner will be preserved, unless ref is overridden\n var owner = element._owner;\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n // Remaining properties override existing props\n var defaultProps;\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n }\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n props.children = childArray;\n }\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n (function () {\n if (!!(element === null || element === undefined)) {\n {\n throw ReactError(Error('React.cloneElement(...): The argument must be a React element, but you passed ' + element + '.'));\n }\n }\n })();\n\n var propName = void 0;\n\n // Original props are copied\n var props = _assign({}, element.props);\n\n // Reserved names are extracted\n var key = element.key;\n var ref = element.ref;\n // Self is preserved since the owner is preserved.\n var self = element._self;\n // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n var source = element._source;\n\n // Owner will be preserved, unless ref is overridden\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n // Remaining properties override existing props\n var defaultProps = void 0;\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n (function () {\n if (!!(element === null || element === undefined)) {\n {\n throw ReactError(Error('React.cloneElement(...): The argument must be a React element, but you passed ' + element + '.'));\n }\n }\n })();\n\n var propName = void 0;\n\n // Original props are copied\n var props = _assign({}, element.props);\n\n // Reserved names are extracted\n var key = element.key;\n var ref = element.ref;\n // Self is preserved since the owner is preserved.\n var self = element._self;\n // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n var source = element._source;\n\n // Owner will be preserved, unless ref is overridden\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n // Remaining properties override existing props\n var defaultProps = void 0;\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n (function () {\n if (!!(element === null || element === undefined)) {\n {\n throw ReactError(Error('React.cloneElement(...): The argument must be a React element, but you passed ' + element + '.'));\n }\n }\n })();\n\n var propName = void 0;\n\n // Original props are copied\n var props = _assign({}, element.props);\n\n // Reserved names are extracted\n var key = element.key;\n var ref = element.ref;\n // Self is preserved since the owner is preserved.\n var self = element._self;\n // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n var source = element._source;\n\n // Owner will be preserved, unless ref is overridden\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n // Remaining properties override existing props\n var defaultProps = void 0;\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n (function () {\n if (!!(element === null || element === undefined)) {\n {\n throw ReactError(Error('React.cloneElement(...): The argument must be a React element, but you passed ' + element + '.'));\n }\n }\n })();\n\n var propName = void 0;\n\n // Original props are copied\n var props = _assign({}, element.props);\n\n // Reserved names are extracted\n var key = element.key;\n var ref = element.ref;\n // Self is preserved since the owner is preserved.\n var self = element._self;\n // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n var source = element._source;\n\n // Owner will be preserved, unless ref is overridden\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n // Remaining properties override existing props\n var defaultProps = void 0;\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n (function () {\n if (!!(element === null || element === undefined)) {\n {\n throw ReactError(Error('React.cloneElement(...): The argument must be a React element, but you passed ' + element + '.'));\n }\n }\n })();\n\n var propName = void 0;\n\n // Original props are copied\n var props = _assign({}, element.props);\n\n // Reserved names are extracted\n var key = element.key;\n var ref = element.ref;\n // Self is preserved since the owner is preserved.\n var self = element._self;\n // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n var source = element._source;\n\n // Owner will be preserved, unless ref is overridden\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n // Remaining properties override existing props\n var defaultProps = void 0;\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}", "function cloneElement(element, config, children) {\n !!(element === null || element === undefined) ? invariant(false, 'React.cloneElement(...): The argument must be a React element, but you passed %s.', element) : undefined;\n\n var propName = undefined;\n\n // Original props are copied\n var props = _assign({}, element.props);\n\n // Reserved names are extracted\n var key = element.key;\n var ref = element.ref;\n // Self is preserved since the owner is preserved.\n var self = element._self;\n // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n var source = element._source;\n\n // Owner will be preserved, unless ref is overridden\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n // Remaining properties override existing props\n var defaultProps = undefined;\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n var propName;\n\n // Original props are copied\n var props = _assign({}, element.props);\n\n // Reserved names are extracted\n var key = element.key;\n var ref = element.ref;\n // Self is preserved since the owner is preserved.\n var self = element._self;\n // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n var source = element._source;\n\n // Owner will be preserved, unless ref is overridden\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n // Remaining properties override existing props\n var defaultProps;\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n var propName;\n\n // Original props are copied\n var props = _assign({}, element.props);\n\n // Reserved names are extracted\n var key = element.key;\n var ref = element.ref;\n // Self is preserved since the owner is preserved.\n var self = element._self;\n // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n var source = element._source;\n\n // Owner will be preserved, unless ref is overridden\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n // Remaining properties override existing props\n var defaultProps;\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n var propName;\n\n // Original props are copied\n var props = _assign({}, element.props);\n\n // Reserved names are extracted\n var key = element.key;\n var ref = element.ref;\n // Self is preserved since the owner is preserved.\n var self = element._self;\n // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n var source = element._source;\n\n // Owner will be preserved, unless ref is overridden\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n // Remaining properties override existing props\n var defaultProps;\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n var propName;\n\n // Original props are copied\n var props = _assign({}, element.props);\n\n // Reserved names are extracted\n var key = element.key;\n var ref = element.ref;\n // Self is preserved since the owner is preserved.\n var self = element._self;\n // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n var source = element._source;\n\n // Owner will be preserved, unless ref is overridden\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n // Remaining properties override existing props\n var defaultProps;\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, props) {\n if (props.style && element.props.style) {\n props.style = _objectSpread({}, element.props.style, {}, props.style);\n }\n\n if (props.className && element.props.className) {\n props.className = element.props.className + \" \" + props.className;\n }\n\n return _react.default.cloneElement(element, props);\n}", "function cloneElement(element, config, children) {\n !!(element === null || element === undefined) ? invariant(false, 'React.cloneElement(...): The argument must be a React element, but you passed %s.', element) : void 0;\n\n var propName = void 0;\n\n // Original props are copied\n var props = _assign({}, element.props);\n\n // Reserved names are extracted\n var key = element.key;\n var ref = element.ref;\n // Self is preserved since the owner is preserved.\n var self = element._self;\n // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n var source = element._source;\n\n // Owner will be preserved, unless ref is overridden\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n // Remaining properties override existing props\n var defaultProps = void 0;\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n !!(element === null || element === undefined) ? invariant(false, 'React.cloneElement(...): The argument must be a React element, but you passed %s.', element) : void 0;\n\n var propName = void 0;\n\n // Original props are copied\n var props = _assign({}, element.props);\n\n // Reserved names are extracted\n var key = element.key;\n var ref = element.ref;\n // Self is preserved since the owner is preserved.\n var self = element._self;\n // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n var source = element._source;\n\n // Owner will be preserved, unless ref is overridden\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n // Remaining properties override existing props\n var defaultProps = void 0;\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }", "function cloneElement(element, config, children) {\n !!(element === null || element === undefined) ? invariant(false, 'React.cloneElement(...): The argument must be a React element, but you passed %s.', element) : void 0;\n\n var propName = void 0;\n\n // Original props are copied\n var props = _assign({}, element.props);\n\n // Reserved names are extracted\n var key = element.key;\n var ref = element.ref;\n // Self is preserved since the owner is preserved.\n var self = element._self;\n // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n var source = element._source;\n\n // Owner will be preserved, unless ref is overridden\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n // Remaining properties override existing props\n var defaultProps = void 0;\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n }" ]
[ "0.6915212", "0.68927294", "0.6695613", "0.6695613", "0.66943395", "0.6647816", "0.6647816", "0.6647816", "0.6647816", "0.6647816", "0.6647816", "0.6647816", "0.6647816", "0.6647816", "0.6647816", "0.6647816", "0.6647816", "0.6647816", "0.6634648", "0.6615246", "0.6615246", "0.6615246", "0.6615246", "0.6615246", "0.6610004", "0.659702", "0.659702", "0.659702", "0.65870035", "0.6583266", "0.6545357", "0.6542035", "0.6542035", "0.6542035", "0.6542035", "0.653281", "0.6526539", "0.6526539", "0.6526539", "0.6526539", "0.6523168", "0.6520026", "0.6520026", "0.6520026" ]
0.6612965
76
Flatten a children object (typically specified as `props.children`) and return an array with appropriately rekeyed children. See
function toArray(children) { var result = []; mapIntoWithKeyPrefixInternal(children, result, null, function (child) { return child; }); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toArrayChildren(children) {\n var ret = [];\n React__default.Children.forEach(children, function (child) {\n ret.push(child);\n });\n return ret;\n }", "function toArray(children){var result=[];mapIntoWithKeyPrefixInternal(children,result,null,function(child){return child;});return result;}", "function toArray(children){return mapChildren(children,function(child){return child;})||[];}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n }", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n }", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n }", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n }", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n }", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n }", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, function (child) {\n return child;\n });\n return result;\n }", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, function (child) {\n return child;\n });\n return result;\n }", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, function (child) {\n return child;\n });\n return result;\n }", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, function (child) {\n return child;\n });\n return result;\n }", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, function (child) {\n return child;\n });\n return result;\n }", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, function (child) {\n return child;\n });\n return result;\n }", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, function (child) {\n return child;\n });\n return result;\n }", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, function (child) {\n return child;\n });\n return result;\n }", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, function (child) {\n return child;\n });\n return result;\n }", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, function (child) {\n return child;\n });\n return result;\n }", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, function (child) {\n return child;\n });\n return result;\n }", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, function (child) {\n return child;\n });\n return result;\n }", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, function (child) {\n return child;\n });\n return result;\n }", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, function (child) {\n return child;\n });\n return result;\n }", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, function (child) {\n return child;\n });\n return result;\n }", "function toArray(children){var result=[];mapIntoWithKeyPrefixInternal(children,result,null,emptyFunction.thatReturnsArgument);return result;}", "function toArray(children){var result=[];mapIntoWithKeyPrefixInternal(children,result,null,emptyFunction.thatReturnsArgument);return result;}", "function toArray(children){var result=[];mapIntoWithKeyPrefixInternal(children,result,null,emptyFunction.thatReturnsArgument);return result;}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n }", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n }", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n }", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n }", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n }", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n }", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n }", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n }", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, function(\n child,\n ) {\n return child;\n });\n return result;\n }", "function toArray(children) {\n return mapChildren(children, function(child) {\n return child;\n }) || [];\n }", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n }", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}", "function toArray(children) {\n var result = [];\n mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);\n return result;\n}" ]
[ "0.7753083", "0.75176793", "0.74334466", "0.74051267", "0.74051267", "0.74051267", "0.74051267", "0.74051267", "0.74051267", "0.7397549", "0.7397549", "0.7397549", "0.7397549", "0.7397549", "0.7397549", "0.7397549", "0.7397549", "0.7397549", "0.7397549", "0.7397549", "0.7397549", "0.7397549", "0.7397549", "0.7397549", "0.73960507", "0.73960507", "0.73960507", "0.7394056", "0.7394056", "0.7394056", "0.7394056", "0.7394056", "0.7394056", "0.7394056", "0.7394056", "0.73816067", "0.73816067", "0.73816067", "0.73816067", "0.73816067", "0.73816067", "0.73816067", "0.73816067", "0.73816067", "0.73816067", "0.73816067", "0.73816067", "0.73816067", "0.73816067", "0.73816067", "0.73816067", "0.73816067", "0.73816067", "0.73816067", "0.73816067", "0.73816067", "0.73816067", "0.73816067", "0.73816067", "0.73816067", "0.73816067", "0.73816067", "0.73816067", "0.73406494", "0.7305379", "0.73026425", "0.73025167", "0.73025167", "0.73025167", "0.73025167", "0.73025167", "0.73025167", "0.73025167", "0.73025167", "0.73025167", "0.73025167", "0.73025167", "0.73025167", "0.73025167", "0.73025167", "0.73025167", "0.73025167", "0.73025167", "0.73025167", "0.73025167", "0.73025167", "0.73025167", "0.73025167", "0.73025167", "0.73025167", "0.73025167", "0.73025167", "0.73025167", "0.73025167", "0.73025167", "0.73025167", "0.73025167", "0.73025167", "0.73025167", "0.73025167", "0.73025167" ]
0.0
-1
This is a dummy function to check if the function name has been altered by minification. If the function has been minified and NODE_ENV !== 'production', warn the user.
function isCrushed() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function uglify(name) {\n console.log(\"Hello \" + name);\n}", "function keepNonMinified(file) {\n\tvar keep = true;\n\tif(file.path.match('.js$')) {\n\t\tvar minPath = file.path.replace('.js', '.min.js');\n\t\tkeep = !exists(minPath);\n\t}\n\treturn keep;\n}", "function markFuncFreeze(fun, opt_name) {\n // inline: enforceType(fun, 'function', opt_name);\n if (typeOf(fun) !== 'function') {\n fail('expected function instead of ', typeOf(fun),\n ': ', (opt_name || fun));\n }\n\n // inline: if (isCtor(fun)) {\n if (fun.CONSTRUCTOR___) {\n fail(\"Constructors can't be simple functions: \", fun);\n }\n // inline: if (isXo4aFunc(fun)) {\n if (fun.XO4A___) {\n fail(\"Exophoric functions can't be simple functions: \", fun);\n }\n fun.FUNC___ = opt_name ? String(opt_name) : true;\n return primFreeze(fun);\n }", "function warnOnceInDevelopment(msg, type) {\n if (type === void 0) { type = 'warn'; }\n if (Object(__WEBPACK_IMPORTED_MODULE_0__environment__[\"b\" /* isProduction */])()) {\n return;\n }\n if (!haveWarned[msg]) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__environment__[\"c\" /* isTest */])()) {\n haveWarned[msg] = true;\n }\n switch (type) {\n case 'error':\n console.error(msg);\n break;\n default:\n console.warn(msg);\n }\n }\n}", "function warnOnceInDevelopment(msg, type) {\n if (type === void 0) { type = 'warn'; }\n if (Object(__WEBPACK_IMPORTED_MODULE_0__environment__[\"b\" /* isProduction */])()) {\n return;\n }\n if (!haveWarned[msg]) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__environment__[\"c\" /* isTest */])()) {\n haveWarned[msg] = true;\n }\n switch (type) {\n case 'error':\n console.error(msg);\n break;\n default:\n console.warn(msg);\n }\n }\n}", "function isUserFunction(source) {\n return (typeof source === 'function' && source !== exports.NOOP);\n}", "function isUserFunction(source) {\n return (typeof source === 'function' && source !== exports.NOOP);\n}", "function warnOnceInDevelopment(msg, type) {\n if (type === void 0) { type = 'warn'; }\n if (Object(__WEBPACK_IMPORTED_MODULE_0__environment__[\"d\" /* isProduction */])()) {\n return;\n }\n if (!haveWarned[msg]) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__environment__[\"e\" /* isTest */])()) {\n haveWarned[msg] = true;\n }\n switch (type) {\n case 'error':\n console.error(msg);\n break;\n default:\n console.warn(msg);\n }\n }\n}", "function warn(message) {\n if (_warningCallback && \"dev\" !== 'production') {\n _warningCallback(message);\n }\n else if (console && console.warn) {\n console.warn(message);\n }\n}", "function cleanFunctionName(functionName) {\n var ignoredPrefix = 'non-virtual thunk to ';\n if (functionName.startsWith(ignoredPrefix)) {\n return functionName.substr(ignoredPrefix.length);\n }\n return functionName;\n}", "minify() {\n\n }", "function warnOnceInDevelopment(msg, type) {\n if (type === void 0) { type = 'warn'; }\n if (Object(_environment__WEBPACK_IMPORTED_MODULE_0__[\"isProduction\"])()) {\n return;\n }\n if (!haveWarned[msg]) {\n if (!Object(_environment__WEBPACK_IMPORTED_MODULE_0__[\"isTest\"])()) {\n haveWarned[msg] = true;\n }\n switch (type) {\n case 'error':\n console.error(msg);\n break;\n default:\n console.warn(msg);\n }\n }\n}", "function warnOnceInDevelopment(msg, type) {\n if (type === void 0) { type = 'warn'; }\n if (Object(_environment__WEBPACK_IMPORTED_MODULE_0__[\"isProduction\"])()) {\n return;\n }\n if (!haveWarned[msg]) {\n if (!Object(_environment__WEBPACK_IMPORTED_MODULE_0__[\"isTest\"])()) {\n haveWarned[msg] = true;\n }\n switch (type) {\n case 'error':\n console.error(msg);\n break;\n default:\n console.warn(msg);\n }\n }\n}", "function warnOnceInDevelopment(msg, type) {\n if (type === void 0) { type = 'warn'; }\n if (Object(_environment__WEBPACK_IMPORTED_MODULE_0__[\"isProduction\"])()) {\n return;\n }\n if (!haveWarned[msg]) {\n if (!Object(_environment__WEBPACK_IMPORTED_MODULE_0__[\"isTest\"])()) {\n haveWarned[msg] = true;\n }\n switch (type) {\n case 'error':\n console.error(msg);\n break;\n default:\n console.warn(msg);\n }\n }\n}", "function warnOnceInDevelopment(msg, type) {\n if (type === void 0) { type = 'warn'; }\n if (Object(_environment__WEBPACK_IMPORTED_MODULE_0__[\"isProduction\"])()) {\n return;\n }\n if (!haveWarned[msg]) {\n if (!Object(_environment__WEBPACK_IMPORTED_MODULE_0__[\"isTest\"])()) {\n haveWarned[msg] = true;\n }\n switch (type) {\n case 'error':\n console.error(msg);\n break;\n default:\n console.warn(msg);\n }\n }\n}", "function warnOnceInDevelopment(msg, type) {\n if (type === void 0) { type = 'warn'; }\n if (Object(_environment__WEBPACK_IMPORTED_MODULE_0__[\"isProduction\"])()) {\n return;\n }\n if (!haveWarned[msg]) {\n if (!Object(_environment__WEBPACK_IMPORTED_MODULE_0__[\"isTest\"])()) {\n haveWarned[msg] = true;\n }\n switch (type) {\n case 'error':\n console.error(msg);\n break;\n default:\n console.warn(msg);\n }\n }\n}", "isFileCompressed(file) {\n var dir = path.dirname(file);\n var basename = path.basename(file);\n\n if(this.isScript(basename) || this.isCss(basename) || this.isLess(basename)) {\n if(basename == 'script.js') {\n var compressedName = dir + '/script.min.js';\n } else if(basename == 'styles.css') {\n var compressedName = dir + '/styles.min.css';\n } else if(basename == 'style.css') {\n var compressedName = dir + '/style.min.css';\n } else if(this.isLess(basename)) {\n var compressedName = '../www/local/templates/bootstrap3/styles.css';\n }\n // var compressedName = (basename == 'script.js') ? dir + '/script.min.js' : dir + '/style.min.css';\n\n return this.isDateActual(file, compressedName);\n } else {\n return false;\n }\n }", "function isFallbackFunction(f) {\n return !f.name\n}", "function functionWithoutJSDocWarningsBecauseTheSectionWasCompletelyExcluded() {\n console.log('ASHLDKFJHASKFJSDHFKJSDHFKLSDJHFLJKSDHFLKSDJFHKSDLJFHLSDKJF')\n return true\n}", "function warn(message) {\n if (_warningCallback && \"development\" !== 'production') {\n _warningCallback(message);\n }\n else if (console && console.warn) {\n console.warn(message);\n }\n}", "isPackedFunc(func) {\n // eslint-disable-next-line no-prototype-builtins\n return typeof func == \"function\" && func.hasOwnProperty(\"_tvmPackedCell\");\n }", "function checkFunction(fn) {\n return typeof fn === 'function';\n }", "function istraced (namespace) {\n /* istanbul ignore next: tested in a child processs */\n if (process.traceDeprecation) {\n // --trace-deprecation support\n return true\n }\n\n var str = Object({\"NODE_ENV\":\"production\"}).TRACE_DEPRECATION || ''\n\n // namespace traced\n return containsNamespace(str, namespace)\n}", "function istraced (namespace) {\n /* istanbul ignore next: tested in a child processs */\n if (process.traceDeprecation) {\n // --trace-deprecation support\n return true\n }\n\n var str = Object({\"NODE_ENV\":\"production\"}).TRACE_DEPRECATION || ''\n\n // namespace traced\n return containsNamespace(str, namespace)\n}", "function istraced (namespace) {\n /* istanbul ignore next: tested in a child processs */\n if (process.traceDeprecation) {\n // --trace-deprecation support\n return true\n }\n\n var str = Object({\"NODE_ENV\":\"production\"}).TRACE_DEPRECATION || ''\n\n // namespace traced\n return containsNamespace(str, namespace)\n}", "function isignored (namespace) {\n /* istanbul ignore next: tested in a child processs */\n if (process.noDeprecation) {\n // --no-deprecation support\n return true\n }\n\n var str = Object({\"NODE_ENV\":\"production\"}).NO_DEPRECATION || ''\n\n // namespace ignored\n return containsNamespace(str, namespace)\n}", "function isignored (namespace) {\n /* istanbul ignore next: tested in a child processs */\n if (process.noDeprecation) {\n // --no-deprecation support\n return true\n }\n\n var str = Object({\"NODE_ENV\":\"production\"}).NO_DEPRECATION || ''\n\n // namespace ignored\n return containsNamespace(str, namespace)\n}", "function isignored (namespace) {\n /* istanbul ignore next: tested in a child processs */\n if (process.noDeprecation) {\n // --no-deprecation support\n return true\n }\n\n var str = Object({\"NODE_ENV\":\"production\"}).NO_DEPRECATION || ''\n\n // namespace ignored\n return containsNamespace(str, namespace)\n}", "function isProduction() {\n return argv.production\n}", "function isDev(fn) {\n if (devMode) {\n return fn;\n } else {\n return passthrough();\n }\n}", "function isDev() {\n return (process.env.NODE_ENV !== 'production')\n}", "function onValidateGLFunc( functionName, functionArgs ) {\n let functionString;\n if ( log.priority >= 4 ) {\n functionString = getFunctionString( functionName, functionArgs );\n log.info( 4, functionString );\n }\n\n if ( log.break ) {\n functionString = functionString || getFunctionString( functionName, functionArgs );\n const isBreakpoint = log.break &&\n log.break.every( breakOn => functionString.indexOf( breakOn ) !== -1 );\n if ( isBreakpoint ) {\n debugger; // eslint-disable-line\n }\n }\n\n for ( const arg of functionArgs ) {\n if ( arg === undefined ) {\n functionString = functionString || getFunctionString( functionName, functionArgs );\n if ( log.throw ) {\n throw new Error( `Undefined argument: ${functionString}` );\n } else {\n log.error( `Undefined argument: ${functionString}` );\n debugger; // eslint-disable-line\n }\n }\n }\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== \"development\" ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== \"development\" ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== \"development\" ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== \"development\" ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== \"development\" ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== \"development\" ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function can_mangle(name) {\n if (unmangleable.indexOf(name) >= 0) return false;\n if (reserved.indexOf(name) >= 0) return false;\n if (options.only_cache) {\n return cache.props.has(name);\n }\n if (/^-?[0-9]+(\\.[0-9]+)?(e[+-][0-9]+)?$/.test(name)) return false;\n return true;\n }", "function onValidateGLFunc(functionName, functionArgs) {\n let functionString;\n if (log.priority >= 4) {\n functionString = getFunctionString(functionName, functionArgs);\n log.log(4, functionString)();\n }\n\n if (log.break) {\n functionString = functionString || getFunctionString(functionName, functionArgs);\n const isBreakpoint =\n log.break && log.break.every(breakOn => functionString.indexOf(breakOn) !== -1);\n if (isBreakpoint) {\n debugger; // eslint-disable-line\n }\n }\n\n for (const arg of functionArgs) {\n if (arg === undefined) {\n functionString = functionString || getFunctionString(functionName, functionArgs);\n if (log.throw) {\n throw new Error(`Undefined argument: ${functionString}`);\n } else {\n log.error(`Undefined argument: ${functionString}`)();\n log.error(`Undefined argument: ${functionString}`)();\n debugger; // eslint-disable-line\n }\n }\n }\n}", "function untestableFilter(mockName) {\n var cond =\n !(\n mockName === 'font-wishlist' ||\n mockName.indexOf('mapbox_') !== -1\n );\n\n if(!cond) console.log(' -', mockName);\n\n return cond;\n}", "function warnOnceInDevelopment(msg, type) {\n if (type === void 0) { type = 'warn'; }\n if (isProduction()) {\n return;\n }\n if (!haveWarned[msg]) {\n if (!isTest()) {\n haveWarned[msg] = true;\n }\n switch (type) {\n case 'error':\n console.error(msg);\n break;\n default:\n console.warn(msg);\n }\n }\n}", "function isProductionBuild() {\n return process.env.NODE_ENV === 'production';\n}", "function function_exists(function_name)\n{\n if (typeof function_name == 'string')\n return (typeof window[function_name] == 'function');\n return (function_name instanceof Function);\n}", "function warn(message) {\n if (_warningCallback && process.env.NODE_ENV !== 'production') {\n _warningCallback(message);\n }\n else if (console && console.warn) {\n console.warn(message);\n }\n}", "function monitorCodeUse(eventName, data) {\n\t (\"production\" !== process.env.NODE_ENV ? invariant(\n\t eventName && !/[^a-z0-9_]/.test(eventName),\n\t 'You must provide an eventName using only the characters [a-z0-9_]'\n\t ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n\t}", "function monitorCodeUse(eventName, data) {\n\t (\"production\" !== process.env.NODE_ENV ? invariant(\n\t eventName && !/[^a-z0-9_]/.test(eventName),\n\t 'You must provide an eventName using only the characters [a-z0-9_]'\n\t ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n\t}", "function warnOnceInDevelopment(msg, type) {\n if (type === void 0) {\n type = 'warn';\n }\n if ((0, _environment.isProduction)()) {\n return;\n }\n if (!haveWarned[msg]) {\n if (!(0, _environment.isTest)()) {\n haveWarned[msg] = true;\n }\n switch (type) {\n case 'error':\n console.error(msg);\n break;\n default:\n console.warn(msg);\n }\n }\n}", "function warnOnceInDevelopment(msg, type) {\n if (type === void 0) {\n type = 'warn';\n }\n if ((0, _environment.isProduction)()) {\n return;\n }\n if (!haveWarned[msg]) {\n if (!(0, _environment.isTest)()) {\n haveWarned[msg] = true;\n }\n switch (type) {\n case 'error':\n console.error(msg);\n break;\n default:\n console.warn(msg);\n }\n }\n}", "function isProdMode() {\n return process.env.NODE_ENV == 'production';\n}", "function funcName(func) {\n return func.name || \"{anonymous}\"\n }", "function checkIfFunction(func) {\n return typeof func === \"function\";\n}", "function getFunctionName( func ){\n\n\ttry {\n\t\tfunc = func.substr('function '.length);\n\t \tfunc = func.substr(0, func.indexOf('('));\n\n\t\tif( func == \"\" ) func = \"ANONYMOUS_FUNC\";\n\t\tif( func.indexOf( \"=>\" ) >= 0 ) func = \"ANONYMOUS_FUNC\";\n\n\t\treturn func;\n\t} catch( err ){\n\t\tconsole.log( \"\\x1b[31m%s\\x1b[0m\", \"[summer-mvc core]\", \"[logger.js]\", err );\n\t\tthrow err;\n\t}\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function checkFunctions(func1, func2) {\n if (func1.toString() !== func2.toString()) return false;\n return true;\n}", "function monitorCodeUse(eventName, data) {\n (\"production\" !== \"production\" ? invariant(\n eventName && !/[^a-z0-9_]/.test(eventName),\n 'You must provide an eventName using only the characters [a-z0-9_]'\n ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName)));\n}", "function unusedFragMessage(fragName) {\n return 'Fragment \"' + fragName + '\" is never used.';\n}", "function showSpecialWarning() {\r\n return true;\r\n}", "function has_bugs(buggy_code) {\n if (buggy_code) {\n return 'sad days'\n } else {\n return 'it\\'s a good day'\n }\n }", "function function_exists(function_name)\n{\n\tif (typeof function_name == 'string')\n\t\treturn (typeof window[function_name] == 'function');\n\treturn (function_name instanceof Function);\n}", "function StupidBug() {}", "function functionTest(){\n 'use strict';\n console.log(this===window);\n}", "function unusedFragMessage(fragName) {\n return \"Fragment \\\"\".concat(fragName, \"\\\" is never used.\");\n}", "warn() {}", "function isDeployment() {\n return !isDev()\n}", "function getMinimizerConfig() {\n return global.FOO_PROD\n ? [\n new UglifyJsPlugin({\n uglifyOptions: {\n parse: {\n html5_comments: false\n },\n comments: false,\n compress: {\n warnings: false,\n drop_console: true,\n drop_debugger: true\n }\n },\n extractComments: true\n })\n ]\n : [];\n}", "function DEBUG2() {\n if (d) {\n console.warn.apply(console, arguments)\n }\n}", "function checkInstrumented() {\n if (proto['__gl_wrapped__']) {\n return false;\n }\n Object.defineProperty(proto, '__gl_wrapped__', {\n 'configurable': true,\n 'enumerable': false,\n 'value': true\n });\n contextRestoreFns.push(function() {\n delete proto['__gl_wrapped__'];\n });\n return true;\n }", "function existFunction(strNameFunction)\n{\n return (!empty(window[strNameFunction])) ? isFunction(window[strNameFunction]) : false;\n}", "function someFunc() {}", "minifyOneFile () {\n throw new Error('CachingMinifier subclass should implement minifyOneFile!');\n }", "function myReusableFunction(){\n console.log(\"Heyya World\");\n}", "function isHotswappableLambdaFunctionChange(logicalId, change, assetParamsWithEnv) {\n var _a, _b;\n const lambdaCodeChange = isLambdaFunctionCodeOnlyChange(change, assetParamsWithEnv);\n if (typeof lambdaCodeChange === 'string') {\n return lambdaCodeChange;\n }\n else {\n // verify that the Asset changed - otherwise,\n // it's a Code property-only change,\n // but not to an asset change\n // (for example, going from Code.fromAsset() to Code.fromInline())\n if (!common_1.assetMetadataChanged(change)) {\n return common_1.ChangeHotswapImpact.REQUIRES_FULL_DEPLOYMENT;\n }\n let functionPhysicalName;\n try {\n functionPhysicalName = common_1.stringifyPotentialCfnExpression((_b = (_a = change.newValue) === null || _a === void 0 ? void 0 : _a.Properties) === null || _b === void 0 ? void 0 : _b.FunctionName, assetParamsWithEnv);\n }\n catch (e) {\n // It's possible we can't evaluate the function's name -\n // for example, it can use a Ref to a different resource,\n // which we wouldn't have in `assetParamsWithEnv`.\n // That's fine though - ignore any errors,\n // and treat this case the same way as if the name wasn't provided at all,\n // which means it will be looked up using the listStackResources() call\n // by the later phase (which actually does the Lambda function update)\n functionPhysicalName = undefined;\n }\n return new LambdaFunctionHotswapOperation({\n logicalId,\n physicalName: functionPhysicalName,\n code: lambdaCodeChange,\n });\n }\n}", "function staticallyAnalyze(fn) {\n const report = {\n isAsync: false,\n hasInjectionParam: false,\n injections: [/* alias1, alias2, ... */],\n wantsContainer: false,\n wantedBindingMethods: [],\n // fn, // The function itself\n };\n\n // NOTE Here we say this is a proper function to Esprima\n // since it throws error if the function string like;\n // `boot() { ... }`\n let bootFnStr = fn.toString();\n if (/^(\\w+)\\(([\\w,\\s{}:\\'\\\"]*)\\)\\s{0,1}\\{(?!\\w+)/.test(bootFnStr)) {\n bootFnStr = `function ${bootFnStr}`;\n }\n let pb0 = (esprima.parseScript(bootFnStr)).body[0];\n if (pb0.type !== 'FunctionDeclaration' && pb0.expression) {\n pb0 = pb0.expression;\n }\n\n report.isAsync = pb0.async;\n\n // TODO Loop here at most 2 times (hence the note above)\n // Therefore we can enter the if statement's body below (~:335)\n const maxArgumentCountToProcess = (pb0.params.length < 2 ? pb0.params.length : 2);\n let i = 0;\n while (i < maxArgumentCountToProcess) {\n if (pb0.params[i].type === 'ObjectPattern') {\n // First argument is defined as `{ ... }`\n\n // Extract property names\n //\n const propertyNames = pb0.params[i].properties.map((property) => {\n // TODO Figure out the checks below is really necessary - if not simplify this arrow function\n if (property.computed) {\n throw new Error(`Computed property names (${property.key.name}) are not supported.`);\n }\n if (property.method) {\n throw new Error(`Methods (${property.key.name}) are not supported.`);\n }\n\n return (property.key.name || property.key.value);\n });\n\n // FIXME [MANUALNAME_INJECTABLE]: Manual update required here to sustain consistency\n // See https://stackoverflow.com/a/1885569/250453\n const containerLikeIntersection = [\n 'bind',\n 'singleton',\n 'instance',\n 'make',\n 'callInKernelContext',\n 'paths',\n 'on',\n 'once',\n 'off',\n 'emit',\n // Add Mirket methods that can be injected to the `boot()` of a provider\n ].filter(value => propertyNames.indexOf(value) !== -1);\n\n // NOTE Maybe here we can validate each type of argument's number in the list,\n // e.g. if argument list is like this; `({ binding1 }, container, { instance })\n // do NOT send the container as the 2nd or 3rd argument.\n if (containerLikeIntersection.length > 0) {\n // NOTE Just one container-related method name (e.g. 'bind', 'singleton', 'instance')\n // is enough to say that it want the container.\n report.wantsContainer = true;\n report.wantedBindingMethods.push(...containerLikeIntersection);\n\n // TODO Figure out what to do with others?\n } else {\n report.hasInjectionParam = true;\n report.injections.push(...propertyNames);\n }\n }\n\n i += 1;\n }\n\n return report;\n}", "function isValidExtensionFunction(fn) {\n const reflectionResult = functionReflector.forFunction(fn);\n\n return reflectionResult.params.length === 0\n || (reflectionResult.params[0].type === `DESTRUCTURING`\n && reflectionResult.params[0].value.type === `object`);\n}", "function functionExists(function_name)\n\t{\n\t\t// https://kvz.io/\n\t\t// + original by: Kevin van Zonneveld (https://kvz.io/)\n\t\t// + improved by: Steve Clay\n\t\t// + improved by: Legaev Andrey\n\t\t// * example 1: function_exists('isFinite');\n\t\t// * returns 1: true\n\t\tif (typeof function_name == 'string')\n\t\t{\n\t\t\treturn (typeof window[function_name] == 'function');\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn (function_name instanceof Function);\n\t\t}\n\t}", "function funcname(f) {\n const s = f.toString().match(/function (\\w*)/)[1];\n if ((s === null) || (s.length === 0)){ return \"~anonymous~\";}\n return s;\n}", "function strictly() {\n 'use strict';\n\n}", "function test(fn) {\n return Object.defineProperty(fn, \"name\", {\n enumerable: false,\n configurable: true,\n value: \"@\" + fn.name,\n writable: false\n });\n}", "diagnosticDetectFunctionCollisions(file) {\n for (let func of file.callables) {\n const funcName = func.getName(Parser_1.ParseMode.BrighterScript);\n const lowerFuncName = funcName === null || funcName === void 0 ? void 0 : funcName.toLowerCase();\n if (lowerFuncName) {\n //find function declarations with the same name as a stdlib function\n if (globalCallables_1.globalCallableMap.has(lowerFuncName)) {\n this.diagnostics.push(Object.assign(Object.assign({}, DiagnosticMessages_1.DiagnosticMessages.scopeFunctionShadowedByBuiltInFunction()), { range: func.nameRange, file: file }));\n }\n //find any functions that have the same name as a class\n if (this.hasClass(lowerFuncName)) {\n this.diagnostics.push(Object.assign(Object.assign({}, DiagnosticMessages_1.DiagnosticMessages.functionCannotHaveSameNameAsClass(funcName)), { range: func.nameRange, file: file }));\n }\n }\n }\n }", "function warnUser() {\n console.log(\"This is my warning message\");\n}", "function warnUser() {\n console.log(\"This is my warning message\");\n}", "function _checkForUnused() {\n // function params are handled specially\n // assume that parameters are the only thing declared in the param scope\n if (_current[\"(type)\"] === \"functionparams\") {\n _checkParams();\n return;\n }\n var curentLabels = _current[\"(labels)\"];\n for (var labelName in curentLabels) {\n if (curentLabels[labelName][\"(type)\"] !== \"exception\" &&\n curentLabels[labelName][\"(unused)\"]) {\n _warnUnused(labelName, curentLabels[labelName][\"(token)\"], \"var\");\n }\n }\n }", "function formatProdErrorMessage(code){var url='https://reactjs.org/docs/error-decoder.html?invariant='+code;for(var i=1;i<arguments.length;i++){url+='&args[]='+encodeURIComponent(arguments[i]);}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.';}// TODO: this is special because it gets imported during build.", "function f() {\n \"Make sure `this` is unusable in this standalone function.\";\n}", "function check_for_anonymous_functions(){\n\t\n\t// For completing the starting block\n\tfunc_name = '';\n\tfunc_stack = [];\n\n\tfor (var i = 0; i < program_stack.length; i++) {\n\t\tif(program_stack[i] == 'invoke-fun-pre_'){\n\t\t\t\n\t\t\t//If the program starts with a self-invokating function then add \"anonymous\" keyword which will help in further processing\n\t\t\tif(i == 0){\n\t\t\t\tfunc_stack.push(\"anonymous\");\n\t\t\t\tprogram_stack[i] = program_stack[i] + \"anonymous\";\n\t\t\t\tfunction_list.push(\"anonymous\");\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// For anonymous functions without names assign them the names to which these functions are assigned.\n\t\t\tfunc_name = program_stack[i-1].split('_').splice(-1)[0];\n\t\t\tprogram_stack[i] = program_stack[i] + func_name;\n\t\t\tfunction_list.push(func_name);\n\t\t\tfunc_stack.push(func_name);\t\t\n\t\t}\n\n\t\t//Completing the program stack block ending with appropriate keywords for anonymous functions.\n\t\tif(program_stack[i] == 'invoke-fun_'){\n\t\t\tprogram_stack[i] = program_stack[i] + func_stack.pop();\n\t\t}\n\t};\t\t\n\n}", "function ourReusableFunction() {\r\n console.log(\"Hi World\");\r\n}", "function linting() {\r\n return lintExtension;\r\n}", "function isignored (namespace) {\n /* istanbul ignore next: tested in a child processs */\n if (process.noDeprecation) {\n // --no-deprecation support\n return true\n }\n\n var str = process.env.NO_DEPRECATION || ''\n\n // namespace ignored\n return containsNamespace(str, namespace)\n}", "function isignored (namespace) {\n /* istanbul ignore next: tested in a child processs */\n if (process.noDeprecation) {\n // --no-deprecation support\n return true\n }\n\n var str = process.env.NO_DEPRECATION || ''\n\n // namespace ignored\n return containsNamespace(str, namespace)\n}", "function isignored (namespace) {\n /* istanbul ignore next: tested in a child processs */\n if (process.noDeprecation) {\n // --no-deprecation support\n return true\n }\n\n var str = process.env.NO_DEPRECATION || ''\n\n // namespace ignored\n return containsNamespace(str, namespace)\n}", "function isignored (namespace) {\n /* istanbul ignore next: tested in a child processs */\n if (process.noDeprecation) {\n // --no-deprecation support\n return true\n }\n\n var str = process.env.NO_DEPRECATION || ''\n\n // namespace ignored\n return containsNamespace(str, namespace)\n}", "function isignored (namespace) {\n /* istanbul ignore next: tested in a child processs */\n if (process.noDeprecation) {\n // --no-deprecation support\n return true\n }\n\n var str = process.env.NO_DEPRECATION || ''\n\n // namespace ignored\n return containsNamespace(str, namespace)\n}", "function isignored (namespace) {\n /* istanbul ignore next: tested in a child processs */\n if (process.noDeprecation) {\n // --no-deprecation support\n return true\n }\n\n var str = process.env.NO_DEPRECATION || ''\n\n // namespace ignored\n return containsNamespace(str, namespace)\n}" ]
[ "0.6026162", "0.57766795", "0.5717173", "0.56829125", "0.56829125", "0.56371236", "0.56371236", "0.5623456", "0.55784535", "0.55485183", "0.55269253", "0.55227464", "0.55227464", "0.55227464", "0.55227464", "0.55227464", "0.55071455", "0.5493993", "0.5487601", "0.54814136", "0.54781854", "0.5441119", "0.5424181", "0.5424181", "0.5424181", "0.5414891", "0.5414891", "0.5414891", "0.5395056", "0.537711", "0.53760326", "0.53285503", "0.53271735", "0.53271735", "0.53271735", "0.53271735", "0.53271735", "0.53271735", "0.53241783", "0.5323927", "0.5317425", "0.53014237", "0.53008765", "0.5299353", "0.5293673", "0.5279827", "0.5279827", "0.524404", "0.524404", "0.52143574", "0.5193981", "0.519075", "0.518626", "0.51834005", "0.51834005", "0.51834005", "0.51834005", "0.51834005", "0.51834005", "0.51834005", "0.51834005", "0.51829773", "0.5177262", "0.51725346", "0.5169511", "0.5164999", "0.51507217", "0.5145704", "0.51406884", "0.5140644", "0.5128232", "0.5123776", "0.5108933", "0.50951433", "0.5092104", "0.50919294", "0.5086835", "0.5082954", "0.5079683", "0.50743437", "0.50722146", "0.5071476", "0.5069794", "0.50659585", "0.5063816", "0.5062538", "0.5051524", "0.50465065", "0.50465065", "0.5040013", "0.5035137", "0.5015879", "0.5013976", "0.5011422", "0.5007479", "0.49886364", "0.49886364", "0.49886364", "0.49886364", "0.49886364", "0.49886364" ]
0.0
-1
About 1.5x faster than the twoarg version of Arraysplice()
function spliceOne(list, index) { for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) { list[i] = list[k]; } list.pop(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static fastSplice(arr, startIdx, removeCount) {\n let i, length = arr.length;\n if (startIdx >= length || removeCount === 0) {\n return;\n }\n removeCount = (startIdx + removeCount > length ? length - startIdx : removeCount);\n let len = length - removeCount;\n for (i = startIdx; i < len; ++i) {\n arr[i] = arr[i + removeCount];\n }\n arr.length = len;\n }", "function testSplice2(arr) {\n arr.splice(0, 2); // start at 0, delete 2 elements\n console.log(arr);\n}", "splice() {\n let ret;\n\n _checkManualPopulation(this, Array.prototype.slice.call(arguments, 2));\n\n if (arguments.length) {\n const vals = [];\n for (let i = 0; i < arguments.length; ++i) {\n vals[i] = i < 2 ?\n arguments[i] :\n this._cast(arguments[i], arguments[0] + (i - 2));\n }\n ret = [].splice.apply(this, vals);\n this._registerAtomic('$set', this);\n }\n\n return ret;\n }", "function usingSplice(array, start, deleteCount, item) {\n array.splice(start, deleteCount, item)\n return array;\n}", "function applySplice(array, index, item1, item2) {\n\t// remove two elements from the array at the index given, and adds item1 and item2 in their place\n\tarray.splice(index, 2, item1, item2);\n\t// return the array\n\treturn array;\n}", "splice() {\n let ret;\n\n _checkManualPopulation(this, Array.prototype.slice.call(arguments, 2));\n\n if (arguments.length) {\n let vals;\n if (this[arraySchemaSymbol] == null) {\n vals = arguments;\n } else {\n vals = [];\n for (let i = 0; i < arguments.length; ++i) {\n vals[i] = i < 2 ?\n arguments[i] :\n this._cast(arguments[i], arguments[0] + (i - 2));\n }\n }\n\n ret = [].splice.apply(this, vals);\n this._registerAtomic('$set', this);\n }\n\n return ret;\n }", "function jpt_splice(arr, index) {\n\t for (var i = index, len = arr.length - 1; i < len; i++)\n\t arr[i] = arr[i + 1];\n\n\t arr.length = len;\n\t}", "splice(position = self.list.length, deleteCount = 0, ...elements) {\n return self.list.splice(position, deleteCount, ...elements)\n }", "function frankenSplice(arr1, arr2, n) {\n var arr2Copy = arr2.slice();\n\n}", "function splice(array, start, deleteCount, element1, elementN) {\n var newElements = [];\n var oldElements = [];\n var i;\n\n for (i = 3; i < arguments.length; i += 1) {\n newElements.push(arguments[i]);\n }\n\n for (i = start; i < start + deleteCount; i += 1) {\n oldElements.push(array[i]);\n array[i] = undefined;\n }\n\n console.log(oldElements);\n console.log(array);\n}", "function frankenSplice(arr1, arr2, n) {\r\n let localArr = arr2.slice();\r\n localArr.splice(n, 0, ...arr1);\r\n return localArr;\r\n}", "function f6(arr) {\n return arr.concat(arr.splice(0, 2));\n}", "function testSplice(arr) {\n arr.splice(2, 0, 'c');\n console.log(arr);\n}", "function frankenSplice(arr1, arr2, n) {\n // It's alive. It's alive!\n // my code\n // copy the elements in arr2 and assign them to newArr so that we don't change arr2\n let newArr = arr2.slice();\n // starting from n index, delete 0 elements, and insert arr1(unpacked with the spread operator)\n newArr.splice(n, 0, ...arr1)\n // my code\n return newArr;\n}", "function frankenSplice(arr1, arr2, n) {\n let localArr = arr2.slice();\n localArr.splice(n, 0, ...arr1);\n return localArr;\n}", "function spliceElement(someArr, index) {\n newArray = someArr[index]\n someArr = someArr.splice(index,1) //is is cheating to use the already existing splice fxn?\n return newArray\n}", "function frankenSplice(arr1, arr2, n) {\n\n return;\n}", "function sliceAndSplice(original, start, deleteCount, ...args) {\n const returnArray = original.slice();\n returnArray.splice(start, deleteCount, ...args);\n return returnArray;\n}", "function getSpliceEquivalent ( length, methodName, args ) {\n\t \tswitch ( methodName ) {\n\t \t\tcase 'splice':\n\t \t\t\tif ( args[0] !== undefined && args[0] < 0 ) {\n\t \t\t\t\targs[0] = length + Math.max( args[0], -length );\n\t \t\t\t}\n\n\t \t\t\twhile ( args.length < 2 ) {\n\t \t\t\t\targs.push( length - args[0] );\n\t \t\t\t}\n\n\t \t\t\t// ensure we only remove elements that exist\n\t \t\t\targs[1] = Math.min( args[1], length - args[0] );\n\n\t \t\t\treturn args;\n\n\t \t\tcase 'sort':\n\t \t\tcase 'reverse':\n\t \t\t\treturn null;\n\n\t \t\tcase 'pop':\n\t \t\t\tif ( length ) {\n\t \t\t\t\treturn [ length - 1, 1 ];\n\t \t\t\t}\n\t \t\t\treturn [ 0, 0 ];\n\n\t \t\tcase 'push':\n\t \t\t\treturn [ length, 0 ].concat( args );\n\n\t \t\tcase 'shift':\n\t \t\t\treturn [ 0, length ? 1 : 0 ];\n\n\t \t\tcase 'unshift':\n\t \t\t\treturn [ 0, 0 ].concat( args );\n\t \t}\n\t }", "function splice(arr, start, deleteCount, items) {\n arr.splice(start, deleteCount, items);\n}", "function mySplice (arr, start, deleteCount) {\n var deletedArr = [];\n var startElements = [];\n //Remove members up to start\n for (var i=0; i<start; i++) {\n startElements.push(arr.shift());\n }\n //Remove deleted elements\n for (var j=0; j<deleteCount; j++) {\n deletedArr.push(arr.shift());\n }\n //Add start elements back into the original array\n var startElementsLength = startElements.length;\n for (var z=0; z<startElementsLength; z++) {\n arr.unshift(startElements.pop());\n }\n return deletedArr;\n}", "function frankenSplice(arr1, arr2, n) {\n return arr2;\n}", "function getSpliceEquivalent(array, methodName, args) {\n \tswitch (methodName) {\n \t\tcase \"splice\":\n \t\t\tif (args[0] !== undefined && args[0] < 0) {\n \t\t\t\targs[0] = array.length + Math.max(args[0], -array.length);\n \t\t\t}\n\n \t\t\twhile (args.length < 2) {\n \t\t\t\targs.push(0);\n \t\t\t}\n\n \t\t\t// ensure we only remove elements that exist\n \t\t\targs[1] = Math.min(args[1], array.length - args[0]);\n\n \t\t\treturn args;\n\n \t\tcase \"sort\":\n \t\tcase \"reverse\":\n \t\t\treturn null;\n\n \t\tcase \"pop\":\n \t\t\tif (array.length) {\n \t\t\t\treturn [array.length - 1, 1];\n \t\t\t}\n \t\t\treturn [0, 0];\n\n \t\tcase \"push\":\n \t\t\treturn [array.length, 0].concat(args);\n\n \t\tcase \"shift\":\n \t\t\treturn [0, array.length ? 1 : 0];\n\n \t\tcase \"unshift\":\n \t\t\treturn [0, 0].concat(args);\n \t}\n }", "function Task2(array,index){\n array.splice(index,1);\n}", "function frankenSplice(arr1, arr2, n) {\n\n let NewArr = arr2.slice()\n NewArr.splice(n, 0, ...arr1);\n return NewArr\n }", "function Task2(array,index, newValue){\n return array.splice(index,0, newValue);\n}", "function n(e,t,n,...o){t<e.length?e.splice(t,n,...o):e.push(...o);}", "function arraySplice(array, index, count) {\n var length = array.length - count;\n\n while (index < length) {\n array[index] = array[index + count];\n index++;\n }\n\n while (count--) {\n array.pop(); // shrink the array\n }\n }", "function arraySplice(array, index, count) {\n var length = array.length - count;\n\n while (index < length) {\n array[index] = array[index + count];\n index++;\n }\n\n while (count--) {\n array.pop(); // shrink the array\n }\n }", "function arraySplice(array, index, count) {\n var length = array.length - count;\n\n while (index < length) {\n array[index] = array[index + count];\n index++;\n }\n\n while (count--) {\n array.pop(); // shrink the array\n }\n }", "function slasher(arr, howMany) {\n var splicedArray = [];\n arr.splice(0, howMany);\n return arr;\n}", "function frankenSpliceF(arr1, arr2, n) {\n\t// let localArray = arr2.slice(); // or Array.from(arr2) or [...arr2]\n\t// for (let i = 0; i < arr1.length; i++) {\n\t// \tlocalArray.splice(n, 0, arr1[i]);\n\t// \tn++; // increments index at which we insert arr1[i];\n\t// }\n\t// return localArray;\n\n\t// let localArr = arr2.slice();\n\t// localArr.splice(n, 0, ...arr1);\n\t// return localArr;\n\n\treturn arr2.slice(0, n).concat(arr1).concat(arr2.slice(n));\n}", "function frankenSplice(arr1, arr2, n) {\n // It's alive. It's alive!\n let copy = arr2.slice();\n\n for(let i = 0; i < arr1.length; i++) {\n copy.splice(n, 0 , arr1[i]);\n n++\n }\n return copy;\n}", "function sliceSplice(arr1, arr2, n){\n // slice method to make new copy of arr2 so original arr2 not mutated\n let newArr = arr2.slice();\n\n // ... spread operator spread out individual elements in arr1\n // without ... the fx put arr1 as a single element\n newArr.splice(n, 0, ...arr1);\n\n // return in new line because splice returns elements removed, which would result in empty [] in this case\n return newArr;\n}", "function splice(arr, idx, num) {\n var result = [];\n\n for (var i = idx; i < idx + num; i++) { push(result, arr[i]); } // adding values to result\n for (var i = idx; i < arr.length - num; i++) { arr[i] = arr[i + num]; } // removing values from arr\n\n arr.length = arr.length - num; // chop\n return result;\n}", "function ObservableArray$splice(start, deleteCount) {\n var items = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n items[_i - 2] = arguments[_i];\n }\n var removed = Array.prototype.splice.apply(this, arguments);\n if (removed.length > 0 || items.length > 0) {\n var changeEvents = [];\n if (removed.length > 0) {\n changeEvents.push({ type: ArrayChangeType.remove, startIndex: start, endIndex: start + removed.length - 1, items: removed });\n }\n if (items.length > 0) {\n changeEvents.push({ type: ArrayChangeType.add, startIndex: start, endIndex: start + items.length - 1, items: items });\n }\n this.__ob__.raiseEvents(changeEvents);\n }\n return removed;\n}", "function frankenSplice(arr1, arr2, n) {\n // It's alive. It's alive!\n\n\tconsole.log (arr2.slice(n));\n\tconsole.log (arr2.slice(0,n));\n\tconsole.log (arr1.slice());\nreturn [...arr2.slice(0,n), ...arr1, ...arr2.slice(n)];\n}", "function arraySplice(array, index, count) {\n var length = array.length - count;\n\n while (index < length) {\n array[index] = array[index + count];\n index++;\n }\n\n while (count--) {\n array.pop(); // shrink the array\n }\n}", "function splice(arr, start, remove) {\n var items = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n items[_i - 3] = arguments[_i];\n }\n start = start || 0;\n var head = arr.slice(0, start);\n var tail = arr.slice(start);\n var removed = [];\n if (remove) {\n removed = tail.slice(0, remove);\n tail = tail.slice(remove);\n }\n if (!is_1.isValue(remove)) {\n arr = head.concat(items);\n removed = tail;\n }\n else {\n arr = head.concat(items).concat(tail);\n }\n return {\n array: arr,\n val: removed\n };\n}", "function spliceMe(tempArr,ind,howmanytoRemove,AddedItem ){\r\n\r\n return tempArr.splice(ind,howmanytoRemove,AddedItem);\r\n\r\n\r\n }", "function testSplice3(arr) {\n let newArr = arr.splice(3); // default start at 0, delete 3 element\n console.log(newArr); // [ 4, 5, 6, 7 ]\n console.log(arr); // [ 1, 2, 3 ]\n}", "function splic(array, start, deleteCount, ...values) {\n start = Math.min(start, array.length);\n deleteCount = Math.min(deleteCount, array.length - start);\n\n var deleted = slice(array, start, start + deleteCount);\n var rest = slice(array, start + deleteCount, array.length);\n\n array.length = start;\n array.push(...values);\n array.push(...rest);\n\n console.log(deleted);\n return deleted;\n}", "function frankenSplice(arr1, arr2, n) {\n let Aux = arr2.slice();\n\n for (let i = 0; i < arr1.length; i++) {\n Aux.splice(n + i, 0, arr1[i])\n }\n return Aux\n}", "function splice(arr, start, deleteCount, element1, elementN) {\n let deleted = [];\n let i;\n let arrLength = arr.length;\n\n // arr = [1, 2, 3];\n // start = 1;\n // deleteCount = 1;\n // element1 = 'two'\n\n if (element1 === undefined && elementN === undefined) {\n if ((start + deleteCount) >= arrLength) {\n deleted = arr.slice(start, deleteCount); \n arrLength -= deleteCount;\n } else if (start == 0) {\n for (i = 0; i < deleteCount; i += 1) {\n deleted.push(arr.shift()); \n }\n }\n } else if (element1 !== undefined && elementN === undefined) {\n if (deleteCount === 0) {\n for (i = arrLength; i > start; i -= 1) {\n arr[i + 1] = arr[i - 1]; \n } \n arr[start] = element1;\n } else if (deleteCount === 1) {\n deleted.push(arr[start]);\n arr[start] = element1; \n } \n } else if (element1 !== undefined && elementN !== undefined) {\n if (deleteCount === 2) {\n deleted = arr.slice(start, 2);\n arr[start] = element1; \n arr[start + 1] = elementN;\n } \n }\n return deleted;\n}", "function frankenSplice(arr1, arr2, n) {\n let newArr = arr2.slice();\n newArr.splice(n, 0, ...arr1);\n console.log(newArr);\n\n return newArr;\n\n }", "function frankenSplice(arr1, arr2, n) {\n let arr1mod = arr1;\n let arr2mod = [...arr2];\n arr1mod.forEach((element, index) => {\n arr2mod.splice((n+index), 0, element)\n });\n console.log(arr2mod);\n console.log(arr2);\n return arr2mod;\n}", "function doubleTrouble(arr){\n for(let i=0;i<arr.length;i+=2){ arr.splice(i, 0, arr[i]); }\n return arr;\n}", "array_move(arr, fromIndex, toIndex) {\n\t\tvar element = arr[fromIndex];\n\t\tarr.splice(fromIndex, 1);\n\t\tarr.splice(toIndex, 0, element);\n\t}", "function frankenSplice(arr1, arr2, n) {\n let combined_arr = [...arr2];\n combined_arr.splice(n, 0, ...arr1); // splice( starting index, # items to remove, items... )\n\n return combined_arr;\n}", "function removeAt(array, idx) {\n if (idx >= array.length || idx < 0) return array;\n return array.slice(0, idx).concat(array.slice(idx + 1));\n} // -- #### replaceAt()", "function test() {\n var arr;\n var res;\n\n // Standard: splice 'baz' and 'quuux'.\n arr = [ 'foo', 'bar', 'quux', 'baz', 'quuux' ];\n res = arr.splice(3, 2);\n print(JSON.stringify(arr), JSON.stringify(res));\n\n // ES2015+: same behavior if second argument omitted.\n // ES5.1 behavior seems to mandate same behavior as\n // arr.splice(3, 0);\n arr = [ 'foo', 'bar', 'quux', 'baz', 'quuux' ];\n res = arr.splice(3);\n print(JSON.stringify(arr), JSON.stringify(res));\n\n // When given as 'undefined', Rhino and V8 both behave like\n // the standard mandates, e.g. same as arr.splice(3, 0);\n arr = [ 'foo', 'bar', 'quux', 'baz', 'quuux' ];\n res = arr.splice(3, undefined);\n print(JSON.stringify(arr), JSON.stringify(res));\n}", "function arraySplice(array, index, count) {\n const length = array.length - count;\n while (index < length) {\n array[index] = array[index + count];\n index++;\n }\n while (count--) {\n array.pop(); // shrink the array\n }\n}", "function arraySplice(array, index, count) {\n const length = array.length - count;\n while (index < length) {\n array[index] = array[index + count];\n index++;\n }\n while (count--) {\n array.pop(); // shrink the array\n }\n}", "function arraySplice(array, index, count) {\n const length = array.length - count;\n while (index < length) {\n array[index] = array[index + count];\n index++;\n }\n while (count--) {\n array.pop(); // shrink the array\n }\n}", "function arraySplice(array, index, count) {\n const length = array.length - count;\n while (index < length) {\n array[index] = array[index + count];\n index++;\n }\n while (count--) {\n array.pop(); // shrink the array\n }\n}", "function arraySplice(array, index, count) {\n const length = array.length - count;\n while (index < length) {\n array[index] = array[index + count];\n index++;\n }\n while (count--) {\n array.pop(); // shrink the array\n }\n}", "function arraySplice(array, index, count) {\n const length = array.length - count;\n while (index < length) {\n array[index] = array[index + count];\n index++;\n }\n while (count--) {\n array.pop(); // shrink the array\n }\n}", "function arraySplice(array, index, count) {\n const length = array.length - count;\n while (index < length) {\n array[index] = array[index + count];\n index++;\n }\n while (count--) {\n array.pop(); // shrink the array\n }\n}", "spliceToArray() {\n return this.splice.apply(this, arguments).base;\n }", "function take(arr, n) { \n arr.splice(n)\n return arr\n}", "function spliceWorks() {\n\t\tvar n = 256,\n\t\t\ta = [];\n\t\ta[n] = 'a';\n\t\ta.splice( n + 1, 0, 'b' );\n\t\treturn a[n] === 'a';\n\t}", "function test1(arr) {\n\tarr.push(arr.splice(arr.indexOf(0), 1)[0]);\n\n\treturn arr;\n}", "function unsafeRemove (i, a, l) {\n\t var b = new Array(l)\n\t var j\n\t for (j = 0; j < i; ++j) {\n\t b[j] = a[j]\n\t }\n\t for (j = i; j < l; ++j) {\n\t b[j] = a[j + 1]\n\t }\n\t\n\t return b\n\t}", "immutableDelete (arr, index) {\n var i = parseInt(index, 10);\n return arr.slice(0,i).concat(arr.slice(i+1));\n }", "function replaceInNativeArray(array, start, deleteCount, items) {\n arrayContentWillChange(array, start, deleteCount, items.length);\n\n if (items.length <= CHUNK_SIZE) {\n array.splice(start, deleteCount, ...items);\n } else {\n array.splice(start, deleteCount);\n\n for (let i = 0; i < items.length; i += CHUNK_SIZE) {\n let chunk = items.slice(i, i + CHUNK_SIZE);\n array.splice(start + i, 0, ...chunk);\n }\n }\n\n arrayContentDidChange(array, start, deleteCount, items.length);\n}", "function unsafeRemove(i, a, l) {\n var b = new Array(l);\n var j = void 0;\n for (j = 0; j < i; ++j) {\n b[j] = a[j];\n }\n for (j = i; j < l; ++j) {\n b[j] = a[j + 1];\n }\n\n return b;\n}", "function removex(array, from, to) {\n var rest = array.slice((to || from) + 1 || array.length);\n array.length = from < 0 ? array.length + from: from;\n return array.push.apply(array, rest);\n}", "function removex(array, from, to) {\n var rest = array.slice((to || from) + 1 || array.length);\n array.length = from < 0 ? array.length + from: from;\n return array.push.apply(array, rest);\n}", "function unsafeDeleteAt_(as, i) {\n const xs = [...as];\n xs.splice(i, 1);\n return xs;\n}", "function unsafeRemove (i, a, l) {\n var b = new Array(l)\n var j\n for (j = 0; j < i; ++j) {\n b[j] = a[j]\n }\n for (j = i; j < l; ++j) {\n b[j] = a[j + 1]\n }\n\n return b\n}", "function frankenSplice(arr1, arr2, n) {\n let newArr1 = arr1.slice();\n let newArr2 = arr2.slice();\n for (let i = 0 ; i < newArr1.length ; i++) {\n newArr2.splice(n, 0, newArr1[i] );\n n++;\n }\n return newArr2;\n}", "function frankenSplice(arr1, arr2, n) {\n\n // use array.slice() to create beginning of array\n let arrBegin = arr2.slice(0, n);\n \n // use array.slice() to create end of array\n let arrEnd = arr2.slice(n);\n \n // use array.concat() to concat arrays\n let arrResult = arrBegin.concat(arr1).concat(arrEnd)\n \n return arrResult;\n}", "splice(start, deleteCount, ...items) {\n // Delete items\n if (deleteCount) {\n for (let i = start; i < this._length - deleteCount; i++) {\n this._array[this._getCyclicIndex(i)] = this._array[this._getCyclicIndex(i + deleteCount)];\n }\n this._length -= deleteCount;\n this.onDeleteEmitter.fire({ index: start, amount: deleteCount });\n }\n // Add items\n for (let i = this._length - 1; i >= start; i--) {\n this._array[this._getCyclicIndex(i + items.length)] = this._array[this._getCyclicIndex(i)];\n }\n for (let i = 0; i < items.length; i++) {\n this._array[this._getCyclicIndex(start + i)] = items[i];\n }\n if (items.length) {\n this.onInsertEmitter.fire({ index: start, amount: items.length });\n }\n // Adjust length as needed\n if (this._length + items.length > this._maxLength) {\n const countToTrim = (this._length + items.length) - this._maxLength;\n this._startIndex += countToTrim;\n this._length = this._maxLength;\n this.onTrimEmitter.fire(countToTrim);\n }\n else {\n this._length += items.length;\n }\n }", "function spliceElement(someArr) {\r\n console.log(someArr.length);\r\n someArr.splice(2, 1);\r\n console.log(someArr.length);\r\n }", "function arraymove(arr, fromIndex, toIndex) {\n var element = arr[fromIndex];\n arr.splice(fromIndex, 1);\n arr.splice(toIndex, 0, element);\n}", "function arraymove(arr, fromIndex, toIndex) {\n\t\t\tvar element = arr[fromIndex];\n\t\t\tarr.splice(fromIndex, 1);\n\t\t\tarr.splice(toIndex, 0, element);\n\t\t\treturn arr\n\t\t}", "function removeAt(array, idx) {\n if (idx >= array.length || idx < 0) return array;\n return array.slice(0, idx).concat(array.slice(idx + 1));\n}", "function slasher(arr, howMany) {\n arr.splice(0, howMany);\n return arr;\n}", "function slasher(arr, howMany) {\n // it doesn't always pay to be first\n arr.splice(0, howMany);\n return arr;\n}", "function spliceArray(origArray, start, replace, arrayToSplice) {\n var args = [start];\n if (arguments.length > 2) { args.push(replace); }\n if (arguments.length > 3) { args = args.concat(arrayToSplice); } // In case arrayToSplice is not passed in, otherwise appending 'undefined'\n return Array.prototype.splice.apply(origArray, args);\n }", "function spliceArray(origArray, start, replace, arrayToSplice) {\n var args = [start];\n if (arguments.length > 2) { args.push(replace); }\n if (arguments.length > 3) { args = args.concat(arrayToSplice); } // In case arrayToSplice is not passed in, otherwise appending 'undefined'\n return Array.prototype.splice.apply(origArray, args);\n }", "function splice(array, start, count, ...values) {\n var narray = [];\n var count = Math.min(array.length - start, count);\n var difference = count - 0;\n var extra = shuffleUp(array, values.length, start);\n for (start; start < array.length; start++) {\n if (values.length > 0) {\n array[start] = values.shift();\n } else {\n if (count > 0) {\n narray.push(array[start]);\n count -= 1;\n }\n array[start] = array[start + difference];\n }\n }\n array.length -= difference;\n return narray;\n}", "function slasher(arr, howMany) {\n // it doesn't always pay to be first\n\n return arr.splice(howMany,arr.length-howMany);\n}", "function mySplice(inputArray, start = 0, deleteCount = inputArray.length, ...items) {\n // create new empty arrays and copy the input\n let inputArrayCopy = [];\n let newArray = [];\n let deletedItems = [];\n inputArrayCopy = inputArrayCopy.concat(inputArray);\n\n // if we are passed values, assume the start didn't offset the index by -1\n if (start) start--;\n //if (deleteCount) deleteCount--;\n\n // slice off the deleted items\n //let deletedItems = (inputArray.slice(start, start + deleteCount +1));\n // Note: MODIFY inputArray when deleting or adding\n for (let i = 0; i < inputArray.length; i++) {\n if (i <= start || i > start + deleteCount) {\n console.log('keep: idx', i, 'val', inputArrayCopy[0]);\n newArray = newArray.concat(inputArrayCopy.shift());\n } \n else {\n console.log('dele: idx', i, 'val', inputArrayCopy[0]);\n deletedItems = deletedItems.concat(inputArrayCopy.shift());\n }\n }\n console.log('new', newArray);\n console.log('del', deletedItems);\n\n // clear the inputArray, then move the newArray to the inputArray\n while (inputArray.length) inputArray.pop();\n while (newArray.length) inputArray.push(newArray.shift());\n \n\n // returns the deleted elements, not the modified array!\n return deletedItems;\n}", "function insert(array, idx, val) {\n return array.slice(0, idx).concat(Array.isArray(val) ? val : [val]).concat(array.slice(idx));\n} // -- #### removeAt()", "function replace(array, from, to, elements) {\n\t// array.splice.apply(array, [from, to - from].concat(elements)); //ES5\n\ttestArray=[...array.slice(0,from), ...elements, ...array.slice(to)];\n}", "function frankenSplice(arr1, arr2, n) {\n let arr3 = arr2.slice(0,n);\n for (let i=0;i < arr1.length; i++) {\n arr3.push(arr1[i]);\n }\n for (let i=n;i < arr2.length; i++) {\n arr3.push(arr2[i]);\n }\n return arr3;\n}", "function slasher(arr, howMany) {\n\tarr.splice(0, howMany);\n\treturn arr;\n}", "function spliceOne(list,index){for(var i=index,k=i+1,n=list.length;k<n;i+=1,k+=1){list[i]=list[k];}list.pop();}", "function spliceOne(list,index){for(var i=index,k=i+1,n=list.length;k<n;i+=1,k+=1){list[i]=list[k];}list.pop();}", "function unsafeInsertAt_(as, i, a) {\n const xs = [...as];\n xs.splice(i, 0, a);\n return xs;\n}", "function fnArraySwitch( aArray, iFrom, iTo )\n{\n\tvar mStore = aArray.splice( iFrom, 1 )[0];\n\taArray.splice( iTo, 0, mStore );\n}", "function fnArraySwitch( aArray, iFrom, iTo )\n{\n\tvar mStore = aArray.splice( iFrom, 1 )[0];\n\taArray.splice( iTo, 0, mStore );\n}", "function fnArraySwitch( aArray, iFrom, iTo )\n{\n\tvar mStore = aArray.splice( iFrom, 1 )[0];\n\taArray.splice( iTo, 0, mStore );\n}", "function arrayMove(arr, from, to) {\n var element = arr.splice(from, 1);\n arr.splice(to, 0, element[0]);\n }", "function spliceOne(list, index) {\n\t for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1)\n\t list[i] = list[k];\n\t list.pop();\n\t}", "function spliceOne(list, index) {\n\t for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1)\n\t list[i] = list[k];\n\t list.pop();\n\t}", "function spliceOne(list, index) {\n\t for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1)\n\t list[i] = list[k];\n\t list.pop();\n\t}", "function spliceOne(list, index) {\n\t for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1)\n\t list[i] = list[k];\n\t list.pop();\n\t}", "function spliceOne(list, index) {\n\t for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1)\n\t list[i] = list[k];\n\t list.pop();\n\t}", "function spliceOne(list, index) {\n\t for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1)\n\t list[i] = list[k];\n\t list.pop();\n\t}" ]
[ "0.7447761", "0.707984", "0.7064555", "0.70439214", "0.68553483", "0.6749214", "0.6711499", "0.66870314", "0.66847533", "0.6684205", "0.6679297", "0.66641325", "0.6650311", "0.6631806", "0.66058284", "0.6588319", "0.65741193", "0.6562488", "0.6520138", "0.6509104", "0.6501042", "0.6464615", "0.64592516", "0.6445424", "0.64114183", "0.6405197", "0.6384435", "0.6381934", "0.6381934", "0.637492", "0.63563067", "0.6338186", "0.63282704", "0.6328182", "0.6318744", "0.6316207", "0.6314837", "0.63145715", "0.63139945", "0.6300719", "0.62997395", "0.6297438", "0.6291247", "0.62899524", "0.6277047", "0.626116", "0.624671", "0.6225284", "0.6225165", "0.6219795", "0.62165993", "0.6210176", "0.6210176", "0.6210176", "0.6210176", "0.6210176", "0.6210176", "0.6210176", "0.61956996", "0.61708504", "0.6148969", "0.6138995", "0.61320204", "0.61255944", "0.6124806", "0.6088843", "0.6087805", "0.6087805", "0.60810965", "0.60739625", "0.6070486", "0.6067844", "0.6050195", "0.6046416", "0.60361546", "0.60303414", "0.6027697", "0.6011613", "0.6004954", "0.6004473", "0.6004473", "0.6003073", "0.6000267", "0.59973", "0.5994757", "0.59887683", "0.5977292", "0.5963801", "0.5939535", "0.5939535", "0.5912369", "0.5893419", "0.5893419", "0.5893419", "0.5881773", "0.5861087", "0.5861087", "0.5861087", "0.5861087", "0.5861087", "0.5861087" ]
0.0
-1
This implementation is based heavily on node's url.parse
function resolvePathname(to, from) { if (from === undefined) from = ''; var toParts = (to && to.split('/')) || []; var fromParts = (from && from.split('/')) || []; var isToAbs = to && isAbsolute(to); var isFromAbs = from && isAbsolute(from); var mustEndAbs = isToAbs || isFromAbs; if (to && isAbsolute(to)) { // to is absolute fromParts = toParts; } else if (toParts.length) { // to is relative, drop the filename fromParts.pop(); fromParts = fromParts.concat(toParts); } if (!fromParts.length) return '/'; var hasTrailingSlash; if (fromParts.length) { var last = fromParts[fromParts.length - 1]; hasTrailingSlash = last === '.' || last === '..' || last === ''; } else { hasTrailingSlash = false; } var up = 0; for (var i = fromParts.length; i >= 0; i--) { var part = fromParts[i]; if (part === '.') { spliceOne(fromParts, i); } else if (part === '..') { spliceOne(fromParts, i); up++; } else if (up) { spliceOne(fromParts, i); up--; } } if (!mustEndAbs) for (; up--; up) fromParts.unshift('..'); if ( mustEndAbs && fromParts[0] !== '' && (!fromParts[0] || !isAbsolute(fromParts[0])) ) fromParts.unshift(''); var result = fromParts.join('/'); if (hasTrailingSlash && result.substr(-1) !== '/') result += '/'; return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseUrl(url) {\n\t const firstChar = url.charAt(0);\n\t if (firstChar === '~') {\n\t const secondChar = url.charAt(1);\n\t url = url.slice(secondChar === '/' ? 2 : 1);\n\t }\n\t return parseUriParts(url);\n\t}", "function parseURL(request, response){\n \tvar parseQuery = true; \n var badHost = true; \n var urlObj = url.parse(request.url, parseQuery , badHost );\n console.log('path:');\n console.log(urlObj.path);\n console.log('query:');\n console.log(urlObj.query);\n \treturn urlObj;\n }", "function parseURL(str) {\n let fullObject;\n if (typeof FastBoot === 'undefined') {\n const element = document.createElement('a');\n element.href = str;\n fullObject = element;\n } else {\n fullObject = FastBoot.require('url').parse(str);\n }\n const desiredProps = {\n href: fullObject.href,\n protocol: fullObject.protocol,\n hostname: fullObject.hostname,\n port: fullObject.port,\n pathname: fullObject.pathname,\n search: fullObject.search,\n hash: fullObject.hash\n };\n return desiredProps;\n }", "function parseUrl(url){if(typeof url!=='string')return{};var match=url.match(/^(([^:\\/?#]+):)?(\\/\\/([^\\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);// coerce to undefined values to empty string so we don't get 'undefined'\nvar query=match[6]||'';var fragment=match[8]||'';return{protocol:match[2],host:match[4],path:match[5],relative:match[5]+query+fragment// everything minus origin\n};}", "function rawUrlParse(strurl)\n{\n\tvar\tep = url.parse(strurl);\n\tif(rawIsSafeEntity(ep) && (null === ep.port || !rawIsSafeEntity(ep.port) || isNaN(ep.port))){\n\t\t// set default port\n\t\tif(rawIsSafeString(ep.protocol) && 'https:' === ep.protocol){\n\t\t\tep.port\t= 443;\n\t\t}else{\n\t\t\tep.port\t= 80;\n\t\t}\n\t}\n\treturn ep;\n}", "function parseUriParts(urlString) {\n\t // A TypeError is thrown if urlString is not a string\n\t // @see https://nodejs.org/api/url.html#url_url_parse_urlstring_parsequerystring_slashesdenotehost\n\t return url.parse(shared.isString(urlString) ? urlString : '', false, true);\n\t}", "parseUrl(url) {\n let urlTree;\n\n try {\n urlTree = this.urlSerializer.parse(url);\n } catch (e) {\n urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);\n }\n\n return urlTree;\n }", "function parseURL(url, p) {\n\tvar result = \"\";\n\tvar items = url.split('/');\n\tvar i;\n\n\tfor (i = 1; i < items.length; i++) {\n\t\tvar item = items[i];\n\n\t\tif (item.indexOf(':') == 0) {\n\t\t\tvar keyname = item.substring(1);\n\t\t\tvar val = p[keyname];\n\n\t\t\tif (!! val) {\n\t\t\t\tresult = result + '/' + val;\n\t\t\t}else {\n\t\t\t\tlog.error('Invalid params:' + JSON.stringify(p) + ' for url: ' + url);\n\t\t\t\tresult = null;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}else {\n\t\t\tresult = result + '/' + item;\n\t\t}\n\t}\n\n\treturn result;\n}", "function URLUtils() {}", "function parseUri (str) {\n var o = {\n strictMode: false,\n key : [\"source\", \"protocol\", \"authority\", \"userInfo\", \"user\", \"password\", \"host\", \"port\", \"relative\", \"path\", \"directory\", \"file\", \"query\", \"anchor\"],\n q : {\n name : \"queryKey\",\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser : {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose : /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n },\n m = o.parser[o.strictMode ? \"strict\" : \"loose\"].exec(str),\n uri = {},\n i = 14;\n\n while (i--) {\n uri[o.key[i]] = m[i] || \"\";\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}", "parse(url) {\n const p = new UrlParser(url);\n return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());\n }", "static parseURI(url) {\n var parse;\n parse = document.createElement('a');\n parse.href = url;\n parse.segments = parse.pathname.split('/');\n parse.filex = parse.segments.pop().split('.');\n parse.file = parse.filex[0];\n parse.ext = parse.filex.length === 2 ? parse.filex[1] : '';\n return parse;\n }", "function parseUrl() {\n var url = location.href;\n var k = url.indexOf('?');\n if(k == -1){\n return;\n }\n var querystr = url.substr(k+1);\n var arr1 = querystr.split('&');\n var arr2 = new Object();\n for (k in arr1){\n var ta = arr1[k].split('=');\n arr2[ta[0]] = ta[1];\n }\n return arr2;\n}", "function Url(s){\n if (!s) return;\n\n // While this implementation seemingly has a few more steps than using a regular expression,\n // fixing the regular expression result to get the port number, if any, as well as the \"context\"\n // (as I call it here) ended up having as many steps. Thus, for now, this implementation seems simpler.\n // However, I have not considered the relative performances yet.\n var qs, parts, host, protocol, pathinfo;\n s = stripDblSlashes(s);\n parts = s.split(\"?\");\n qs = parts.length > 1 ? parts[1] : null;\n parts = parts[0].split(\"/\");\n if (s.contains(\"://\")){\n protocol = parts[0];\n parts.shift();\n if (parts[0].trim() == \"\") parts.shift();\n }\n host = parts[0].split(\":\").toEach({ name: \"\", port: \"\"});\n parts.shift();\n $.extend(this, {\n protocol: protocol.replace(\":\",\"\"),\n hostname: host.name,\n port: $.notEmpty(host.port) ? $.parseInt(host.port) : null,\n file: $re.extension.test(parts[parts.length - 1]) ? parts.pop() : null,\n context: $.notEmpty(parts[0]) ? parts[0] : null,\n pathinfo: (pathinfo = parts.slice(1).join(\"/\")).notEmpty() ? pathinfo : null,\n search: qs ? \"?\" + qs : null,\n query: qs,\n current: s\n });\n }", "parseUrl(url) {\n let urlTree;\n try {\n urlTree = this.urlSerializer.parse(url);\n }\n catch (e) {\n urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);\n }\n return urlTree;\n }", "parseUrl(url) {\n let urlTree;\n try {\n urlTree = this.urlSerializer.parse(url);\n }\n catch (e) {\n urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);\n }\n return urlTree;\n }", "parseUrl(url) {\n let urlTree;\n try {\n urlTree = this.urlSerializer.parse(url);\n }\n catch (e) {\n urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);\n }\n return urlTree;\n }", "parseUrl(url) {\n let urlTree;\n try {\n urlTree = this.urlSerializer.parse(url);\n }\n catch (e) {\n urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);\n }\n return urlTree;\n }", "parseUrl(url) {\n let urlTree;\n try {\n urlTree = this.urlSerializer.parse(url);\n }\n catch (e) {\n urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);\n }\n return urlTree;\n }", "function urlParser(req, res, next) {\n req.parsedUrl = require('url').parse(req.url, true);\n next();\n}", "function parseUrl(url) {\n const lastSlash = url.lastIndexOf('/');\n const lastSearchParam = url.lastIndexOf('?');\n const prefix = url.substring(0, lastSlash);\n const suffix = lastSearchParam > lastSlash ? url.substring(lastSearchParam) : '';\n return [prefix + '/', suffix];\n}", "function parseURL(url) {\n var parser = document.createElement('a'),\n searchObject = {},\n queries, split, i;\n // Let the browser do the work\n parser.href = url;\n // Convert query string to object\n queries = parser.search.replace(/^\\?/, '').split('&');\n for (i = 0; i < queries.length; i++) {\n split = queries[i].split('=');\n searchObject[split[0]] = split[1];\n }\n return parser.pathname;\n\n //return {\n //protocol: parser.protocol,\n //host: parser.host,\n //hostname: parser.hostname,\n //port: parser.port,\n //pathname: parser.pathname,\n //search: parser.search,\n //searchObject: searchObject,\n //hash: parser.hash\n //};\n}", "function parseUrl(url) {\n var lastSlash = url.lastIndexOf('/');\n var lastSearchParam = url.lastIndexOf('?');\n var prefix = url.substring(0, lastSlash);\n var suffix = lastSearchParam > lastSlash ? url.substring(lastSearchParam) : '';\n return [prefix + '/', suffix];\n}", "function parseUrl(url) {\n var lastSlash = url.lastIndexOf('/');\n var lastSearchParam = url.lastIndexOf('?');\n var prefix = url.substring(0, lastSlash);\n var suffix = lastSearchParam > lastSlash ? url.substring(lastSearchParam) : '';\n return [prefix + '/', suffix];\n}", "function parseURL(url) {\n var a = document.createElement('a');\n a.href = url;\n return {\n source: url,\n protocol: a.protocol.replace(':',''),\n host: a.hostname,\n port: a.port,\n query: a.search,\n params: (function(){\n var ret = {},\n seg = a.search.replace(/^\\?/,'').split('&'),\n len = seg.length, i = 0, s;\n for (;i<len;i++) {\n if (!seg[i]) { continue; }\n s = seg[i].split('=');\n ret[s[0]] = s[1];\n }\n return ret;\n })(),\n file: (a.pathname.match(/\\/([^\\/?#]+)$/i) || [,''])[1],\n hash: a.hash.replace('#',''),\n path: a.pathname.replace(/^([^\\/])/,'/$1'),\n relative: (a.href.match(/tps?:\\/\\/[^\\/]+(.+)/) || [,''])[1],\n segments: a.pathname.replace(/^\\//,'').split('/')\n };\n}", "function parseUrl(url) {\n var a = document.createElement('a');\n a.href = url;\n return {\n source: url,\n protocol: a.protocol.replace(':', ''),\n host: a.hostname,\n port: a.port,\n query: a.search,\n params: (function () {\n var ret = {},\n seg = a.search.replace(/^\\?/, '').split('&'),\n len = seg.length,\n i = 0,\n s;\n for (; i < len; i++) {\n if (!seg[i]) {\n continue;\n }\n s = seg[i].split('=');\n ret[s[0]] = s[1];\n }\n return ret;\n })(),\n file: (a.pathname.match(/\\/([^\\/?#]+)$/i) || [, ''])[1],\n hash: a.hash.replace('#', ''),\n path: a.pathname.replace(/^([^\\/])/, '/$1'),\n relative: (a.href.match(/tps?:\\/\\/[^\\/]+(.+)/) || [, ''])[1],\n segments: a.pathname.replace(/^\\//, '').split('/')\n };\n}", "function parseUrl(url)\n\n\t {\n\t if (!url) {\n\t return {};\n\t }\n\n\t const match = url.match(/^(([^:/?#]+):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n\n\t if (!match) {\n\t return {};\n\t }\n\n\t // coerce to undefined values to empty string so we don't get 'undefined'\n\t const query = match[6] || '';\n\t const fragment = match[8] || '';\n\t return {\n\t host: match[4],\n\t path: match[5],\n\t protocol: match[2],\n\t relative: match[5] + query + fragment, // everything minus origin\n\t };\n\t}", "function parseURL(url) {\n var a = document.createElement('a');\n a.href = url;\n return {\n source: url,\n protocol: a.protocol.replace(':',''),\n host: a.hostname,\n port: a.port,\n query: a.search,\n params: (function(){\n var ret = {},\n seg = a.search.replace(/^\\?/,'').split('&'),\n len = seg.length, i = 0, s;\n for (;i<len;i++) {\n if (!seg[i]) { continue; }\n s = seg[i].split('=');\n ret[s[0]] = s[1];\n }\n return ret;\n })(),\n file: (a.pathname.match(/\\/([^\\/?#]+)$/i) || [,''])[1],\n hash: a.hash.replace('#',''),\n path: a.pathname.replace(/^([^\\/])/,'/$1'),\n relative: (a.href.match(/tp:\\/\\/[^\\/]+(.+)/) || [,''])[1],\n segments: a.pathname.replace(/^\\//,'').split('/')\n };\n}", "function parseURL(url) {\n var a = document.createElement('a');\n a.href = url;\n return {\n source: url,\n protocol: a.protocol.replace(':',''),\n host: a.hostname,\n port: a.port,\n query: a.search,\n params: (function() {\n var ret = {},\n seg = a.search.replace(/^\\?/,'').split('&'),\n len = seg.length, i = 0, s;\n for (;i<len;i++) {\n if (!seg[i]) { continue; }\n s = seg[i].split('=');\n ret[s[0]] = s[1];\n }\n return ret;\n })(),\n file: (a.pathname.match(/\\/([^\\/?#]+)$/i) || [,''])[1],\n hash: a.hash.replace('#',''),\n path: a.pathname.replace(/^([^\\/])/,'/$1'),\n relative: (a.href.match(/tp:\\/\\/[^\\/]+(.+)/) || [,''])[1],\n segments: a.pathname.replace(/^\\//,'').split('/')\n };\n}", "function parseUrl(url)\n\n {\n if (!url) {\n return {};\n }\n\n const match = url.match(/^(([^:/?#]+):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n\n if (!match) {\n return {};\n }\n\n // coerce to undefined values to empty string so we don't get 'undefined'\n const query = match[6] || '';\n const fragment = match[8] || '';\n return {\n host: match[4],\n path: match[5],\n protocol: match[2],\n relative: match[5] + query + fragment, // everything minus origin\n };\n }", "function urlParse ( url, parseQueryString ) {\n\tvar urlReg = /^((\\w+:)\\/)?\\/?((.*?)@)?(([^:\\/\\s]+)(:(\\d+))?)(([^?#]*)(\\?([^#]*))?)(#.*)?/\n\tvar m = urlReg.exec( url );\n\n\tvar ret = {};\n\n\tret.protocol \t= m[2] || '';\n\tret.slashes\t\t= true;\n\tret.auth\t\t= m[4] || null;\n\tret.host \t\t= m[5] || '';\n\tret.port\t\t= m[8] || null;\n\tret.hostname\t= m[6];\n\tret.hash \t\t= m[13] || null;\n\tret.search\t\t= m[11];\n\n\tif ( parseQueryString && m[12] ) {\n\t\tvar q \t\t= m[12].split('&');\n\n\t\tret.query \t= {};\n\t\tfor ( var i = 0; i < q.length; i ++ ) {\n\t\t\tvar p \t= q[i].split('=');\n\t\t\tret.query[p[0]]\t= p[1] || '';\n\t\t}\n\t\t\n\t}\n\n\tret.pathname\t= m[10];\n\tret.path\t\t= m[9];\n\tret.href \t\t= url;\n\n\treturn ret;\n}", "function parseURL(url) {\n if (url.indexOf(URL_SCHEME_SUFFIX) === -1) {\n throw new Error(\"The url string provided does not contain a scheme. \" +\n \"Supported schemes are: \" +\n (\"\" + ModelStoreManagerRegistry.getSchemes().join(',')));\n }\n return {\n scheme: url.split(URL_SCHEME_SUFFIX)[0],\n path: url.split(URL_SCHEME_SUFFIX)[1],\n };\n}", "parsePath(url) {\n\t\tvar ret = \"\";\n\n\t\t// In case the url has a protocol, remove it.\n\t\tvar protocolSplit = url.split(\"://\");\n\t\tvar withoutProtocol;\n\t\tif (protocolSplit.length > 1) {\n\t\t\twithoutProtocol = protocolSplit[1];\n\t\t} else {\n\t\t\twithoutProtocol = protocolSplit[0];\n\t\t}\n\n\t\tvar host = withoutProtocol.split(\"?\")[0];\n\t\tvar pathIndex = host.indexOf(\"/\");\n\t\tif (pathIndex !== -1) {\n\t\t\tret = host.substring(pathIndex, host.length);\n\t\t} else {\n\t\t\tret = \"/\";\n\t\t}\n\n\t\treturn ret;\n\t}", "function parseURI(url) {\n\t\tvar m = String(url).replace(/^\\s+|\\s+$/g, '').match(/^([^:\\/?#]+:)?(\\/\\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\\/?#]*)(?::(\\d*))?))?([^?#]*)(\\?[^#]*)?(#[\\s\\S]*)?/);\n\t\t// authority = '//' + user + ':' + pass '@' + hostname + ':' port\n\t\treturn (m ? {\n\t\t\thref : m[0] || '',\n\t\t\tprotocol : m[1] || '',\n\t\t\tauthority: m[2] || '',\n\t\t\thost : m[3] || '',\n\t\t\thostname : m[4] || '',\n\t\t\tport : m[5] || '',\n\t\t\tpathname : m[6] || '',\n\t\t\tsearch : m[7] || '',\n\t\t\thash : m[8] || ''\n\t\t} : null);\n\t}", "function parseUrl(url) {\n if (!url) {\n return {};\n }\n var match = url.match(/^(([^:\\/?#]+):)?(\\/\\/([^\\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n if (!match) {\n return {};\n }\n // coerce to undefined values to empty string so we don't get 'undefined'\n var query = match[6] || '';\n var fragment = match[8] || '';\n return {\n host: match[4],\n path: match[5],\n protocol: match[2],\n relative: match[5] + query + fragment,\n };\n}", "function parseUrl(url) {\n if (!url) {\n return {};\n }\n var match = url.match(/^(([^:\\/?#]+):)?(\\/\\/([^\\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n if (!match) {\n return {};\n }\n // coerce to undefined values to empty string so we don't get 'undefined'\n var query = match[6] || '';\n var fragment = match[8] || '';\n return {\n host: match[4],\n path: match[5],\n protocol: match[2],\n relative: match[5] + query + fragment,\n };\n}", "function parseURL(url) {\n if (url.indexOf(URL_SCHEME_SUFFIX) === -1) {\n throw new Error(`The url string provided does not contain a scheme. ` +\n `Supported schemes are: ` +\n `${ModelStoreManagerRegistry.getSchemes().join(',')}`);\n }\n return {\n scheme: url.split(URL_SCHEME_SUFFIX)[0],\n path: url.split(URL_SCHEME_SUFFIX)[1],\n };\n}", "function parseURL(url) {\n if (url.indexOf(URL_SCHEME_SUFFIX) === -1) {\n throw new Error(`The url string provided does not contain a scheme. ` +\n `Supported schemes are: ` +\n `${ModelStoreManagerRegistry.getSchemes().join(',')}`);\n }\n return {\n scheme: url.split(URL_SCHEME_SUFFIX)[0],\n path: url.split(URL_SCHEME_SUFFIX)[1],\n };\n}", "function parseUrl(url) {\r\n if (!url) {\r\n return {};\r\n }\r\n var match = url.match(/^(([^:\\/?#]+):)?(\\/\\/([^\\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\r\n if (!match) {\r\n return {};\r\n }\r\n // coerce to undefined values to empty string so we don't get 'undefined'\r\n var query = match[6] || '';\r\n var fragment = match[8] || '';\r\n return {\r\n host: match[4],\r\n path: match[5],\r\n protocol: match[2],\r\n relative: match[5] + query + fragment\r\n };\r\n}", "function parseUri(str) {\n var pattern = /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/;\n var key = ['source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'anchor'];\n var querypattern = /(?:^|&)([^&=]*)=?([^&]*)/g;\n\n var match = pattern.exec(str);\n var uri = {};\n var i = 14;\n while (i--) {\n uri[key[i]] = match[i] || '';\n }\n\n uri.queryKey = {};\n uri[key[12]].replace(querypattern, function ($0, $1, $2) {\n if ($1) {\n uri.queryKey[$1] = $2;\n }\n });\n\n return uri;\n}", "function parseUrl(url) {\n if (!url) {\n return {};\n }\n var match = url.match(/^(([^:/?#]+):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n if (!match) {\n return {};\n }\n // coerce to undefined values to empty string so we don't get 'undefined'\n var query = match[6] || '';\n var fragment = match[8] || '';\n return {\n host: match[4],\n path: match[5],\n protocol: match[2],\n relative: match[5] + query + fragment,\n };\n}", "function parseUrl(url) {\n if (!url) {\n return {};\n }\n var match = url.match(/^(([^:/?#]+):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n if (!match) {\n return {};\n }\n // coerce to undefined values to empty string so we don't get 'undefined'\n var query = match[6] || '';\n var fragment = match[8] || '';\n return {\n host: match[4],\n path: match[5],\n protocol: match[2],\n relative: match[5] + query + fragment,\n };\n}", "function parseUri( url, strictMode )\n\t{\n\t\tvar str = decodeURI( url ),\n\t\t res = parser[ strictMode || false ? \"strict\" : \"loose\" ].exec( str ),\n\t\t uri = { attr : {}, param : {}, seg : {}, friendly : {} },\n\t\t i = 14;\n\t\t\n\t\twhile ( i-- )\n\t\t{\n\t\t\turi.attr[ key[i] ] = res[i] || \"\";\n\t\t}\n\t\t\n\t\t// build query and fragment parameters\n\t\t\n\t\turi.param['query'] = {};\n\t\turi.param['fragment'] = {};\n\t\t\n\t\turi.attr['query'].replace( querystring_parser, function ( $0, $1, $2 ){\n\t\t\tif ($1)\n\t\t\t{\n\t\t\t\turi.param['query'][$1] = $2;\n\t\t\t}\n\t\t});\n\t\t\n\t\turi.attr['fragment'].replace( fragment_parser, function ( $0, $1, $2 ){\n\t\t\tif ($1)\n\t\t\t{\n\t\t\t\turi.param['fragment'][$1] = $2;\n\t\t\t}\n\t\t});\n\t\t\n\t\t// split path and fragement into segments\n\t\t\n uri.seg['path'] = uri.attr.path.replace(/^\\/+|\\/+$/g,'').split('/');\n \n uri.seg['fragment'] = uri.attr.fragment.replace(/^\\/+|\\/+$/g,'').split('/');\n \n // compile a 'base' domain attribute\n \n uri.attr['base'] = uri.attr.host ? uri.attr.protocol+\"://\"+uri.attr.host + (uri.attr.port ? \":\"+uri.attr.port : '') : '';\n\n var pathKey = '';\n var pathValue = '';\n var pathArr = uri.seg['path'];\n \n for(var i = 0; i < pathArr.length; i+=2){\n \tif(pathArr[i+1] != null){\n \t\tpathKey = uri.seg['path'][i];\n \tpathValue = uri.seg['path'][i+1];\n \turi.friendly[pathKey] = pathValue;\t\n \t}\n }\n \n\t\treturn uri;\n\t}", "function parseProtocol(url) {\n const parsedURL = /^(\\w+)\\:\\/\\/([^\\/]+)\\/(.*)$/.exec(url);\n if (!parsedURL) {\n return false;\n }\n console.log(parsedURL);\n // [\"https://developer.mozilla.org/en-US/docs/Web/JavaScript\", \n // \"https\", \"developer.mozilla.org\", \"en-US/docs/Web/JavaScript\"]\n\n const [, protocol, fullhost, fullpath] = parsedURL;\n return protocol;\n}", "function parseURL(url) {\n var a = document.createElement('a');\n a.href = url;\n var domsplits = a.hostname.split(\".\");\n var dom = domsplits[domsplits.length-2]+\".\"+domsplits[domsplits.length-1];\n return ret = {\n source: url,\n protocol: a.protocol.replace(':',''),\n hostdomain: dom\n };\n}", "static splitURI(uri) {\nvar matches, pattern;\n// lggr.trace? \"Splitting #{uri}\"\npattern = RegExp(\"^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\\\?([^#]*))?(#(.*))?\");\nmatches = uri.match(pattern);\nreturn {\nscheme: matches[2],\nauthority: matches[4],\npath: matches[5],\nquery: matches[7],\nfragment: matches[9]\n};\n}", "function parseUri(url) {\r\n\t\tvar match = String(url).replace(/^\\s+|\\s+$/g, '').match(/^([^:\\/?#]+:)?(\\/\\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\\/?#]*)(?::(\\d*))?))?([^?#]*)(\\?[^#]*)?(#[\\s\\S]*)?/);\r\n\t\treturn (match ? { href: match[0] || '', protocol: match[1] || '', authority: match[2] || '', host: match[3] || '', hostname: match[4] || '',\r\n\t\t port: match[5] || '', pathname: match[6] || '', search: match[7] || '', hash: match[8] || '' } : null);\r\n\t}", "parse(url) {\n const p = new UrlParser(url);\n return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());\n }", "parse(url) {\n const p = new UrlParser(url);\n return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());\n }", "parse(url) {\n const p = new UrlParser(url);\n return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());\n }", "parse(url) {\n const p = new UrlParser(url);\n return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());\n }", "parse(url) {\n const p = new UrlParser(url);\n return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());\n }", "function parseURL() {\n\tlet match,\n\t\tpl = /\\+/g, // Regex for replacing addition symbol with a space\n\t\tsearch = /([^&=]+)=?([^&]*)/g,\n\t\tdecode = function (s) { return decodeURIComponent(s.replace(pl, ' ')); },\n\t\tquery = window.location.search.substring(1);\n\n\tlet urlParams = {};\n\twhile (match = search.exec(query))\n\t\turlParams[decode(match[1])] = decode(match[2]);\n\n\tirc.auther.fillFormFromURI(urlParams);\n}", "function linkparser(link) {\r\n const start = link.indexOf('net/');\r\n const end = link.indexOf('?');\r\n const res = link.slice(Number(start) + 4, end);\r\n return res;\r\n}", "function Common_parseUrlParam(){\n\turl = decodeURI(window.location.href);\n\tlet returnParams = {};\n\tparamPos = url.indexOf('?');\n\tif(paramPos<0)\n\t\treturn {};\n\turl = url.substring(paramPos+1);//don't need the '?' any more\n\tfor(;;){\n\t\tparamPos = url.indexOf('=');\n\t\tvalPos = url.indexOf('&');\n\t\tif(paramPos>0 && valPos>0){\n\t\t\treturnParams[url.substring(0,paramPos)] = url.substring(paramPos+1,valPos);\n\t\t\turl = url.substring(valPos+1);\n\t\t}\n\t\telse if(paramPos>0 && valPos<0){\n\t\t\treturnParams[url.substring(0,paramPos)] = url.substring(paramPos+1);\n\t\t\turl='';\n\t\t}\n\t\telse if(paramPos<0){\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}\n\t\n\treturn returnParams;\n\t\n}", "function parseUrl (ast) {\n let [firstAgument] = ast.arguments;\n let rawUrl = firstAgument.raw;\n let url = rawUrl.replace(/^\\//, '').replace(/\\/$/, '').replace(/\\\\/g,'');\n assert(url);\n return url;\n }", "function parseUrl(url)\n\n {\n if (!url) {\n return {};\n }\n\n const match = url.match(/^(([^:/?#]+):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n\n if (!match) {\n return {};\n }\n\n // coerce to undefined values to empty string so we don't get 'undefined'\n const query = match[6] || '';\n const fragment = match[8] || '';\n return {\n host: match[4],\n path: match[5],\n protocol: match[2],\n relative: match[5] + query + fragment, // everything minus origin\n };\n}", "function parseURI(url) {\n var m = String(url).replace(/^\\s+|\\s+$/g, '').match(/^([^:\\/?#]+:)?(\\/\\/(?:[^:@\\/?#]*(?::[^:@\\/?#]*)?@)?(([^:\\/?#]*)(?::(\\d*))?))?([^?#]*)(\\?[^#]*)?(#[\\s\\S]*)?/);\n // authority = '//' + user + ':' + pass '@' + hostname + ':' port\n return (m ? {\n href : m[0] || '',\n protocol : m[1] || '',\n authority: m[2] || '',\n host : m[3] || '',\n hostname : m[4] || '',\n port : m[5] || '',\n pathname : m[6] || '',\n search : m[7] || '',\n hash : m[8] || ''\n } : null);\n }", "function parseURI(url) {\n var m = String(url).replace(/^\\s+|\\s+$/g, '').match(/^([^:\\/?#]+:)?(\\/\\/(?:[^:@\\/?#]*(?::[^:@\\/?#]*)?@)?(([^:\\/?#]*)(?::(\\d*))?))?([^?#]*)(\\?[^#]*)?(#[\\s\\S]*)?/);\n // authority = '//' + user + ':' + pass '@' + hostname + ':' port\n return (m ? {\n href : m[0] || '',\n protocol : m[1] || '',\n authority: m[2] || '',\n host : m[3] || '',\n hostname : m[4] || '',\n port : m[5] || '',\n pathname : m[6] || '',\n search : m[7] || '',\n hash : m[8] || ''\n } : null);\n }", "function parseURI(url) {\n\tvar m = String(url).replace(/^\\s+|\\s+$/g, '').match(/^([^:\\/?#]+:)?(\\/\\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\\/?#]*)(?::(\\d*))?))?([^?#]*)(\\?[^#]*)?(#[\\s\\S]*)?/);\n\t// authority = '//' + user + ':' + pass '@' + hostname + ':' port\n\treturn (m ? {\n\t\thref : m[0] || '',\n\t\tprotocol : m[1] || '',\n\t\tauthority: m[2] || '',\n\t\thost : m[3] || '',\n\t\thostname : m[4] || '',\n\t\tport : m[5] || '',\n\t\tpathname : m[6] || '',\n\t\tsearch : m[7] || '',\n\t\thash : m[8] || ''\n\t} : null);\n}", "function parseURI(url) {\n\tvar m = String(url).replace(/^\\s+|\\s+$/g, '').match(/^([^:\\/?#]+:)?(\\/\\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\\/?#]*)(?::(\\d*))?))?([^?#]*)(\\?[^#]*)?(#[\\s\\S]*)?/);\n\t// authority = '//' + user + ':' + pass '@' + hostname + ':' port\n\treturn (m ? {\n\t\thref : m[0] || '',\n\t\tprotocol : m[1] || '',\n\t\tauthority: m[2] || '',\n\t\thost : m[3] || '',\n\t\thostname : m[4] || '',\n\t\tport : m[5] || '',\n\t\tpathname : m[6] || '',\n\t\tsearch : m[7] || '',\n\t\thash : m[8] || ''\n\t} : null);\n}", "function parseURI(url) {\n\tvar m = String(url).replace(/^\\s+|\\s+$/g, '').match(/^([^:\\/?#]+:)?(\\/\\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\\/?#]*)(?::(\\d*))?))?([^?#]*)(\\?[^#]*)?(#[\\s\\S]*)?/);\n\t// authority = '//' + user + ':' + pass '@' + hostname + ':' port\n\treturn (m ? {\n\t\thref : m[0] || '',\n\t\tprotocol : m[1] || '',\n\t\tauthority: m[2] || '',\n\t\thost : m[3] || '',\n\t\thostname : m[4] || '',\n\t\tport : m[5] || '',\n\t\tpathname : m[6] || '',\n\t\tsearch : m[7] || '',\n\t\thash : m[8] || ''\n\t} : null);\n}", "function parseURI(url) {\n\tvar m = String(url).replace(/^\\s+|\\s+$/g, '').match(/^([^:\\/?#]+:)?(\\/\\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\\/?#]*)(?::(\\d*))?))?([^?#]*)(\\?[^#]*)?(#[\\s\\S]*)?/);\n\t// authority = '//' + user + ':' + pass '@' + hostname + ':' port\n\treturn (m ? {\n\t\thref : m[0] || '',\n\t\tprotocol : m[1] || '',\n\t\tauthority: m[2] || '',\n\t\thost : m[3] || '',\n\t\thostname : m[4] || '',\n\t\tport : m[5] || '',\n\t\tpathname : m[6] || '',\n\t\tsearch : m[7] || '',\n\t\thash : m[8] || ''\n\t} : null);\n}", "parseHost(url) {\n\t\tvar ret;\n\n\t\t// In case the url has a protocol, remove it.\n\t\tvar protocolSplit = url.split(\"://\");\n\t\tvar withoutProtocol;\n\t\tif (protocolSplit.length > 1) {\n\t\t\twithoutProtocol = protocolSplit[1];\n\t\t} else {\n\t\t\twithoutProtocol = protocolSplit[0];\n\t\t}\n\n\t\tvar host = withoutProtocol.split(\"?\")[0];\n\t\tvar pathIndex = host.indexOf(\"/\");\n\n\t\tif (pathIndex !== -1) {\n\t\t\tret = host.substring(0, pathIndex);\n\t\t} else {\n\t\t\tret = host;\n\t\t}\n\n\t\treturn ret;\n\t}", "function parse_url(url) {\n\tvar parser = document.createElement('a'),\n\t\tsearchObject = {},\n\t\tqueries, split, i;\n\t// Let the browser do the work\n\tparser.href = url;\n\t// Convert query string to object\n\tqueries = parser.search.replace(/\\?/, '').split('&');\n\tfor( i = 0; i < queries.length; i++ ) {\n\t\tsplit = queries[i].split('=');\n\t\tif (split.length > 1) {\n\t\t\tsearchObject[split[0]] = split[1];\n\t\t} else {\n\t\t\tsearchObject[split[0]] = \"\";\n\t\t}\n\t}\n\t//return {\"host\":host, \"path\":path, \"gparamstr\":param, \"gparams\":gparams};\n\treturn {\"host\":parser.protocol + \"//\" + parser.host, \"path\":parser.pathname, \"gparamstr\":parser.search, \"gparams\":searchObject};\n}", "function Main_ParseUrlParameters()\n{\n\t//create an url object\n\tvar url = {};\n\n\t//get the url string\n\tvar strURL = location.href;\n\t//search for first query\n\tvar nAmp = strURL.indexOf(\"?\");\n\tif (nAmp != -1)\n\t{\n\t\t//correct url\n\t\tstrURL = strURL.substr(nAmp + 1);\n\t\t//split into pairs\n\t\tstrURL = strURL.split(\"&\");\n\t\t//loop through them\n\t\tfor (var i = 0, c = strURL.length; i < c; i++)\n\t\t{\n\t\t\t//split this into the name/value pair\n\t\t\tvar pair = strURL[i].split(\"=\");\n\t\t\tif (pair.length == 2)\n\t\t\t{\n\t\t\t\t//add this\n\t\t\t\turl[pair[0].toLowerCase()] = pair[1];\n\t\t\t}\n\t\t}\n\t\t//we have a root?\n\t\tif (url.startid)\n\t\t{\n\t\t\t//add root\n\t\t\turl.StartStateId = url.startid;\n\t\t\t//has extension?\n\t\t\tif (url.StartStateId.indexOf(__NEMESIS_EXTENSION) != -1)\n\t\t\t{\n\t\t\t\t//remove it\n\t\t\t\turl.StartStateId.replace(__NEMESIS_EXTENSION, \"\");\n\t\t\t}\n\t\t}\n\t}\n\t//return it\n\treturn url;\n}", "parseDomain(url) {\n if(url) {\n if (url.indexOf(\"://\") > -1) {\n url = url.split('/')[2];\n } else {\n url = url.split('/')[0];\n }\n }\n\n return url;\n }", "function parseURL(url) {\n var link = document.createElement('a');\n link.href = url;\n let path = link.pathname;\n if (/\\.[a-z0-9_-]+$/i.test(path)) {\n path = path.split('/').slice(0, -1).join('/') + '/';\n }\n return {\n protocol: link.protocol,\n host: link.host,\n hostname: link.hostname,\n pathname: link.pathname,\n path,\n search: link.search,\n hash: link.hash\n };\n}", "function parseUrl (url) {\n var a = document.createElement('a')\n a.href = url\n\n return {\n href: a.href,\n pathname: a.pathname,\n search: (a.search) ? qs(a.search) : {},\n hash: a.hash\n }\n }", "function parseURL(url) {\n\n /** URL pattern in GitHub\n * new:\t<SERVER>/<user>/<repo>/new/<branch>/<fpath>\n * edit:\t<SERVER>/<user>/<repo>/edit/<branch>/<fpath>\n * delete:\t<SERVER>/<user>/<repo>/delete/<branch>/<fpath>\n * upload:\t<SERVER>/<user>/<repo>/upload/<branch>/<fpath>\n * merge:\t<SERVER>/<user>/<repo>/pull/<pr#>\n **/\n\n /** URL pattern in GitLab\n * new:\t<SERVER>/<user>/<repo>/-/new/<branch>/<fpath>\n * edit:\t<SERVER>/<user>/<repo>/-/edit/<branch>/<fpath>\n * delete:\t<SERVER>/<user>/<repo>/-/blob/<branch>/<fpath>\n * upload:\t<SERVER>/<user>/<repo>/-/tree/<branch>/<fpath>\n * merge:\t<SERVER>/<user>/<repo>/-/merge_requests/<pr#>\n **/\n\n let info = url.replace(`${SERVER}`, \"\").split(\"/\");\n\n // The extension does not work on the main page of repo\n if (info.length < 4) {\n deactivate({\n rule: UNKNOWN_REQUEST\n });\n return UNKNOWN_REQUEST;\n }\n\n // Remove an extra element (i.e. \"-\") from the GitLab url\n if (SERVER == SERVER_GL) info.splice(3,1);\n\n let commitType = info[3];\n let baseBranch = null;\n let oldPath = null;\n let prId = null;\n let request = REQ_MERGE;\n\n if ((commitType == MERGE_GH) || (commitType == MERGE_GL)) {\n commitType = REQ_MERGE;\n prId = info[4];\n } else {\n // RULE: requests on non-commit pages are ignored\n request = checkRequest(commitType, url);\n if (request == UNKNOWN_REQUEST) {\n return request;\n }\n baseBranch = info[4];\n oldPath = getFilePath(url, commitType, baseBranch);\n\n // Unify D/U requests for GiHub and GitLab\n if (commitType == TYPE_BLOB) commitType = REQ_DELETE;\n if (commitType == TYPE_TREE) commitType = REQ_UPLOAD;\n }\n\n return {\n user: info[1],\n repo: info[2],\n baseBranch,\n commitType,\n request,\n oldPath,\n prId,\n url\n }\n}", "function Url() {\n this.protocol = null;\n this.slashes = null;\n this.auth = null;\n this.port = null;\n this.hostname = null;\n this.hash = null;\n this.search = null;\n this.pathname = null;\n} // Reference: RFC 3986, RFC 1808, RFC 2396", "static parseURI(uri) {\n var a, j, len1, name, nameValue, nameValues, parse, value;\n parse = {};\n parse.params = {};\n a = document.createElement('a');\n a.href = uri;\n parse.href = a.href;\n parse.protocol = a.protocol;\n parse.hostname = a.hostname;\n parse.port = a.port;\n parse.segments = a.pathname.split('/');\n parse.fileExt = parse.segments.pop().split('.');\n parse.file = parse.fileExt[0];\n parse.ext = parse.fileExt.length === 2 ? parse.fileExt[1] : '';\n parse.dbName = parse.file;\n parse.fragment = a.hash;\n parse.query = Util.isStr(a.search) ? a.search.substring(1) : '';\n nameValues = parse.query.split('&');\n if (Util.isArray(nameValues)) {\n for (j = 0, len1 = nameValues.length; j < len1; j++) {\n nameValue = nameValues[j];\n name = '';\n value = '';\n [name, value] = nameValue.split('=');\n parse.params[name] = value;\n }\n }\n return parse;\n }", "function parseurl(url) {\n var parts = url.split('?')\n if (parts.length == 1) {\n return {\n path: parts[0],\n qs: {}\n };\n }\n var qs = {}\n var qs_parts = parts[1].split('&');\n for (var i = 0; i < qs_parts.length; i++) {\n var v_parts = qs_parts[i].split('=')\n var name = v_parts[0];\n var value = '';\n if (v_parts.length == 1) {\n value = 1;\n } else {\n value = v_parts[1]\n }\n ;\n if (qs[name]) {\n qs.name.push(value);\n } else {\n qs[name] = [value];\n }\n }\n return {\n path: parts[0],\n qs: qs\n };\n}", "function process_url(url) {\n\tconsole.log(\" @@@ DEPRICATED process_url() \");\n\t// split up the url to host, path and get parameters\n\tvar re = /^(https?:\\/\\/[^\\/]+)([^?&]*)(.*)$/;\n\tvar matches = re.exec(url);\n\tvar param = \"\";\n\tvar host = \"\";\n\tvar path = \"\";\n\tif (matches[1]) {\n\t\thost = matches[1];\n\t}\n\tif (matches[2]) {\n\t\tpath = matches[2];\n\t}\n\t// the get parameter string\n\tif (matches[3] && typeof matches[3] == \"string\") {\n\t\tparam = matches[3].substr(1);\n\t}\n\n\t// pull out the get parameters and decode them\n\tgparams = {};\n\tif (matches.length > 2) {\n\t\tgparams = get_url_params(matches[3]);\n\t}\n\n\treturn {\"host\":host, \"path\":path, \"gparamstr\":param, \"gparams\":gparams};\n}", "function parseUri(url) {\n\tvar p = [\"source\", \"protocol\", \"authority\", \"userInfo\", \"user\", \"password\", \"host\", \"port\", \"relative\", \"path\", \"directory\", \"file\", \"query\", \"anchor\"],\n\t\tu = {}, i = p.length,\n\t\tm = /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/.exec(url);\n\twhile (i--) u[p[i]] = m[i] || \"\";\n\treturn u;\n}", "function parseURL( url ) {\n var a = document.createElement('a');\n a.href = url;\n\n return {\n element: a,\n href: a.href,\n host: a.host,\n port: '0' === a.port || '' === a.port ? '' : a.port,\n hash: a.hash,\n hostname: a.hostname,\n pathname: a.pathname.charAt(0) !== '/' ? '/' + a.pathname : a.pathname,\n protocol: !a.protocol || ':' === a.protocol ? 'https:' : a.protocol,\n search: a.search,\n query: a.search.slice(1) // Nice utility for pre-stripping out the `?`\n };\n}", "async parse() {\n // First try to parse the extended settings part of the URL.\n let parsedUrl = this.parseExtendedSettings(this.url);\n if (this.connectionProps.size === 0 && this.urlProps.size === 0) {\n // If we have not parsed anything then use the received url as is.\n parsedUrl = this.url;\n }\n\n if (parsedUrl.startsWith(\"(\")) {\n // Skip resolve the URL if it is in TNS format,\n // TNS format starts with '('\n this.resolvedUrl = this.urlPrefix + parsedUrl;\n } else {\n // Try to resolve the EZConnectURL to Long TNS URL.\n this.resolvedUrl = this.urlPrefix + await this.resolveToLongURLFormat(parsedUrl);\n }\n }", "function parseUrl(url)\n{\n c(url, 'yellow');\n var defaultFormat = 'json';\n var parsedUrl = ur.parse(url);\n var format = parsedUrl.pathname.match(/.*\\.(.*)?(\\?.*)?/);\n var pathname = parsedUrl.pathname.replace(/\\..*/, '').replace(/^\\/|\\/$/, '').replace(/^resources\\//, '').split('/');\n var queries = qs.parse(parsedUrl.query);\n var parsed = {\n path: parsedUrl.path,\n format: (format) ? format[1] : defaultFormat,\n pathname: pathname,\n queries: queries,\n resource_name: (pathname) ? pathname[0] : null,\n account_id: (pathname && pathname[1]) ? pathname[1] : null,\n resource_id: (pathname && pathname[2]) ? pathname[2] : null,\n token: (queries && queries.access_token) ? queries.access_token : null\n }\n c(parsed, 'red');\n return parsed;\n}", "function parseURI(url) {\n var m = String(url).match(/^([^:\\/?#]+:)?(\\/\\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\\/?#]*)(?::(\\d*))?))?([^?#]*)(\\?[^#]*)?(#[\\s\\S]*)?/);\n // authority = '//' + user + ':' + pass '@' + hostname + ':' port\n return (m ? {\n href : m[0] || '',\n protocol : m[1] || '',\n authority: m[2] || '',\n host : m[3] || '',\n hostname : m[4] || '',\n port : m[5] || '',\n pathname : m[6] || '',\n search : m[7] || '',\n hash : m[8] || ''\n } : null);\n}", "function parseUri(str) {\n var o = parseUri.options,\n m = o.parser[o.strictMode ? \"strict\" : \"loose\"].exec(str),\n uri = {},\n i = 14;\n\n while (i--) uri[o.key[i]] = m[i] || \"\";\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) uri[o.q.name][$1] = urldecode($2);\n });\n\n return uri;\n }", "function parseRelativeUrl(url,base){const resolvedBase=base?new URL(base,DUMMY_BASE):DUMMY_BASE;const{pathname,searchParams,search,hash,href,origin,protocol}=new URL(url,resolvedBase);if(origin!==DUMMY_BASE.origin||protocol!=='http:'&&protocol!=='https:'){throw new Error('invariant: invalid relative URL');}return{pathname,searchParams,search,hash,href:href.slice(DUMMY_BASE.origin.length)};}", "function parseUrl (url) {\n\turl = url || location.href\n\n\tconst splitUrl = url.split('?')\n\tconst [link, params] = splitUrl\n\n\tif(params) {\n\t\tconst result = {url: link}\n\t\tconst _params = params.split('&')\n\t\t_params.forEach(item => {\n\t\t\tconst [name, key] = item.split('=')\n\t\t\tresult[name] = decodeURIComponent(key)\n\t\t})\n\t\treturn result\n\t}else {\n\t\treturn null\n\t}\n}", "function parseUri(str) {\r\n\tvar options = parseUri.options;\r\n\tvar matches = options.parser[options.strictMode ? \"strict\" : \"loose\"].exec(str);\r\n\tvar uri = {};\r\n\tvar i = 14;\r\n\r\n\twhile (i--) {\r\n\t\turi[options.key[i]] = matches[i] || \"\";\r\n\t}\r\n\turi[options.query.name] = {};\r\n\turi[options.key[12]].replace(options.query.parser, function($0, $1, $2) {\r\n\t\tif ($1)\r\n\t\t\turi[options.query.name][$1] = $2;\r\n\t});\r\n\r\n\treturn uri;\r\n}", "function parseUrl() {\n var hash = window.location.hash.substr(1),\n rez = hash.split(\"-\"),\n index = rez.length > 1 && /^\\+?\\d+$/.test(rez[rez.length - 1]) ? parseInt(rez.pop(-1), 10) || 1 : 1,\n gallery = rez.join(\"-\");\n\n return {\n hash: hash,\n /* Index is starting from 1 */\n index: index < 1 ? 1 : index,\n gallery: gallery\n };\n }", "function UriUtils() {}", "function parse(url) {\n if (typeof document !== 'undefined') {\n var a = document.createElement('a');\n a.href = url;\n return a;\n }\n return urlparse(url);\n }", "function parseUri( url, strictMode )\r\n\t{\r\n\t\tvar str = decodeURI( url ),\r\n\t\t res = parser[ strictMode || false ? \"strict\" : \"loose\" ].exec( str ),\r\n\t\t uri = { attr : {}, param : {}, seg : {} },\r\n\t\t i = 14;\r\n\t\t\r\n\t\twhile ( i-- )\r\n\t\t{\r\n\t\t\turi.attr[ key[i] ] = res[i] || \"\";\r\n\t\t}\r\n\t\t\r\n\t\t// build query and fragment parameters\r\n\t\t\r\n\t\turi.param['query'] = {};\r\n\t\turi.param['fragment'] = {};\r\n\t\t\r\n\t\turi.attr['query'].replace( querystring_parser, function ( $0, $1, $2 ){\r\n\t\t\tif ($1)\r\n\t\t\t{\r\n\t\t\t\turi.param['query'][$1] = $2;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\turi.attr['fragment'].replace( fragment_parser, function ( $0, $1, $2 ){\r\n\t\t\tif ($1)\r\n\t\t\t{\r\n\t\t\t\turi.param['fragment'][$1] = $2;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\t\t\r\n\t\t// split path and fragement into segments\r\n\t\t\r\n uri.seg['path'] = uri.attr.path.replace(/^\\/+|\\/+$/g,'').split('/');\r\n \r\n uri.seg['fragment'] = uri.attr.fragment.replace(/^\\/+|\\/+$/g,'').split('/');\r\n \r\n // compile a 'base' domain attribute\r\n \r\n uri.attr['base'] = uri.attr.host ? uri.attr.protocol+\"://\"+uri.attr.host + (uri.attr.port ? \":\"+uri.attr.port : '') : '';\r\n \r\n\t\treturn uri;\r\n\t}", "function parseUri (str) {\r\n\t\tvar\to = parseUri.options,\r\n\t\t\tm = o.parser[o.strictMode ? \"strict\" : \"loose\"].exec(str),\r\n\t\t\turi = {},\r\n\t\t\ti = 14;\r\n\r\n\t\twhile (i--) uri[o.key[i]] = m[i] || \"\";\r\n\r\n\t\turi[o.q.name] = {};\r\n\t\turi[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\r\n\t\t\tif ($1) {\r\n\t\t\t\t//Decode percent-encoded query parameters.\r\n\t\t\t\tif (o.q.name === 'queryKey') {\r\n\t\t\t\t\t//A space can be encoded either as \"%20\" or \"+\". decodeUriComponent doesn't decode plus signs,\r\n\t\t\t\t\t//so we need to do that first.\r\n\t\t\t\t\t$2 = $2.replace('+', ' ');\r\n\r\n\t\t\t\t\t$1 = decodeURIComponent($1);\r\n\t\t\t\t\t$2 = decodeURIComponent($2);\r\n\t\t\t\t}\r\n\t\t\t\turi[o.q.name][$1] = $2;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn uri;\r\n\t}", "function parseUri(str) {\n var o = parseUri.options, m = o.parser[o.strictMode ? \"strict\" : \"loose\"].exec(str), uri = {}, i = 14;\n while (i--)\n uri[o.key[i]] = m[i] || \"\";\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1)\n uri[o.q.name][$1] = $2;\n });\n return uri;\n }", "function urlencoded_parse(input, isindex) {\n var sequences = input.split('&');\n if (isindex && sequences[0].indexOf('=') === -1)\n sequences[0] = '=' + sequences[0];\n var pairs = [];\n sequences.forEach(function (bytes) {\n if (bytes.length === 0) return;\n var index = bytes.indexOf('=');\n if (index !== -1) {\n var name = bytes.substring(0, index);\n var value = bytes.substring(index + 1);\n } else {\n name = bytes;\n value = '';\n }\n name = name.replace(/\\+/g, ' ');\n value = value.replace(/\\+/g, ' ');\n pairs.push({ name: name, value: value });\n });\n var output = [];\n pairs.forEach(function (pair) {\n output.push({\n name: decodeURIComponent(pair.name),\n value: decodeURIComponent(pair.value)\n });\n });\n return output;\n }", "function urlencoded_parse(input, isindex) {\n var sequences = input.split('&');\n if (isindex && sequences[0].indexOf('=') === -1)\n sequences[0] = '=' + sequences[0];\n var pairs = [];\n sequences.forEach(function (bytes) {\n if (bytes.length === 0) return;\n var index = bytes.indexOf('=');\n if (index !== -1) {\n var name = bytes.substring(0, index);\n var value = bytes.substring(index + 1);\n } else {\n name = bytes;\n value = '';\n }\n name = name.replace(/\\+/g, ' ');\n value = value.replace(/\\+/g, ' ');\n pairs.push({ name: name, value: value });\n });\n var output = [];\n pairs.forEach(function (pair) {\n output.push({\n name: decodeURIComponent(pair.name),\n value: decodeURIComponent(pair.value)\n });\n });\n return output;\n }", "function parseUri(str) {\n\tvar options = parseUri.options;\n\tvar matches = options.parser[options.strictMode ? \"strict\" : \"loose\"].exec(str);\n\tvar uri = {};\n\tvar i = 14;\n\n\twhile (i--) {\n\t\turi[options.key[i]] = matches[i] || \"\";\n\t}\n\turi[options.query.name] = {};\n\turi[options.key[12]].replace(options.query.parser, function($0, $1, $2) {\n\t\tif ($1)\n\t\t\turi[options.query.name][$1] = $2;\n\t});\n\n\treturn uri;\n}", "function splitUrl(sUrl) {\n\t\tvar m = rUrl.exec(sUrl);\n\t\treturn m && { url : sUrl, prefix : m[1], ext : m[2], query: m[4], hash: (m[5] || \"\"), suffix : m[2] + (m[3] || \"\") };\n\t}", "function parseUri(str) {\n var o = parseUri.options,\n m = o.parser[o.strictMode ? \"strict\" : \"loose\"].exec(str),\n uri = {},\n i = 14\n\n while (i--) uri[o.key[i]] = m[i] || \"\"\n\n uri[o.q.name] = {}\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) uri[o.q.name][$1] = $2\n })\n\n return uri\n}", "function parseUri (str) {\n\t var o = parseUri.options\n\t , m = o.parser[o.strictMode ? \"strict\" : \"loose\"].exec(str)\n\t , uri = {}\n\t , i = 14\n\t\n\t while (i--) { uri[o.key[i]] = m[i] || \"\" }\n\t\n\t uri[o.q.name] = {};\n\t uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n\t if ($1) { uri[o.q.name][$1] = $2 }\n\t })\n\t\n\t return uri\n\t}", "function urlencoded_parse(input, isindex) {\n\t\t\t\t\tvar sequences = input.split('&');\n\t\t\t\t\tif (isindex && sequences[0].indexOf('=') === -1)\n\t\t\t\t\t\tsequences[0] = '=' + sequences[0];\n\t\t\t\t\tvar pairs = [];\n\t\t\t\t\tsequences.forEach(function (bytes) {\n\t\t\t\t\t\tif (bytes.length === 0) return;\n\t\t\t\t\t\tvar index = bytes.indexOf('=');\n\t\t\t\t\t\tif (index !== -1) {\n\t\t\t\t\t\t\tvar name = bytes.substring(0, index);\n\t\t\t\t\t\t\tvar value = bytes.substring(index + 1);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tname = bytes;\n\t\t\t\t\t\t\tvalue = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tname = name.replace(/\\+/g, ' ');\n\t\t\t\t\t\tvalue = value.replace(/\\+/g, ' ');\n\t\t\t\t\t\tpairs.push({ name: name, value: value });\n\t\t\t\t\t});\n\t\t\t\t\tvar output = [];\n\t\t\t\t\tpairs.forEach(function (pair) {\n\t\t\t\t\t\toutput.push({\n\t\t\t\t\t\t\tname: decodeURIComponent(pair.name),\n\t\t\t\t\t\t\tvalue: decodeURIComponent(pair.value)\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t\treturn output;\n\t\t\t\t}", "function Url() {\n //For more efficient internal representation and laziness.\n //The non-underscore versions of these properties are accessor functions\n //defined on the prototype.\n this._protocol = null;\n this._href = \"\";\n this._port = -1;\n this._query = null;\n\n this.auth = null;\n this.slashes = null;\n this.host = null;\n this.hostname = null;\n this.hash = null;\n this.search = null;\n this.pathname = null;\n\n this._prependSlash = false;\n}", "function parseUri (str) {\n\t var o = parseUri.options,\n\t m = o.parser[o.strictMode ? \"strict\" : \"loose\"].exec(str),\n\t uri = {},\n\t i = 14;\n\n\t while (i--) {\n\t uri[o.key[i]] = m[i] || \"\";\n\t }\n\n\t uri[o.q.name] = {};\n\t uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n\t if ($1) {\n\t uri[o.q.name][$1] = $2;\n\t }\n\t });\n\n\t return uri;\n\t }", "function parseUrl() {\r\n var hash = window.location.hash.substr(1),\r\n rez = hash.split(\"-\"),\r\n index = rez.length > 1 && /^\\+?\\d+$/.test(rez[rez.length - 1]) ? parseInt(rez.pop(-1), 10) || 1 : 1,\r\n gallery = rez.join(\"-\");\r\n\r\n return {\r\n hash: hash,\r\n /* Index is starting from 1 */\r\n index: index < 1 ? 1 : index,\r\n gallery: gallery\r\n };\r\n }", "function parseUrl() {\r\n var hash = window.location.hash.substr(1),\r\n rez = hash.split(\"-\"),\r\n index = rez.length > 1 && /^\\+?\\d+$/.test(rez[rez.length - 1]) ? parseInt(rez.pop(-1), 10) || 1 : 1,\r\n gallery = rez.join(\"-\");\r\n\r\n return {\r\n hash: hash,\r\n /* Index is starting from 1 */\r\n index: index < 1 ? 1 : index,\r\n gallery: gallery\r\n };\r\n }", "function parseUrl() {\n var hash = window.location.hash.substr( 1 );\n var rez = hash.split( '-' );\n var index = rez.length > 1 && /^\\+?\\d+$/.test( rez[ rez.length - 1 ] ) ? parseInt( rez.pop( -1 ), 10 ) || 1 : 1;\n var gallery = rez.join( '-' );\n\n // Index is starting from 1\n if ( index < 1 ) {\n index = 1;\n }\n\n return {\n hash : hash,\n index : index,\n gallery : gallery\n };\n }" ]
[ "0.71804994", "0.7167736", "0.70781493", "0.70533544", "0.69422597", "0.68068653", "0.6711252", "0.67056453", "0.664349", "0.66432464", "0.6620269", "0.66057503", "0.6579839", "0.6572687", "0.6571172", "0.6571172", "0.6571172", "0.6571172", "0.6571172", "0.65536606", "0.65505975", "0.6548968", "0.6527631", "0.6527631", "0.6525315", "0.6522455", "0.6516408", "0.6515834", "0.6505229", "0.64758915", "0.64677763", "0.6452921", "0.6447982", "0.6423444", "0.6422909", "0.6422909", "0.642108", "0.642108", "0.6419244", "0.64148307", "0.64120156", "0.64120156", "0.6409781", "0.63820434", "0.6363944", "0.63588256", "0.63582426", "0.63572097", "0.63572097", "0.63572097", "0.63572097", "0.63572097", "0.6344322", "0.63341475", "0.63335264", "0.6328839", "0.6327978", "0.63165784", "0.63165784", "0.6305048", "0.6305048", "0.6305048", "0.6305048", "0.6299729", "0.6295363", "0.6274058", "0.62716347", "0.62605953", "0.6259617", "0.6255961", "0.625175", "0.6248908", "0.6248363", "0.6241765", "0.62345153", "0.62264603", "0.6216079", "0.6212601", "0.6192668", "0.6189441", "0.61878246", "0.61587423", "0.6151895", "0.61432725", "0.6133507", "0.6132342", "0.61303806", "0.6115232", "0.6106076", "0.6094145", "0.6094145", "0.60931665", "0.60717124", "0.60558707", "0.60552305", "0.60441786", "0.6042432", "0.6039126", "0.6029838", "0.6029838", "0.60260236" ]
0.0
-1
Array.prototype.find not available in IE.
function find(list, predicate) { for (var i = 0, length = list.length; i < length; i++) { if (predicate(list[i])) return list[i]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function find(arr, fn) {\n if (arr && 'length' in arr) {\n for (var i = 0, ii = arr.length; i < ii; i++) {\n var result = fn(arr[i], i);\n if (result) return result;\n }\n }\n\n return null;\n}", "function find() {}", "function find(arr, func) {\n return arr.find(function(item){\n \treturn func(item);\n });\n}", "function find(array, cb) {\r\n var index = findIndex(array, cb);\r\n if (index < 0) {\r\n return undefined;\r\n }\r\n return array[index];\r\n}", "function find(array, cb) {\r\n var index = findIndex(array, cb);\r\n if (index < 0) {\r\n return undefined;\r\n }\r\n return array[index];\r\n}", "function find(array, cb) {\n var index = findIndex(array, cb);\n if (index < 0) {\n return undefined;\n }\n return array[index];\n}", "function find(array, cb) {\n var index = findIndex(array, cb);\n if (index < 0) {\n return undefined;\n }\n return array[index];\n}", "function find(array, cb) {\n var index = findIndex(array, cb);\n if (index < 0) {\n return undefined;\n }\n return array[index];\n}", "function find(array, cb) {\n var index = findIndex(array, cb);\n if (index < 0) {\n return undefined;\n }\n return array[index];\n}", "function findElement(arr, func) {\n return arr.find(func);\n}", "function find(arr, iterator, thisObj){\n\t var idx = findIndex(arr, iterator, thisObj);\n\t return idx >= 0? arr[idx] : void(0);\n\t }", "function findBy(array, findFn) {\n for (var i = 0; i < array.length; i++) {\n if (findFn(array[i])) {\n return array[i];\n }\n }\n return null;\n}", "find(key) {\n throw new Error(\"This method hasn't been implemented yet!\");\n }", "function search(x, arr) {\n return null; \n}", "function find(array, predicate, thisArg) {\n if ( !Array.prototype.find) {\n // idx needs to be a Number, for..in returns string\n for (var idx = 0; idx < array.length; idx++) {\n if (predicate.call(thisArg, array[idx], idx, array)) {\n return array[idx];\n }\n }\n\n return;\n }\n\n return array.find(predicate, thisArg);\n}", "function find(array, predicate, thisArg) {\n if ( !Array.prototype.find) {\n // idx needs to be a Number, for..in returns string\n for (var idx = 0; idx < array.length; idx++) {\n if (predicate.call(thisArg, array[idx], idx, array)) {\n return array[idx];\n }\n }\n\n return;\n }\n\n return array.find(predicate, thisArg);\n}", "function find(array, value)\n{\n for(let ii = 0; ii < array.length; ii++)\n {\n if(array[ii].position == value)\n {\n return array[ii];\n }\n }\n\n return null;\n}", "function find(arrayLike, predicate) {\n var array = Array.isArray(arrayLike) ? arrayLike : toArray(arrayLike);\n var idx = findIndex(array, predicate);\n return idx === -1 ? undefined : array[idx];\n}", "function find(arrayLike, predicate) {\n var array = Array.isArray(arrayLike) ? arrayLike : toArray(arrayLike);\n var idx = findIndex(array, predicate);\n return idx === -1 ? undefined : array[idx];\n}", "function find(array, callback) {\n const index = findIndex(array, callback);\n\n if (index === -1) {\n return undefined;\n }\n\n return array[index];\n}", "function findElement(arr, func) {\r\n\tfor (var i in arr) {\r\n\t\tif (func(arr[i])) {\r\n\t\t\treturn arr[i];\r\n\t\t}\r\n\t}\r\n\treturn undefined;\r\n}", "function find(arrayLike, predicate) {\n var array = Array.isArray(arrayLike) ? arrayLike : toArray(arrayLike);\n var idx = findIndex(array, predicate);\n return idx === -1 ? undefined : array[idx];\n }", "function ArrayFind(predicate/*, thisArg*/) {\n /* Steps 1-2. */\n var O = ToObject(this);\n\n /* Steps 3-5. */\n var len = ToLength(O.length);\n\n /* Step 6. */\n if (arguments.length === 0)\n ThrowTypeError(JSMSG_MISSING_FUN_ARG, 0, \"Array.prototype.find\");\n if (!IsCallable(predicate))\n ThrowTypeError(JSMSG_NOT_FUNCTION, DecompileArg(0, predicate));\n\n /* Step 7. */\n var T = arguments.length > 1 ? arguments[1] : undefined;\n\n /* Steps 8-9. */\n /* Steps a (implicit), and g. */\n for (var k = 0; k < len; k++) {\n /* Steps a-c. */\n var kValue = O[k];\n /* Steps d-f. */\n if (callContentFunction(predicate, T, kValue, k, O))\n return kValue;\n }\n\n /* Step 10. */\n return undefined;\n}", "function find(arr, cb) {\n for (var i = 0; i < arr.length; i++) {\n if (cb(arr[i])) {\n return arr[i];\n }\n }\n}", "function find(arr, fn) {\n for (let e of arr) {\n if (fn(e)) {\n return e;\n }\n }\n}", "find(callback) {\r\n for (let i = 0; i < this.array.length; i++) {\r\n const item = this.array[i];\r\n if (callback(item)) return item;\r\n }\r\n }", "function find(arr, predicate) {\n const index = findIndex(arr, predicate);\n if (index === undefined) {\n return undefined;\n }\n return arr[index];\n}", "find(callback) {\n for (const ele of this.arr) {\n if (callback(ele)) {\n return ele;\n }\n }\n }", "find(predicate) {\n for (const element of this)\n if (predicate(element))\n return element;\n return undefined;\n }", "find() {\n\t\t// https://api.jquery.com/find/\n\t\tthrow new Error(\"NOT IMPLEMENTED\");\n\t}", "function findFunc(arr, findFn) {\r\n var temp;\r\n for (var i = 0; i < arr.length; i++) {\r\n if (findFn(arr[i], i, arr)) {\r\n temp = arr[i];\r\n break;\r\n }\r\n }\r\n return temp;\r\n}", "find(input) {}", "function find(array, test) {\n for (const obj of array) {\n if (test(obj)) return obj\n }\n}", "find(fn) {\n for(let val of this) {\n if(fn(val)) return val\n }\n return undefined\n }", "function find(array, predicate) {\n for (var i = 0, len = array.length; i < len; i++) {\n var value = array[i];\n if (predicate(value, i)) {\n return value;\n }\n }\n return undefined;\n }", "function find(arr, searchVal) {\n return arr.filter(function(val) {\n return val === searchVal;\n })[0];\n}", "function myFind(arr, cb) {\n for (let i = 0; i < arr.length; i++) {\n if (cb(arr[i], i, arr) === true) return arr[i]\n }\n return undefined\n}", "function find(array, criteriaFn) {\n let current = array\n let next = []\n while (current || current === 0) {\n if (criteriaFn(current)) {\n return current\n }\n if (Array.isArray(current)) {\n for (let i = 0; i < current.length; i++) {\n next.push(current[i])\n }\n }\n current = next.shift()\n }\n return null;\n}", "function find(ar, fun, extra) {\r\n\t\t\t\tvar res;\r\n\t\t\t\tres = _pivotfilter.call(ar, fun, extra);\r\n\t\t\t\treturn res.length > 0 ? res[0] : null;\r\n\t\t\t}", "function find(items, predicate) {\n if (items) {\n for (var i = 0; i < items.length; ++i) {\n if (predicate(items[i])) {\n return items[i]\n }\n }\n }\n return undefined\n}", "function find(array, matches) {\n var index = findIndex(array, matches);\n if (index !== -1) {\n return array[index];\n }\n}", "function findObjectById(id,arr)\n{\n\tfor(var i = 0; i < arr.length; i++)\n\t\tif(arr[i].id == id) return arr[i];\n\n\treturn false;\n}", "function find(collection, callback){\n\tif(Array.isArray(collection)){\n\t\tfor(var i = 0, result; i<collection.length; i++){\n\t\t\tif(callback(collection[i])){\n\t\t\t\treturn collection[i];\n\t\t\t\t//break;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor(var key in collection){\n\t\t\tif(callback(collection[key])){\n\t\t\t\treturn collection[key];\n\t\t\t\t//break;\n\t\t\t}\n\t\t}\n\t}\n\treturn undefined;\n}", "elementoById(id, array){\r\n return array.find((ele) => ele.getId() === id);\r\n }", "function find(arr, searchValue) {\n return arr.filter(function(val) {\n return val === searchValue;\n })\n [0];\n }", "function find(collection, predicate){\n if (!collection) return null;\n \n var ret = null;\n collection.forEach(function(element) {\n if (!ret && predicate(element)) {\n ret = element;\n }\n });\n return ret;\n }", "function fixIE() {\n if (!Array.indexOf) {\n Array.prototype.indexOf = function(arg) {\n var index = -1;\n for (var i = 0; i < this.length; i++){\n var value = this[i];\n if (value == arg) {\n index = i;\n break;\n } \n }\n return index;\n };\n }\n\n if (!window.console) {\n window.console = {};\n window.console.log = window.console.debug = function(message) {\n return;\n var body = document.getElementsByTagName('body')[0];\n var messageDiv = document.createElement('div');\n messageDiv.innerHTML = message;\n body.insertBefore(messageDiv, body.lastChild);\n };\n } \n}", "function find(arr, searchValue) {\n\treturn arr.filter(function(value){\n\t\treturn value === searchValue;\n\t})[0];\n}", "function find() {\n return function (arr, value) {\n var len = arr.length,\n i;\n for (i = 0; i < len; i += 1) {\n if (arr[i] === value) {\n return i;\n }\n }\n return -1;\n };\n }", "function find(items, predicate) {\n var value;\n\n for (var i = 0; i < items.length; i++) {\n value = items[i]; // inlined for performance: if (Call(predicate, thisArg, [value, i, list])) {\n\n if (predicate(value, i, items)) {\n return value;\n }\n }\n\n return undefined;\n}", "function find(items, predicate) {\n var value;\n\n for (var i = 0; i < items.length; i++) {\n value = items[i]; // inlined for performance: if (Call(predicate, thisArg, [value, i, list])) {\n\n if (predicate(value, i, items)) {\n return value;\n }\n }\n\n return undefined;\n}", "function find(arr, val){\n return arr.filter(curVal => curVal === val)[0];\n}", "function findById(a, id) {\n for (var i = 0; i < a.length; i++) {\n if (a[i].id == id) return a[i];\n }\n return null;\n }", "function find(array, pred) {\n for (var idx = 0, len = array.length; idx < len; idx++) {\n var item = array[idx];\n if (pred(item)) {\n return item;\n }\n }\n }", "function find(obj, predicate, context) {\n var keyFinder = isArrayLike(obj) ? findIndex : findKey;\n var key = keyFinder(obj, predicate, context);\n if (key !== void 0 && key !== -1) return obj[key];\n }", "function find(obj, predicate, context) {\n var keyFinder = isArrayLike(obj) ? findIndex : findKey;\n var key = keyFinder(obj, predicate, context);\n if (key !== void 0 && key !== -1) return obj[key];\n }", "function find(obj, predicate, context) {\n var keyFinder = isArrayLike(obj) ? findIndex : findKey;\n var key = keyFinder(obj, predicate, context);\n if (key !== void 0 && key !== -1) return obj[key];\n }", "function find(obj, predicate, context) {\n var keyFinder = isArrayLike(obj) ? findIndex : findKey;\n var key = keyFinder(obj, predicate, context);\n if (key !== void 0 && key !== -1) return obj[key];\n }", "function find(obj, predicate, context) {\n var keyFinder = isArrayLike(obj) ? findIndex : findKey;\n var key = keyFinder(obj, predicate, context);\n if (key !== void 0 && key !== -1) return obj[key];\n }", "function find(obj, predicate, context) {\n var keyFinder = isArrayLike(obj) ? findIndex : findKey;\n var key = keyFinder(obj, predicate, context);\n if (key !== void 0 && key !== -1) return obj[key];\n }", "function find(obj, predicate, context) {\n var keyFinder = isArrayLike(obj) ? findIndex : findKey;\n var key = keyFinder(obj, predicate, context);\n if (key !== void 0 && key !== -1) return obj[key];\n }", "function find(obj, predicate, context) {\n var keyFinder = isArrayLike(obj) ? findIndex : findKey;\n var key = keyFinder(obj, predicate, context);\n if (key !== void 0 && key !== -1) return obj[key];\n }", "function find(obj, predicate, context) {\n var keyFinder = isArrayLike(obj) ? findIndex : findKey;\n var key = keyFinder(obj, predicate, context);\n if (key !== void 0 && key !== -1) return obj[key];\n }", "function find(arr, func) {\n filterArr = arr.filter(func); //filter array with the function provided\n\n return filterArr[0]; //return the first element that returns true, or undefined if no elements return true\n}", "function findIfExist(array, toFind) {\n for (var index = 0; index < array.length; index++) {\n if (array[index] === toFind) return true;\n }\n return false;\n}", "function find(arr, searchValue) {\n return arr.filter(function (value) {\n return value === searchValue;\n })[0];\n}", "function find(collection, callback) {\n\t var result;\n\t exports.forEach(collection, function (item, i) {\n\t if (result)\n\t return;\n\t if (callback(item, i))\n\t result = item;\n\t });\n\t return result;\n\t}", "function find(collection, callback) {\n\t var result;\n\t exports.forEach(collection, function (item, i) {\n\t if (result)\n\t return;\n\t if (callback(item, i))\n\t result = item;\n\t });\n\t return result;\n\t}", "function find(arr, value) {\n for (let i = 0; i < arr.length; i++) {\n if (arr[i] === value) {\n return value;\n }\n }\n return -1;\n}", "function findObById(id, arr) {\n return lodash.find(arr, function(obj) { return obj.id == id });\n }", "function indexOf(arr, searchItem) {\n // code here\n}", "function indexOf(arr, searchItem) {\n // code here\n}", "function findElement(arr, func) {\n let arrAux = arr.filter(func)\n return arrAux.length > 0 ? arrAux[0] : undefined\n}", "function find(array, pred) {\n for (var idx = 0, len = array.length; idx < len; idx++) {\n var item = array[idx];\n if (pred(item)) {\n return item;\n }\n }\n}", "function find(array, pred) {\n for (var idx = 0, len = array.length; idx < len; idx++) {\n var item = array[idx];\n if (pred(item)) {\n return item;\n }\n }\n}", "function find(array, pred) {\n for (var idx = 0, len = array.length; idx < len; idx++) {\n var item = array[idx];\n if (pred(item)) {\n return item;\n }\n }\n}", "function find(array, pred) {\n for (var idx = 0, len = array.length; idx < len; idx++) {\n var item = array[idx];\n if (pred(item)) {\n return item;\n }\n }\n}", "function find(list, value) {\n var index = list.indexOf(value);\n return index == -1 ? undefined : list[index];\n}", "function find (arr, iterator, callback) {\n var done = false\n var pending = arr.length\n\n arr.forEach(function (item, i) {\n iterator(item, function (err, found) {\n --pending\n if (done) {\n return\n }\n if (err) {\n onError(err)\n }\n if (found) {\n onFind(item)\n }\n if (pending === 0) {\n callback(null, null)\n }\n })\n })\n\n function onFind (item) {\n done = true\n callback(null, item)\n }\n function onError (err) {\n done = true\n callback(err)\n }\n}", "function findElement(arr, func) {\n for (let i=0; i<arr.length; i++) {\n if(func(arr[i])) {\n return arr[i];\n }\n }\n return undefined;\n}", "function searchByID(array, id) {\n for (var i = 0; i < array.length; i++) {\n if (array[i].id == id)\n return array[i];\n }\n}", "function find(array, pred) {\n for (var idx = 0, len = array.length; idx < len; idx++) {\n var item = array[idx];\n if (pred(item)) {\n return item;\n }\n }\n }", "function find(array, pred) {\n for (var idx = 0, len = array.length; idx < len; idx++) {\n var item = array[idx];\n if (pred(item)) {\n return item;\n }\n }\n }", "function arrayfinder(ele, ind){\n\t\tif(ind.length === 0){\n\t\t\treturn ele;\n\t\t}\n\t\treturn arrayfinder(ele[buscar(ind.shift())], ind);\n\t}", "function findIndex(arr, val) {\n\n}", "function findIndex(array, find) {\n for (let element of array) {\n if(find(element)) {\n return array.indexOf(element);\n }\n }\n\n return -1;\n}", "function findElement(arr, func) {\n for (let value of arr) {\n if (func(value)) {\n return value;\n }\n }\n\n return;\n}", "function find(collection, callback) {\n var result;\n exports.forEach(collection, function (item, i) {\n if (result)\n return;\n if (callback(item, i))\n result = item;\n });\n return result;\n}", "function find(collection, callback) {\n var result;\n exports.forEach(collection, function (item, i) {\n if (result)\n return;\n if (callback(item, i))\n result = item;\n });\n return result;\n}", "function findBy(key, val) {\n\n /*\n * Implement of e6 Array::find()\n * @param list\n * @param callback\n * @returns {*}\n */\n function find(list, callback) {\n var results = [ ];\n\n angular.forEach(list, function (it, index) {\n var val = callback.apply(null, [it, index, list]);\n if (val) {\n results.push(val);\n }\n });\n\n return results.length ? results : null;\n }\n\n // Use iterator callback to matches element key value\n // NOTE: searches full prototype chain\n\n return find(_items, function (el) {\n return ( el[key] == val ) ? el : null;\n });\n\n }", "find(fn) {\n return this._pool.find(fn);\n }", "function findElement(arr, func) {\n \n var filtered = arr.filter(func);\n return filtered[0];\n }", "function find( value, array ){\n for(val of array) {\n if(value === val) {\n return true;\n }\n }\n return false;\n}", "function findElement(arr, func) {\n let i = 0;\n while( i < arr.length){\n if(func(arr[i])) return arr[i]\n i++\n }\n return undefined;\n}", "function contains(array, toFind) {\n return array.indexOf(toFind) >= 0;\n}", "function binaryFind(array, value, compare) {\n var index = lowerBound(array, value, compare);\n if (index === array.length) {\n return undefined;\n }\n var item = array[index];\n if (compare(item, value) !== 0) {\n return undefined;\n }\n return item;\n }", "function myFind(array, callback) {\n for(let i = 0; i < array.length; i++) {\n if (callback(array[i])) {\n return array[i];\n }\n }\n}", "function find(p, a){\r\n return listToMaybe(filter(p, a));\r\n}", "function findFirst(predicate, array) {\n const pred = checkedPredicate('findFirst', predicate ? predicate : all);\n for (const el of array) {\n if (pred(el)) {\n return el;\n }\n }\n return null;\n }", "_recursiveFindArray(array, cb) {\n asynk.each(array, (item, cb) => {\n if (Array.isArray(item)) {\n this._recursiveFindArray(item, cb);\n } else if (item instanceof Object) {\n this._recursiveFindObject(item, cb);\n } else {\n cb();\n }\n }).serie().asCallback(cb);\n }", "static findWhere() {\n let users = [\n { 'user': 'barney', 'active': true },\n { 'user': 'fred', 'active': false },\n { 'user': 'pebbles', 'active': false }\n ];\n\n console.log(_.find(users, { 'user': 'fred', 'active': false }));\n }" ]
[ "0.7007406", "0.6930815", "0.68127745", "0.6794149", "0.6794149", "0.67534524", "0.67534524", "0.67534524", "0.67534524", "0.67512274", "0.6723627", "0.67182636", "0.65673363", "0.653245", "0.65095145", "0.65095145", "0.6492026", "0.6474983", "0.6474983", "0.6427573", "0.6412459", "0.6361123", "0.6343709", "0.6319123", "0.6313676", "0.62906086", "0.6263363", "0.6262355", "0.6261476", "0.6243074", "0.6211896", "0.6200534", "0.6185426", "0.61091137", "0.6085323", "0.6069298", "0.60602486", "0.6049553", "0.60339564", "0.602422", "0.59990114", "0.59798574", "0.5970645", "0.5969273", "0.59594405", "0.59571886", "0.59502", "0.59478855", "0.5937948", "0.590401", "0.590401", "0.589513", "0.5880215", "0.5850874", "0.58501035", "0.58501035", "0.58501035", "0.58501035", "0.58501035", "0.58501035", "0.58501035", "0.58501035", "0.58501035", "0.5836799", "0.5823583", "0.5811229", "0.57960576", "0.57960576", "0.57941616", "0.5785454", "0.5784476", "0.5784476", "0.5767352", "0.5764325", "0.5764325", "0.5764325", "0.5764325", "0.5758488", "0.5752715", "0.5731902", "0.57248193", "0.5723869", "0.5723869", "0.5716802", "0.57146883", "0.57133883", "0.5705286", "0.5701178", "0.5701178", "0.56930935", "0.56777745", "0.5675126", "0.5665266", "0.56473285", "0.5645837", "0.56351763", "0.5632985", "0.563289", "0.562843", "0.562597", "0.5624215" ]
0.0
-1
An element is "untouchable" if it or one of its ancestors has `visibility: hidden` or `display: none`.
function UntouchabilityChecker(elementDocument) { this.doc = elementDocument; // Node cache must be refreshed on every check, in case // the content of the element has changed. The cache contains tuples // mapping nodes to their boolean result. this.cache = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function visible(element){var visibility=element.css(\"visibility\");while(visibility === \"inherit\") {element = element.parent();visibility = element.css(\"visibility\");}return visibility !== \"hidden\";}", "function visible(element){var visibility=element.css(\"visibility\");while(visibility===\"inherit\"){element=element.parent();visibility=element.css(\"visibility\");}return visibility!==\"hidden\";}", "function visible(element){var visibility=element.css(\"visibility\");while(visibility===\"inherit\"){element=element.parent();visibility=element.css(\"visibility\");}return visibility!==\"hidden\";}", "function visible(element){var visibility=element.css(\"visibility\");while(visibility===\"inherit\"){element=element.parent();visibility=element.css(\"visibility\");}return visibility!==\"hidden\";}", "function visible(element) {\r\n if(getComputedStyle(element).getPropertyValue(\"visibility\") == \"hidden\") {\r\n return false;\r\n } else {\r\n if(element.parentNode != document) {\r\n return visible(element.parentNode);\r\n } else {\r\n return true;\r\n }\r\n }\r\n}", "function isVisible(elem) {\n let element = elem;\n let visibility = element.css('visibility');\n while (visibility === 'inherit') {\n element = element.parent();\n visibility = element.css('visibility');\n }\n return visibility !== 'hidden';\n }", "isInvisibleElement(element){\n //If is textNode\n if ( element.nodeName == '#text' ) {\n element = element.parentElement;\n }\n\n var css = window.getComputedStyle(element),\n opacity = parseInt(css.opacity);\n\n //If is invisible element\n if ( opacity <= 0.5 || css.visibility == 'hidden' || css.fontSize == 0 ) {\n return true;\n }\n\n return false;\n }", "function _isVisible(el, t, r, b, l, w, h) {\n\n // Application.console.log(\"isVisible called\");\n\n var s1 = 0;\n var s2 = 0;\n var s3 = 0;\n var s4 = 0;\n\n var p = el.parentNode,\n VISIBLE_PADDING = 2;\n\n // if ( !_elementInDocument(el) ) {\n // Application.console.log(\"rejected in step1\");\n // return false; \n // }\n\n //-- Return true for document node\n if ( 9 === p.nodeType ) {\n return true;\n\n // Application.console.log(\"rejected in step 2\")\n }\n\n //-- Return false if our element is invisible\n if (\n '0' === _getStyle(el, 'opacity') ||\n 'none' === _getStyle(el, 'display') ||\n 'hidden' === _getStyle(el, 'visibility')\n ) {\n\n // Application.console.log(\"rejected in step 3\");\n return false;\n }\n\n if ( \n 'undefined' === typeof(t) ||\n 'undefined' === typeof(r) ||\n 'undefined' === typeof(b) ||\n 'undefined' === typeof(l) ||\n 'undefined' === typeof(w) ||\n 'undefined' === typeof(h)\n ) {\n t = el.offsetTop;\n l = el.offsetLeft;\n b = t + el.offsetHeight;\n r = l + el.offsetWidth;\n w = el.offsetWidth;\n h = el.offsetHeight;\n }\n //-- If we have a parent, let's continue:\n if ( p ) {\n //-- Check if the parent can hide its children.\n if ( ('hidden' === _getStyle(p, 'overflow') || 'scroll' === _getStyle(p, 'overflow')) ) {\n //-- Only check if the offset is different for the parent\n if (\n //-- If the target element is to the right of the parent elm\n l + VISIBLE_PADDING > p.offsetWidth + p.scrollLeft ||\n //-- If the target element is to the left of the parent elm\n l + w - VISIBLE_PADDING < p.scrollLeft ||\n //-- If the target element is under the parent elm\n t + VISIBLE_PADDING > p.offsetHeight + p.scrollTop ||\n //-- If the target element is above the parent elm\n t + h - VISIBLE_PADDING < p.scrollTop\n ) {\n //-- Our target element is out of bounds:\n // Application.console.log(\"rejected in step 4\")\n return false;\n\n s3++;\n }\n }\n //-- Add the offset parent's left/top coords to our element's offset:\n if ( el.offsetParent === p ) {\n l += p.offsetLeft;\n t += p.offsetTop;\n }\n //-- Let's recursively check upwards:\n return _isVisible(p, t, r, b, l, w, h);\n }\n return true;\n }", "function _isVisible(el, t, r, b, l, w, h) {\n var p = el.parentNode,\n VISIBLE_PADDING = 2;\n\n if ( !_elementInDocument(el) ) {\n return false;\n }\n\n //-- Return true for document node\n if ( 9 === p.nodeType ) {\n return true;\n }\n\n //-- Return false if our element is invisible\n if (\n '0' === _getStyle(el, 'opacity') ||\n 'none' === _getStyle(el, 'display') ||\n 'hidden' === _getStyle(el, 'visibility')\n ) {\n return false;\n }\n \n if ( \n 'undefined' === typeof(t) ||\n 'undefined' === typeof(r) ||\n 'undefined' === typeof(b) ||\n 'undefined' === typeof(l) ||\n 'undefined' === typeof(w) ||\n 'undefined' === typeof(h)\n ) {\n t = el.offsetTop;\n l = el.offsetLeft;\n b = t + el.offsetHeight;\n r = l + el.offsetWidth;\n w = el.offsetWidth;\n h = el.offsetHeight;\n }\n //-- If we have a parent, let's continue:\n if ( p ) {\n //-- Check if the parent can hide its children.\n if ( ('hidden' === _getStyle(p, 'overflow') || 'scroll' === _getStyle(p, 'overflow')) ) {\n //-- Only check if the offset is different for the parent\n if (\n //-- If the target element is to the right of the parent elm\n l + VISIBLE_PADDING > p.offsetWidth + p.scrollLeft ||\n //-- If the target element is to the left of the parent elm\n l + w - VISIBLE_PADDING < p.scrollLeft ||\n //-- If the target element is under the parent elm\n t + VISIBLE_PADDING > p.offsetHeight + p.scrollTop ||\n //-- If the target element is above the parent elm\n t + h - VISIBLE_PADDING < p.scrollTop\n ) {\n //-- Our target element is out of bounds:\n return false;\n }\n }\n //-- Add the offset parent's left/top coords to our element's offset:\n if ( el.offsetParent === p ) {\n l += p.offsetLeft;\n t += p.offsetTop;\n }\n //-- Let's recursively check upwards:\n return _isVisible(p, t, r, b, l, w, h);\n }\n return true;\n }", "function isVisible(el) {\n if (el == document) {\n return true;\n }\n if (!el) {\n return false;\n }\n if (!el.parentNode) {\n return false;\n }\n if (el.style) {\n if (el.style.display == 'none') {\n return false;\n }\n if (el.style.visibility == 'hidden') {\n return false;\n }\n }\n return isVisible(el.parentNode);\n}", "function visible(element) {\n var visibility = element.css('visibility');\n while (visibility === 'inherit') {\n element = element.parent();\n visibility = element.css('visibility');\n }\n return visibility !== 'hidden';\n }", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}", "function isVisible (o) {\n\tif (o === null || !(o instanceof Element)) {\n\t\treturn true;\n\t}\n\tlet style = window.getComputedStyle (o);\n\tif ('parentNode' in o) {\n\t\treturn style.display !== 'none' && isVisible (o.parentNode);\n\t} else {\n\t\treturn style.display !== 'none';\n\t}\n}", "isVisible(element) {\n return hasGeometry(element) && getComputedStyle(element).visibility === 'visible';\n }", "function isHidden(element) {\n if (false) {}\n return !element || element.offsetParent === null;\n}", "function isStyleVisible(element) {\r\n if (!(element instanceof HTMLElement) && !(element instanceof SVGElement)) {\r\n return false;\r\n }\r\n var _a = getComputedStyle(element), display = _a.display, visibility = _a.visibility, opacity = _a.opacity;\r\n return (display !== 'none' &&\r\n visibility !== 'hidden' &&\r\n visibility !== 'collapse' &&\r\n opacity !== '0');\r\n}", "function isHidden(element) {\n if (\"development\" === 'test') {\n return false;\n }\n\n return !element || element.offsetParent === null;\n}", "function isVisible(elem) {\n if (!(elem instanceof Element)) throw Error('DomUtil: elem is not an element.');\n var style = getComputedStyle(elem);\n var rect = elem.getBoundingClientRect();\n if (style.display === 'none') return false;\n if (style.visibility !== 'visible') return false;\n if (parseFloat(style.opacity) < 0.1) return false;\n if (elem.offsetWidth + elem.offsetHeight + rect.height + rect.width === 0) {\n return false;\n }\n return true;\n }", "function isHidden(element) {\n if (false) {\n }\n\n return !element || element.offsetParent === null;\n }", "function isHidden(element) {\n return !element || element.offsetParent === null || element.hidden;\n}", "function isHidden(element) {\n if (false) {}\n\n return !element || element.offsetParent === null;\n}", "function isHidden(element) {\n if (false) {}\n\n return !element || element.offsetParent === null;\n}", "function isHidden(element) {\n if (false) {}\n\n return !element || element.offsetParent === null;\n}", "function isHidden(element) {\n if (false) {}\n\n return !element || element.offsetParent === null;\n}", "function isHidden(element) {\n if (false) {}\n\n return !element || element.offsetParent === null;\n}", "function isHidden(element) {\n if (false) {}\n\n return !element || element.offsetParent === null;\n}", "function isHidden(element) {\n if (false) {}\n\n return !element || element.offsetParent === null;\n}", "function isHidden(element) {\n if (false) {}\n\n return !element || element.offsetParent === null;\n}", "function isHidden(element) {\n if (false) {}\n\n return !element || element.offsetParent === null;\n}", "function isHidden(element) {\n if (false) {}\n\n return !element || element.offsetParent === null;\n}", "function isHidden(element) {\n if (false) {}\n\n return !element || element.offsetParent === null;\n}", "function isElementHidden(element) {\n if (element.style.display == \"none\") {\n return true;\n }\n\n return false;\n}", "async function tangible(node) {\n return (\n // exists\n !!node &&\n // is visible\n node.evaluate(node => {\n for (let anc = node; anc instanceof Element; anc = anc.parentNode) {\n const styles = getComputedStyle(anc);\n if (\n styles.opacity === \"0\" ||\n styles.display === \"none\" ||\n styles.visibility === \"hidden\"\n ) {\n return false;\n }\n }\n return true;\n })\n );\n}", "function isHidden(element) {\n return (element.offsetParent === null);\n}", "function isHidden(element) {\n if (process.env.NODE_ENV === 'test') {\n return false;\n }\n\n return !element || element.offsetParent === null || element.hidden;\n}", "function isHidden(element) {\n if (process.env.NODE_ENV === 'test') {\n return false;\n }\n\n return !element || element.offsetParent === null || element.hidden;\n}", "function isHidden(element) {\n if (false) {\n return false;\n }\n\n return !element || element.offsetParent === null;\n}", "function shouldPreviewElemBeHidden($elem) {\n var thisVisibility = $elem.attr('data-visibility');\n var parentVisibility = $elem.attr('data-parent-visibility');\n return thisVisibility === 'hidden' || thisVisibility === 'unset' && parentVisibility === 'hidden';\n}", "get visible(){ return this.filter(_elementIsVisible); }", "function isHidden(element) {\n if (false) {}\n\n return !element || element.offsetParent === null || element.hidden;\n}", "function isHidden(element) {\n if (false) {}\n\n return !element || element.offsetParent === null || element.hidden;\n}", "function inAccessibilityTree(node) {\n return !isAriaHidden(node) && !isPresentation(node);\n}", "function isHidden(el) {\n var style = window.getComputedStyle(el);\n return ((style.display === 'none') || (style.visibility === 'hidden'))\n}", "function isHidden(element) {\n let style = window.getComputedStyle(element);\n return ((style.display === \"none\") || (style.visibility === \"hidden\"))\n}", "function isHidden(el) {\n return el.offsetParent === null;\n}", "function isVisible(e) {\n\tif (e == null) return false;\n\treturn !!(e.offsetWidth || e.offsetHeight || e.getClientRects().length);\n}", "isVisible(element) {\n return hasGeometry(element) && getComputedStyle(element).visibility === 'visible';\n }", "isVisible(element) {\n return hasGeometry(element) && getComputedStyle(element).visibility === 'visible';\n }", "isVisible(element) {\n return hasGeometry(element) && getComputedStyle(element).visibility === 'visible';\n }", "isPartiallyVisible() {\n\t\treturn !this.isVisible() && !this.isHidden();\n\t}", "function isVisibleChild(value) {\n\treturn !isBoolean(value) && value != null;\n}", "function visible( element ) {\n\t\t// check if one of the parents (until it's position parent) is invisible\n\t\t// prevent that elements in static area are always checked as invisible\n\t\t\n\t\t// list all items until the offsetParent item (with jQuery >1.6 you can use parentsUntil)\n\t\tvar oOffsetParent = jQuery(element).offsetParent();\n\t\tvar bOffsetParentFound = false;\n\t\tvar $refs = jQuery(element).parents().filter(function() {\n\t\t\tif (this === oOffsetParent) {\n\t\t\t\tbOffsetParentFound = true;\n\t\t\t}\n\t\t\treturn bOffsetParentFound;\n\t\t});\n\t\t\n\t\t// check for at least one item to be visible\n\t\treturn !jQuery(element).add($refs).filter(function() {\n\t\t\treturn jQuery.css( this, \"visibility\" ) === \"hidden\" || jQuery.expr.filters.hidden( this );\n\t\t}).length;\n\t}", "function IsElementVisible(element)\n{\n var isVisible = true;\n \n if (element)\n {\n while(element.parentNode)\n {\n if (element.style && element.style.display && element.style.display == 'none')\n {\n isVisible = false;\n break;\n } \n\t element = element.parentNode;\t \n\t }\n } \n\treturn isVisible;\n}", "_hideNonDialogContentFromAssistiveTechnology() {\n const overlayContainer = this._overlayContainer.getContainerElement();\n // Ensure that the overlay container is attached to the DOM.\n if (overlayContainer.parentElement) {\n const siblings = overlayContainer.parentElement.children;\n for (let i = siblings.length - 1; i > -1; i--) {\n let sibling = siblings[i];\n if (sibling !== overlayContainer &&\n sibling.nodeName !== 'SCRIPT' &&\n sibling.nodeName !== 'STYLE' &&\n !sibling.hasAttribute('aria-live')) {\n this._ariaHiddenElements.set(sibling, sibling.getAttribute('aria-hidden'));\n sibling.setAttribute('aria-hidden', 'true');\n }\n }\n }\n }", "function isVisible(elem) {\n return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );\n}", "function isVisible(element){\n\treturn ((element.offsetWidth > 0) && (element.offsetHeight > 0));\n}", "function isVisible(element, value) {\n if (!element.offsetParent && element.offsetWidth === 0 && element.offsetHeight === 0) {\n return (false)\n } else {\n return (true);\n }\n }", "_hideNonDialogContentFromAssistiveTechnology() {\n const overlayContainer = this._overlayContainer.getContainerElement();\n // Ensure that the overlay container is attached to the DOM.\n if (overlayContainer.parentElement) {\n const siblings = overlayContainer.parentElement.children;\n for (let i = siblings.length - 1; i > -1; i--) {\n const sibling = siblings[i];\n if (sibling !== overlayContainer &&\n sibling.nodeName !== 'SCRIPT' &&\n sibling.nodeName !== 'STYLE' &&\n !sibling.hasAttribute('aria-live')) {\n this._ariaHiddenElements.set(sibling, sibling.getAttribute('aria-hidden'));\n sibling.setAttribute('aria-hidden', 'true');\n }\n }\n }\n }", "function showElemnt(){\n articleElem.classList.remove(\"elementIsNotVisible\")\n articleElem2.classList.remove(\"elementIsNotVisible\")\n console.log(\"visible\");\n}", "function isElementVisible(element) {\r\n // If the element is not valid, return false.\r\n if (!element || !element.getAttribute) {\r\n return false;\r\n }\r\n var visibilityAttribute = element.getAttribute(IS_VISIBLE_ATTRIBUTE);\r\n // If the element is explicitly marked with the visibility attribute, return that value as boolean.\r\n if (visibilityAttribute !== null && visibilityAttribute !== undefined) {\r\n return visibilityAttribute === 'true';\r\n }\r\n // Fallback to other methods of determining actual visibility.\r\n return (element.offsetHeight !== 0 ||\r\n element.offsetParent !== null ||\r\n // tslint:disable-next-line:no-any\r\n element.isVisible === true); // used as a workaround for testing.\r\n}", "function isElementVisible(element) {\r\n // If the element is not valid, return false.\r\n if (!element || !element.getAttribute) {\r\n return false;\r\n }\r\n var visibilityAttribute = element.getAttribute(IS_VISIBLE_ATTRIBUTE);\r\n // If the element is explicitly marked with the visibility attribute, return that value as boolean.\r\n if (visibilityAttribute !== null && visibilityAttribute !== undefined) {\r\n return visibilityAttribute === 'true';\r\n }\r\n // Fallback to other methods of determining actual visibility.\r\n return (element.offsetHeight !== 0 ||\r\n element.offsetParent !== null ||\r\n // tslint:disable-next-line:no-any\r\n element.isVisible === true); // used as a workaround for testing.\r\n}", "function checkVisible()\n{\n\tcheckElementRunThough(\"slide-card\");\n\tcheckElementRunThough(\"cardSec\");\n}", "function checkVisibility(oElement, componentId, impressionType) {\n try {\n if ($.prototype.bElementIsViewedByUser(oElement)) {\n clearInterval(recommendationaddon.oIntervalIds[oElement.attr(\"id\")]);\n captureImpression(oElement, componentId, impressionType);\n }\n } catch (e) {\n clearInterval(recommendationaddon.oIntervalIds[oElement.attr(\"id\")]);\n }\n }", "function isElementVisible(element) {\n // If the element is not valid, return false.\n if (!element || !element.getAttribute) {\n return false;\n }\n var visibilityAttribute = element.getAttribute(IS_VISIBLE_ATTRIBUTE);\n // If the element is explicitly marked with the visibility attribute, return that value as boolean.\n if (visibilityAttribute !== null && visibilityAttribute !== undefined) {\n return visibilityAttribute === 'true';\n }\n // Fallback to other methods of determining actual visibility.\n return (element.offsetHeight !== 0 ||\n element.offsetParent !== null ||\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n element.isVisible === true); // used as a workaround for testing.\n}", "function isElementVisible(element) {\n // If the element is not valid, return false.\n if (!element || !element.getAttribute) {\n return false;\n }\n var visibilityAttribute = element.getAttribute(IS_VISIBLE_ATTRIBUTE);\n // If the element is explicitly marked with the visibility attribute, return that value as boolean.\n if (visibilityAttribute !== null && visibilityAttribute !== undefined) {\n return visibilityAttribute === 'true';\n }\n // Fallback to other methods of determining actual visibility.\n return (element.offsetHeight !== 0 ||\n element.offsetParent !== null ||\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n element.isVisible === true); // used as a workaround for testing.\n}", "function checkVisible(elm) {\n var rect = elm.getBoundingClientRect();\n var viewHeight = Math.max(document.documentElement.clientHeight, window.innerHeight);\n return !(rect.bottom < 0 || rect.top + 20 - viewHeight >= 0);\n}", "function visible(element) {\n let $el = Ember.$(element);\n return Ember.$.expr.filters.visible(element) && !Ember.$($el, $el.parents()).filter(function () {\n return Ember.$.css(this, \"visibility\") === \"hidden\";\n }).length;\n }", "function isVisible( $el ) {\n\t\t\t\t// If has visibility : hidden or display : none, or opacity : 0 -> return false ( not visible )\n\t\t\t\tif( $el.css( 'visibility') === 'hidden' || $el.css( 'display' ) === 'none' || $el.css( 'opacity' ) === '0' ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}", "static isHidden()\n {\n return document.visibilityState === \"hidden\";\n }", "function plugin_hidden_isHidden(elem){\n return jQuery(elem.parentNode).children('div.hiddenBody')[0].style.display === \"none\";\n}", "function xHide(e){return xVisibility(e,0);}", "function isElementVisible(element) {\n // If the element is not valid, return false.\n if (!element || !element.getAttribute) {\n return false;\n }\n var visibilityAttribute = element.getAttribute(IS_VISIBLE_ATTRIBUTE);\n // If the element is explicitly marked with the visibility attribute, return that value as boolean.\n if (visibilityAttribute !== null && visibilityAttribute !== undefined) {\n return visibilityAttribute === 'true';\n }\n // Fallback to other methods of determining actual visibility.\n return (element.offsetHeight !== 0 ||\n element.offsetParent !== null ||\n // tslint:disable-next-line:no-any\n element.isVisible === true); // used as a workaround for testing.\n}", "function isElementVisible(element) {\n // If the element is not valid, return false.\n if (!element || !element.getAttribute) {\n return false;\n }\n var visibilityAttribute = element.getAttribute(IS_VISIBLE_ATTRIBUTE);\n // If the element is explicitly marked with the visibility attribute, return that value as boolean.\n if (visibilityAttribute !== null && visibilityAttribute !== undefined) {\n return visibilityAttribute === 'true';\n }\n // Fallback to other methods of determining actual visibility.\n return (element.offsetHeight !== 0 ||\n element.offsetParent !== null ||\n // tslint:disable-next-line:no-any\n element.isVisible === true); // used as a workaround for testing.\n}", "function visible(e){return a.a.expr.filters.visible(e)&&!a()(e).parents().addBack().filter(function(){return\"hidden\"===a.a.css(this,\"visibility\")}).length}", "get _isVisible(){return!!(this.offsetWidth||this.offsetHeight)}", "function f$7(e){return !!r$s(e)&&!e.visible}", "function xVisibility(e, bShow)\r\n{\r\n if(!(e=xGetElementById(e))) return null;\r\n if(e.style && xDef(e.style.visibility)) {\r\n if (xDef(bShow)) e.style.visibility = bShow ? 'visible' : 'hidden';\r\n return e.style.visibility;\r\n }\r\n return null;\r\n}", "function overbox(){\n\tvar node=this.parentNode.children;\n\tvar reqnode=node[0];\n\tconsole.log(reqnode.style.visibility);\n\n\t//IT HAD AN ISSUE WITH TWO CLICKS TRIGGERING\n\n\tif((!(reqnode.style.visibility) || reqnode.style.visibility==\"hidden\")&& reqnode.style.opacity==0){\n\t\treqnode.style.visibility=\"visible\";\n\t\tanimateopacity(reqnode);\n\t\tconsole.log(reqnode.style.visibility);\n\t}\n\telse if(reqnode.style.opacity==1){\n\t\t//reqnode.style.visibility=\"hidden\";\n\t\tdeanimateopacity(reqnode);\n\t\t//setTimeout(function(){reqnode.style.visibility= \"hidden\";\n\t\t\t\t\t\t\t//this.children[0].style.opacity=0;\n\t\t\t\t\t\t//},1000);\n\t\tconsole.log(reqnode.style.visibility);\n\t}\n}", "function isNotVisible(visible) {\n\tif (visible == false) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "function hideElement(element) {\n element.css('visibility', 'hidden');\n}", "function isHidden(node) {\n return !node || node.offsetParent === null;\n}", "function isHidden(node) {\n return !node || node.offsetParent === null;\n}", "async waitForElementNotVisible (selector) {\n debug('waitForElementNotVisible', selector)\n var waitFor = this.wait.bind(this)\n var findElement = this.findElement.bind(this)\n return new Promise(async resolve => {\n var isHidden = await waitFor(async () => {\n var el = await findElement(selector)\n return !el || !await el.isVisible()\n })\n resolve(isHidden)\n })\n }" ]
[ "0.69815546", "0.6885399", "0.6885399", "0.6885399", "0.65720654", "0.6529043", "0.6451936", "0.64429814", "0.64204997", "0.6404728", "0.63581306", "0.6331091", "0.6331091", "0.6331091", "0.6331091", "0.6331091", "0.6331091", "0.6331091", "0.6331091", "0.6331091", "0.6331091", "0.6331091", "0.6331091", "0.6331091", "0.6331091", "0.6331091", "0.6331091", "0.6331091", "0.6331091", "0.6331091", "0.6297708", "0.6281505", "0.6201758", "0.61920017", "0.6188792", "0.6186226", "0.6175645", "0.6171995", "0.615505", "0.615505", "0.615505", "0.615505", "0.615505", "0.615505", "0.615505", "0.615505", "0.615505", "0.615505", "0.615505", "0.61538047", "0.6152115", "0.6140673", "0.6118469", "0.6118469", "0.6110877", "0.6108345", "0.6104984", "0.61038184", "0.61038184", "0.609519", "0.60929835", "0.606277", "0.6062768", "0.60484177", "0.6022229", "0.6022229", "0.6022229", "0.602135", "0.59955007", "0.59537286", "0.59523404", "0.5949554", "0.59479004", "0.5944877", "0.5941923", "0.5938482", "0.5909809", "0.58926296", "0.58926296", "0.58918905", "0.5874901", "0.58654296", "0.58654296", "0.5857835", "0.5849576", "0.583775", "0.58337504", "0.5828788", "0.58285904", "0.5820865", "0.5820865", "0.58024514", "0.5790354", "0.5773543", "0.5772191", "0.57686025", "0.57632875", "0.5757506", "0.5754315", "0.5754315", "0.5736301" ]
0.0
-1
Given a string or object, convert that input to RGB Possible string inputs: "red" "f00" or "f00" "ff0000" or "ff0000" "ff000000" or "ff000000" "rgb 255 0 0" or "rgb (255, 0, 0)" "rgb 1.0 0 0" or "rgb (1, 0, 0)" "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1" "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1" "hsl(0, 100%, 50%)" or "hsl 0 100% 50%" "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1" "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
function inputToRGB(color) { var rgb = { r: 0, g: 0, b: 0 }; var a = 1; var s = null; var v = null; var l = null; var ok = false; var format = false; if (typeof color == "string") { color = stringInputToObject(color); } if (typeof color == "object") { if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) { rgb = rgbToRgb(color.r, color.g, color.b); ok = true; format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb"; } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) { s = convertToPercentage(color.s); v = convertToPercentage(color.v); rgb = hsvToRgb(color.h, s, v); ok = true; format = "hsv"; } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) { s = convertToPercentage(color.s); l = convertToPercentage(color.l); rgb = hslToRgb(color.h, s, l); ok = true; format = "hsl"; } if (color.hasOwnProperty("a")) { a = color.a; } } a = boundAlpha(a); return { ok: ok, format: color.format || format, r: mathMin(255, mathMax(rgb.r, 0)), g: mathMin(255, mathMax(rgb.g, 0)), b: mathMin(255, mathMax(rgb.b, 0)), a: a }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stringToRGB (theString) {\r // we assume a comma separated string, just because of course...\r var tmp = theString.split(\",\");\r var r = tmp[0]? tmp[0]:0;\r var g = tmp[1]? tmp[1]:0;\r var b = tmp[2]? tmp[2]:0;\r return [r/255,g/255,b/255];\r}", "function stringToRGB (theString) {\r // we assume a comma separated string, just because of course...\r var tmp = theString.split(\",\");\r var r = tmp[0]? tmp[0]:0;\r var g = tmp[1]? tmp[1]:0;\r var b = tmp[2]? tmp[2]:0;\r return [r/255,g/255,b/255];\r}", "function parseRGB(str) {\n var c = str.match(/[\\d\\.]+/g);\n\n return {\n \"r\": +c[0],\n \"g\": +c[1],\n \"b\": +c[2],\n \"a\": +c[3] || 1\n };\n }", "function stringToRGB(color: Color) {\n const tuple = color\n .substring(4, color.length - 1)\n .replace(/ /g, '')\n .split(',');\n\n const r = parseInt(tuple[0], 10);\n const g = parseInt(tuple[1], 10);\n const b = parseInt(tuple[2], 10);\n\n return { r, g, b };\n}", "function parseColor(str) {\n var color = {\n \"r\": 0,\n \"g\": 0,\n \"b\": 0,\n \"a\": 1\n };\n \n if (str.match(/#/)) {\n color = parseHex(str);\n }\n else if (str.match(/rgb/)) {\n color = parseRGB(str);\n }\n else if (str.match(/hsl/)) {\n color = parseHSL(str);\n }\n\n return color;\n }", "function parseRgb(string, obj) {\n var values = string.replace(/[^\\d,.]/g, '');\n var rgba = values.split(',');\n\n rgba[0] = keepWithin(parseInt(rgba[0], 10), 0, 255);\n rgba[1] = keepWithin(parseInt(rgba[1], 10), 0, 255);\n rgba[2] = keepWithin(parseInt(rgba[2], 10), 0, 255);\n if(rgba[3]) {\n rgba[3] = keepWithin(parseFloat(rgba[3], 10), 0, 1);\n }\n\n // Return RGBA object\n if( obj ) {\n if (rgba[3]) {\n return {\n r: rgba[0],\n g: rgba[1],\n b: rgba[2],\n a: rgba[3]\n };\n } else {\n return {\n r: rgba[0],\n g: rgba[1],\n b: rgba[2]\n };\n }\n }\n\n // Return RGBA string\n if(typeof(rgba[3]) !== 'undefined' && rgba[3] <= 1) {\n return 'rgba(' + rgba[0] + ', ' + rgba[1] + ', ' + rgba[2] + ', ' + rgba[3] + ')';\n } else {\n return 'rgb(' + rgba[0] + ', ' + rgba[1] + ', ' + rgba[2] + ')';\n }\n\n }", "function parseRgb(string, obj) {\r\n var values = string.replace(/[^\\d,.]/g, '');\r\n var rgba = values.split(',');\r\n\r\n rgba[0] = keepWithin(parseInt(rgba[0], 10), 0, 255);\r\n rgba[1] = keepWithin(parseInt(rgba[1], 10), 0, 255);\r\n rgba[2] = keepWithin(parseInt(rgba[2], 10), 0, 255);\r\n if(rgba[3]) {\r\n rgba[3] = keepWithin(parseFloat(rgba[3], 10), 0, 1);\r\n }\r\n\r\n // Return RGBA object\r\n if( obj ) {\r\n if (rgba[3]) {\r\n return {\r\n r: rgba[0],\r\n g: rgba[1],\r\n b: rgba[2],\r\n a: rgba[3]\r\n };\r\n } else {\r\n return {\r\n r: rgba[0],\r\n g: rgba[1],\r\n b: rgba[2]\r\n };\r\n }\r\n }\r\n\r\n // Return RGBA string\r\n if(typeof(rgba[3]) !== 'undefined' && rgba[3] <= 1) {\r\n return 'rgba(' + rgba[0] + ', ' + rgba[1] + ', ' + rgba[2] + ', ' + rgba[3] + ')';\r\n } else {\r\n return 'rgb(' + rgba[0] + ', ' + rgba[1] + ', ' + rgba[2] + ')';\r\n }\r\n\r\n }", "function stringToColor(value) {\n\t value = value.toLowerCase();\n\t // Test keywords\n\t if (colorKeywords.baseColorKeywords[value] !== void 0) {\n\t return valueToKeyword(colorKeywords.baseColorKeywords[value]);\n\t }\n\t if (colorKeywords.extendedColorKeywords[value] !== void 0) {\n\t return valueToKeyword(colorKeywords.extendedColorKeywords[value]);\n\t }\n\t // Test for function\n\t if (value.indexOf('(') === -1) {\n\t // Not a function: test hex string\n\t return hexToColor(value);\n\t }\n\t // Remove whitespace\n\t value = value.replace(/\\s+/g, '');\n\t if (value.slice(-1) !== ')') {\n\t return null;\n\t }\n\t // Remove ')' at the end\n\t value = value.slice(0, value.length - 1);\n\t // Split by '('\n\t const parts = value.split('(');\n\t if (parts.length !== 2 || /[^\\d.,%-]/.test(parts[1])) {\n\t return null;\n\t }\n\t const keyword = parts[0];\n\t const colors = parts[1].split(',');\n\t if (colors.length !== 3 && colors.length !== 4) {\n\t return null;\n\t }\n\t let alpha = 1;\n\t // Get alpha\n\t if (colors.length === 4) {\n\t // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t const lastItem = colors.pop();\n\t alpha = parseFloat(lastItem) * (lastItem.slice(-1) === '%' ? 0.01 : 1);\n\t if (isNaN(alpha)) {\n\t return null;\n\t }\n\t alpha = alpha < 0 ? 0 : alpha > 1 ? 1 : alpha;\n\t }\n\t // Parse\n\t let color1; // red or hue\n\t let color2; // green or saturation\n\t let color3; // blue or lightness\n\t let isPercentages;\n\t let multiplier;\n\t switch (keyword) {\n\t case 'rgb':\n\t case 'rgba':\n\t // Either all or no components can be percentages\n\t isPercentages = colors[0].slice(-1) === '%';\n\t if ((colors[1].slice(-1) === '%') !== isPercentages ||\n\t (colors[2].slice(-1) === '%') !== isPercentages) {\n\t return null;\n\t }\n\t // Convert to numbers and normalize colors\n\t multiplier = isPercentages ? 2.55 : 1;\n\t color1 = parseFloat(colors[0]) * multiplier;\n\t color2 = parseFloat(colors[1]) * multiplier;\n\t color3 = parseFloat(colors[2]) * multiplier;\n\t return {\n\t r: isNaN(color1) || color1 < 0\n\t ? 0\n\t : color1 > 255\n\t ? 255\n\t : color1,\n\t g: isNaN(color2) || color2 < 0\n\t ? 0\n\t : color2 > 255\n\t ? 255\n\t : color2,\n\t b: isNaN(color3) || color3 < 0\n\t ? 0\n\t : color3 > 255\n\t ? 255\n\t : color3,\n\t a: alpha,\n\t };\n\t case 'hsl':\n\t case 'hsla':\n\t if (colors[0].indexOf('%') !== -1 ||\n\t colors[1].slice(-1) !== '%' ||\n\t colors[2].slice(-1) !== '%') {\n\t // Hue cannot be percentage, saturation and lightness must be percentage\n\t return null;\n\t }\n\t // Convert to numbers and normalize colors\n\t color1 = parseFloat(colors[0]);\n\t color2 = parseFloat(colors[1]);\n\t color3 = parseFloat(colors[2]);\n\t return {\n\t h: isNaN(color1)\n\t ? 0\n\t : color1 < 0\n\t ? (color1 % 360) + 360\n\t : color1 >= 360\n\t ? color1 % 360\n\t : color1,\n\t s: isNaN(color2) || color2 < 0\n\t ? 0\n\t : color2 > 100\n\t ? 100\n\t : color2,\n\t l: isNaN(color3) || color3 < 0\n\t ? 0\n\t : color3 > 100\n\t ? 100\n\t : color3,\n\t a: alpha,\n\t };\n\t }\n\t return null;\n\t}", "function inputToRGB(color) {\n\n var rgb = { r: 0, g: 0, b: 0 };\n var a = 1;\n var ok = false;\n var format = false;\n\n if (typeof color == \"string\") {\n color = stringInputToObject(color);\n }\n\n if (typeof color == \"object\") {\n if (color.hasOwnProperty(\"r\") && color.hasOwnProperty(\"g\") && color.hasOwnProperty(\"b\")) {\n rgb = rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = \"rgb\";\n }\n else if (color.hasOwnProperty(\"h\") && color.hasOwnProperty(\"s\") && color.hasOwnProperty(\"v\")) {\n rgb = hsvToRgb(color.h, color.s, color.v);\n ok = true;\n format = \"hsv\";\n }\n else if (color.hasOwnProperty(\"h\") && color.hasOwnProperty(\"s\") && color.hasOwnProperty(\"l\")) {\n rgb = hslToRgb(color.h, color.s, color.l);\n ok = true;\n format = \"hsl\";\n }\n\n if (color.hasOwnProperty(\"a\")) {\n a = color.a;\n }\n }\n\n rgb.r = mathMin(255, mathMax(rgb.r, 0));\n rgb.g = mathMin(255, mathMax(rgb.g, 0));\n rgb.b = mathMin(255, mathMax(rgb.b, 0));\n\n\n // Don't let the range of [0,255] come back in [0,1].\n // Potentially lose a little bit of precision here, but will fix issues where\n // .5 gets interpreted as half of the total, instead of half of 1.\n // If it was supposed to be 128, this was already taken care of in the conversion function\n if (rgb.r < 1) { rgb.r = mathRound(rgb.r); }\n if (rgb.g < 1) { rgb.g = mathRound(rgb.g); }\n if (rgb.b < 1) { rgb.b = mathRound(rgb.b); }\n\n return {\n ok: ok,\n format: (color && color.format) || format,\n r: rgb.r,\n g: rgb.g,\n b: rgb.b,\n a: a\n };\n }", "function inputToRGB(color) {\n var rgb = {\n r: 0,\n g: 0,\n b: 0\n };\n var a = 1;\n var s = null;\n var v = null;\n var l = null;\n var ok = false;\n var format = false;\n\n if (typeof color == \"string\") {\n color = stringInputToObject(color);\n }\n\n if (typeof color == \"object\") {\n if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {\n rgb = rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === \"%\" ? \"prgb\" : \"rgb\";\n } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {\n s = convertToPercentage(color.s);\n v = convertToPercentage(color.v);\n rgb = hsvToRgb(color.h, s, v);\n ok = true;\n format = \"hsv\";\n } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {\n s = convertToPercentage(color.s);\n l = convertToPercentage(color.l);\n rgb = hslToRgb(color.h, s, l);\n ok = true;\n format = \"hsl\";\n }\n\n if (color.hasOwnProperty(\"a\")) {\n a = color.a;\n }\n }\n\n a = boundAlpha(a);\n return {\n ok: ok,\n format: color.format || format,\n r: mathMin(255, mathMax(rgb.r, 0)),\n g: mathMin(255, mathMax(rgb.g, 0)),\n b: mathMin(255, mathMax(rgb.b, 0)),\n a: a\n };\n } // Conversion Functions", "function inputToRGB(color) {\n var rgb = { r: 0, g: 0, b: 0 };\n var a = 1;\n var s = null;\n var v = null;\n var l = null;\n var ok = false;\n var format = false;\n if (typeof color === 'string') {\n color = stringInputToObject(color);\n }\n if (typeof color === 'object') {\n if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {\n rgb = (0,_conversion__WEBPACK_IMPORTED_MODULE_0__.rgbToRgb)(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === '%' ? 'prgb' : 'rgb';\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {\n s = (0,_util__WEBPACK_IMPORTED_MODULE_1__.convertToPercentage)(color.s);\n v = (0,_util__WEBPACK_IMPORTED_MODULE_1__.convertToPercentage)(color.v);\n rgb = (0,_conversion__WEBPACK_IMPORTED_MODULE_0__.hsvToRgb)(color.h, s, v);\n ok = true;\n format = 'hsv';\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {\n s = (0,_util__WEBPACK_IMPORTED_MODULE_1__.convertToPercentage)(color.s);\n l = (0,_util__WEBPACK_IMPORTED_MODULE_1__.convertToPercentage)(color.l);\n rgb = (0,_conversion__WEBPACK_IMPORTED_MODULE_0__.hslToRgb)(color.h, s, l);\n ok = true;\n format = 'hsl';\n }\n if (Object.prototype.hasOwnProperty.call(color, 'a')) {\n a = color.a;\n }\n }\n a = (0,_util__WEBPACK_IMPORTED_MODULE_1__.boundAlpha)(a);\n return {\n ok: ok,\n format: color.format || format,\n r: Math.min(255, Math.max(rgb.r, 0)),\n g: Math.min(255, Math.max(rgb.g, 0)),\n b: Math.min(255, Math.max(rgb.b, 0)),\n a: a,\n };\n}", "function inputToRGB(color) {\n var rgb = { r: 0, g: 0, b: 0 };\n var a = 1;\n var s = null;\n var v = null;\n var l = null;\n var ok = false;\n var format = false;\n if (typeof color === 'string') {\n color = stringInputToObject(color);\n }\n if (typeof color === 'object') {\n if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {\n rgb = (0,_conversion__WEBPACK_IMPORTED_MODULE_0__.rgbToRgb)(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === '%' ? 'prgb' : 'rgb';\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {\n s = (0,_util__WEBPACK_IMPORTED_MODULE_1__.convertToPercentage)(color.s);\n v = (0,_util__WEBPACK_IMPORTED_MODULE_1__.convertToPercentage)(color.v);\n rgb = (0,_conversion__WEBPACK_IMPORTED_MODULE_0__.hsvToRgb)(color.h, s, v);\n ok = true;\n format = 'hsv';\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {\n s = (0,_util__WEBPACK_IMPORTED_MODULE_1__.convertToPercentage)(color.s);\n l = (0,_util__WEBPACK_IMPORTED_MODULE_1__.convertToPercentage)(color.l);\n rgb = (0,_conversion__WEBPACK_IMPORTED_MODULE_0__.hslToRgb)(color.h, s, l);\n ok = true;\n format = 'hsl';\n }\n if (Object.prototype.hasOwnProperty.call(color, 'a')) {\n a = color.a;\n }\n }\n a = (0,_util__WEBPACK_IMPORTED_MODULE_1__.boundAlpha)(a);\n return {\n ok: ok,\n format: color.format || format,\n r: Math.min(255, Math.max(rgb.r, 0)),\n g: Math.min(255, Math.max(rgb.g, 0)),\n b: Math.min(255, Math.max(rgb.b, 0)),\n a: a,\n };\n}", "function inputToRGB(color) {\n var rgb = { r: 0, g: 0, b: 0 };\n var a = 1;\n var s = null;\n var v = null;\n var l = null;\n var ok = false;\n var format = false;\n if (typeof color === 'string') {\n color = stringInputToObject(color);\n }\n if (typeof color === 'object') {\n if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {\n rgb = (0,_conversion__WEBPACK_IMPORTED_MODULE_0__.rgbToRgb)(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === '%' ? 'prgb' : 'rgb';\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {\n s = (0,_util__WEBPACK_IMPORTED_MODULE_1__.convertToPercentage)(color.s);\n v = (0,_util__WEBPACK_IMPORTED_MODULE_1__.convertToPercentage)(color.v);\n rgb = (0,_conversion__WEBPACK_IMPORTED_MODULE_0__.hsvToRgb)(color.h, s, v);\n ok = true;\n format = 'hsv';\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {\n s = (0,_util__WEBPACK_IMPORTED_MODULE_1__.convertToPercentage)(color.s);\n l = (0,_util__WEBPACK_IMPORTED_MODULE_1__.convertToPercentage)(color.l);\n rgb = (0,_conversion__WEBPACK_IMPORTED_MODULE_0__.hslToRgb)(color.h, s, l);\n ok = true;\n format = 'hsl';\n }\n if (Object.prototype.hasOwnProperty.call(color, 'a')) {\n a = color.a;\n }\n }\n a = (0,_util__WEBPACK_IMPORTED_MODULE_1__.boundAlpha)(a);\n return {\n ok: ok,\n format: color.format || format,\n r: Math.min(255, Math.max(rgb.r, 0)),\n g: Math.min(255, Math.max(rgb.g, 0)),\n b: Math.min(255, Math.max(rgb.b, 0)),\n a: a,\n };\n}", "function inputToRGB(color) {\n var rgb = { r: 0, g: 0, b: 0 };\n var a = 1;\n var s = null;\n var v = null;\n var l = null;\n var ok = false;\n var format = false;\n if (typeof color === 'string') {\n color = stringInputToObject(color);\n }\n if (typeof color === 'object') {\n if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {\n rgb = (0,_conversion__WEBPACK_IMPORTED_MODULE_0__.rgbToRgb)(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === '%' ? 'prgb' : 'rgb';\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {\n s = (0,_util__WEBPACK_IMPORTED_MODULE_1__.convertToPercentage)(color.s);\n v = (0,_util__WEBPACK_IMPORTED_MODULE_1__.convertToPercentage)(color.v);\n rgb = (0,_conversion__WEBPACK_IMPORTED_MODULE_0__.hsvToRgb)(color.h, s, v);\n ok = true;\n format = 'hsv';\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {\n s = (0,_util__WEBPACK_IMPORTED_MODULE_1__.convertToPercentage)(color.s);\n l = (0,_util__WEBPACK_IMPORTED_MODULE_1__.convertToPercentage)(color.l);\n rgb = (0,_conversion__WEBPACK_IMPORTED_MODULE_0__.hslToRgb)(color.h, s, l);\n ok = true;\n format = 'hsl';\n }\n if (Object.prototype.hasOwnProperty.call(color, 'a')) {\n a = color.a;\n }\n }\n a = (0,_util__WEBPACK_IMPORTED_MODULE_1__.boundAlpha)(a);\n return {\n ok: ok,\n format: color.format || format,\n r: Math.min(255, Math.max(rgb.r, 0)),\n g: Math.min(255, Math.max(rgb.g, 0)),\n b: Math.min(255, Math.max(rgb.b, 0)),\n a: a,\n };\n}", "function inputToRGB(color) {\r\n\r\n var rgb = { r: 0, g: 0, b: 0 };\r\n var a = 1;\r\n var ok = false;\r\n var format = false;\r\n\r\n if (typeof color == \"string\") {\r\n color = stringInputToObject(color);\r\n }\r\n\r\n if (typeof color == \"object\") {\r\n if (color.hasOwnProperty(\"r\") && color.hasOwnProperty(\"g\") && color.hasOwnProperty(\"b\")) {\r\n rgb = rgbToRgb(color.r, color.g, color.b);\r\n ok = true;\r\n format = String(color.r).substr(-1) === \"%\" ? \"prgb\" : \"rgb\";\r\n }\r\n else if (color.hasOwnProperty(\"h\") && color.hasOwnProperty(\"s\") && color.hasOwnProperty(\"v\")) {\r\n color.s = convertToPercentage(color.s);\r\n color.v = convertToPercentage(color.v);\r\n rgb = hsvToRgb(color.h, color.s, color.v);\r\n ok = true;\r\n format = \"hsv\";\r\n }\r\n else if (color.hasOwnProperty(\"h\") && color.hasOwnProperty(\"s\") && color.hasOwnProperty(\"l\")) {\r\n color.s = convertToPercentage(color.s);\r\n color.l = convertToPercentage(color.l);\r\n rgb = hslToRgb(color.h, color.s, color.l);\r\n ok = true;\r\n format = \"hsl\";\r\n }\r\n\r\n if (color.hasOwnProperty(\"a\")) {\r\n a = color.a;\r\n }\r\n }\r\n\r\n a = parseFloat(a);\r\n\r\n // Handle invalid alpha characters by setting to 1\r\n if (isNaN(a) || a < 0 || a > 1) {\r\n a = 1;\r\n }\r\n\r\n return {\r\n ok: ok,\r\n format: color.format || format,\r\n r: mathMin(255, mathMax(rgb.r, 0)),\r\n g: mathMin(255, mathMax(rgb.g, 0)),\r\n b: mathMin(255, mathMax(rgb.b, 0)),\r\n a: a\r\n };\r\n }", "function inputToRGB(color) {\n\n var rgb = { r: 0, g: 0, b: 0 };\n var a = 1;\n var ok = false;\n var format = false;\n\n if (typeof color == \"string\") {\n color = stringInputToObject(color);\n }\n\n if (typeof color == \"object\") {\n if (color.hasOwnProperty(\"r\") && color.hasOwnProperty(\"g\") && color.hasOwnProperty(\"b\")) {\n rgb = rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === \"%\" ? \"prgb\" : \"rgb\";\n }\n else if (color.hasOwnProperty(\"h\") && color.hasOwnProperty(\"s\") && color.hasOwnProperty(\"v\")) {\n color.s = convertToPercentage(color.s);\n color.v = convertToPercentage(color.v);\n rgb = hsvToRgb(color.h, color.s, color.v);\n ok = true;\n format = \"hsv\";\n }\n else if (color.hasOwnProperty(\"h\") && color.hasOwnProperty(\"s\") && color.hasOwnProperty(\"l\")) {\n color.s = convertToPercentage(color.s);\n color.l = convertToPercentage(color.l);\n rgb = hslToRgb(color.h, color.s, color.l);\n ok = true;\n format = \"hsl\";\n }\n\n if (color.hasOwnProperty(\"a\")) {\n a = color.a;\n }\n }\n\n a = boundAlpha(a);\n\n return {\n ok: ok,\n format: color.format || format,\n r: mathMin(255, mathMax(rgb.r, 0)),\n g: mathMin(255, mathMax(rgb.g, 0)),\n b: mathMin(255, mathMax(rgb.b, 0)),\n a: a\n };\n}", "function inputToRGB(color) {\n\n var rgb = { r: 0, g: 0, b: 0 };\n var a = 1;\n var ok = false;\n var format = false;\n\n if (typeof color == \"string\") {\n color = stringInputToObject(color);\n }\n\n if (typeof color == \"object\") {\n if (color.hasOwnProperty(\"r\") && color.hasOwnProperty(\"g\") && color.hasOwnProperty(\"b\")) {\n rgb = rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === \"%\" ? \"prgb\" : \"rgb\";\n }\n else if (color.hasOwnProperty(\"h\") && color.hasOwnProperty(\"s\") && color.hasOwnProperty(\"v\")) {\n color.s = convertToPercentage(color.s);\n color.v = convertToPercentage(color.v);\n rgb = hsvToRgb(color.h, color.s, color.v);\n ok = true;\n format = \"hsv\";\n }\n else if (color.hasOwnProperty(\"h\") && color.hasOwnProperty(\"s\") && color.hasOwnProperty(\"l\")) {\n color.s = convertToPercentage(color.s);\n color.l = convertToPercentage(color.l);\n rgb = hslToRgb(color.h, color.s, color.l);\n ok = true;\n format = \"hsl\";\n }\n\n if (color.hasOwnProperty(\"a\")) {\n a = color.a;\n }\n }\n\n a = boundAlpha(a);\n\n return {\n ok: ok,\n format: color.format || format,\n r: mathMin(255, mathMax(rgb.r, 0)),\n g: mathMin(255, mathMax(rgb.g, 0)),\n b: mathMin(255, mathMax(rgb.b, 0)),\n a: a\n };\n}", "function inputToRGB(color) {\n var rgb = {\n r: 0,\n g: 0,\n b: 0\n };\n var a = 1;\n var s = null;\n var v = null;\n var l = null;\n var ok = false;\n var format = false;\n\n if (typeof color == \"string\") {\n color = stringInputToObject(color);\n }\n\n if (_typeof(color) == \"object\") {\n if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {\n rgb = rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === \"%\" ? \"prgb\" : \"rgb\";\n } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {\n s = convertToPercentage(color.s);\n v = convertToPercentage(color.v);\n rgb = hsvToRgb(color.h, s, v);\n ok = true;\n format = \"hsv\";\n } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {\n s = convertToPercentage(color.s);\n l = convertToPercentage(color.l);\n rgb = hslToRgb(color.h, s, l);\n ok = true;\n format = \"hsl\";\n }\n\n if (color.hasOwnProperty(\"a\")) {\n a = color.a;\n }\n }\n\n a = boundAlpha(a);\n return {\n ok: ok,\n format: color.format || format,\n r: mathMin(255, mathMax(rgb.r, 0)),\n g: mathMin(255, mathMax(rgb.g, 0)),\n b: mathMin(255, mathMax(rgb.b, 0)),\n a: a\n };\n } // Conversion Functions", "function inputToRGB(color) {\n\n var rgb = { r: 0, g: 0, b: 0 };\n var a = 1;\n var ok = false;\n var format = false;\n\n if (typeof color == \"string\") {\n color = stringInputToObject(color);\n }\n\n if (typeof color == \"object\") {\n if (color.hasOwnProperty(\"r\") && color.hasOwnProperty(\"g\") && color.hasOwnProperty(\"b\")) {\n rgb = rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === \"%\" ? \"prgb\" : \"rgb\";\n }\n else if (color.hasOwnProperty(\"h\") && color.hasOwnProperty(\"s\") && color.hasOwnProperty(\"v\")) {\n color.s = convertToPercentage(color.s);\n color.v = convertToPercentage(color.v);\n rgb = hsvToRgb(color.h, color.s, color.v);\n ok = true;\n format = \"hsv\";\n }\n else if (color.hasOwnProperty(\"h\") && color.hasOwnProperty(\"s\") && color.hasOwnProperty(\"l\")) {\n color.s = convertToPercentage(color.s);\n color.l = convertToPercentage(color.l);\n rgb = hslToRgb(color.h, color.s, color.l);\n ok = true;\n format = \"hsl\";\n }\n\n if (color.hasOwnProperty(\"a\")) {\n a = color.a;\n }\n }\n\n a = parseFloat(a);\n\n // Handle invalid alpha characters by setting to 1\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n\n return {\n ok: ok,\n format: color.format || format,\n r: mathMin(255, mathMax(rgb.r, 0)),\n g: mathMin(255, mathMax(rgb.g, 0)),\n b: mathMin(255, mathMax(rgb.b, 0)),\n a: a\n };\n }", "function inputToRGB(color) {\n\n var rgb = { r: 0, g: 0, b: 0 };\n var a = 1;\n var ok = false;\n var format = false;\n\n if (typeof color == \"string\") {\n color = stringInputToObject(color);\n }\n\n if (typeof color == \"object\") {\n if (color.hasOwnProperty(\"r\") && color.hasOwnProperty(\"g\") && color.hasOwnProperty(\"b\")) {\n rgb = rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === \"%\" ? \"prgb\" : \"rgb\";\n }\n else if (color.hasOwnProperty(\"h\") && color.hasOwnProperty(\"s\") && color.hasOwnProperty(\"v\")) {\n color.s = convertToPercentage(color.s);\n color.v = convertToPercentage(color.v);\n rgb = hsvToRgb(color.h, color.s, color.v);\n ok = true;\n format = \"hsv\";\n }\n else if (color.hasOwnProperty(\"h\") && color.hasOwnProperty(\"s\") && color.hasOwnProperty(\"l\")) {\n color.s = convertToPercentage(color.s);\n color.l = convertToPercentage(color.l);\n rgb = hslToRgb(color.h, color.s, color.l);\n ok = true;\n format = \"hsl\";\n }\n\n if (color.hasOwnProperty(\"a\")) {\n a = color.a;\n }\n }\n\n a = parseFloat(a);\n\n // Handle invalid alpha characters by setting to 1\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n\n return {\n ok: ok,\n format: color.format || format,\n r: mathMin(255, mathMax(rgb.r, 0)),\n g: mathMin(255, mathMax(rgb.g, 0)),\n b: mathMin(255, mathMax(rgb.b, 0)),\n a: a\n };\n }", "function parseColor(str){\n\t\tvar result;\n\t\n\t\t/**\n\t\t * rgb(num,num,num)\n\t\t */\n\t\tif((result = /rgb\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*\\)/.exec(str)))\n\t\t\treturn new Color(parseInt(result[1]), parseInt(result[2]), parseInt(result[3]));\n\t\n\t\t/**\n\t\t * rgba(num,num,num,num)\n\t\t */\n\t\tif((result = /rgba\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\s*\\)/.exec(str)))\n\t\t\treturn new Color(parseInt(result[1]), parseInt(result[2]), parseInt(result[3]), parseFloat(result[4]));\n\t\t\t\n\t\t/**\n\t\t * rgb(num%,num%,num%)\n\t\t */\n\t\tif((result = /rgb\\(\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*\\)/.exec(str)))\n\t\t\treturn new Color(parseFloat(result[1])*2.55, parseFloat(result[2])*2.55, parseFloat(result[3])*2.55);\n\t\n\t\t/**\n\t\t * rgba(num%,num%,num%,num)\n\t\t */\n\t\tif((result = /rgba\\(\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\s*\\)/.exec(str)))\n\t\t\treturn new Color(parseFloat(result[1])*2.55, parseFloat(result[2])*2.55, parseFloat(result[3])*2.55, parseFloat(result[4]));\n\t\t\t\n\t\t/**\n\t\t * #a0b1c2\n\t\t */\n\t\tif((result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(str)))\n\t\t\treturn new Color(parseInt(result[1],16), parseInt(result[2],16), parseInt(result[3],16));\n\t\n\t\t/**\n\t\t * #fff\n\t\t */\n\t\tif((result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(str)))\n\t\t\treturn new Color(parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16));\n\n\t\t/**\n\t\t * Otherwise, we're most likely dealing with a named color.\n\t\t */\n\t\tvar name = str.strip().toLowerCase();\n\t\tif(name == 'transparent'){\n\t\t\treturn new Color(255, 255, 255, 0);\n\t\t}\n\t\tresult = lookupColors[name];\n\t\treturn new Color(result[0], result[1], result[2]);\n\t}", "function inputToRGB(color) {\n\t var rgb = {\n\t r: 0,\n\t g: 0,\n\t b: 0\n\t };\n\t var a = 1;\n\t var s = null;\n\t var v = null;\n\t var l = null;\n\t var ok = false;\n\t var format = false;\n\t if (typeof color == \"string\") {\n\t color = stringInputToObject(color);\n\t }\n\t if (_typeof$1(color) == \"object\") {\n\t if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {\n\t rgb = rgbToRgb(color.r, color.g, color.b);\n\t ok = true;\n\t format = String(color.r).substr(-1) === \"%\" ? \"prgb\" : \"rgb\";\n\t } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {\n\t s = convertToPercentage(color.s);\n\t v = convertToPercentage(color.v);\n\t rgb = hsvToRgb(color.h, s, v);\n\t ok = true;\n\t format = \"hsv\";\n\t } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {\n\t s = convertToPercentage(color.s);\n\t l = convertToPercentage(color.l);\n\t rgb = hslToRgb$1(color.h, s, l);\n\t ok = true;\n\t format = \"hsl\";\n\t }\n\t if (color.hasOwnProperty(\"a\")) {\n\t a = color.a;\n\t }\n\t }\n\t a = boundAlpha(a);\n\t return {\n\t ok: ok,\n\t format: color.format || format,\n\t r: Math.min(255, Math.max(rgb.r, 0)),\n\t g: Math.min(255, Math.max(rgb.g, 0)),\n\t b: Math.min(255, Math.max(rgb.b, 0)),\n\t a: a\n\t };\n\t}", "function IntFromRGBstr(str) {\n var spl = str.replace(/^rgba?\\(/, \"\").replace(/\\,|\\)/g, \"\").replace(/\\s+/g, \" \").split(\" \");\n return {\n red : parseInt(spl[0], 10),\n green : parseInt(spl[1], 10),\n blue : parseInt(spl[2], 10)\n };\n}", "function inputToRGB(color) {\n let rgb = { r: 0, g: 0, b: 0 };\n let a = 1;\n let s = null;\n let v = null;\n let l = null;\n let ok = false;\n let format = false;\n if (typeof color === 'string') {\n color = stringInputToObject(color);\n }\n if (typeof color === 'object') {\n if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {\n rgb = conversion_1.rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === '%' ? 'prgb' : 'rgb';\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {\n s = util_1.convertToPercentage(color.s);\n v = util_1.convertToPercentage(color.v);\n rgb = conversion_1.hsvToRgb(color.h, s, v);\n ok = true;\n format = 'hsv';\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {\n s = util_1.convertToPercentage(color.s);\n l = util_1.convertToPercentage(color.l);\n rgb = conversion_1.hslToRgb(color.h, s, l);\n ok = true;\n format = 'hsl';\n }\n if (Object.prototype.hasOwnProperty.call(color, 'a')) {\n a = color.a;\n }\n }\n a = util_1.boundAlpha(a);\n return {\n ok,\n format: color.format || format,\n r: Math.min(255, Math.max(rgb.r, 0)),\n g: Math.min(255, Math.max(rgb.g, 0)),\n b: Math.min(255, Math.max(rgb.b, 0)),\n a,\n };\n}", "function strToColor(str) {\n var hash = 0, i;\n for (i = 0; i < str.length; i++) {\n hash = str.charCodeAt(i) + ((hash << 5) - hash);\n }\n var colour = '#';\n for (i = 0; i < 3; i++) {\n var value = (hash >> (i * 8)) & 0xFF;\n colour += ('00' + value.toString(16)).substr(-2);\n }\n return colour;\n}", "function inputToRGB(color) {\n\t\n\t var rgb = { r: 0, g: 0, b: 0 };\n\t var a = 1;\n\t var ok = false;\n\t var format = false;\n\t\n\t if (typeof color == \"string\") {\n\t color = stringInputToObject(color);\n\t }\n\t\n\t if (typeof color == \"object\") {\n\t if (color.hasOwnProperty(\"r\") && color.hasOwnProperty(\"g\") && color.hasOwnProperty(\"b\")) {\n\t rgb = rgbToRgb(color.r, color.g, color.b);\n\t ok = true;\n\t format = String(color.r).substr(-1) === \"%\" ? \"prgb\" : \"rgb\";\n\t }\n\t else if (color.hasOwnProperty(\"h\") && color.hasOwnProperty(\"s\") && color.hasOwnProperty(\"v\")) {\n\t color.s = convertToPercentage(color.s);\n\t color.v = convertToPercentage(color.v);\n\t rgb = hsvToRgb(color.h, color.s, color.v);\n\t ok = true;\n\t format = \"hsv\";\n\t }\n\t else if (color.hasOwnProperty(\"h\") && color.hasOwnProperty(\"s\") && color.hasOwnProperty(\"l\")) {\n\t color.s = convertToPercentage(color.s);\n\t color.l = convertToPercentage(color.l);\n\t rgb = hslToRgb(color.h, color.s, color.l);\n\t ok = true;\n\t format = \"hsl\";\n\t }\n\t\n\t if (color.hasOwnProperty(\"a\")) {\n\t a = color.a;\n\t }\n\t }\n\t\n\t a = boundAlpha(a);\n\t\n\t return {\n\t ok: ok,\n\t format: color.format || format,\n\t r: mathMin(255, mathMax(rgb.r, 0)),\n\t g: mathMin(255, mathMax(rgb.g, 0)),\n\t b: mathMin(255, mathMax(rgb.b, 0)),\n\t a: a\n\t };\n\t}", "function stringToColour(str) {\n var hash = 0;\n for (var i = 0; i < str.length; i++) {\n hash = str.charCodeAt(i) + ((hash << 5) - hash);\n }\n var colour = '#';\n for (var i = 0; i < 3; i++) {\n var value = (hash >> (i * 8)) & 0xFF;\n colour += ('00' + value.toString(16)).substr(-2);\n }\n return colour;\n}", "function stringToColour(str) {\n let hash = 0;\n for (let i = 0; i < str.length; i++) {\n hash = str.charCodeAt(i) + ((hash << 5) - hash);\n }\n let colour = '#';\n for (let i = 0; i < 3; i++) {\n let value = (hash >> (i * 8)) & 0xff;\n colour += ('00' + value.toString(16)).substr(-2);\n }\n return colour;\n}", "function stringToColour(str) {\n let hash = 0;\n for (let i = 0; i < str.length; i++) {\n hash = str.charCodeAt(i) + ((hash << 5) - hash);\n }\n let colour = '#';\n for (let i = 0; i < 3; i++) {\n let value = (hash >> (i * 8)) & 0xff;\n colour += ('00' + value.toString(16)).substr(-2);\n }\n return colour;\n}", "function inputToRGB(color) {\n\t\n\t var rgb = { r: 0, g: 0, b: 0 };\n\t var a = 1;\n\t var s = null;\n\t var v = null;\n\t var l = null;\n\t var ok = false;\n\t var format = false;\n\t\n\t if (typeof color == \"string\") {\n\t color = stringInputToObject(color);\n\t }\n\t\n\t if (typeof color == \"object\") {\n\t if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {\n\t rgb = rgbToRgb(color.r, color.g, color.b);\n\t ok = true;\n\t format = String(color.r).substr(-1) === \"%\" ? \"prgb\" : \"rgb\";\n\t }\n\t else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {\n\t s = convertToPercentage(color.s);\n\t v = convertToPercentage(color.v);\n\t rgb = hsvToRgb(color.h, s, v);\n\t ok = true;\n\t format = \"hsv\";\n\t }\n\t else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {\n\t s = convertToPercentage(color.s);\n\t l = convertToPercentage(color.l);\n\t rgb = hslToRgb(color.h, s, l);\n\t ok = true;\n\t format = \"hsl\";\n\t }\n\t\n\t if (color.hasOwnProperty(\"a\")) {\n\t a = color.a;\n\t }\n\t }\n\t\n\t a = boundAlpha(a);\n\t\n\t return {\n\t ok: ok,\n\t format: color.format || format,\n\t r: mathMin(255, mathMax(rgb.r, 0)),\n\t g: mathMin(255, mathMax(rgb.g, 0)),\n\t b: mathMin(255, mathMax(rgb.b, 0)),\n\t a: a\n\t };\n\t}", "function inputToRGB(color) {\n\t\n\t var rgb = { r: 0, g: 0, b: 0 };\n\t var a = 1;\n\t var s = null;\n\t var v = null;\n\t var l = null;\n\t var ok = false;\n\t var format = false;\n\t\n\t if (typeof color == \"string\") {\n\t color = stringInputToObject(color);\n\t }\n\t\n\t if (typeof color == \"object\") {\n\t if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {\n\t rgb = rgbToRgb(color.r, color.g, color.b);\n\t ok = true;\n\t format = String(color.r).substr(-1) === \"%\" ? \"prgb\" : \"rgb\";\n\t }\n\t else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {\n\t s = convertToPercentage(color.s);\n\t v = convertToPercentage(color.v);\n\t rgb = hsvToRgb(color.h, s, v);\n\t ok = true;\n\t format = \"hsv\";\n\t }\n\t else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {\n\t s = convertToPercentage(color.s);\n\t l = convertToPercentage(color.l);\n\t rgb = hslToRgb(color.h, s, l);\n\t ok = true;\n\t format = \"hsl\";\n\t }\n\t\n\t if (color.hasOwnProperty(\"a\")) {\n\t a = color.a;\n\t }\n\t }\n\t\n\t a = boundAlpha(a);\n\t\n\t return {\n\t ok: ok,\n\t format: color.format || format,\n\t r: mathMin(255, mathMax(rgb.r, 0)),\n\t g: mathMin(255, mathMax(rgb.g, 0)),\n\t b: mathMin(255, mathMax(rgb.b, 0)),\n\t a: a\n\t };\n\t}", "function inputToRGB(color) {\n\n var rgb = {r: 0, g: 0, b: 0};\n var a = 1;\n var ok = false;\n var format = false;\n\n if (typeof color == \"string\") {\n color = stringInputToObject(color);\n }\n\n if (typeof color == \"object\") {\n if (color.hasOwnProperty(\"r\") && color.hasOwnProperty(\"g\") && color.hasOwnProperty(\"b\")) {\n rgb = rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === \"%\" ? \"prgb\" : \"rgb\";\n } else if (color.hasOwnProperty(\"h\") && color.hasOwnProperty(\"s\") && color.hasOwnProperty(\"v\")) {\n color.s = convertToPercentage(color.s);\n color.v = convertToPercentage(color.v);\n rgb = hsvToRgb(color.h, color.s, color.v);\n ok = true;\n format = \"hsv\";\n } else if (color.hasOwnProperty(\"h\") && color.hasOwnProperty(\"s\") && color.hasOwnProperty(\"l\")) {\n color.s = convertToPercentage(color.s);\n color.l = convertToPercentage(color.l);\n rgb = hslToRgb(color.h, color.s, color.l);\n ok = true;\n format = \"hsl\";\n }\n\n if (color.hasOwnProperty(\"a\")) {\n a = color.a;\n }\n }\n\n a = boundAlpha(a);\n\n return {\n ok: ok,\n format: color.format || format,\n r: mathMin(255, mathMax(rgb.r, 0)),\n g: mathMin(255, mathMax(rgb.g, 0)),\n b: mathMin(255, mathMax(rgb.b, 0)),\n a: a\n };\n }", "function inputToRGB(color) {\n var rgb = { r: 0, g: 0, b: 0 };\n var a = 1;\n var s = null;\n var v = null;\n var l = null;\n var ok = false;\n var format = false;\n if (typeof color === 'string') {\n color = stringInputToObject(color);\n }\n if (typeof color === 'object') {\n if (\n isValidCSSUnit(color.r) &&\n isValidCSSUnit(color.g) &&\n isValidCSSUnit(color.b)\n ) {\n rgb = Object(\n _conversion__WEBPACK_IMPORTED_MODULE_0__['rgbToRgb'],\n )(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === '%' ? 'prgb' : 'rgb';\n } else if (\n isValidCSSUnit(color.h) &&\n isValidCSSUnit(color.s) &&\n isValidCSSUnit(color.v)\n ) {\n s = Object(\n _util__WEBPACK_IMPORTED_MODULE_2__['convertToPercentage'],\n )(color.s);\n v = Object(\n _util__WEBPACK_IMPORTED_MODULE_2__['convertToPercentage'],\n )(color.v);\n rgb = Object(\n _conversion__WEBPACK_IMPORTED_MODULE_0__['hsvToRgb'],\n )(color.h, s, v);\n ok = true;\n format = 'hsv';\n } else if (\n isValidCSSUnit(color.h) &&\n isValidCSSUnit(color.s) &&\n isValidCSSUnit(color.l)\n ) {\n s = Object(\n _util__WEBPACK_IMPORTED_MODULE_2__['convertToPercentage'],\n )(color.s);\n l = Object(\n _util__WEBPACK_IMPORTED_MODULE_2__['convertToPercentage'],\n )(color.l);\n rgb = Object(\n _conversion__WEBPACK_IMPORTED_MODULE_0__['hslToRgb'],\n )(color.h, s, l);\n ok = true;\n format = 'hsl';\n }\n if (Object.prototype.hasOwnProperty.call(color, 'a')) {\n a = color.a;\n }\n }\n a = Object(_util__WEBPACK_IMPORTED_MODULE_2__['boundAlpha'])(a);\n return {\n ok: ok,\n format: color.format || format,\n r: Math.min(255, Math.max(rgb.r, 0)),\n g: Math.min(255, Math.max(rgb.g, 0)),\n b: Math.min(255, Math.max(rgb.b, 0)),\n a: a,\n };\n }", "function inputToRGB(color) {\n\n var rgb = { r: 0, g: 0, b: 0 };\n var a = 1;\n var s = null;\n var v = null;\n var l = null;\n var ok = false;\n var format = false;\n\n if (typeof color == \"string\") {\n color = stringInputToObject(color);\n }\n\n if ((typeof color === \"undefined\" ? \"undefined\" : _typeof2(color)) == \"object\") {\n if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {\n rgb = rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === \"%\" ? \"prgb\" : \"rgb\";\n } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {\n s = convertToPercentage(color.s);\n v = convertToPercentage(color.v);\n rgb = hsvToRgb(color.h, s, v);\n ok = true;\n format = \"hsv\";\n } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {\n s = convertToPercentage(color.s);\n l = convertToPercentage(color.l);\n rgb = hslToRgb(color.h, s, l);\n ok = true;\n format = \"hsl\";\n }\n\n if (color.hasOwnProperty(\"a\")) {\n a = color.a;\n }\n }\n\n a = boundAlpha(a);\n\n return {\n ok: ok,\n format: color.format || format,\n r: mathMin(255, mathMax(rgb.r, 0)),\n g: mathMin(255, mathMax(rgb.g, 0)),\n b: mathMin(255, mathMax(rgb.b, 0)),\n a: a\n };\n }", "function inputToRGB(color) {\n var rgb = { r: 0, g: 0, b: 0 };\n var a = 1;\n var s = null;\n var v = null;\n var l = null;\n var ok = false;\n var format = false;\n if (typeof color === 'string') {\n color = stringInputToObject(color);\n }\n if (typeof color === 'object') {\n if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {\n rgb = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__conversion__[\"f\" /* rgbToRgb */])(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === '%' ? 'prgb' : 'rgb';\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {\n s = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__util__[\"e\" /* convertToPercentage */])(color.s);\n v = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__util__[\"e\" /* convertToPercentage */])(color.v);\n rgb = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__conversion__[\"g\" /* hsvToRgb */])(color.h, s, v);\n ok = true;\n format = 'hsv';\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {\n s = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__util__[\"e\" /* convertToPercentage */])(color.s);\n l = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__util__[\"e\" /* convertToPercentage */])(color.l);\n rgb = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__conversion__[\"h\" /* hslToRgb */])(color.h, s, l);\n ok = true;\n format = 'hsl';\n }\n if (Object.prototype.hasOwnProperty.call(color, 'a')) {\n a = color.a;\n }\n }\n a = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__util__[\"a\" /* boundAlpha */])(a);\n return {\n ok: ok,\n format: color.format || format,\n r: Math.min(255, Math.max(rgb.r, 0)),\n g: Math.min(255, Math.max(rgb.g, 0)),\n b: Math.min(255, Math.max(rgb.b, 0)),\n a: a,\n };\n}", "function inputToRGB(color) {\n\n var rgb = { r: 0, g: 0, b: 0 };\n var a = 1;\n var ok = false;\n var format = false;\n\n if (typeof color == \"string\") {\n color = stringInputToObject(color);\n }\n\n if (typeof color == \"object\") {\n if (color.hasOwnProperty(\"r\") && color.hasOwnProperty(\"g\") && color.hasOwnProperty(\"b\")) {\n rgb = rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === \"%\" ? \"prgb\" : \"rgb\";\n }\n else if (color.hasOwnProperty(\"h\") && color.hasOwnProperty(\"s\") && color.hasOwnProperty(\"v\")) {\n color.s = convertToPercentage(color.s);\n color.v = convertToPercentage(color.v);\n rgb = hsvToRgb(color.h, color.s, color.v);\n ok = true;\n format = \"hsv\";\n }\n else if (color.hasOwnProperty(\"h\") && color.hasOwnProperty(\"s\") && color.hasOwnProperty(\"l\")) {\n color.s = convertToPercentage(color.s);\n color.l = convertToPercentage(color.l);\n rgb = hslToRgb(color.h, color.s, color.l);\n ok = true;\n format = \"hsl\";\n }\n\n if (color.hasOwnProperty(\"a\")) {\n a = color.a;\n }\n }\n\n a = boundAlpha(a);\n\n return {\n ok: ok,\n format: color.format || format,\n r: mathMin(255, mathMax(rgb.r, 0)),\n g: mathMin(255, mathMax(rgb.g, 0)),\n b: mathMin(255, mathMax(rgb.b, 0)),\n a: a\n };\n }", "function inputToRGB(color) {\n\n var rgb = { r: 0, g: 0, b: 0 };\n var a = 1;\n var ok = false;\n var format = false;\n\n if (typeof color == \"string\") {\n color = stringInputToObject(color);\n }\n\n if (typeof color == \"object\") {\n if (color.hasOwnProperty(\"r\") && color.hasOwnProperty(\"g\") && color.hasOwnProperty(\"b\")) {\n rgb = rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === \"%\" ? \"prgb\" : \"rgb\";\n }\n else if (color.hasOwnProperty(\"h\") && color.hasOwnProperty(\"s\") && color.hasOwnProperty(\"v\")) {\n color.s = convertToPercentage(color.s);\n color.v = convertToPercentage(color.v);\n rgb = hsvToRgb(color.h, color.s, color.v);\n ok = true;\n format = \"hsv\";\n }\n else if (color.hasOwnProperty(\"h\") && color.hasOwnProperty(\"s\") && color.hasOwnProperty(\"l\")) {\n color.s = convertToPercentage(color.s);\n color.l = convertToPercentage(color.l);\n rgb = hslToRgb(color.h, color.s, color.l);\n ok = true;\n format = \"hsl\";\n }\n\n if (color.hasOwnProperty(\"a\")) {\n a = color.a;\n }\n }\n\n a = boundAlpha(a);\n\n return {\n ok: ok,\n format: color.format || format,\n r: mathMin(255, mathMax(rgb.r, 0)),\n g: mathMin(255, mathMax(rgb.g, 0)),\n b: mathMin(255, mathMax(rgb.b, 0)),\n a: a\n };\n }", "function inputToRGB(color) {\n\n var rgb = { r: 0, g: 0, b: 0 };\n var a = 1;\n var ok = false;\n var format = false;\n\n if (typeof color == \"string\") {\n color = stringInputToObject(color);\n }\n\n if (typeof color == \"object\") {\n if (color.hasOwnProperty(\"r\") && color.hasOwnProperty(\"g\") && color.hasOwnProperty(\"b\")) {\n rgb = rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === \"%\" ? \"prgb\" : \"rgb\";\n }\n else if (color.hasOwnProperty(\"h\") && color.hasOwnProperty(\"s\") && color.hasOwnProperty(\"v\")) {\n color.s = convertToPercentage(color.s);\n color.v = convertToPercentage(color.v);\n rgb = hsvToRgb(color.h, color.s, color.v);\n ok = true;\n format = \"hsv\";\n }\n else if (color.hasOwnProperty(\"h\") && color.hasOwnProperty(\"s\") && color.hasOwnProperty(\"l\")) {\n color.s = convertToPercentage(color.s);\n color.l = convertToPercentage(color.l);\n rgb = hslToRgb(color.h, color.s, color.l);\n ok = true;\n format = \"hsl\";\n }\n\n if (color.hasOwnProperty(\"a\")) {\n a = color.a;\n }\n }\n\n a = boundAlpha(a);\n\n return {\n ok: ok,\n format: color.format || format,\n r: mathMin(255, mathMax(rgb.r, 0)),\n g: mathMin(255, mathMax(rgb.g, 0)),\n b: mathMin(255, mathMax(rgb.b, 0)),\n a: a\n };\n }", "function inputToRGB(color) {\n\n var rgb = { r: 0, g: 0, b: 0 };\n var a = 1;\n var ok = false;\n var format = false;\n\n if (typeof color == \"string\") {\n color = stringInputToObject(color);\n }\n\n if (typeof color == \"object\") {\n if (color.hasOwnProperty(\"r\") && color.hasOwnProperty(\"g\") && color.hasOwnProperty(\"b\")) {\n rgb = rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === \"%\" ? \"prgb\" : \"rgb\";\n }\n else if (color.hasOwnProperty(\"h\") && color.hasOwnProperty(\"s\") && color.hasOwnProperty(\"v\")) {\n color.s = convertToPercentage(color.s);\n color.v = convertToPercentage(color.v);\n rgb = hsvToRgb(color.h, color.s, color.v);\n ok = true;\n format = \"hsv\";\n }\n else if (color.hasOwnProperty(\"h\") && color.hasOwnProperty(\"s\") && color.hasOwnProperty(\"l\")) {\n color.s = convertToPercentage(color.s);\n color.l = convertToPercentage(color.l);\n rgb = hslToRgb(color.h, color.s, color.l);\n ok = true;\n format = \"hsl\";\n }\n\n if (color.hasOwnProperty(\"a\")) {\n a = color.a;\n }\n }\n\n a = boundAlpha(a);\n\n return {\n ok: ok,\n format: color.format || format,\n r: mathMin(255, mathMax(rgb.r, 0)),\n g: mathMin(255, mathMax(rgb.g, 0)),\n b: mathMin(255, mathMax(rgb.b, 0)),\n a: a\n };\n }", "function inputToRGB(color) {\n\n var rgb = { r: 0, g: 0, b: 0 };\n var a = 1;\n var ok = false;\n var format = false;\n\n if (typeof color == \"string\") {\n color = stringInputToObject(color);\n }\n\n if (typeof color == \"object\") {\n if (color.hasOwnProperty(\"r\") && color.hasOwnProperty(\"g\") && color.hasOwnProperty(\"b\")) {\n rgb = rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === \"%\" ? \"prgb\" : \"rgb\";\n }\n else if (color.hasOwnProperty(\"h\") && color.hasOwnProperty(\"s\") && color.hasOwnProperty(\"v\")) {\n color.s = convertToPercentage(color.s);\n color.v = convertToPercentage(color.v);\n rgb = hsvToRgb(color.h, color.s, color.v);\n ok = true;\n format = \"hsv\";\n }\n else if (color.hasOwnProperty(\"h\") && color.hasOwnProperty(\"s\") && color.hasOwnProperty(\"l\")) {\n color.s = convertToPercentage(color.s);\n color.l = convertToPercentage(color.l);\n rgb = hslToRgb(color.h, color.s, color.l);\n ok = true;\n format = \"hsl\";\n }\n\n if (color.hasOwnProperty(\"a\")) {\n a = color.a;\n }\n }\n\n a = boundAlpha(a);\n\n return {\n ok: ok,\n format: color.format || format,\n r: mathMin(255, mathMax(rgb.r, 0)),\n g: mathMin(255, mathMax(rgb.g, 0)),\n b: mathMin(255, mathMax(rgb.b, 0)),\n a: a\n };\n }", "function inputToRGB(color) {\n\n var rgb = { r: 0, g: 0, b: 0 };\n var a = 1;\n var ok = false;\n var format = false;\n\n if (typeof color == \"string\") {\n color = stringInputToObject(color);\n }\n\n if (typeof color == \"object\") {\n if (color.hasOwnProperty(\"r\") && color.hasOwnProperty(\"g\") && color.hasOwnProperty(\"b\")) {\n rgb = rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === \"%\" ? \"prgb\" : \"rgb\";\n }\n else if (color.hasOwnProperty(\"h\") && color.hasOwnProperty(\"s\") && color.hasOwnProperty(\"v\")) {\n color.s = convertToPercentage(color.s);\n color.v = convertToPercentage(color.v);\n rgb = hsvToRgb(color.h, color.s, color.v);\n ok = true;\n format = \"hsv\";\n }\n else if (color.hasOwnProperty(\"h\") && color.hasOwnProperty(\"s\") && color.hasOwnProperty(\"l\")) {\n color.s = convertToPercentage(color.s);\n color.l = convertToPercentage(color.l);\n rgb = hslToRgb(color.h, color.s, color.l);\n ok = true;\n format = \"hsl\";\n }\n\n if (color.hasOwnProperty(\"a\")) {\n a = color.a;\n }\n }\n\n a = boundAlpha(a);\n\n return {\n ok: ok,\n format: color.format || format,\n r: mathMin(255, mathMax(rgb.r, 0)),\n g: mathMin(255, mathMax(rgb.g, 0)),\n b: mathMin(255, mathMax(rgb.b, 0)),\n a: a\n };\n }", "function inputToRGB(color) {\n\n var rgb = { r: 0, g: 0, b: 0 };\n var a = 1;\n var ok = false;\n var format = false;\n\n if (typeof color == \"string\") {\n color = stringInputToObject(color);\n }\n\n if (typeof color == \"object\") {\n if (color.hasOwnProperty(\"r\") && color.hasOwnProperty(\"g\") && color.hasOwnProperty(\"b\")) {\n rgb = rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === \"%\" ? \"prgb\" : \"rgb\";\n }\n else if (color.hasOwnProperty(\"h\") && color.hasOwnProperty(\"s\") && color.hasOwnProperty(\"v\")) {\n color.s = convertToPercentage(color.s);\n color.v = convertToPercentage(color.v);\n rgb = hsvToRgb(color.h, color.s, color.v);\n ok = true;\n format = \"hsv\";\n }\n else if (color.hasOwnProperty(\"h\") && color.hasOwnProperty(\"s\") && color.hasOwnProperty(\"l\")) {\n color.s = convertToPercentage(color.s);\n color.l = convertToPercentage(color.l);\n rgb = hslToRgb(color.h, color.s, color.l);\n ok = true;\n format = \"hsl\";\n }\n\n if (color.hasOwnProperty(\"a\")) {\n a = color.a;\n }\n }\n\n a = boundAlpha(a);\n\n return {\n ok: ok,\n format: color.format || format,\n r: mathMin(255, mathMax(rgb.r, 0)),\n g: mathMin(255, mathMax(rgb.g, 0)),\n b: mathMin(255, mathMax(rgb.b, 0)),\n a: a\n };\n }", "function hexToRGB(colorString) {\n if (colorCache[colorString]) {\n return colorCache[colorString];\n }\n var normalizedColor = colorString.replace('#', '');\n if (normalizedColor.length === 3) {\n normalizedColor = normalizedColor[0] + normalizedColor[0] + normalizedColor[1] + normalizedColor[1] + normalizedColor[2] + normalizedColor[2];\n }\n var parts = normalizedColor.match(/.{2}/g);\n if (!parts || parts.length < 3) {\n throw new Error('Expected a color string of format #rrggbb');\n }\n\n var ret = {\n r: parseInt(parts[0], 16),\n g: parseInt(parts[1], 16),\n b: parseInt(parts[2], 16)\n };\n\n colorCache[colorString] = ret;\n return ret;\n}", "function inputToRGB(color) {\n\t var rgb = { r: 0, g: 0, b: 0 };\n\t var a = 1;\n\t var s = null;\n\t var v = null;\n\t var l = null;\n\t var ok = false;\n\t var format = false;\n\t if (typeof color === 'string') {\n\t color = stringInputToObject(color);\n\t }\n\t if (typeof color === 'object') {\n\t if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {\n\t rgb = rgbToRgb(color.r, color.g, color.b);\n\t ok = true;\n\t format = String(color.r).substr(-1) === '%' ? 'prgb' : 'rgb';\n\t }\n\t else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {\n\t s = convertToPercentage(color.s);\n\t v = convertToPercentage(color.v);\n\t rgb = hsvToRgb(color.h, s, v);\n\t ok = true;\n\t format = 'hsv';\n\t }\n\t else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {\n\t s = convertToPercentage(color.s);\n\t l = convertToPercentage(color.l);\n\t rgb = hslToRgb(color.h, s, l);\n\t ok = true;\n\t format = 'hsl';\n\t }\n\t if (Object.prototype.hasOwnProperty.call(color, 'a')) {\n\t a = color.a;\n\t }\n\t }\n\t a = boundAlpha(a);\n\t return {\n\t ok: ok,\n\t format: color.format || format,\n\t r: Math.min(255, Math.max(rgb.r, 0)),\n\t g: Math.min(255, Math.max(rgb.g, 0)),\n\t b: Math.min(255, Math.max(rgb.b, 0)),\n\t a: a,\n\t };\n\t}", "function css2rgb (s) {\n return cssColors[s.toLowerCase()]\n}", "function inputToRGB(color) {\n\n\t\t\tvar rgb = { r: 0, g: 0, b: 0 };\n\t\t\tvar a = 1;\n\t\t\tvar ok = false;\n\t\t\tvar format = false;\n\n\t\t\tif (typeof color == \"string\") {\n\t\t\t\t\tcolor = stringInputToObject(color);\n\t\t\t}\n\n\t\t\tif (typeof color == \"object\") {\n\t\t\t\t\tif (color.hasOwnProperty(\"r\") && color.hasOwnProperty(\"g\") && color.hasOwnProperty(\"b\")) {\n\t\t\t\t\t\t\trgb = rgbToRgb(color.r, color.g, color.b);\n\t\t\t\t\t\t\tok = true;\n\t\t\t\t\t\t\tformat = String(color.r).substr(-1) === \"%\" ? \"prgb\" : \"rgb\";\n\t\t\t\t\t}\n\t\t\t\t\telse if (color.hasOwnProperty(\"h\") && color.hasOwnProperty(\"s\") && color.hasOwnProperty(\"v\")) {\n\t\t\t\t\t\t\tcolor.s = convertToPercentage(color.s, 1);\n\t\t\t\t\t\t\tcolor.v = convertToPercentage(color.v, 1);\n\t\t\t\t\t\t\trgb = hsvToRgb(color.h, color.s, color.v);\n\t\t\t\t\t\t\tok = true;\n\t\t\t\t\t\t\tformat = \"hsv\";\n\t\t\t\t\t}\n\t\t\t\t\telse if (color.hasOwnProperty(\"h\") && color.hasOwnProperty(\"s\") && color.hasOwnProperty(\"l\")) {\n\t\t\t\t\t\t\tcolor.s = convertToPercentage(color.s);\n\t\t\t\t\t\t\tcolor.l = convertToPercentage(color.l);\n\t\t\t\t\t\t\trgb = hslToRgb(color.h, color.s, color.l);\n\t\t\t\t\t\t\tok = true;\n\t\t\t\t\t\t\tformat = \"hsl\";\n\t\t\t\t\t}\n\n\t\t\t\t\tif (color.hasOwnProperty(\"a\")) {\n\t\t\t\t\t\t\ta = color.a;\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t\ta = boundAlpha(a);\n\n\t\t\treturn {\n\t\t\t\t\tok: ok,\n\t\t\t\t\tformat: color.format || format,\n\t\t\t\t\tr: mathMin(255, mathMax(rgb.r, 0)),\n\t\t\t\t\tg: mathMin(255, mathMax(rgb.g, 0)),\n\t\t\t\t\tb: mathMin(255, mathMax(rgb.b, 0)),\n\t\t\t\t\ta: a\n\t\t\t};\n\t}", "function inputToRGB(color) {\n\n\t\t\tvar rgb = { r: 0, g: 0, b: 0 };\n\t\t\tvar a = 1;\n\t\t\tvar ok = false;\n\t\t\tvar format = false;\n\n\t\t\tif (typeof color == \"string\") {\n\t\t\t\t\tcolor = stringInputToObject(color);\n\t\t\t}\n\n\t\t\tif (typeof color == \"object\") {\n\t\t\t\t\tif (color.hasOwnProperty(\"r\") && color.hasOwnProperty(\"g\") && color.hasOwnProperty(\"b\")) {\n\t\t\t\t\t\t\trgb = rgbToRgb(color.r, color.g, color.b);\n\t\t\t\t\t\t\tok = true;\n\t\t\t\t\t\t\tformat = String(color.r).substr(-1) === \"%\" ? \"prgb\" : \"rgb\";\n\t\t\t\t\t}\n\t\t\t\t\telse if (color.hasOwnProperty(\"h\") && color.hasOwnProperty(\"s\") && color.hasOwnProperty(\"v\")) {\n\t\t\t\t\t\t\tcolor.s = convertToPercentage(color.s, 1);\n\t\t\t\t\t\t\tcolor.v = convertToPercentage(color.v, 1);\n\t\t\t\t\t\t\trgb = hsvToRgb(color.h, color.s, color.v);\n\t\t\t\t\t\t\tok = true;\n\t\t\t\t\t\t\tformat = \"hsv\";\n\t\t\t\t\t}\n\t\t\t\t\telse if (color.hasOwnProperty(\"h\") && color.hasOwnProperty(\"s\") && color.hasOwnProperty(\"l\")) {\n\t\t\t\t\t\t\tcolor.s = convertToPercentage(color.s);\n\t\t\t\t\t\t\tcolor.l = convertToPercentage(color.l);\n\t\t\t\t\t\t\trgb = hslToRgb(color.h, color.s, color.l);\n\t\t\t\t\t\t\tok = true;\n\t\t\t\t\t\t\tformat = \"hsl\";\n\t\t\t\t\t}\n\n\t\t\t\t\tif (color.hasOwnProperty(\"a\")) {\n\t\t\t\t\t\t\ta = color.a;\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t\ta = boundAlpha(a);\n\n\t\t\treturn {\n\t\t\t\t\tok: ok,\n\t\t\t\t\tformat: color.format || format,\n\t\t\t\t\tr: mathMin(255, mathMax(rgb.r, 0)),\n\t\t\t\t\tg: mathMin(255, mathMax(rgb.g, 0)),\n\t\t\t\t\tb: mathMin(255, mathMax(rgb.b, 0)),\n\t\t\t\t\ta: a\n\t\t\t};\n\t}", "function hexToRgb(hex_string, default_){\r\n if (default_ == undefined)\r\n default_ = null;\r\n if (hex_string.substr(0, 1) == '#')\r\n hex_string = hex_string.substr(1);\r\n var r;\r\n var g;\r\n var b;\r\n if (hex_string.length == 3) {\r\n r = hex_string.substr(0, 1);\r\n r += r;\r\n g = hex_string.substr(1, 1);\r\n g += g;\r\n b = hex_string.substr(2, 1);\r\n b += b;\r\n } else if (hex_string.length == 6) {\r\n r = hex_string.substr(0, 2);\r\n g = hex_string.substr(2, 2);\r\n b = hex_string.substr(4, 2);\r\n } else {\r\n return default_;\r\n }\r\n r = parseInt(r, 16);\r\n g = parseInt(g, 16);\r\n b = parseInt(b, 16);\r\n if (isNaN(r) || isNaN(g) || isNaN(b))\r\n return default_;\r\n else\r\n return {r: r / 255, g: g / 255, b: b / 255};\r\n }", "function hexToRgb(hex_string, default_){\r\n if (default_ == undefined)\r\n default_ = null;\r\n if (hex_string.substr(0, 1) == '#')\r\n hex_string = hex_string.substr(1);\r\n var r;\r\n var g;\r\n var b;\r\n if (hex_string.length == 3) {\r\n r = hex_string.substr(0, 1);\r\n r += r;\r\n g = hex_string.substr(1, 1);\r\n g += g;\r\n b = hex_string.substr(2, 1);\r\n b += b;\r\n } else if (hex_string.length == 6) {\r\n r = hex_string.substr(0, 2);\r\n g = hex_string.substr(2, 2);\r\n b = hex_string.substr(4, 2);\r\n } else {\r\n return default_;\r\n }\r\n r = parseInt(r, 16);\r\n g = parseInt(g, 16);\r\n b = parseInt(b, 16);\r\n if (isNaN(r) || isNaN(g) || isNaN(b))\r\n return default_;\r\n else\r\n return {r: r / 255, g: g / 255, b: b / 255};\r\n }", "function RGBColor(color_string)\n{\n this.ok = false;\n\n // strip any leading #\n if (color_string.charAt(0) == '#') { // remove # if any\n color_string = color_string.substr(1,6);\n }\n\n color_string = color_string.replace(/ /g,'');\n color_string = color_string.toLowerCase();\n\n // array of color definition objects\n var color_defs = [\n {\n re: /^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,\n example: ['rgb(123, 234, 45)', 'rgb(255,234,245)'],\n process: function (bits){\n return [\n parseInt(bits[1]),\n parseInt(bits[2]),\n parseInt(bits[3])\n ];\n }\n },\n {\n re: /^(\\w{2})(\\w{2})(\\w{2})$/,\n example: ['#00ff00', '336699'],\n process: function (bits){\n return [\n parseInt(bits[1], 16),\n parseInt(bits[2], 16),\n parseInt(bits[3], 16)\n ];\n }\n },\n {\n re: /^(\\w{1})(\\w{1})(\\w{1})$/,\n example: ['#fb0', 'f0f'],\n process: function (bits){\n return [\n parseInt(bits[1] + bits[1], 16),\n parseInt(bits[2] + bits[2], 16),\n parseInt(bits[3] + bits[3], 16)\n ];\n }\n }\n ];\n\n // search through the definitions to find a match\n for (var i = 0; i < color_defs.length; i++) {\n var re = color_defs[i].re;\n var processor = color_defs[i].process;\n var bits = re.exec(color_string);\n if (bits) {\n channels = processor(bits);\n this.r = channels[0];\n this.g = channels[1];\n this.b = channels[2];\n this.ok = true;\n }\n\n }\n\n // validate/cleanup values\n this.r = (this.r < 0 || isNaN(this.r)) ? 0 : ((this.r > 255) ? 255 : this.r);\n this.g = (this.g < 0 || isNaN(this.g)) ? 0 : ((this.g > 255) ? 255 : this.g);\n this.b = (this.b < 0 || isNaN(this.b)) ? 0 : ((this.b > 255) ? 255 : this.b);\n}", "function stringToColor(s) {\n var hash = 0;\n for (var i = 0; i < s.length; i++) {\n hash = s.charCodeAt(i) + ((hash << 5) - hash);\n }\n for (var x = 0, color = '#'; x < 3; x++) {\n color += ('00' + ((hash >> x * 8) & 0xFF).toString(16))\n .slice(-2);\n }\n return color;\n}", "function RGBColor(color_string)\n{\n this.ok = false;\n\n // strip any leading #\n if (color_string.charAt(0) == '#') { // remove # if any\n color_string = color_string.substr(1,6);\n }\n\n color_string = color_string.replace(/ /g,'');\n color_string = color_string.toLowerCase();\n\n // before getting into regexps, try simple matches\n // and overwrite the input\n var simple_colors = {\n aliceblue: 'f0f8ff',\n antiquewhite: 'faebd7',\n aqua: '00ffff',\n aquamarine: '7fffd4',\n azure: 'f0ffff',\n beige: 'f5f5dc',\n bisque: 'ffe4c4',\n black: '000000',\n blanchedalmond: 'ffebcd',\n blue: '0000ff',\n blueviolet: '8a2be2',\n brown: 'a52a2a',\n burlywood: 'deb887',\n cadetblue: '5f9ea0',\n chartreuse: '7fff00',\n chocolate: 'd2691e',\n coral: 'ff7f50',\n cornflowerblue: '6495ed',\n cornsilk: 'fff8dc',\n crimson: 'dc143c',\n cyan: '00ffff',\n darkblue: '00008b',\n darkcyan: '008b8b',\n darkgoldenrod: 'b8860b',\n darkgray: 'a9a9a9',\n darkgreen: '006400',\n darkkhaki: 'bdb76b',\n darkmagenta: '8b008b',\n darkolivegreen: '556b2f',\n darkorange: 'ff8c00',\n darkorchid: '9932cc',\n darkred: '8b0000',\n darksalmon: 'e9967a',\n darkseagreen: '8fbc8f',\n darkslateblue: '483d8b',\n darkslategray: '2f4f4f',\n darkturquoise: '00ced1',\n darkviolet: '9400d3',\n deeppink: 'ff1493',\n deepskyblue: '00bfff',\n dimgray: '696969',\n dodgerblue: '1e90ff',\n feldspar: 'd19275',\n firebrick: 'b22222',\n floralwhite: 'fffaf0',\n forestgreen: '228b22',\n fuchsia: 'ff00ff',\n gainsboro: 'dcdcdc',\n ghostwhite: 'f8f8ff',\n gold: 'ffd700',\n goldenrod: 'daa520',\n gray: '808080',\n green: '008000',\n greenyellow: 'adff2f',\n honeydew: 'f0fff0',\n hotpink: 'ff69b4',\n indianred : 'cd5c5c',\n indigo : '4b0082',\n ivory: 'fffff0',\n khaki: 'f0e68c',\n lavender: 'e6e6fa',\n lavenderblush: 'fff0f5',\n lawngreen: '7cfc00',\n lemonchiffon: 'fffacd',\n lightblue: 'add8e6',\n lightcoral: 'f08080',\n lightcyan: 'e0ffff',\n lightgoldenrodyellow: 'fafad2',\n lightgrey: 'd3d3d3',\n lightgreen: '90ee90',\n lightpink: 'ffb6c1',\n lightsalmon: 'ffa07a',\n lightseagreen: '20b2aa',\n lightskyblue: '87cefa',\n lightslateblue: '8470ff',\n lightslategray: '778899',\n lightsteelblue: 'b0c4de',\n lightyellow: 'ffffe0',\n lime: '00ff00',\n limegreen: '32cd32',\n linen: 'faf0e6',\n magenta: 'ff00ff',\n maroon: '800000',\n mediumaquamarine: '66cdaa',\n mediumblue: '0000cd',\n mediumorchid: 'ba55d3',\n mediumpurple: '9370d8',\n mediumseagreen: '3cb371',\n mediumslateblue: '7b68ee',\n mediumspringgreen: '00fa9a',\n mediumturquoise: '48d1cc',\n mediumvioletred: 'c71585',\n midnightblue: '191970',\n mintcream: 'f5fffa',\n mistyrose: 'ffe4e1',\n moccasin: 'ffe4b5',\n navajowhite: 'ffdead',\n navy: '000080',\n oldlace: 'fdf5e6',\n olive: '808000',\n olivedrab: '6b8e23',\n orange: 'ffa500',\n orangered: 'ff4500',\n orchid: 'da70d6',\n palegoldenrod: 'eee8aa',\n palegreen: '98fb98',\n paleturquoise: 'afeeee',\n palevioletred: 'd87093',\n papayawhip: 'ffefd5',\n peachpuff: 'ffdab9',\n peru: 'cd853f',\n pink: 'ffc0cb',\n plum: 'dda0dd',\n powderblue: 'b0e0e6',\n purple: '800080',\n red: 'ff0000',\n rosybrown: 'bc8f8f',\n royalblue: '4169e1',\n saddlebrown: '8b4513',\n salmon: 'fa8072',\n sandybrown: 'f4a460',\n seagreen: '2e8b57',\n seashell: 'fff5ee',\n sienna: 'a0522d',\n silver: 'c0c0c0',\n skyblue: '87ceeb',\n slateblue: '6a5acd',\n slategray: '708090',\n snow: 'fffafa',\n springgreen: '00ff7f',\n steelblue: '4682b4',\n tan: 'd2b48c',\n teal: '008080',\n thistle: 'd8bfd8',\n tomato: 'ff6347',\n turquoise: '40e0d0',\n violet: 'ee82ee',\n violetred: 'd02090',\n wheat: 'f5deb3',\n white: 'ffffff',\n whitesmoke: 'f5f5f5',\n yellow: 'ffff00',\n yellowgreen: '9acd32'\n };\n for (var key in simple_colors) {\n if (color_string == key) {\n color_string = simple_colors[key];\n }\n }\n // emd of simple type-in colors\n\n // array of color definition objects\n var color_defs = [\n {\n re: /^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,\n example: ['rgb(123, 234, 45)', 'rgb(255,234,245)'],\n process: function (bits){\n return [\n parseInt(bits[1]),\n parseInt(bits[2]),\n parseInt(bits[3])\n ];\n }\n },\n {\n re: /^(\\w{2})(\\w{2})(\\w{2})$/,\n example: ['#00ff00', '336699'],\n process: function (bits){\n return [\n parseInt(bits[1], 16),\n parseInt(bits[2], 16),\n parseInt(bits[3], 16)\n ];\n }\n },\n {\n re: /^(\\w{1})(\\w{1})(\\w{1})$/,\n example: ['#fb0', 'f0f'],\n process: function (bits){\n return [\n parseInt(bits[1] + bits[1], 16),\n parseInt(bits[2] + bits[2], 16),\n parseInt(bits[3] + bits[3], 16)\n ];\n }\n }\n ];\n\n // search through the definitions to find a match\n for (var i = 0; i < color_defs.length; i++) {\n var re = color_defs[i].re;\n var processor = color_defs[i].process;\n var bits = re.exec(color_string);\n if (bits) {\n channels = processor(bits);\n this.r = channels[0];\n this.g = channels[1];\n this.b = channels[2];\n this.ok = true;\n }\n\n }\n\n // validate/cleanup values\n this.r = (this.r < 0 || isNaN(this.r)) ? 0 : ((this.r > 255) ? 255 : this.r);\n this.g = (this.g < 0 || isNaN(this.g)) ? 0 : ((this.g > 255) ? 255 : this.g);\n this.b = (this.b < 0 || isNaN(this.b)) ? 0 : ((this.b > 255) ? 255 : this.b);\n\n // some getters\n this.toRGB = function () {\n return 'rgb(' + this.r + ', ' + this.g + ', ' + this.b + ')';\n }\n this.toHex = function () {\n var r = this.r.toString(16);\n var g = this.g.toString(16);\n var b = this.b.toString(16);\n if (r.length == 1) r = '0' + r;\n if (g.length == 1) g = '0' + g;\n if (b.length == 1) b = '0' + b;\n return r + g + b;\n }\n\n // help\n this.getHelpXML = function () {\n\n var examples = new Array();\n // add regexps\n for (var i = 0; i < color_defs.length; i++) {\n var example = color_defs[i].example;\n for (var j = 0; j < example.length; j++) {\n examples[examples.length] = example[j];\n }\n }\n // add type-in colors\n for (var sc in simple_colors) {\n examples[examples.length] = sc;\n }\n\n var xml = document.createElement('ul');\n xml.setAttribute('id', 'rgbcolor-examples');\n for (var i = 0; i < examples.length; i++) {\n try {\n var list_item = document.createElement('li');\n var list_color = new RGBColor(examples[i]);\n var example_div = document.createElement('div');\n example_div.style.cssText =\n 'margin: 3px; '\n + 'border: 1px solid black; '\n + 'background:' + list_color.toHex() + '; '\n + 'color:' + list_color.toHex()\n ;\n example_div.appendChild(document.createTextNode('test'));\n var list_item_value = document.createTextNode(\n ' ' + examples[i] + ' -> ' + list_color.toRGB() + ' -> ' + list_color.toHex()\n );\n list_item.appendChild(example_div);\n list_item.appendChild(list_item_value);\n xml.appendChild(list_item);\n\n } catch(e){}\n }\n return xml;\n\n }\n\n}", "function RGBColor(color_string)\r\n{\r\n this.ok = false;\r\n\r\n // strip any leading #\r\n if (color_string.charAt(0) == '#') { // remove # if any\r\n color_string = color_string.substr(1,6);\r\n }\r\n\r\n color_string = color_string.replace(/ /g,'');\r\n color_string = color_string.toLowerCase();\r\n\r\n // before getting into regexps, try simple matches\r\n // and overwrite the input\r\n var simple_colors = {\r\n aliceblue: 'f0f8ff',\r\n antiquewhite: 'faebd7',\r\n aqua: '00ffff',\r\n aquamarine: '7fffd4',\r\n azure: 'f0ffff',\r\n beige: 'f5f5dc',\r\n bisque: 'ffe4c4',\r\n black: '000000',\r\n blanchedalmond: 'ffebcd',\r\n blue: '0000ff',\r\n blueviolet: '8a2be2',\r\n brown: 'a52a2a',\r\n burlywood: 'deb887',\r\n cadetblue: '5f9ea0',\r\n chartreuse: '7fff00',\r\n chocolate: 'd2691e',\r\n coral: 'ff7f50',\r\n cornflowerblue: '6495ed',\r\n cornsilk: 'fff8dc',\r\n crimson: 'dc143c',\r\n cyan: '00ffff',\r\n darkblue: '00008b',\r\n darkcyan: '008b8b',\r\n darkgoldenrod: 'b8860b',\r\n darkgray: 'a9a9a9',\r\n darkgreen: '006400',\r\n darkkhaki: 'bdb76b',\r\n darkmagenta: '8b008b',\r\n darkolivegreen: '556b2f',\r\n darkorange: 'ff8c00',\r\n darkorchid: '9932cc',\r\n darkred: '8b0000',\r\n darksalmon: 'e9967a',\r\n darkseagreen: '8fbc8f',\r\n darkslateblue: '483d8b',\r\n darkslategray: '2f4f4f',\r\n darkturquoise: '00ced1',\r\n darkviolet: '9400d3',\r\n deeppink: 'ff1493',\r\n deepskyblue: '00bfff',\r\n dimgray: '696969',\r\n dodgerblue: '1e90ff',\r\n feldspar: 'd19275',\r\n firebrick: 'b22222',\r\n floralwhite: 'fffaf0',\r\n forestgreen: '228b22',\r\n fuchsia: 'ff00ff',\r\n gainsboro: 'dcdcdc',\r\n ghostwhite: 'f8f8ff',\r\n gold: 'ffd700',\r\n goldenrod: 'daa520',\r\n gray: '808080',\r\n green: '008000',\r\n greenyellow: 'adff2f',\r\n honeydew: 'f0fff0',\r\n hotpink: 'ff69b4',\r\n indianred : 'cd5c5c',\r\n indigo : '4b0082',\r\n ivory: 'fffff0',\r\n khaki: 'f0e68c',\r\n lavender: 'e6e6fa',\r\n lavenderblush: 'fff0f5',\r\n lawngreen: '7cfc00',\r\n lemonchiffon: 'fffacd',\r\n lightblue: 'add8e6',\r\n lightcoral: 'f08080',\r\n lightcyan: 'e0ffff',\r\n lightgoldenrodyellow: 'fafad2',\r\n lightgrey: 'd3d3d3',\r\n lightgreen: '90ee90',\r\n lightpink: 'ffb6c1',\r\n lightsalmon: 'ffa07a',\r\n lightseagreen: '20b2aa',\r\n lightskyblue: '87cefa',\r\n lightslateblue: '8470ff',\r\n lightslategray: '778899',\r\n lightsteelblue: 'b0c4de',\r\n lightyellow: 'ffffe0',\r\n lime: '00ff00',\r\n limegreen: '32cd32',\r\n linen: 'faf0e6',\r\n magenta: 'ff00ff',\r\n maroon: '800000',\r\n mediumaquamarine: '66cdaa',\r\n mediumblue: '0000cd',\r\n mediumorchid: 'ba55d3',\r\n mediumpurple: '9370d8',\r\n mediumseagreen: '3cb371',\r\n mediumslateblue: '7b68ee',\r\n mediumspringgreen: '00fa9a',\r\n mediumturquoise: '48d1cc',\r\n mediumvioletred: 'c71585',\r\n midnightblue: '191970',\r\n mintcream: 'f5fffa',\r\n mistyrose: 'ffe4e1',\r\n moccasin: 'ffe4b5',\r\n navajowhite: 'ffdead',\r\n navy: '000080',\r\n oldlace: 'fdf5e6',\r\n olive: '808000',\r\n olivedrab: '6b8e23',\r\n orange: 'ffa500',\r\n orangered: 'ff4500',\r\n orchid: 'da70d6',\r\n palegoldenrod: 'eee8aa',\r\n palegreen: '98fb98',\r\n paleturquoise: 'afeeee',\r\n palevioletred: 'd87093',\r\n papayawhip: 'ffefd5',\r\n peachpuff: 'ffdab9',\r\n peru: 'cd853f',\r\n pink: 'ffc0cb',\r\n plum: 'dda0dd',\r\n powderblue: 'b0e0e6',\r\n purple: '800080',\r\n red: 'ff0000',\r\n rosybrown: 'bc8f8f',\r\n royalblue: '4169e1',\r\n saddlebrown: '8b4513',\r\n salmon: 'fa8072',\r\n sandybrown: 'f4a460',\r\n seagreen: '2e8b57',\r\n seashell: 'fff5ee',\r\n sienna: 'a0522d',\r\n silver: 'c0c0c0',\r\n skyblue: '87ceeb',\r\n slateblue: '6a5acd',\r\n slategray: '708090',\r\n snow: 'fffafa',\r\n springgreen: '00ff7f',\r\n steelblue: '4682b4',\r\n tan: 'd2b48c',\r\n teal: '008080',\r\n thistle: 'd8bfd8',\r\n tomato: 'ff6347',\r\n turquoise: '40e0d0',\r\n violet: 'ee82ee',\r\n violetred: 'd02090',\r\n wheat: 'f5deb3',\r\n white: 'ffffff',\r\n whitesmoke: 'f5f5f5',\r\n yellow: 'ffff00',\r\n yellowgreen: '9acd32'\r\n };\r\n for (var key in simple_colors) {\r\n if (color_string == key) {\r\n color_string = simple_colors[key];\r\n }\r\n }\r\n // emd of simple type-in colors\r\n\r\n // array of color definition objects\r\n var color_defs = [\r\n {\r\n re: /^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,\r\n example: ['rgb(123, 234, 45)', 'rgb(255,234,245)'],\r\n process: function (bits){\r\n return [\r\n parseInt(bits[1]),\r\n parseInt(bits[2]),\r\n parseInt(bits[3])\r\n ];\r\n }\r\n },\r\n {\r\n re: /^(\\w{2})(\\w{2})(\\w{2})$/,\r\n example: ['#00ff00', '336699'],\r\n process: function (bits){\r\n return [\r\n parseInt(bits[1], 16),\r\n parseInt(bits[2], 16),\r\n parseInt(bits[3], 16)\r\n ];\r\n }\r\n },\r\n {\r\n re: /^(\\w{1})(\\w{1})(\\w{1})$/,\r\n example: ['#fb0', 'f0f'],\r\n process: function (bits){\r\n return [\r\n parseInt(bits[1] + bits[1], 16),\r\n parseInt(bits[2] + bits[2], 16),\r\n parseInt(bits[3] + bits[3], 16)\r\n ];\r\n }\r\n }\r\n ];\r\n\r\n // search through the definitions to find a match\r\n for (var i = 0; i < color_defs.length; i++) {\r\n var re = color_defs[i].re;\r\n var processor = color_defs[i].process;\r\n var bits = re.exec(color_string);\r\n if (bits) {\r\n channels = processor(bits);\r\n this.r = channels[0];\r\n this.g = channels[1];\r\n this.b = channels[2];\r\n this.ok = true;\r\n }\r\n\r\n }\r\n\r\n // validate/cleanup values\r\n this.r = (this.r < 0 || isNaN(this.r)) ? 0 : ((this.r > 255) ? 255 : this.r);\r\n this.g = (this.g < 0 || isNaN(this.g)) ? 0 : ((this.g > 255) ? 255 : this.g);\r\n this.b = (this.b < 0 || isNaN(this.b)) ? 0 : ((this.b > 255) ? 255 : this.b);\r\n\r\n // some getters\r\n this.toRGB = function () {\r\n return 'rgb(' + this.r + ', ' + this.g + ', ' + this.b + ')';\r\n }\r\n this.toHex = function () {\r\n var r = this.r.toString(16);\r\n var g = this.g.toString(16);\r\n var b = this.b.toString(16);\r\n if (r.length == 1) r = '0' + r;\r\n if (g.length == 1) g = '0' + g;\r\n if (b.length == 1) b = '0' + b;\r\n return '#' + r + g + b;\r\n }\r\n\r\n // help\r\n this.getHelpXML = function () {\r\n\r\n var examples = new Array();\r\n // add regexps\r\n for (var i = 0; i < color_defs.length; i++) {\r\n var example = color_defs[i].example;\r\n for (var j = 0; j < example.length; j++) {\r\n examples[examples.length] = example[j];\r\n }\r\n }\r\n // add type-in colors\r\n for (var sc in simple_colors) {\r\n examples[examples.length] = sc;\r\n }\r\n\r\n var xml = document.createElement('ul');\r\n xml.setAttribute('id', 'rgbcolor-examples');\r\n for (var i = 0; i < examples.length; i++) {\r\n try {\r\n var list_item = document.createElement('li');\r\n var list_color = new RGBColor(examples[i]);\r\n var example_div = document.createElement('div');\r\n example_div.style.cssText =\r\n 'margin: 3px; '\r\n + 'border: 1px solid black; '\r\n + 'background:' + list_color.toHex() + '; '\r\n + 'color:' + list_color.toHex()\r\n ;\r\n example_div.appendChild(document.createTextNode('test'));\r\n var list_item_value = document.createTextNode(\r\n ' ' + examples[i] + ' -> ' + list_color.toRGB() + ' -> ' + list_color.toHex()\r\n );\r\n list_item.appendChild(example_div);\r\n list_item.appendChild(list_item_value);\r\n xml.appendChild(list_item);\r\n\r\n } catch(e){}\r\n }\r\n return xml;\r\n\r\n }\r\n\r\n}", "function RGBColor(color_string)\r\n{\r\n this.ok = false;\r\n\r\n // strip any leading #\r\n if (color_string.charAt(0) == '#') { // remove # if any\r\n color_string = color_string.substr(1,6);\r\n }\r\n\r\n color_string = color_string.replace(/ /g,'');\r\n color_string = color_string.toLowerCase();\r\n\r\n // before getting into regexps, try simple matches\r\n // and overwrite the input\r\n var simple_colors = {\r\n aliceblue: 'f0f8ff',\r\n antiquewhite: 'faebd7',\r\n aqua: '00ffff',\r\n aquamarine: '7fffd4',\r\n azure: 'f0ffff',\r\n beige: 'f5f5dc',\r\n bisque: 'ffe4c4',\r\n black: '000000',\r\n blanchedalmond: 'ffebcd',\r\n blue: '0000ff',\r\n blueviolet: '8a2be2',\r\n brown: 'a52a2a',\r\n burlywood: 'deb887',\r\n cadetblue: '5f9ea0',\r\n chartreuse: '7fff00',\r\n chocolate: 'd2691e',\r\n coral: 'ff7f50',\r\n cornflowerblue: '6495ed',\r\n cornsilk: 'fff8dc',\r\n crimson: 'dc143c',\r\n cyan: '00ffff',\r\n darkblue: '00008b',\r\n darkcyan: '008b8b',\r\n darkgoldenrod: 'b8860b',\r\n darkgray: 'a9a9a9',\r\n darkgreen: '006400',\r\n darkkhaki: 'bdb76b',\r\n darkmagenta: '8b008b',\r\n darkolivegreen: '556b2f',\r\n darkorange: 'ff8c00',\r\n darkorchid: '9932cc',\r\n darkred: '8b0000',\r\n darksalmon: 'e9967a',\r\n darkseagreen: '8fbc8f',\r\n darkslateblue: '483d8b',\r\n darkslategray: '2f4f4f',\r\n darkturquoise: '00ced1',\r\n darkviolet: '9400d3',\r\n deeppink: 'ff1493',\r\n deepskyblue: '00bfff',\r\n dimgray: '696969',\r\n dodgerblue: '1e90ff',\r\n feldspar: 'd19275',\r\n firebrick: 'b22222',\r\n floralwhite: 'fffaf0',\r\n forestgreen: '228b22',\r\n fuchsia: 'ff00ff',\r\n gainsboro: 'dcdcdc',\r\n ghostwhite: 'f8f8ff',\r\n gold: 'ffd700',\r\n goldenrod: 'daa520',\r\n gray: '808080',\r\n green: '008000',\r\n greenyellow: 'adff2f',\r\n honeydew: 'f0fff0',\r\n hotpink: 'ff69b4',\r\n indianred : 'cd5c5c',\r\n indigo : '4b0082',\r\n ivory: 'fffff0',\r\n khaki: 'f0e68c',\r\n lavender: 'e6e6fa',\r\n lavenderblush: 'fff0f5',\r\n lawngreen: '7cfc00',\r\n lemonchiffon: 'fffacd',\r\n lightblue: 'add8e6',\r\n lightcoral: 'f08080',\r\n lightcyan: 'e0ffff',\r\n lightgoldenrodyellow: 'fafad2',\r\n lightgrey: 'd3d3d3',\r\n lightgreen: '90ee90',\r\n lightpink: 'ffb6c1',\r\n lightsalmon: 'ffa07a',\r\n lightseagreen: '20b2aa',\r\n lightskyblue: '87cefa',\r\n lightslateblue: '8470ff',\r\n lightslategray: '778899',\r\n lightsteelblue: 'b0c4de',\r\n lightyellow: 'ffffe0',\r\n lime: '00ff00',\r\n limegreen: '32cd32',\r\n linen: 'faf0e6',\r\n magenta: 'ff00ff',\r\n maroon: '800000',\r\n mediumaquamarine: '66cdaa',\r\n mediumblue: '0000cd',\r\n mediumorchid: 'ba55d3',\r\n mediumpurple: '9370d8',\r\n mediumseagreen: '3cb371',\r\n mediumslateblue: '7b68ee',\r\n mediumspringgreen: '00fa9a',\r\n mediumturquoise: '48d1cc',\r\n mediumvioletred: 'c71585',\r\n midnightblue: '191970',\r\n mintcream: 'f5fffa',\r\n mistyrose: 'ffe4e1',\r\n moccasin: 'ffe4b5',\r\n navajowhite: 'ffdead',\r\n navy: '000080',\r\n oldlace: 'fdf5e6',\r\n olive: '808000',\r\n olivedrab: '6b8e23',\r\n orange: 'ffa500',\r\n orangered: 'ff4500',\r\n orchid: 'da70d6',\r\n palegoldenrod: 'eee8aa',\r\n palegreen: '98fb98',\r\n paleturquoise: 'afeeee',\r\n palevioletred: 'd87093',\r\n papayawhip: 'ffefd5',\r\n peachpuff: 'ffdab9',\r\n peru: 'cd853f',\r\n pink: 'ffc0cb',\r\n plum: 'dda0dd',\r\n powderblue: 'b0e0e6',\r\n purple: '800080',\r\n red: 'ff0000',\r\n rosybrown: 'bc8f8f',\r\n royalblue: '4169e1',\r\n saddlebrown: '8b4513',\r\n salmon: 'fa8072',\r\n sandybrown: 'f4a460',\r\n seagreen: '2e8b57',\r\n seashell: 'fff5ee',\r\n sienna: 'a0522d',\r\n silver: 'c0c0c0',\r\n skyblue: '87ceeb',\r\n slateblue: '6a5acd',\r\n slategray: '708090',\r\n snow: 'fffafa',\r\n springgreen: '00ff7f',\r\n steelblue: '4682b4',\r\n tan: 'd2b48c',\r\n teal: '008080',\r\n thistle: 'd8bfd8',\r\n tomato: 'ff6347',\r\n turquoise: '40e0d0',\r\n violet: 'ee82ee',\r\n violetred: 'd02090',\r\n wheat: 'f5deb3',\r\n white: 'ffffff',\r\n whitesmoke: 'f5f5f5',\r\n yellow: 'ffff00',\r\n yellowgreen: '9acd32'\r\n };\r\n for (var key in simple_colors) {\r\n if (color_string == key) {\r\n color_string = simple_colors[key];\r\n }\r\n }\r\n // emd of simple type-in colors\r\n\r\n // array of color definition objects\r\n var color_defs = [\r\n {\r\n re: /^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,\r\n example: ['rgb(123, 234, 45)', 'rgb(255,234,245)'],\r\n process: function (bits){\r\n return [\r\n parseInt(bits[1]),\r\n parseInt(bits[2]),\r\n parseInt(bits[3])\r\n ];\r\n }\r\n },\r\n {\r\n re: /^(\\w{2})(\\w{2})(\\w{2})$/,\r\n example: ['#00ff00', '336699'],\r\n process: function (bits){\r\n return [\r\n parseInt(bits[1], 16),\r\n parseInt(bits[2], 16),\r\n parseInt(bits[3], 16)\r\n ];\r\n }\r\n },\r\n {\r\n re: /^(\\w{1})(\\w{1})(\\w{1})$/,\r\n example: ['#fb0', 'f0f'],\r\n process: function (bits){\r\n return [\r\n parseInt(bits[1] + bits[1], 16),\r\n parseInt(bits[2] + bits[2], 16),\r\n parseInt(bits[3] + bits[3], 16)\r\n ];\r\n }\r\n }\r\n ];\r\n\r\n // search through the definitions to find a match\r\n for (var i = 0; i < color_defs.length; i++) {\r\n var re = color_defs[i].re;\r\n var processor = color_defs[i].process;\r\n var bits = re.exec(color_string);\r\n if (bits) {\r\n channels = processor(bits);\r\n this.r = channels[0];\r\n this.g = channels[1];\r\n this.b = channels[2];\r\n this.ok = true;\r\n }\r\n\r\n }\r\n\r\n // validate/cleanup values\r\n this.r = (this.r < 0 || isNaN(this.r)) ? 0 : ((this.r > 255) ? 255 : this.r);\r\n this.g = (this.g < 0 || isNaN(this.g)) ? 0 : ((this.g > 255) ? 255 : this.g);\r\n this.b = (this.b < 0 || isNaN(this.b)) ? 0 : ((this.b > 255) ? 255 : this.b);\r\n\r\n // some getters\r\n this.toRGB = function () {\r\n return 'rgb(' + this.r + ', ' + this.g + ', ' + this.b + ')';\r\n }\r\n this.toHex = function () {\r\n var r = this.r.toString(16);\r\n var g = this.g.toString(16);\r\n var b = this.b.toString(16);\r\n if (r.length == 1) r = '0' + r;\r\n if (g.length == 1) g = '0' + g;\r\n if (b.length == 1) b = '0' + b;\r\n return '#' + r + g + b;\r\n }\r\n\r\n // help\r\n this.getHelpXML = function () {\r\n\r\n var examples = new Array();\r\n // add regexps\r\n for (var i = 0; i < color_defs.length; i++) {\r\n var example = color_defs[i].example;\r\n for (var j = 0; j < example.length; j++) {\r\n examples[examples.length] = example[j];\r\n }\r\n }\r\n // add type-in colors\r\n for (var sc in simple_colors) {\r\n examples[examples.length] = sc;\r\n }\r\n\r\n var xml = document.createElement('ul');\r\n xml.setAttribute('id', 'rgbcolor-examples');\r\n for (var i = 0; i < examples.length; i++) {\r\n try {\r\n var list_item = document.createElement('li');\r\n var list_color = new RGBColor(examples[i]);\r\n var example_div = document.createElement('div');\r\n example_div.style.cssText =\r\n 'margin: 3px; '\r\n + 'border: 1px solid black; '\r\n + 'background:' + list_color.toHex() + '; '\r\n + 'color:' + list_color.toHex()\r\n ;\r\n example_div.appendChild(document.createTextNode('test'));\r\n var list_item_value = document.createTextNode(\r\n ' ' + examples[i] + ' -> ' + list_color.toRGB() + ' -> ' + list_color.toHex()\r\n );\r\n list_item.appendChild(example_div);\r\n list_item.appendChild(list_item_value);\r\n xml.appendChild(list_item);\r\n\r\n } catch(e){}\r\n }\r\n return xml;\r\n\r\n }\r\n\r\n}", "function colorConverter (string) {\n \n// todo: study the Object.freeze \n const colorCodes = Object.freeze({\n \"blue\":\"rgb(40, 116, 237)\",\n \"brown\":\"rgb(255, 102, 102)\",\n \"brownish-red\":\"rgb(196, 136, 124)\",\n \"coral\":\"rgb(255, 102, 102)\",\n \"cream\":\"rgb(240, 237, 218)\",\n \"creamyWhite\":\"rgb(255, 253, 230)\",\n \"darkBlue\":\"rgb(0, 0, 153)\",\n \"darkPink\":\"rgb(255, 102, 153)\",\n \"darkPurple\":\"rgb(103, 0, 103)\",\n \"deepGreen\":\"rgb(0, 102, 0)\",\n \"deepPink\":\"rgb(212, 30, 90)\",\n \"emeraldGreen\":\"rgb(38, 115, 38)\",\n \"gold\":\"rgb(217, 195, 33)\",//stopped here, finish adding colors\n \"green\":\"rgb(50, 133, 59)\",\n \"greenish-white\":\"rgb(217, 242, 217)\",\n \"greenish-yellow\":\"rgb(230, 255, 179)\",\n \"indigoBlue\":\"rgb(74, 51, 222)\",\n \"lavender\":\"rgb(150, 153, 255)\",\n \"lightBlue\":\"rgb(179, 218, 255)\",\n \"lightGreen\":\"rgb(204, 255, 204)\",\n \"lightPink\":\"rgb(255, 204, 225)\",\n \"lilac\":\"rgb(230, 204, 255)\",\n \"magenta\":\"rgb(255, 0, 255)\",\n \"peach\":\"rgb(253, 217, 181)\",\n \"pink\":\"rgb(255, 102, 153)\",\n \"pinkish-lavender\":\"rgb(242, 211, 227)\",\n// \"purple and yellow\":\"rgba(0,100,0,0.75)\",//todo: need code instead of dark green\n \"purpleRed\":\"rgb(192, 0, 64)\",\n \"purplish-pink\":\"rgb(192, 96, 166)\",\n \"rose\":\"rgb(255, 153, 204)\",\n \"violet\":\"rgb(230, 130, 255)\",\n \"whiteAndPurple\":\"rgb(240, 240, 240)\",//todo: need code instead of dark green\n \"yellowish-green\":\"rgb(198, 210, 98)\", \n \"yellowCenter\":\"rgb(200, 200, 0)\"\n });\n \n //remove i_ (used to make inconspicuous) that might be in a name\n \n\t//if an rgb code is sent, return the color name\n if (string.slice(0,3) === \"rgb\") {\n for(let key in colorCodes) {\n if(colorCodes[key] === string) {\n return key;\n }\n }\n }\n //if a color name that needs to be converted is sent, return rgb\n else if (string in (colorCodes)) {\n return colorCodes[string];\n }\n //otherwise return a color name in camel case when needed\n //this is used when the color isn't listed in colorCodes, but\n //its name is valid as is or if converted to camel case notation\n else {\n return camelCase(string);\n }\n \n}", "function _named(str) {\n var c = COLOR_VALUES[str.toLowerCase()];\n if (c) {\n return {\n r: c[0],\n g: c[1],\n b: c[2],\n a: MAX_COLOR_ALPHA\n };\n }\n}", "function StringToRGB(input, return255, alpha255) {\n input = utils_1.convertCssColorToHex(input);\n if (validators_1.isValidStringColor(input)) {\n return HandleSet_1.ConvertString(input, return255, alpha255);\n }\n return null;\n}", "function seeColor(str){\n if(str.substring(0, 3) === 'red'){\n return 'red';\n }\n else if(str.substring(0,4) === 'blue'){\n return 'blue';\n }\n else\n return '';\n}", "function fromCSS(string) {\n var match = string.match(/^#(\\w{1,2})(\\w{1,2})(\\w{1,2})$/),\n components;\n if (match) {\n // Hex\n components = [0, 0, 0];\n for (var i = 0; i < 3; i++) {\n var value = match[i + 1];\n components[i] = parseInt(value.length == 1\n ? value + value : value, 16) / 255;\n }\n } else if (match = string.match(/^rgba?\\((.*)\\)$/)) {\n // RGB / RGBA\n components = match[1].split(',');\n for (var i = 0, l = components.length; i < l; i++) {\n var value = +components[i];\n components[i] = i < 3 ? value / 255 : value;\n }\n } else {\n // Named\n var cached = colorCache[string];\n if (!cached) {\n // Use a canvas to draw to with the given name and then retrieve\n // RGB values from. Build a cache for all the used colors.\n if (!colorCtx) {\n colorCtx = CanvasProvider.getContext(1, 1);\n colorCtx.globalCompositeOperation = 'copy';\n }\n // Set the current fillStyle to transparent, so that it will be\n // transparent instead of the previously set color in case the\n // new color can not be interpreted.\n colorCtx.fillStyle = 'rgba(0,0,0,0)';\n // Set the fillStyle of the context to the passed name and fill\n // the canvas with it, then retrieve the data for the drawn\n // pixel:\n colorCtx.fillStyle = string;\n colorCtx.fillRect(0, 0, 1, 1);\n var data = colorCtx.getImageData(0, 0, 1, 1).data;\n cached = colorCache[string] = [\n data[0] / 255,\n data[1] / 255,\n data[2] / 255\n ];\n }\n components = cached.slice();\n }\n return components;\n }", "function hexToRgb(hexStr) {\n var hexStrR, hexStrG, hexStrB;\n\n if (hexStr.length == 3) {\n hexStrR = hexStr.substr(0, 1) + hexStr.substr(0, 1);\n hexStrG = hexStr.substr(1, 1) + hexStr.substr(1, 1);\n hexStrB = hexStr.substr(2, 1) + hexStr.substr(2, 1);\n } else {\n hexStrR = hexStr.substr(0, 2);\n hexStrG = hexStr.substr(2, 2);\n hexStrB = hexStr.substr(4, 2);\n }\n\n var r = formatHexToDec(hexStrR);\n var g = formatHexToDec(hexStrG);\n var b = formatHexToDec(hexStrB);\n return {\n r: r,\n g: g,\n b: b,\n rgbStr: `rgb(${r}, ${g}, ${b})`\n }\n}", "function colorScheme(str) {\n\t\tlet hashes = hashNines(str);\n\t\tlet r = 100 + 15 * hashes[1];\n\t\tlet g = 100 + 15 * hashes[2];\n\t\tlet b = 100 + 15 * hashes[0];\n\t\tlet lightColor = `rgb(${r},${g},${b})`;\n\t\tlet lighterColor = `rgb(${r+20},${g+20},${b+20})`;\n\t\tlet darkColor = `rgb(${r-60},${g-60},${b-60})`;\n\t\treturn [lightColor, darkColor, lighterColor];\n\t}", "function parseColor(inputColor, defaultColor) {\n if (isString(inputColor)) {\n var colorStr = inputColor;\n\n if (isValidRGB(colorStr)) {\n var _context8;\n\n var rgb = map$2(_context8 = colorStr.substr(4).substr(0, colorStr.length - 5).split(\",\")).call(_context8, function (value) {\n return _parseInt$2(value);\n });\n\n colorStr = RGBToHex(rgb[0], rgb[1], rgb[2]);\n }\n\n if (isValidHex(colorStr) === true) {\n var hsv = hexToHSV(colorStr);\n var lighterColorHSV = {\n h: hsv.h,\n s: hsv.s * 0.8,\n v: Math.min(1, hsv.v * 1.02)\n };\n var darkerColorHSV = {\n h: hsv.h,\n s: Math.min(1, hsv.s * 1.25),\n v: hsv.v * 0.8\n };\n var darkerColorHex = HSVToHex(darkerColorHSV.h, darkerColorHSV.s, darkerColorHSV.v);\n var lighterColorHex = HSVToHex(lighterColorHSV.h, lighterColorHSV.s, lighterColorHSV.v);\n return {\n background: colorStr,\n border: darkerColorHex,\n highlight: {\n background: lighterColorHex,\n border: darkerColorHex\n },\n hover: {\n background: lighterColorHex,\n border: darkerColorHex\n }\n };\n } else {\n return {\n background: colorStr,\n border: colorStr,\n highlight: {\n background: colorStr,\n border: colorStr\n },\n hover: {\n background: colorStr,\n border: colorStr\n }\n };\n }\n } else {\n if (defaultColor) {\n var color = {\n background: inputColor.background || defaultColor.background,\n border: inputColor.border || defaultColor.border,\n highlight: isString(inputColor.highlight) ? {\n border: inputColor.highlight,\n background: inputColor.highlight\n } : {\n background: inputColor.highlight && inputColor.highlight.background || defaultColor.highlight.background,\n border: inputColor.highlight && inputColor.highlight.border || defaultColor.highlight.border\n },\n hover: isString(inputColor.hover) ? {\n border: inputColor.hover,\n background: inputColor.hover\n } : {\n border: inputColor.hover && inputColor.hover.border || defaultColor.hover.border,\n background: inputColor.hover && inputColor.hover.background || defaultColor.hover.background\n }\n };\n return color;\n } else {\n var _color = {\n background: inputColor.background || undefined,\n border: inputColor.border || undefined,\n highlight: isString(inputColor.highlight) ? {\n border: inputColor.highlight,\n background: inputColor.highlight\n } : {\n background: inputColor.highlight && inputColor.highlight.background || undefined,\n border: inputColor.highlight && inputColor.highlight.border || undefined\n },\n hover: isString(inputColor.hover) ? {\n border: inputColor.hover,\n background: inputColor.hover\n } : {\n border: inputColor.hover && inputColor.hover.border || undefined,\n background: inputColor.hover && inputColor.hover.background || undefined\n }\n };\n return _color;\n }\n }\n}", "function parseColor(inputColor, defaultColor) {\n if (isString(inputColor)) {\n var colorStr = inputColor;\n\n if (isValidRGB(colorStr)) {\n var _context8;\n\n var rgb = map$2(_context8 = colorStr.substr(4).substr(0, colorStr.length - 5).split(\",\")).call(_context8, function (value) {\n return _parseInt$2(value);\n });\n\n colorStr = RGBToHex(rgb[0], rgb[1], rgb[2]);\n }\n\n if (isValidHex(colorStr) === true) {\n var hsv = hexToHSV(colorStr);\n var lighterColorHSV = {\n h: hsv.h,\n s: hsv.s * 0.8,\n v: Math.min(1, hsv.v * 1.02)\n };\n var darkerColorHSV = {\n h: hsv.h,\n s: Math.min(1, hsv.s * 1.25),\n v: hsv.v * 0.8\n };\n var darkerColorHex = HSVToHex(darkerColorHSV.h, darkerColorHSV.s, darkerColorHSV.v);\n var lighterColorHex = HSVToHex(lighterColorHSV.h, lighterColorHSV.s, lighterColorHSV.v);\n return {\n background: colorStr,\n border: darkerColorHex,\n highlight: {\n background: lighterColorHex,\n border: darkerColorHex\n },\n hover: {\n background: lighterColorHex,\n border: darkerColorHex\n }\n };\n } else {\n return {\n background: colorStr,\n border: colorStr,\n highlight: {\n background: colorStr,\n border: colorStr\n },\n hover: {\n background: colorStr,\n border: colorStr\n }\n };\n }\n } else {\n if (defaultColor) {\n var color = {\n background: inputColor.background || defaultColor.background,\n border: inputColor.border || defaultColor.border,\n highlight: isString(inputColor.highlight) ? {\n border: inputColor.highlight,\n background: inputColor.highlight\n } : {\n background: inputColor.highlight && inputColor.highlight.background || defaultColor.highlight.background,\n border: inputColor.highlight && inputColor.highlight.border || defaultColor.highlight.border\n },\n hover: isString(inputColor.hover) ? {\n border: inputColor.hover,\n background: inputColor.hover\n } : {\n border: inputColor.hover && inputColor.hover.border || defaultColor.hover.border,\n background: inputColor.hover && inputColor.hover.background || defaultColor.hover.background\n }\n };\n return color;\n } else {\n var _color = {\n background: inputColor.background || undefined,\n border: inputColor.border || undefined,\n highlight: isString(inputColor.highlight) ? {\n border: inputColor.highlight,\n background: inputColor.highlight\n } : {\n background: inputColor.highlight && inputColor.highlight.background || undefined,\n border: inputColor.highlight && inputColor.highlight.border || undefined\n },\n hover: isString(inputColor.hover) ? {\n border: inputColor.hover,\n background: inputColor.hover\n } : {\n border: inputColor.hover && inputColor.hover.border || undefined,\n background: inputColor.hover && inputColor.hover.background || undefined\n }\n };\n return _color;\n }\n }\n}", "function hslaColor(str) {\n /*\n Split the string by the following 3 characters:\n * (\n * )\n * ,\n This will always leave an empty string as the last item in the array.\n */\n const [type, h, s, l, a, empty] = str.split(/[\\(\\),]/)\n const isHsl = type === 'hsl'\n const error = new TypeError(`\"${str}\" isn't a valid ${type} color.`)\n const getPercentNumAndCheck = val => {\n const num = +val.slice(0, -1)\n if (!/%$/.test(val) || !numCheck(num, 0, 100)) throw error\n return num / 100\n }\n\n // Check for the correct ending and the correct empty string - there's always an empty string.\n if (!str.endsWith(')') || (isHsl ? a : empty) !== '') throw error\n\n const hue = safeHue(h)\n const saturation = getPercentNumAndCheck(s)\n const lightness = getPercentNumAndCheck(l)\n const alpha = isHsl ? 1 : +a\n const alphaOk = numCheck(alpha, 0, 1)\n\n if (isNaN(hue) || !alphaOk) throw error\n\n const results = {h: hue, s: saturation, l: lightness, a: alpha}\n return addHex(addRgb(results))\n}", "function color2Rgb(color) {\n if (color.toLowerCase() in engColors) {\n // Decode English language colors with the map\n color = engColors[color.toLowerCase()];\n }\n var match,\n factor;\n if (color.length >= 6) {\n // Match double-wide characters\n match = color.match(/^\\#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i);\n factor = 1;\n } else {\n // Match single-wide characters\n match = color.match(/^\\#?([0-9a-f])([0-9a-f])([0-9a-f])$/i);\n factor = 16;\n }\n if (match == null || match.length < 4) {\n return null;\n } else {\n var vals = $$.select(match.slice(1, 4), function(val) { return /*factor **/ parseInt(val, 16); });\n return {\n r: vals[0],\n g: vals[1],\n b: vals[2],\n base: 256 / factor\n };\n }\n}", "function hexToRgb(e){var a=/^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;e=e.replace(a,function(e,a,t,i){return a+a+t+t+i+i});var t=/^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}", "function hexToRgb(e){var a=/^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;e=e.replace(a,function(e,a,t,i){return a+a+t+t+i+i});var t=/^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}", "function hexToRgb(e){var a=/^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;e=e.replace(a,function(e,a,t,i){return a+a+t+t+i+i});var t=/^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}" ]
[ "0.76101536", "0.76101536", "0.7584859", "0.7551137", "0.753427", "0.7420546", "0.7363761", "0.7351614", "0.73077554", "0.7294883", "0.7293897", "0.7293897", "0.7293897", "0.7293897", "0.72887504", "0.7273011", "0.7273011", "0.72710276", "0.72638", "0.72638", "0.7235114", "0.72198516", "0.72150856", "0.72041386", "0.7197365", "0.71882385", "0.71824044", "0.7181229", "0.7181229", "0.71785265", "0.71785265", "0.71699387", "0.71659184", "0.715231", "0.71474504", "0.7143171", "0.7143171", "0.7143171", "0.7143171", "0.7143171", "0.7143171", "0.7143171", "0.7140268", "0.7136958", "0.7132416", "0.7061132", "0.7061132", "0.70498455", "0.70498455", "0.7003837", "0.69581944", "0.6941751", "0.68757486", "0.68757486", "0.68702096", "0.67802227", "0.67724615", "0.67592865", "0.66624415", "0.6657812", "0.6637751", "0.6631934", "0.6631934", "0.6624782", "0.66082907", "0.660569", "0.660569", "0.660569" ]
0.7249848
50
`rgbToHex` Converts an RGB color to hex Assumes r, g, and b are contained in the set [0, 255] Returns a 3 or 6 character hex
function rgbToHex(r, g, b, allow3Char) { var hex = [ pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16)) ]; // Return a 3 character hex if possible if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) { return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0); } return hex.join(""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rgbToHex(r, g, b) {\n return '#' + componentToHex(r) + componentToHex(g) + componentToHex(b)\n}", "function rgbToHex(r, g, b) {\n return \"#\" + componentToHex(r) + componentToHex(g) + componentToHex(b);\n}", "function rgbToHex(r, g, b) {\n return \"#\" + componentToHex(r) + componentToHex(g) + componentToHex(b);\n}", "function rgbToHex(r, g, b) {\n return \"#\" + componentToHex(r) + componentToHex(g) + componentToHex(b);\n}", "function rgbToHex (r, g, b) {\n var hx = '#' + componentToHex(r) + componentToHex(g) + componentToHex(b);\n return (hx);\n}", "function rgbToHex(r, g, b) {\n var hex = \"#\" + convertToHex(r) + convertToHex(g) + convertToHex(b);\n return hex;\n}", "function rgbToHex(R,G,B) { return toHex(R)+toHex(G)+toHex(B); }", "function rgbToHex(r, g, b) {\n\t\t return \"#\" + componentToHex(r) + componentToHex(g) + componentToHex(b);\n\t\t}", "function rgbToHex(rgb){\n var hex = Number(rgb).toString(16);\n if (hex.length < 2) {\n hex = \"0\" + hex;\n }\n return hex;\n\n function fullColorHex(r,g,b){\n var red = rgbToHex(r);\n var green = rgbToHex(g);\n var blue = rgbToHex(b);\n return red+green+blue;\n }\n}", "function rgbToHex(r, g, b) {\n return \"#\" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);\n}", "function rgbToHex(r, g, b) {\n return \"#\" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);\n}", "rgbToHex(r, g, b) {\n return (\"#\" +\n this.componentToHex(r) +\n this.componentToHex(g) +\n this.componentToHex(b));\n }", "function colorRGBToHex(rgb){\n var color = rgb.toString().match(/\\d+/g);\n var hex = \"#\";\n for (var i = 0; i < 3; i++) {\n hex += (\"0\" + Number(color[i]).toString(16)).slice(-2);\n }\n return hex;\n}", "function rgbToHex(rgb) {\n return \"#\" + pad2(rgb.r.toString(16)) + pad2(rgb.g.toString(16)) + pad2(rgb.b.toString(16));\n}", "function rgbToHex(rgb) {\n hex = rgb.r.toString(16);\n r = hex.length == 1 ? \"0\" + hex : hex;\n hex = rgb.g.toString(16);\n g = hex.length == 1 ? \"0\" + hex : hex;\n hex = rgb.b.toString(16);\n b = hex.length == 1 ? \"0\" + hex : hex;\n return \"#\" + r + g + b;\n}", "function RGBToHex(rgb) {\n // Choose correct separator\n let sep = rgb.indexOf(\",\") > -1 ? \",\" : \" \";\n // Turn \"rgb(r,g,b)\" into [r,g,b]\n rgb = rgb.substr(4).split(\")\")[0].split(sep);\n \n let r = (+rgb[0]).toString(16),\n g = (+rgb[1]).toString(16),\n b = (+rgb[2]).toString(16);\n \n if (r.length == 1)\n r = \"0\" + r;\n if (g.length == 1)\n g = \"0\" + g;\n if (b.length == 1)\n b = \"0\" + b;\n \n return \"#\" + r + g + b;\n }", "function rgbToHex(rgb) {\n const hexR = rgb.r.toString(16).padStart(2, \"0\");\n const hexG = rgb.g.toString(16).padStart(2, \"0\");\n const hexB = rgb.b.toString(16).padStart(2, \"0\");\n\n return \"#\" + hexR + hexG + hexB;\n}", "function RGBToHex(r, g, b) {\n r = r.toString(16);\n g = g.toString(16);\n b = b.toString(16);\n\n if (r.length == 1) r = \"0\" + r;\n if (g.length == 1) g = \"0\" + g;\n if (b.length == 1) b = \"0\" + b;\n\n return \"#\" + r + g + b;\n}", "function RGBToHex(r, g, b) {\r\n return \"#\" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);\r\n }", "function rgbToHex(rgb) {\n hex = rgb.r.toString(16);\n r = hex.length == 1 ? \"0\" + hex : hex;\n hex = rgb.g.toString(16);\n g = hex.length == 1 ? \"0\" + hex : hex;\n hex = rgb.b.toString(16);\n b = hex.length == 1 ? \"0\" + hex : hex;\n return \"#\" + r + g + b;\n }", "function rgbToHex(r, g, b) {\n\n var hex = [\n r.toString(16),\n g.toString(16),\n b.toString(16)\n ];\n\n\n return hex.join(\"\");\n }", "function rgbToHex(rgb) {\n let r = rgb.r.toString(16).padStart(2, '0');\n let g = rgb.g.toString(16).padStart(2, '0');\n let b = rgb.b.toString(16).padStart(2, '0');\n return `#${r}${g}${b}`;\n}", "function rgbToHex(rgb){\n rgb = rgb.replace(\"rgb(\", \"\");\n rgb = rgb.replace(\")\", \"\");\n rgb = rgb.split(\",\");\n\n function deciToHex(rgb) {\n const BASE = 16;\n const ALPHABET = [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"A\", \"B\", \"C\", \"D\", \"E\", \"F\"];\n\n let rightHex = rgb % BASE;\n let leftHex = (rgb - rightHex) / BASE;\n return ALPHABET[leftHex] + ALPHABET[rightHex];\n }\n\n return '#' + deciToHex(rgb[0]) + deciToHex(rgb[1]) + deciToHex(rgb[2]);\n }", "function rgbToHex(rgb) \n {\n var hexCode = \"\"; \n for(var i=0; i < rgb.length; i++)\n {\n var hex = parseInt(rgb[i]).toString(16);\n hex = hex.length == 1 ? \"0\" + hex : hex; \n hexCode += hex;\n }\n\n return \"#\" + hexCode;\n }", "function rgbTohex(r, g, b) {\r\n return \"#\" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);\r\n}", "function rgbToHex(rgb){ \r\n\t\tvar hex = Number(rgb).toString(16);\r\n\t\tif (hex.length < 2) {\r\n\t\t hex = \"0\" + hex;\r\n\t\t}\r\n\t\treturn hex;\r\n\t\t}", "function rgbToHex(rNum, gNum, bNum) {\n var r = rNum.toString(16);\n var g = gNum.toString(16);\n var b = bNum.toString(16);\n r = r.length < 2 ? '0' + r : r;\n g = g.length < 2 ? '0' + g : g;\n b = b.length < 2 ? '0' + b : b;\n return '#' + r + g + b;\n}", "function rgbToHex(r, g, b, allow3Char) {\n var hex = [(0,_util__WEBPACK_IMPORTED_MODULE_0__/* .pad2 */ .FZ)(Math.round(r).toString(16)), (0,_util__WEBPACK_IMPORTED_MODULE_0__/* .pad2 */ .FZ)(Math.round(g).toString(16)), (0,_util__WEBPACK_IMPORTED_MODULE_0__/* .pad2 */ .FZ)(Math.round(b).toString(16))];\n // Return a 3 character hex if possible\n if (allow3Char && hex[0].startsWith(hex[0].charAt(1)) && hex[1].startsWith(hex[1].charAt(1)) && hex[2].startsWith(hex[2].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n }\n return hex.join('');\n}", "function rgbToHex(r, g, b, allow3Char) {\n var hex = [pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16))]; // Return a 3 character hex if possible\n\n if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n }\n\n return hex.join(\"\");\n } // `rgbaToHex`", "function rgbToHex(r, g, b, allow3Char) {\n var hex = [pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16))]; // Return a 3 character hex if possible\n\n if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n }\n\n return hex.join(\"\");\n } // `rgbaToHex`", "function rgbToHex(r, g, b, allow3Char) {\n var hex = [\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(r).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(g).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(b).toString(16)),\n ];\n // Return a 3 character hex if possible\n if (allow3Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n }\n return hex.join('');\n}", "function rgbToHex(r, g, b, allow3Char) {\n var hex = [\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(r).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(g).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(b).toString(16)),\n ];\n // Return a 3 character hex if possible\n if (allow3Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n }\n return hex.join('');\n}", "function rgbToHex(r, g, b, allow3Char) {\n var hex = [\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(r).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(g).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(b).toString(16)),\n ];\n // Return a 3 character hex if possible\n if (allow3Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n }\n return hex.join('');\n}", "function rgbToHex(r, g, b, allow3Char) {\n var hex = [\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(r).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(g).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(b).toString(16)),\n ];\n // Return a 3 character hex if possible\n if (allow3Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n }\n return hex.join('');\n}", "function rgbToHex(r, g, b, allow3Char) {\n var hex = [\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(r).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(g).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(b).toString(16)),\n ];\n // Return a 3 character hex if possible\n if (allow3Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n }\n return hex.join('');\n}", "function convertToHex(rgb) {\n return '#' + hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]);\n}", "function rgbToHex(r, g, b, allow3Char) {\n var hex = [\n Object(_util__WEBPACK_IMPORTED_MODULE_0__['pad2'])(\n Math.round(r).toString(16),\n ),\n Object(_util__WEBPACK_IMPORTED_MODULE_0__['pad2'])(\n Math.round(g).toString(16),\n ),\n Object(_util__WEBPACK_IMPORTED_MODULE_0__['pad2'])(\n Math.round(b).toString(16),\n ),\n ];\n // Return a 3 character hex if possible\n if (\n allow3Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1))\n ) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n }\n return hex.join('');\n }", "rgbToHex(rgb) {\n const result = rgb.match(/\\d+/g);\n\n function hex(x) {\n var digits = new Array(\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"A\", \"B\", \"C\", \"D\", \"E\", \"F\");\n return isNaN(x) ? \"00\" : digits[(x - x % 16 ) / 16] + digits[x % 16];\n }\n\n return \"#\" + hex(result[0]) + hex(result[1]) + hex(result[2]);\n }", "function rgbToHexConverter(rgb) {\n const regex = /[\\(|\\)|r|g|b| ]/g\n let rgbString = rgb.replace(regex, '')\n let rgbArr = new Array();\n rgbArr = rgbString.split(\",\");\n const hex = \"#\" + ((1 << 24) + ((+rgbArr[0]) << 16) + ((+rgbArr[1]) << 8) + (+rgbArr[2])).toString(16).slice(1);\n return hex\n}", "function rgb2Hex(rgb) {\n return \"#\" + hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]);\n}", "function rgbToHex(r, g, b, allow3Char) {\n var hex = [\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util__[\"d\" /* pad2 */])(Math.round(r).toString(16)),\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util__[\"d\" /* pad2 */])(Math.round(g).toString(16)),\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util__[\"d\" /* pad2 */])(Math.round(b).toString(16)),\n ];\n // Return a 3 character hex if possible\n if (allow3Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n }\n return hex.join('');\n}", "function rgb2hex(r, g, b) {\n var hex = [\n r.toString( 16 ),\n g.toString( 16 ),\n b.toString( 16 )\n ];\n $.each( hex, function( nr, val ) {\n if ( val.length === 1 ) {\n hex[ nr ] = \"0\" + val;\n }\n });\n return hex.join( \"\" ).toUpperCase();\n }", "function convertToHex (rgb) {\n return hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]);\n}", "function convertToHex (rgb) {\n return hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]);\n}", "function rgb2hex(r, g, b) {\n return '#' \n + ('0' + r.toString(16)).slice(-2)\n + ('0' + g.toString(16)).slice(-2)\n + ('0' + b.toString(16)).slice(-2); \n}", "function rgb2hex(rgb) {\n return \"#\" + hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]);\n }", "function convertToHex (rgb) {\n return hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]);\n}", "function rgbToHex(r, g, b, allow3Char) {\n const hex = [\n util_1.pad2(Math.round(r).toString(16)),\n util_1.pad2(Math.round(g).toString(16)),\n util_1.pad2(Math.round(b).toString(16)),\n ];\n // Return a 3 character hex if possible\n if (allow3Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n }\n return hex.join('');\n}", "function rgbHex(rgb) {\n let hex = '#';\n for (let i = 0; i < 3; i++) {\n hex += d2h(rgb[i]);\n }\n return hex;\n}", "function rgb2hex(rgb) {\r\n return \"#\" + hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]);\r\n }", "function rgb2hex(rgb) {\n rgb = rgb.match(/^rgb\\((\\d+),\\s*(\\d+),\\s*(\\d+)\\)$/);\n $val=\"#\" + hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3])\n return $val.toUpperCase();\n}", "function convertToHex(rgb) {\n return hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]);\n }", "function rgb2hex(r, g, b) {\r\n return [_rgbToPaddedHex(r), _rgbToPaddedHex(g), _rgbToPaddedHex(b)].join('');\r\n}", "function RGBtoHex(r, g, b) {\n\t\treturn \"#\" + unitConversion(r) + unitConversion(g) + unitConversion(b);\n\t\t}", "function rgbToHex(hex){\n return toHex(hex[0])+toHex(hex[1])+toHex(hex[2]);\n}", "function rgb2hex(r, g, b) {\n return [_rgbToPaddedHex(r), _rgbToPaddedHex(g), _rgbToPaddedHex(b)].join('');\n}", "function rgb2hex(rgb) {\r\n rgb = rgb.match(/^rgb\\((\\d+),\\s*(\\d+),\\s*(\\d+)\\)$/);\r\n return \"#\" + hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]);\r\n}", "function rgb2hex(rgb) {\n rgb = rgb.match(/^rgb\\((\\d+),\\s*(\\d+),\\s*(\\d+)\\)$/);\n return \"#\" + hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]);\n}", "function rgb2hex(rgb) {\n rgb = rgb.match(/^rgb\\((\\d+),\\s*(\\d+),\\s*(\\d+)\\)$/);\n return \"#\" + hexify(rgb[1]) + hexify(rgb[2]) + hexify(rgb[3]);\n }", "function rgbToHex(rgbObj) {\n return '#' + formatDecToHex(rgbObj.r) + formatDecToHex(rgbObj.g) + formatDecToHex(rgbObj.b);\n}", "function rgb2hex(rgb) {\n var hex = [\n rgb.r.toString(16),\n rgb.g.toString(16),\n rgb.b.toString(16)\n ];\n $.each(hex, function(nr, val) {\n if(val.length === 1) hex[nr] = '0' + val;\n });\n return '#' + hex.join('');\n }", "function rgb2hex(rgb){\n rgb = rgb.match(/^rgb\\((\\d+),\\s*(\\d+),\\s*(\\d+)\\)$/);\n return rgb ? \"#\" +\n (\"0\" + parseInt(rgb[1],10).toString(16)).slice(-2) +\n (\"0\" + parseInt(rgb[2],10).toString(16)).slice(-2) +\n (\"0\" + parseInt(rgb[3],10).toString(16)).slice(-2) : '#00000000';\n }", "function rgb2hex(rgb) {\n rgb = rgb.match(/^rgb\\((\\d+),\\s*(\\d+),\\s*(\\d+)\\)$/);\n return hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]);\n}", "function rgbToHex(r, g, b, allow3Char) {\n\n var hex = [pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16))];\n\n // Return a 3 character hex if possible\n if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n }\n\n return hex.join(\"\");\n }", "function rgb2hex(rgb) {\r\n var hex = [\r\n rgb.r.toString(16),\r\n rgb.g.toString(16),\r\n rgb.b.toString(16)\r\n ];\r\n $.each(hex, function(nr, val) {\r\n if(val.length === 1) hex[nr] = '0' + val;\r\n });\r\n return '#' + hex.join('');\r\n }", "function rgb2hex(rgb) {\n rgb = rgb.match(/^rgb\\((\\d+),\\s*(\\d+),\\s*(\\d+)\\)$/);\n return '#' + hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]);\n }" ]
[ "0.8503501", "0.8486479", "0.84731126", "0.84731126", "0.84264696", "0.8352944", "0.83259827", "0.82644963", "0.82461166", "0.823947", "0.82267046", "0.8167519", "0.81094265", "0.80909735", "0.80686516", "0.8020955", "0.80175596", "0.8009066", "0.80053276", "0.79967576", "0.7960185", "0.7958823", "0.79292446", "0.79214656", "0.78889716", "0.7878381", "0.78749853", "0.78672296", "0.7847145", "0.7847145", "0.78293175", "0.78293175", "0.78293175", "0.78293175", "0.78293175", "0.7795887", "0.7790825", "0.77905864", "0.7762699", "0.7761687", "0.7749809", "0.77424145", "0.77126664", "0.77126664", "0.7710004", "0.7707606", "0.7698017", "0.7674668", "0.76692915", "0.7668688", "0.7665928", "0.76634187", "0.7651232", "0.7642184", "0.76400095", "0.76264095", "0.7621164", "0.7613868", "0.760669", "0.76054317", "0.76008004", "0.75930107", "0.75905305", "0.75839883", "0.7582882", "0.7569143" ]
0.7586019
95
`rgbaToHex` Converts an RGBA color plus alpha transparency to hex Assumes r, g, b are contained in the set [0, 255] and a in [0, 1]. Returns a 4 or 8 character rgba hex
function rgbaToHex(r, g, b, a, allow4Char) { var hex = [ pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16)), pad2(convertDecimalToHex(a)) ]; // Return a 4 character hex if possible if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) { return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0); } return hex.join(""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rgbaToHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}", "function rgbaToHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n }", "function rgbaToHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n }", "function rgbaToHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n }", "function rgbaToHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n }", "function rgbaToHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n }", "function rgbaToHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n }", "function rgbaToHex(r, g, b, a) {\n\t\n\t var hex = [\n\t pad2(convertDecimalToHex(a)),\n\t pad2(mathRound(r).toString(16)),\n\t pad2(mathRound(g).toString(16)),\n\t pad2(mathRound(b).toString(16))\n\t ];\n\t\n\t return hex.join(\"\");\n\t}", "function rgbaToHex(r, g, b, a) {\n\n\t\t\t\t\tvar hex = [\n\t\t\t\t\t\t\tpad2(convertDecimalToHex(a)),\n\t\t\t\t\t\t\tpad2(mathRound(r).toString(16)),\n\t\t\t\t\t\t\tpad2(mathRound(g).toString(16)),\n\t\t\t\t\t\t\tpad2(mathRound(b).toString(16))\n\t\t\t\t\t];\n\n\t\t\t\t\treturn hex.join(\"\");\n\t\t\t}", "function rgbaToHex(r, g, b, a) {\n\n\t\t\t\t\tvar hex = [\n\t\t\t\t\t\t\tpad2(convertDecimalToHex(a)),\n\t\t\t\t\t\t\tpad2(mathRound(r).toString(16)),\n\t\t\t\t\t\t\tpad2(mathRound(g).toString(16)),\n\t\t\t\t\t\t\tpad2(mathRound(b).toString(16))\n\t\t\t\t\t];\n\n\t\t\t\t\treturn hex.join(\"\");\n\t\t\t}", "function rgbaToArgbHex(r, g, b, a) {\n var hex = [pad2(convertDecimalToHex(a)), pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16))];\n return hex.join(\"\");\n } // `equals`", "function rgbaToArgbHex(r, g, b, a) {\n var hex = [pad2(convertDecimalToHex(a)), pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16))];\n return hex.join(\"\");\n } // `equals`", "function rgbaToArgbHex(r, g, b, a) {\n var hex = [pad2(convertDecimalToHex(a)), pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))];\n return hex.join('');\n}", "function rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}", "function rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}", "function rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}", "function rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}", "function rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}", "function rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}", "function rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}", "function rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}", "function rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}", "function rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}", "function rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}", "function rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}", "function rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}", "function rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}", "function rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}", "function rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}", "function rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}", "function rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}", "function rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}", "function rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}", "function rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}", "function rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}", "function rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}", "function rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}", "function rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}", "function rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}", "function rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}", "function rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}", "function rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}", "function rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}", "function rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}", "function rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}", "function rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}", "function rgbaToArgbHex(r, g, b, a) {\n\n var hex = [pad2(convertDecimalToHex(a)), pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16))];\n\n return hex.join(\"\");\n }", "function rgbaToArgbHex(r, g, b, a) {\n const hex = [\n util_1.pad2(convertDecimalToHex(a)),\n util_1.pad2(Math.round(r).toString(16)),\n util_1.pad2(Math.round(g).toString(16)),\n util_1.pad2(Math.round(b).toString(16)),\n ];\n return hex.join('');\n}", "function rgb2hex(rgba) {\n let sep = rgba.indexOf(\",\") > -1 ? \",\" : \" \";\n rgba = rgba.substr(rgba.indexOf(\"(\")+1).split(\")\")[0].split(sep);\n\n let r = (+rgba[0]).toString(16),\n g = (+rgba[1]).toString(16),\n b = (+rgba[2]).toString(16),\n a = rgba[3] * 255;\n\n if (r.length == 1) {\n r = \"0\" + r;\n } \n if (g.length == 1) {\n g = \"0\" + g;\n }\n if (b.length == 1) {\n b = \"0\" + b;\n }\n\n // rgb exception\n if (isNaN(a)) {\n a = \"\";\n } else {\n if (a == 0) {\n return \"transparent\";\n }\n a = Math.round(a).toString(16); // \" \" + a + \"%\";\n if (a.length == 1) {\n a = \"0\" + a;\n }\n }\n\n return \"#\" + r + g + b + a;\n}", "function rgbaToArgbHex(r, g, b, a) {\n\t var hex = [pad2(convertDecimalToHex(a)), pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))];\n\t return hex.join(\"\");\n\t}", "function rgbaToHex(r, g, b, a, allow4Char) {\n var hex = [pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16)), pad2(convertDecimalToHex(a))]; // Return a 4 character hex if possible\n\n if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n\n return hex.join(\"\");\n } // `rgbaToArgbHex`", "function rgbaToHex(r, g, b, a, allow4Char) {\n var hex = [pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16)), pad2(convertDecimalToHex(a))]; // Return a 4 character hex if possible\n\n if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n\n return hex.join(\"\");\n } // `rgbaToArgbHex`", "function rgbaToArgbHex(r, g, b, a) {\n\t\n\t var hex = [\n\t pad2(convertDecimalToHex(a)),\n\t pad2(mathRound(r).toString(16)),\n\t pad2(mathRound(g).toString(16)),\n\t pad2(mathRound(b).toString(16))\n\t ];\n\t\n\t return hex.join(\"\");\n\t}", "function rgbaToArgbHex(r, g, b, a) {\n\t\n\t var hex = [\n\t pad2(convertDecimalToHex(a)),\n\t pad2(mathRound(r).toString(16)),\n\t pad2(mathRound(g).toString(16)),\n\t pad2(mathRound(b).toString(16))\n\t ];\n\t\n\t return hex.join(\"\");\n\t}", "function rgbaToArgbHex(r, g, b, a) {\n var hex = [\n Object(_util__WEBPACK_IMPORTED_MODULE_0__['pad2'])(\n convertDecimalToHex(a),\n ),\n Object(_util__WEBPACK_IMPORTED_MODULE_0__['pad2'])(\n Math.round(r).toString(16),\n ),\n Object(_util__WEBPACK_IMPORTED_MODULE_0__['pad2'])(\n Math.round(g).toString(16),\n ),\n Object(_util__WEBPACK_IMPORTED_MODULE_0__['pad2'])(\n Math.round(b).toString(16),\n ),\n ];\n return hex.join('');\n }", "function rgbaToArgbHex(r, g, b, a) {\n var hex = [\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(convertDecimalToHex(a)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(r).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(g).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(b).toString(16)),\n ];\n return hex.join('');\n}", "function rgbaToArgbHex(r, g, b, a) {\n var hex = [\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(convertDecimalToHex(a)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(r).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(g).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(b).toString(16)),\n ];\n return hex.join('');\n}", "function rgbaToArgbHex(r, g, b, a) {\n var hex = [\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(convertDecimalToHex(a)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(r).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(g).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(b).toString(16)),\n ];\n return hex.join('');\n}", "function rgbaToArgbHex(r, g, b, a) {\n var hex = [\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(convertDecimalToHex(a)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(r).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(g).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(b).toString(16)),\n ];\n return hex.join('');\n}", "function rgbaToArgbHex(r, g, b, a) {\n var hex = [\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(convertDecimalToHex(a)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(r).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(g).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(b).toString(16)),\n ];\n return hex.join('');\n}", "function rgbaToHex(r, g, b, a, allow4Char) {\n var hex = [(0,_util__WEBPACK_IMPORTED_MODULE_0__/* .pad2 */ .FZ)(Math.round(r).toString(16)), (0,_util__WEBPACK_IMPORTED_MODULE_0__/* .pad2 */ .FZ)(Math.round(g).toString(16)), (0,_util__WEBPACK_IMPORTED_MODULE_0__/* .pad2 */ .FZ)(Math.round(b).toString(16)), (0,_util__WEBPACK_IMPORTED_MODULE_0__/* .pad2 */ .FZ)(convertDecimalToHex(a))];\n // Return a 4 character hex if possible\n if (allow4Char && hex[0].startsWith(hex[0].charAt(1)) && hex[1].startsWith(hex[1].charAt(1)) && hex[2].startsWith(hex[2].charAt(1)) && hex[3].startsWith(hex[3].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n return hex.join('');\n}", "function rgbaToHex(r, g, b, a, allow4Char) {\n var hex = [\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(r).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(g).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(b).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(convertDecimalToHex(a)),\n ];\n // Return a 4 character hex if possible\n if (allow4Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1)) &&\n hex[3].startsWith(hex[3].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n return hex.join('');\n}", "function rgbaToHex(r, g, b, a, allow4Char) {\n var hex = [\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(r).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(g).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(b).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(convertDecimalToHex(a)),\n ];\n // Return a 4 character hex if possible\n if (allow4Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1)) &&\n hex[3].startsWith(hex[3].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n return hex.join('');\n}", "function rgbaToHex(r, g, b, a, allow4Char) {\n var hex = [\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(r).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(g).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(b).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(convertDecimalToHex(a)),\n ];\n // Return a 4 character hex if possible\n if (allow4Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1)) &&\n hex[3].startsWith(hex[3].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n return hex.join('');\n}", "function rgbaToHex(r, g, b, a, allow4Char) {\n var hex = [\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(r).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(g).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(b).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(convertDecimalToHex(a)),\n ];\n // Return a 4 character hex if possible\n if (allow4Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1)) &&\n hex[3].startsWith(hex[3].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n return hex.join('');\n}", "function rgbaToHex(r, g, b, a, allow4Char) {\n var hex = [\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(r).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(g).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(b).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(convertDecimalToHex(a)),\n ];\n // Return a 4 character hex if possible\n if (allow4Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1)) &&\n hex[3].startsWith(hex[3].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n return hex.join('');\n}", "function rgbaToHex(r, g, b, a, allow4Char) {\n var hex = [\n Object(_util__WEBPACK_IMPORTED_MODULE_0__['pad2'])(\n Math.round(r).toString(16),\n ),\n Object(_util__WEBPACK_IMPORTED_MODULE_0__['pad2'])(\n Math.round(g).toString(16),\n ),\n Object(_util__WEBPACK_IMPORTED_MODULE_0__['pad2'])(\n Math.round(b).toString(16),\n ),\n Object(_util__WEBPACK_IMPORTED_MODULE_0__['pad2'])(\n convertDecimalToHex(a),\n ),\n ];\n // Return a 4 character hex if possible\n if (\n allow4Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1)) &&\n hex[3].startsWith(hex[3].charAt(1))\n ) {\n return (\n hex[0].charAt(0) +\n hex[1].charAt(0) +\n hex[2].charAt(0) +\n hex[3].charAt(0)\n );\n }\n return hex.join('');\n }", "function rgbaToHex(rgb) {\n\trgb = rgb + \"\";\n\trgb = rgb.match(/^rgba?[\\s+]?\\([\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?/i);\n\treturn (rgb && rgb.length === 4) ? \"#\" +\n\t\t(\"0\" + parseInt(rgb[1], 10).toString(16)).slice(-2) +\n\t\t(\"0\" + parseInt(rgb[2], 10).toString(16)).slice(-2) +\n\t\t(\"0\" + parseInt(rgb[3], 10).toString(16)).slice(-2) : \"\";\n}", "function rgbaToHex(r, g, b, a, allow4Char) {\n var hex = [\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util__[\"d\" /* pad2 */])(Math.round(r).toString(16)),\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util__[\"d\" /* pad2 */])(Math.round(g).toString(16)),\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util__[\"d\" /* pad2 */])(Math.round(b).toString(16)),\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util__[\"d\" /* pad2 */])(convertDecimalToHex(a)),\n ];\n // Return a 4 character hex if possible\n if (allow4Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1)) &&\n hex[3].startsWith(hex[3].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n return hex.join('');\n}", "function rgbaToHex(r, g, b, a, allow4Char) {\n const hex = [\n util_1.pad2(Math.round(r).toString(16)),\n util_1.pad2(Math.round(g).toString(16)),\n util_1.pad2(Math.round(b).toString(16)),\n util_1.pad2(convertDecimalToHex(a)),\n ];\n // Return a 4 character hex if possible\n if (allow4Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1)) &&\n hex[3].startsWith(hex[3].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n return hex.join('');\n}", "function rgbaToHex(r, g, b, a, allow4Char) {\n\n var hex = [pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16)), pad2(convertDecimalToHex(a))];\n\n // Return a 4 character hex if possible\n if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n\n return hex.join(\"\");\n }", "function rgbaToHex(r, g, b, a, allow4Char) {\n\t var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16)), pad2(convertDecimalToHex(a))];\n\n\t // Return a 4 character hex if possible\n\t if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {\n\t return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n\t }\n\t return hex.join(\"\");\n\t}", "function rgbaToArgbHex(r, g, b, a) {\n var hex = [\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util__[\"d\" /* pad2 */])(convertDecimalToHex(a)),\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util__[\"d\" /* pad2 */])(Math.round(r).toString(16)),\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util__[\"d\" /* pad2 */])(Math.round(g).toString(16)),\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util__[\"d\" /* pad2 */])(Math.round(b).toString(16)),\n ];\n return hex.join('');\n}" ]
[ "0.81387776", "0.8120112", "0.8120112", "0.8120112", "0.8120112", "0.8120112", "0.8120112", "0.8066185", "0.8065866", "0.8065866", "0.7994703", "0.7994703", "0.7886135", "0.7877471", "0.7877471", "0.7877471", "0.7877471", "0.7877471", "0.7877471", "0.7877471", "0.7877471", "0.7877471", "0.7877471", "0.7877471", "0.7877471", "0.7877471", "0.7877471", "0.7877471", "0.7877471", "0.7877471", "0.7877471", "0.7877471", "0.7877471", "0.7877471", "0.7877471", "0.7877471", "0.7877471", "0.7877471", "0.7877471", "0.7877471", "0.7877471", "0.7877471", "0.7877471", "0.7877471", "0.7877471", "0.7877471", "0.78764415", "0.7861543", "0.7851522", "0.781698", "0.7810671", "0.7810671", "0.7774232", "0.7774232", "0.7767936", "0.7755819", "0.7755819", "0.7755819", "0.7755819", "0.7755819", "0.7731111", "0.76982784", "0.76982784", "0.76982784", "0.76982784", "0.76982784", "0.76750964", "0.7666742", "0.75764024", "0.75393313", "0.75292724", "0.75009906", "0.7500031" ]
0.0
-1
`rgbaToArgbHex` Converts an RGBA color to an ARGB Hex8 string Rarely used, but required for "toFilter()"
function rgbaToArgbHex(r, g, b, a) { var hex = [ pad2(convertDecimalToHex(a)), pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16)) ]; return hex.join(""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rgb2hex(rgba) {\n let sep = rgba.indexOf(\",\") > -1 ? \",\" : \" \";\n rgba = rgba.substr(rgba.indexOf(\"(\")+1).split(\")\")[0].split(sep);\n\n let r = (+rgba[0]).toString(16),\n g = (+rgba[1]).toString(16),\n b = (+rgba[2]).toString(16),\n a = rgba[3] * 255;\n\n if (r.length == 1) {\n r = \"0\" + r;\n } \n if (g.length == 1) {\n g = \"0\" + g;\n }\n if (b.length == 1) {\n b = \"0\" + b;\n }\n\n // rgb exception\n if (isNaN(a)) {\n a = \"\";\n } else {\n if (a == 0) {\n return \"transparent\";\n }\n a = Math.round(a).toString(16); // \" \" + a + \"%\";\n if (a.length == 1) {\n a = \"0\" + a;\n }\n }\n\n return \"#\" + r + g + b + a;\n}", "function rgbaToArgbHex(r, g, b, a) {\n var hex = [pad2(convertDecimalToHex(a)), pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))];\n return hex.join('');\n}", "function rgbaToArgbHex(r, g, b, a) {\n var hex = [pad2(convertDecimalToHex(a)), pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16))];\n return hex.join(\"\");\n } // `equals`", "function rgbaToArgbHex(r, g, b, a) {\n var hex = [pad2(convertDecimalToHex(a)), pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16))];\n return hex.join(\"\");\n } // `equals`", "function rgbaToArgbHex(r, g, b, a) {\n const hex = [\n util_1.pad2(convertDecimalToHex(a)),\n util_1.pad2(Math.round(r).toString(16)),\n util_1.pad2(Math.round(g).toString(16)),\n util_1.pad2(Math.round(b).toString(16)),\n ];\n return hex.join('');\n}", "function rgbaToArgbHex(r, g, b, a) {\n\n var hex = [pad2(convertDecimalToHex(a)), pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16))];\n\n return hex.join(\"\");\n }", "function rgbaToArgbHex(r, g, b, a) {\n\t var hex = [pad2(convertDecimalToHex(a)), pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))];\n\t return hex.join(\"\");\n\t}", "function rgbaToArgbHex(r, g, b, a) {\n var hex = [\n Object(_util__WEBPACK_IMPORTED_MODULE_0__['pad2'])(\n convertDecimalToHex(a),\n ),\n Object(_util__WEBPACK_IMPORTED_MODULE_0__['pad2'])(\n Math.round(r).toString(16),\n ),\n Object(_util__WEBPACK_IMPORTED_MODULE_0__['pad2'])(\n Math.round(g).toString(16),\n ),\n Object(_util__WEBPACK_IMPORTED_MODULE_0__['pad2'])(\n Math.round(b).toString(16),\n ),\n ];\n return hex.join('');\n }", "function rgbaToArgbHex(r, g, b, a) {\n\t\n\t var hex = [\n\t pad2(convertDecimalToHex(a)),\n\t pad2(mathRound(r).toString(16)),\n\t pad2(mathRound(g).toString(16)),\n\t pad2(mathRound(b).toString(16))\n\t ];\n\t\n\t return hex.join(\"\");\n\t}", "function rgbaToArgbHex(r, g, b, a) {\n\t\n\t var hex = [\n\t pad2(convertDecimalToHex(a)),\n\t pad2(mathRound(r).toString(16)),\n\t pad2(mathRound(g).toString(16)),\n\t pad2(mathRound(b).toString(16))\n\t ];\n\t\n\t return hex.join(\"\");\n\t}", "function rgbaToArgbHex(r, g, b, a) {\n var hex = [\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(convertDecimalToHex(a)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(r).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(g).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(b).toString(16)),\n ];\n return hex.join('');\n}", "function rgbaToArgbHex(r, g, b, a) {\n var hex = [\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(convertDecimalToHex(a)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(r).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(g).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(b).toString(16)),\n ];\n return hex.join('');\n}", "function rgbaToArgbHex(r, g, b, a) {\n var hex = [\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(convertDecimalToHex(a)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(r).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(g).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(b).toString(16)),\n ];\n return hex.join('');\n}", "function rgbaToArgbHex(r, g, b, a) {\n var hex = [\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(convertDecimalToHex(a)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(r).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(g).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(b).toString(16)),\n ];\n return hex.join('');\n}", "function rgbaToArgbHex(r, g, b, a) {\n var hex = [\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(convertDecimalToHex(a)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(r).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(g).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(b).toString(16)),\n ];\n return hex.join('');\n}", "function rgbaToHex(rgb) {\n\trgb = rgb + \"\";\n\trgb = rgb.match(/^rgba?[\\s+]?\\([\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?/i);\n\treturn (rgb && rgb.length === 4) ? \"#\" +\n\t\t(\"0\" + parseInt(rgb[1], 10).toString(16)).slice(-2) +\n\t\t(\"0\" + parseInt(rgb[2], 10).toString(16)).slice(-2) +\n\t\t(\"0\" + parseInt(rgb[3], 10).toString(16)).slice(-2) : \"\";\n}", "function rgb2hex(rgb) {\n rgb = rgb.match(/^rgba?[\\s+]?\\([\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?/i);\n return (rgb && rgb.length === 4) ? \"#\" +\n (\"0\" + parseInt(rgb[1], 10).toString(16)).slice(-2) +\n (\"0\" + parseInt(rgb[2], 10).toString(16)).slice(-2) +\n (\"0\" + parseInt(rgb[3], 10).toString(16)).slice(-2) : '';\n}", "function rgb2hex(rgb){\n rgb = rgb.match(/^rgba?[\\s+]?\\([\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?/i);\n return (rgb && rgb.length === 4) ? \"#\" +\n (\"0\" + parseInt(rgb[1],10).toString(16)).slice(-2) +\n (\"0\" + parseInt(rgb[2],10).toString(16)).slice(-2) +\n (\"0\" + parseInt(rgb[3],10).toString(16)).slice(-2) : '';\n}", "function rgbaToArgbHex(r, g, b, a) {\n var hex = [\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util__[\"d\" /* pad2 */])(convertDecimalToHex(a)),\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util__[\"d\" /* pad2 */])(Math.round(r).toString(16)),\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util__[\"d\" /* pad2 */])(Math.round(g).toString(16)),\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util__[\"d\" /* pad2 */])(Math.round(b).toString(16)),\n ];\n return hex.join('');\n}", "function rgb2hex(rgb){\n rgb = rgb.match(/^rgba?[\\s+]?\\([\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?/i);\n return (rgb && rgb.length === 4) ? \"#\" +\n (\"0\" + parseInt(rgb[1],10).toString(16)).slice(-2) +\n (\"0\" + parseInt(rgb[2],10).toString(16)).slice(-2) +\n (\"0\" + parseInt(rgb[3],10).toString(16)).slice(-2) : '';\n}", "function rgbString2hex(rgb){\n rgb = rgb.match(/^rgba?[\\s+]?\\([\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?/i);\n return (rgb && rgb.length === 4) ? '#' +\n ('0' + parseInt(rgb[1],10).toString(16)).slice(-2) +\n ('0' + parseInt(rgb[2],10).toString(16)).slice(-2) +\n ('0' + parseInt(rgb[3],10).toString(16)).slice(-2) : '';\n }", "function rgbString2hex(rgb){\r\n rgb = rgb.match(/^rgba?[\\s+]?\\([\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?/i);\r\n return (rgb && rgb.length === 4) ? '#' +\r\n ('0' + parseInt(rgb[1],10).toString(16)).slice(-2) +\r\n ('0' + parseInt(rgb[2],10).toString(16)).slice(-2) +\r\n ('0' + parseInt(rgb[3],10).toString(16)).slice(-2) : '';\r\n }", "function rgbaToHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n }", "function rgbaToHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n }", "function rgbaToHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n }", "function rgbaToHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n }", "function rgbaToHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n }", "function rgbaToHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n }", "function rgbaToHex(r, g, b, a) {\n\n\t\t\t\t\tvar hex = [\n\t\t\t\t\t\t\tpad2(convertDecimalToHex(a)),\n\t\t\t\t\t\t\tpad2(mathRound(r).toString(16)),\n\t\t\t\t\t\t\tpad2(mathRound(g).toString(16)),\n\t\t\t\t\t\t\tpad2(mathRound(b).toString(16))\n\t\t\t\t\t];\n\n\t\t\t\t\treturn hex.join(\"\");\n\t\t\t}", "function rgbaToHex(r, g, b, a) {\n\n\t\t\t\t\tvar hex = [\n\t\t\t\t\t\t\tpad2(convertDecimalToHex(a)),\n\t\t\t\t\t\t\tpad2(mathRound(r).toString(16)),\n\t\t\t\t\t\t\tpad2(mathRound(g).toString(16)),\n\t\t\t\t\t\t\tpad2(mathRound(b).toString(16))\n\t\t\t\t\t];\n\n\t\t\t\t\treturn hex.join(\"\");\n\t\t\t}", "function rgbaToHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}", "function rgbaToHex(r, g, b, a) {\n\t\n\t var hex = [\n\t pad2(convertDecimalToHex(a)),\n\t pad2(mathRound(r).toString(16)),\n\t pad2(mathRound(g).toString(16)),\n\t pad2(mathRound(b).toString(16))\n\t ];\n\t\n\t return hex.join(\"\");\n\t}", "function _rgb2hex(rgb) {\n\t if ( rgb.search(\"rgb\") == -1 ) {\n\t return rgb;\n\t } else {\n\t rgb = rgb.match(/^rgba?\\((\\d+),\\s*(\\d+),\\s*(\\d+)(?:,\\s*(\\d+))?\\)$/);\n\t function hex(x) {\n\t return (\"0\" + parseInt(x).toString(16)).slice(-2);\n\t }\n\t return \"#\" + hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]); \n\t }\n\t}", "function rgb2hex(rgb){if(/^#[0-9A-F]{6}$/i.test(rgb))return rgb;rgb=rgb.match(/^rgba?\\((\\d+),\\s*(\\d+),\\s*(\\d+)/);function hex(x){return(\"0\"+parseInt(x).toString(16)).slice(-2);}return\"#\"+hex(rgb[1])+hex(rgb[2])+hex(rgb[3]);}// Return it", "function convertHexToRGBA(rgba) {\n // Get the hexadecimal value without the #.\n var hex = rgba.slice(1);\n // Separate the values in pairs.\n var hexMatrice = hex.match(/.{2}/g);\n // Convert the alpha value in decimal between 0 and 1.\n var alpha = parseFloat(parseInt(parseInt(hexMatrice[3], 16) / 255 * 1000, 10) / 1000);\n // Get the standard RGB value.\n var rgb = hexMatrice.slice(0, 3).map(function (i) {\n return parseInt(i, 16);\n });\n // Return the RGBA value for CSS.\n return 'rgba(' + rgb.join(',') + ',' + alpha + ');';\n }", "function convertHexToRGBA(rgba) {\n // Get the hexadecimal value without the #.\n var hex = rgba.slice(1);\n // Separate the values in pairs.\n var hexMatrice = hex.match(/.{2}/g);\n // Convert the alpha value in decimal between 0 and 1.\n var alpha = parseFloat(parseInt((parseInt(hexMatrice[3], 16) / 255) * 1000, 10) / 1000);\n // Get the standard RGB value.\n var rgb = hexMatrice.slice(0, 3).map(function (i) {\n return parseInt(i, 16);\n });\n // Return the RGBA value for CSS.\n return 'rgba(' + rgb.join(',') + ',' + alpha + ');';\n }", "function hextoRgba(hex, opacity) {\n hex = hex.replace('#', '');\n var r = parseInt(hex.substring(0, 2), 16);\n var g = parseInt(hex.substring(2, 4), 16);\n var b = parseInt(hex.substring(4, 6), 16);\n var result = 'rgba(' + r + ',' + g + ',' + b + ',' + opacity / 100 + ')';\n return result;\n }", "function rgbaToHex(r, g, b, a, allow4Char) {\n var hex = [pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16)), pad2(convertDecimalToHex(a))]; // Return a 4 character hex if possible\n\n if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n\n return hex.join(\"\");\n } // `rgbaToArgbHex`", "function rgbaToHex(r, g, b, a, allow4Char) {\n var hex = [pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16)), pad2(convertDecimalToHex(a))]; // Return a 4 character hex if possible\n\n if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n\n return hex.join(\"\");\n } // `rgbaToArgbHex`", "_toHex(rgb) {\r\n if (rgb.indexOf('#') !== -1) {\r\n return rgb;\r\n }\r\n\r\n const result = /rgb\\((\\d+), (\\d+), (\\d+)\\)/g.exec(rgb);\r\n\r\n if (!result) {\r\n return '#FFFFFF';\r\n }\r\n\r\n return '#' + (parseFloat(result[1]).toString(16).padStart(2, '0') +\r\n parseFloat(result[2]).toString(16).padStart(2, '0') +\r\n parseFloat(result[3]).toString(16).padStart(2, '0')).toUpperCase();\r\n }", "function rgba2hex(orig) {\n var a,\n rgb = orig.replace(/\\s/g, '').match(/^rgba?\\((\\d+),(\\d+),(\\d+),?([^,\\s)]+)?/i),\n alpha = (rgb && rgb[4] || \"\").trim(),\n hex = rgb ?\n (rgb[1] | 1 << 8).toString(16).slice(1) +\n (rgb[2] | 1 << 8).toString(16).slice(1) +\n (rgb[3] | 1 << 8).toString(16).slice(1) : orig;\n\n if (alpha !== \"\") {\n a = alpha;\n } else {\n a = \"01\";\n }\n // multiply before convert to HEX\n a = ((a * 255) | 1 << 8).toString(16).slice(1);\n hex = hex + a;\n\n return hex;\n}", "function RGBAtoHEX(color){\n\tconst rgba = color.replace(/^rgba?\\(|\\s+|\\)$/g, '').split(',');\n\tconst hex = `#${((1 << 24) + (parseInt(rgba[0]) << 16) + (parseInt(rgba[1]) << 8) + parseInt(rgba[2])).toString(16).slice(1)}`;\n\n\treturn hex;\n}", "function rgbToHex(rgb_string) {\r\n // This checks if the given rgb string is a alpha rgb or not.. if alpha rgb then return it without any changes since opacity cannot be made with Hex only\r\n if (rgb_string[4] == \"(\") {\r\n return rgb_string;\r\n }\r\n else {\r\n var rgb_vals = rgb_string.substring(4, rgb_string.length - 1)\r\n .replace(/ /g, '')\r\n .split(',');\r\n return \"#\" + componentToHex(Number(rgb_vals[0])) + componentToHex(Number(rgb_vals[1])) + componentToHex(Number(rgb_vals[2]));\r\n }\r\n}", "function rgbToHex(rgb_string) {\r\n // This checks if the given rgb string is a alpha rgb or not.. if alpha rgb then return it without any changes since opacity cannot be made with Hex only\r\n if (rgb_string[4] == \"(\") {\r\n return rgb_string;\r\n }\r\n else {\r\n var rgb_vals = rgb_string.substring(4, rgb_string.length - 1)\r\n .replace(/ /g, '')\r\n .split(',');\r\n return \"#\" + componentToHex(Number(rgb_vals[0])) + componentToHex(Number(rgb_vals[1])) + componentToHex(Number(rgb_vals[2]));\r\n }\r\n}", "function rgb2hex(color) {\n if (color.substr(0, 1) === '#') {\n return color;\n }\n var digits = /(.*?)rgba{0,1}\\((\\d+), (\\d+), (\\d+)\\)/.exec(color);\n\n if (digits == null) {\n digits = /(.*?)rgba\\((\\d+), (\\d+), (\\d+), (\\d+)\\)/.exec(color);\n }\n\n var red = parseInt(digits[2]);\n var green = parseInt(digits[3]);\n var blue = parseInt(digits[4]);\n\n var rgb = blue | (green << 8) | (red << 16);\n return digits[1] + '#' + (\"000000\" + rgb.toString(16)).slice(-6);\n}", "function rgbaToHex(r, g, b, a, allow4Char) {\n var hex = [(0,_util__WEBPACK_IMPORTED_MODULE_0__/* .pad2 */ .FZ)(Math.round(r).toString(16)), (0,_util__WEBPACK_IMPORTED_MODULE_0__/* .pad2 */ .FZ)(Math.round(g).toString(16)), (0,_util__WEBPACK_IMPORTED_MODULE_0__/* .pad2 */ .FZ)(Math.round(b).toString(16)), (0,_util__WEBPACK_IMPORTED_MODULE_0__/* .pad2 */ .FZ)(convertDecimalToHex(a))];\n // Return a 4 character hex if possible\n if (allow4Char && hex[0].startsWith(hex[0].charAt(1)) && hex[1].startsWith(hex[1].charAt(1)) && hex[2].startsWith(hex[2].charAt(1)) && hex[3].startsWith(hex[3].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n return hex.join('');\n}", "function convertToHex(rgb) {\n return '#' + hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]);\n}", "function royalHex2Rgba( hex, opacity ) {\n\t\tif ( typeof(hex) === 'undefined' ) {\n\t\t return;\n\t\t}\n\n\t var result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec( hex ),\n\t \trgba = 'rgba( '+ parseInt( result[1], 16 ) +', '+ parseInt( result[2], 16 ) +', '+ parseInt( result[3], 16 ) +', '+ opacity +')';\n\n\t // return converted RGB\n\t return rgba;\n\n\t}", "function rgbaToHex(r, g, b, a, allow4Char) {\n var hex = [\n Object(_util__WEBPACK_IMPORTED_MODULE_0__['pad2'])(\n Math.round(r).toString(16),\n ),\n Object(_util__WEBPACK_IMPORTED_MODULE_0__['pad2'])(\n Math.round(g).toString(16),\n ),\n Object(_util__WEBPACK_IMPORTED_MODULE_0__['pad2'])(\n Math.round(b).toString(16),\n ),\n Object(_util__WEBPACK_IMPORTED_MODULE_0__['pad2'])(\n convertDecimalToHex(a),\n ),\n ];\n // Return a 4 character hex if possible\n if (\n allow4Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1)) &&\n hex[3].startsWith(hex[3].charAt(1))\n ) {\n return (\n hex[0].charAt(0) +\n hex[1].charAt(0) +\n hex[2].charAt(0) +\n hex[3].charAt(0)\n );\n }\n return hex.join('');\n }", "function convertToHex(rgb) {\n return hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]);\n }", "function rgbaToHex(r, g, b, a, allow4Char) {\n var hex = [\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(r).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(g).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(b).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(convertDecimalToHex(a)),\n ];\n // Return a 4 character hex if possible\n if (allow4Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1)) &&\n hex[3].startsWith(hex[3].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n return hex.join('');\n}", "function rgbaToHex(r, g, b, a, allow4Char) {\n var hex = [\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(r).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(g).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(b).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(convertDecimalToHex(a)),\n ];\n // Return a 4 character hex if possible\n if (allow4Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1)) &&\n hex[3].startsWith(hex[3].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n return hex.join('');\n}", "function rgbaToHex(r, g, b, a, allow4Char) {\n var hex = [\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(r).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(g).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(b).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(convertDecimalToHex(a)),\n ];\n // Return a 4 character hex if possible\n if (allow4Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1)) &&\n hex[3].startsWith(hex[3].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n return hex.join('');\n}", "function rgbaToHex(r, g, b, a, allow4Char) {\n var hex = [\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(r).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(g).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(b).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(convertDecimalToHex(a)),\n ];\n // Return a 4 character hex if possible\n if (allow4Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1)) &&\n hex[3].startsWith(hex[3].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n return hex.join('');\n}", "function rgbaToHex(r, g, b, a, allow4Char) {\n var hex = [\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(r).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(g).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(Math.round(b).toString(16)),\n (0,_util__WEBPACK_IMPORTED_MODULE_0__.pad2)(convertDecimalToHex(a)),\n ];\n // Return a 4 character hex if possible\n if (allow4Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1)) &&\n hex[3].startsWith(hex[3].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n return hex.join('');\n}", "function colorRGBToHex(rgb){\n var color = rgb.toString().match(/\\d+/g);\n var hex = \"#\";\n for (var i = 0; i < 3; i++) {\n hex += (\"0\" + Number(color[i]).toString(16)).slice(-2);\n }\n return hex;\n}", "function _convertToHex(rgbArr) {\n if (rgbArr.toString() !== '[object Array]' && rgbArr.length != 3) {\n console.error('rgbArr should be an array with length equals to 3.');\n throw new Error('Invalid parameter');\n }\n var hex = _(rgbArr).map(_hex).reduce(function(prev, curr) {\n return prev + curr;\n });\n return '#' + hex;\n}", "function rgb2hex(rgb){\n rgb = rgb.match(/^rgb\\((\\d+),\\s*(\\d+),\\s*(\\d+)\\)$/);\n return \"#\" +\n (\"0\" + parseInt(rgb[1],10).toString(16)).slice(-2) +\n (\"0\" + parseInt(rgb[2],10).toString(16)).slice(-2) +\n (\"0\" + parseInt(rgb[3],10).toString(16)).slice(-2);\n}", "function rgbToHexConverter(rgb) {\n const regex = /[\\(|\\)|r|g|b| ]/g\n let rgbString = rgb.replace(regex, '')\n let rgbArr = new Array();\n rgbArr = rgbString.split(\",\");\n const hex = \"#\" + ((1 << 24) + ((+rgbArr[0]) << 16) + ((+rgbArr[1]) << 8) + (+rgbArr[2])).toString(16).slice(1);\n return hex\n}", "function thememount_rgbToHex( rgb ) {\n\trgb = rgb.match(/^rgba?[\\s+]?\\([\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?/i);\n\treturn (rgb && rgb.length === 4) ? \"#\" +\n\t(\"0\" + parseInt(rgb[1],10).toString(16)).slice(-2) +\n\t(\"0\" + parseInt(rgb[2],10).toString(16)).slice(-2) +\n\t(\"0\" + parseInt(rgb[3],10).toString(16)).slice(-2) : '';\n}", "function rgbToHex(rgb){\n var hex = Number(rgb).toString(16);\n if (hex.length < 2) {\n hex = \"0\" + hex;\n }\n return hex;\n\n function fullColorHex(r,g,b){\n var red = rgbToHex(r);\n var green = rgbToHex(g);\n var blue = rgbToHex(b);\n return red+green+blue;\n }\n}", "function convertToHex (rgb) {\n return hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]);\n}", "function rgb2hex(rgb){\n rgb = rgb.match(/^rgb\\((\\d+),\\s*(\\d+),\\s*(\\d+)\\)$/);\n return rgb ? \"#\" +\n (\"0\" + parseInt(rgb[1],10).toString(16)).slice(-2) +\n (\"0\" + parseInt(rgb[2],10).toString(16)).slice(-2) +\n (\"0\" + parseInt(rgb[3],10).toString(16)).slice(-2) : '#00000000';\n }", "function rgbaToHex(r, g, b, a, allow4Char) {\n\n var hex = [pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16)), pad2(convertDecimalToHex(a))];\n\n // Return a 4 character hex if possible\n if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n\n return hex.join(\"\");\n }", "function rgb2hex(rgb) {\n var hex = [\n rgb.r.toString(16),\n rgb.g.toString(16),\n rgb.b.toString(16)\n ];\n $.each(hex, function(nr, val) {\n if(val.length === 1) hex[nr] = '0' + val;\n });\n return '#' + hex.join('');\n }", "function RGBAToHex({ red, green, blue, alpha }) {\n const r = red.toString(16).padStart(2, \"0\");\n const g = green.toString(16).padStart(2, \"0\");\n const b = blue.toString(16).padStart(2, \"0\");\n const a = alpha.toString(16).padStart(2, \"0\");\n return `#${r}${g}${b}${a === \"ff\" ? \"\" : a}`;\n}", "function convertToHex (rgb) {\n return hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]);\n}", "function convertToHex (rgb) {\n return hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]);\n}" ]
[ "0.8096237", "0.8031533", "0.8027", "0.8027", "0.80210817", "0.80176497", "0.8006354", "0.79695195", "0.79411036", "0.79411036", "0.7909123", "0.7909123", "0.7909123", "0.7909123", "0.7909123", "0.77834994", "0.77328616", "0.77181447", "0.7707203", "0.769005", "0.7573088", "0.7567693", "0.7519528", "0.7519528", "0.7519528", "0.7519528", "0.7519528", "0.7519528", "0.7519347", "0.7519347", "0.75078934", "0.74934787", "0.73633456", "0.7290219", "0.7278472", "0.7278076", "0.7265883", "0.726024", "0.726024", "0.7238279", "0.7186301", "0.7157356", "0.71234095", "0.71234095", "0.70651954", "0.7060874", "0.70548785", "0.703776", "0.69973373", "0.6984651", "0.6983197", "0.6983197", "0.6983197", "0.6983197", "0.6983197", "0.6968607", "0.69575113", "0.69314224", "0.69271594", "0.6924852", "0.6920873", "0.69167745", "0.69126236", "0.69092435", "0.69031775", "0.6901735", "0.68996763", "0.68996763" ]
0.7970098
32
Modification Functions Thanks to less.js for some of the basics here <
function desaturate(color, amount) { amount = (amount === 0) ? 0 : (amount || 10); var hsl = tinycolor(color).toHsl(); hsl.s -= amount / 100; hsl.s = clamp01(hsl.s); return tinycolor(hsl); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function lessContent(){\n\t//var less = document.getElementById(\"less\"); same concept of why not needed as last problem\n\tless.style.display = \"none\";\n\n\t//you could also do less.HTML = \"\"; or \n\t\n}", "function less(hljs) {\n var IDENT_RE = '[\\\\w-]+'; // yes, Less identifiers may begin with a digit\n var INTERP_IDENT_RE = '(' + IDENT_RE + '|@\\\\{' + IDENT_RE + '\\\\})';\n\n /* Generic Modes */\n\n var RULES = [], VALUE = []; // forward def. for recursive modes\n\n var STRING_MODE = function(c) { return {\n // Less strings are not multiline (also include '~' for more consistent coloring of \"escaped\" strings)\n className: 'string', begin: '~?' + c + '.*?' + c\n };};\n\n var IDENT_MODE = function(name, begin, relevance) { return {\n className: name, begin: begin, relevance: relevance\n };};\n\n var PARENS_MODE = {\n // used only to properly balance nested parens inside mixin call, def. arg list\n begin: '\\\\(', end: '\\\\)', contains: VALUE, relevance: 0\n };\n\n // generic Less highlighter (used almost everywhere except selectors):\n VALUE.push(\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n STRING_MODE(\"'\"),\n STRING_MODE('\"'),\n hljs.CSS_NUMBER_MODE, // fixme: it does not include dot for numbers like .5em :(\n {\n begin: '(url|data-uri)\\\\(',\n starts: {className: 'string', end: '[\\\\)\\\\n]', excludeEnd: true}\n },\n IDENT_MODE('number', '#[0-9A-Fa-f]+\\\\b'),\n PARENS_MODE,\n IDENT_MODE('variable', '@@?' + IDENT_RE, 10),\n IDENT_MODE('variable', '@\\\\{' + IDENT_RE + '\\\\}'),\n IDENT_MODE('built_in', '~?`[^`]*?`'), // inline javascript (or whatever host language) *multiline* string\n { // @media features (it’s here to not duplicate things in AT_RULE_MODE with extra PARENS_MODE overriding):\n className: 'attribute', begin: IDENT_RE + '\\\\s*:', end: ':', returnBegin: true, excludeEnd: true\n },\n {\n className: 'meta',\n begin: '!important'\n }\n );\n\n var VALUE_WITH_RULESETS = VALUE.concat({\n begin: /\\{/, end: /\\}/, contains: RULES\n });\n\n var MIXIN_GUARD_MODE = {\n beginKeywords: 'when', endsWithParent: true,\n contains: [{beginKeywords: 'and not'}].concat(VALUE) // using this form to override VALUE’s 'function' match\n };\n\n /* Rule-Level Modes */\n\n var RULE_MODE = {\n begin: INTERP_IDENT_RE + '\\\\s*:', returnBegin: true, end: '[;}]',\n relevance: 0,\n contains: [\n {\n className: 'attribute',\n begin: INTERP_IDENT_RE, end: ':', excludeEnd: true,\n starts: {\n endsWithParent: true, illegal: '[<=$]',\n relevance: 0,\n contains: VALUE\n }\n }\n ]\n };\n\n var AT_RULE_MODE = {\n className: 'keyword',\n begin: '@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\\\b',\n starts: {end: '[;{}]', returnEnd: true, contains: VALUE, relevance: 0}\n };\n\n // variable definitions and calls\n var VAR_RULE_MODE = {\n className: 'variable',\n variants: [\n // using more strict pattern for higher relevance to increase chances of Less detection.\n // this is *the only* Less specific statement used in most of the sources, so...\n // (we’ll still often loose to the css-parser unless there's '//' comment,\n // simply because 1 variable just can't beat 99 properties :)\n {begin: '@' + IDENT_RE + '\\\\s*:', relevance: 15},\n {begin: '@' + IDENT_RE}\n ],\n starts: {end: '[;}]', returnEnd: true, contains: VALUE_WITH_RULESETS}\n };\n\n var SELECTOR_MODE = {\n // first parse unambiguous selectors (i.e. those not starting with tag)\n // then fall into the scary lookahead-discriminator variant.\n // this mode also handles mixin definitions and calls\n variants: [{\n begin: '[\\\\.#:&\\\\[>]', end: '[;{}]' // mixin calls end with ';'\n }, {\n begin: INTERP_IDENT_RE, end: /\\{/\n }],\n returnBegin: true,\n returnEnd: true,\n illegal: '[<=\\'$\"]',\n relevance: 0,\n contains: [\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n MIXIN_GUARD_MODE,\n IDENT_MODE('keyword', 'all\\\\b'),\n IDENT_MODE('variable', '@\\\\{' + IDENT_RE + '\\\\}'), // otherwise it’s identified as tag\n IDENT_MODE('selector-tag', INTERP_IDENT_RE + '%?', 0), // '%' for more consistent coloring of @keyframes \"tags\"\n IDENT_MODE('selector-id', '#' + INTERP_IDENT_RE),\n IDENT_MODE('selector-class', '\\\\.' + INTERP_IDENT_RE, 0),\n IDENT_MODE('selector-tag', '&', 0),\n {className: 'selector-attr', begin: '\\\\[', end: '\\\\]'},\n {className: 'selector-pseudo', begin: /:(:)?[a-zA-Z0-9_\\-+()\"'.]+/},\n {begin: '\\\\(', end: '\\\\)', contains: VALUE_WITH_RULESETS}, // argument list of parametric mixins\n {begin: '!important'} // eat !important after mixin call or it will be colored as tag\n ]\n };\n\n RULES.push(\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n AT_RULE_MODE,\n VAR_RULE_MODE,\n RULE_MODE,\n SELECTOR_MODE\n );\n\n return {\n name: 'Less',\n case_insensitive: true,\n illegal: '[=>\\'/<($\"]',\n contains: RULES\n };\n}", "function less(hljs) {\n var IDENT_RE = '[\\\\w-]+'; // yes, Less identifiers may begin with a digit\n var INTERP_IDENT_RE = '(' + IDENT_RE + '|@\\\\{' + IDENT_RE + '\\\\})';\n\n /* Generic Modes */\n\n var RULES = [], VALUE = []; // forward def. for recursive modes\n\n var STRING_MODE = function(c) { return {\n // Less strings are not multiline (also include '~' for more consistent coloring of \"escaped\" strings)\n className: 'string', begin: '~?' + c + '.*?' + c\n };};\n\n var IDENT_MODE = function(name, begin, relevance) { return {\n className: name, begin: begin, relevance: relevance\n };};\n\n var PARENS_MODE = {\n // used only to properly balance nested parens inside mixin call, def. arg list\n begin: '\\\\(', end: '\\\\)', contains: VALUE, relevance: 0\n };\n\n // generic Less highlighter (used almost everywhere except selectors):\n VALUE.push(\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n STRING_MODE(\"'\"),\n STRING_MODE('\"'),\n hljs.CSS_NUMBER_MODE, // fixme: it does not include dot for numbers like .5em :(\n {\n begin: '(url|data-uri)\\\\(',\n starts: {className: 'string', end: '[\\\\)\\\\n]', excludeEnd: true}\n },\n IDENT_MODE('number', '#[0-9A-Fa-f]+\\\\b'),\n PARENS_MODE,\n IDENT_MODE('variable', '@@?' + IDENT_RE, 10),\n IDENT_MODE('variable', '@\\\\{' + IDENT_RE + '\\\\}'),\n IDENT_MODE('built_in', '~?`[^`]*?`'), // inline javascript (or whatever host language) *multiline* string\n { // @media features (it’s here to not duplicate things in AT_RULE_MODE with extra PARENS_MODE overriding):\n className: 'attribute', begin: IDENT_RE + '\\\\s*:', end: ':', returnBegin: true, excludeEnd: true\n },\n {\n className: 'meta',\n begin: '!important'\n }\n );\n\n var VALUE_WITH_RULESETS = VALUE.concat({\n begin: /\\{/, end: /\\}/, contains: RULES\n });\n\n var MIXIN_GUARD_MODE = {\n beginKeywords: 'when', endsWithParent: true,\n contains: [{beginKeywords: 'and not'}].concat(VALUE) // using this form to override VALUE’s 'function' match\n };\n\n /* Rule-Level Modes */\n\n var RULE_MODE = {\n begin: INTERP_IDENT_RE + '\\\\s*:', returnBegin: true, end: '[;}]',\n relevance: 0,\n contains: [\n {\n className: 'attribute',\n begin: INTERP_IDENT_RE, end: ':', excludeEnd: true,\n starts: {\n endsWithParent: true, illegal: '[<=$]',\n relevance: 0,\n contains: VALUE\n }\n }\n ]\n };\n\n var AT_RULE_MODE = {\n className: 'keyword',\n begin: '@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\\\b',\n starts: {end: '[;{}]', returnEnd: true, contains: VALUE, relevance: 0}\n };\n\n // variable definitions and calls\n var VAR_RULE_MODE = {\n className: 'variable',\n variants: [\n // using more strict pattern for higher relevance to increase chances of Less detection.\n // this is *the only* Less specific statement used in most of the sources, so...\n // (we’ll still often loose to the css-parser unless there's '//' comment,\n // simply because 1 variable just can't beat 99 properties :)\n {begin: '@' + IDENT_RE + '\\\\s*:', relevance: 15},\n {begin: '@' + IDENT_RE}\n ],\n starts: {end: '[;}]', returnEnd: true, contains: VALUE_WITH_RULESETS}\n };\n\n var SELECTOR_MODE = {\n // first parse unambiguous selectors (i.e. those not starting with tag)\n // then fall into the scary lookahead-discriminator variant.\n // this mode also handles mixin definitions and calls\n variants: [{\n begin: '[\\\\.#:&\\\\[>]', end: '[;{}]' // mixin calls end with ';'\n }, {\n begin: INTERP_IDENT_RE, end: /\\{/\n }],\n returnBegin: true,\n returnEnd: true,\n illegal: '[<=\\'$\"]',\n relevance: 0,\n contains: [\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n MIXIN_GUARD_MODE,\n IDENT_MODE('keyword', 'all\\\\b'),\n IDENT_MODE('variable', '@\\\\{' + IDENT_RE + '\\\\}'), // otherwise it’s identified as tag\n IDENT_MODE('selector-tag', INTERP_IDENT_RE + '%?', 0), // '%' for more consistent coloring of @keyframes \"tags\"\n IDENT_MODE('selector-id', '#' + INTERP_IDENT_RE),\n IDENT_MODE('selector-class', '\\\\.' + INTERP_IDENT_RE, 0),\n IDENT_MODE('selector-tag', '&', 0),\n {className: 'selector-attr', begin: '\\\\[', end: '\\\\]'},\n {className: 'selector-pseudo', begin: /:(:)?[a-zA-Z0-9_\\-+()\"'.]+/},\n {begin: '\\\\(', end: '\\\\)', contains: VALUE_WITH_RULESETS}, // argument list of parametric mixins\n {begin: '!important'} // eat !important after mixin call or it will be colored as tag\n ]\n };\n\n RULES.push(\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n AT_RULE_MODE,\n VAR_RULE_MODE,\n RULE_MODE,\n SELECTOR_MODE\n );\n\n return {\n name: 'Less',\n case_insensitive: true,\n illegal: '[=>\\'/<($\"]',\n contains: RULES\n };\n}", "function $96bf2d6309cc61b6$var$less(hljs) {\n var IDENT_RE = \"[\\\\w-]+\"; // yes, Less identifiers may begin with a digit\n var INTERP_IDENT_RE = \"(\" + IDENT_RE + \"|@\\\\{\" + IDENT_RE + \"\\\\})\";\n /* Generic Modes */ var RULES = [], VALUE = []; // forward def. for recursive modes\n var STRING_MODE = function(c) {\n return {\n // Less strings are not multiline (also include '~' for more consistent coloring of \"escaped\" strings)\n className: \"string\",\n begin: \"~?\" + c + \".*?\" + c\n };\n };\n var IDENT_MODE = function(name, begin, relevance) {\n return {\n className: name,\n begin: begin,\n relevance: relevance\n };\n };\n var PARENS_MODE = {\n // used only to properly balance nested parens inside mixin call, def. arg list\n begin: \"\\\\(\",\n end: \"\\\\)\",\n contains: VALUE,\n relevance: 0\n };\n // generic Less highlighter (used almost everywhere except selectors):\n VALUE.push(hljs.C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE, STRING_MODE(\"'\"), STRING_MODE('\"'), hljs.CSS_NUMBER_MODE, {\n begin: \"(url|data-uri)\\\\(\",\n starts: {\n className: \"string\",\n end: \"[\\\\)\\\\n]\",\n excludeEnd: true\n }\n }, IDENT_MODE(\"number\", \"#[0-9A-Fa-f]+\\\\b\"), PARENS_MODE, IDENT_MODE(\"variable\", \"@@?\" + IDENT_RE, 10), IDENT_MODE(\"variable\", \"@\\\\{\" + IDENT_RE + \"\\\\}\"), IDENT_MODE(\"built_in\", \"~?`[^`]*?`\"), {\n className: \"attribute\",\n begin: IDENT_RE + \"\\\\s*:\",\n end: \":\",\n returnBegin: true,\n excludeEnd: true\n }, {\n className: \"meta\",\n begin: \"!important\"\n });\n var VALUE_WITH_RULESETS = VALUE.concat({\n begin: /\\{/,\n end: /\\}/,\n contains: RULES\n });\n var MIXIN_GUARD_MODE = {\n beginKeywords: \"when\",\n endsWithParent: true,\n contains: [\n {\n beginKeywords: \"and not\"\n }\n ].concat(VALUE) // using this form to override VALUE’s 'function' match\n };\n /* Rule-Level Modes */ var RULE_MODE = {\n begin: INTERP_IDENT_RE + \"\\\\s*:\",\n returnBegin: true,\n end: \"[;}]\",\n relevance: 0,\n contains: [\n {\n className: \"attribute\",\n begin: INTERP_IDENT_RE,\n end: \":\",\n excludeEnd: true,\n starts: {\n endsWithParent: true,\n illegal: \"[<=$]\",\n relevance: 0,\n contains: VALUE\n }\n }\n ]\n };\n var AT_RULE_MODE = {\n className: \"keyword\",\n begin: \"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\\\b\",\n starts: {\n end: \"[;{}]\",\n returnEnd: true,\n contains: VALUE,\n relevance: 0\n }\n };\n // variable definitions and calls\n var VAR_RULE_MODE = {\n className: \"variable\",\n variants: [\n // using more strict pattern for higher relevance to increase chances of Less detection.\n // this is *the only* Less specific statement used in most of the sources, so...\n // (we’ll still often loose to the css-parser unless there's '//' comment,\n // simply because 1 variable just can't beat 99 properties :)\n {\n begin: \"@\" + IDENT_RE + \"\\\\s*:\",\n relevance: 15\n },\n {\n begin: \"@\" + IDENT_RE\n }\n ],\n starts: {\n end: \"[;}]\",\n returnEnd: true,\n contains: VALUE_WITH_RULESETS\n }\n };\n var SELECTOR_MODE = {\n // first parse unambiguous selectors (i.e. those not starting with tag)\n // then fall into the scary lookahead-discriminator variant.\n // this mode also handles mixin definitions and calls\n variants: [\n {\n begin: \"[\\\\.#:&\\\\[>]\",\n end: \"[;{}]\" // mixin calls end with ';'\n },\n {\n begin: INTERP_IDENT_RE,\n end: /\\{/\n }\n ],\n returnBegin: true,\n returnEnd: true,\n illegal: \"[<='$\\\"]\",\n relevance: 0,\n contains: [\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n MIXIN_GUARD_MODE,\n IDENT_MODE(\"keyword\", \"all\\\\b\"),\n IDENT_MODE(\"variable\", \"@\\\\{\" + IDENT_RE + \"\\\\}\"),\n IDENT_MODE(\"selector-tag\", INTERP_IDENT_RE + \"%?\", 0),\n IDENT_MODE(\"selector-id\", \"#\" + INTERP_IDENT_RE),\n IDENT_MODE(\"selector-class\", \"\\\\.\" + INTERP_IDENT_RE, 0),\n IDENT_MODE(\"selector-tag\", \"&\", 0),\n {\n className: \"selector-attr\",\n begin: \"\\\\[\",\n end: \"\\\\]\"\n },\n {\n className: \"selector-pseudo\",\n begin: /:(:)?[a-zA-Z0-9_\\-+()\"'.]+/\n },\n {\n begin: \"\\\\(\",\n end: \"\\\\)\",\n contains: VALUE_WITH_RULESETS\n },\n {\n begin: \"!important\"\n } // eat !important after mixin call or it will be colored as tag\n ]\n };\n RULES.push(hljs.C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE, AT_RULE_MODE, VAR_RULE_MODE, RULE_MODE, SELECTOR_MODE);\n return {\n name: \"Less\",\n case_insensitive: true,\n illegal: \"[=>'/<($\\\"]\",\n contains: RULES\n };\n}", "function less(hljs) {\n var IDENT_RE = '[\\\\w-]+'; // yes, Less identifiers may begin with a digit\n var INTERP_IDENT_RE = '(' + IDENT_RE + '|@{' + IDENT_RE + '})';\n\n /* Generic Modes */\n\n var RULES = [], VALUE = []; // forward def. for recursive modes\n\n var STRING_MODE = function(c) { return {\n // Less strings are not multiline (also include '~' for more consistent coloring of \"escaped\" strings)\n className: 'string', begin: '~?' + c + '.*?' + c\n };};\n\n var IDENT_MODE = function(name, begin, relevance) { return {\n className: name, begin: begin, relevance: relevance\n };};\n\n var PARENS_MODE = {\n // used only to properly balance nested parens inside mixin call, def. arg list\n begin: '\\\\(', end: '\\\\)', contains: VALUE, relevance: 0\n };\n\n // generic Less highlighter (used almost everywhere except selectors):\n VALUE.push(\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n STRING_MODE(\"'\"),\n STRING_MODE('\"'),\n hljs.CSS_NUMBER_MODE, // fixme: it does not include dot for numbers like .5em :(\n {\n begin: '(url|data-uri)\\\\(',\n starts: {className: 'string', end: '[\\\\)\\\\n]', excludeEnd: true}\n },\n IDENT_MODE('number', '#[0-9A-Fa-f]+\\\\b'),\n PARENS_MODE,\n IDENT_MODE('variable', '@@?' + IDENT_RE, 10),\n IDENT_MODE('variable', '@{' + IDENT_RE + '}'),\n IDENT_MODE('built_in', '~?`[^`]*?`'), // inline javascript (or whatever host language) *multiline* string\n { // @media features (it’s here to not duplicate things in AT_RULE_MODE with extra PARENS_MODE overriding):\n className: 'attribute', begin: IDENT_RE + '\\\\s*:', end: ':', returnBegin: true, excludeEnd: true\n },\n {\n className: 'meta',\n begin: '!important'\n }\n );\n\n var VALUE_WITH_RULESETS = VALUE.concat({\n begin: '{', end: '}', contains: RULES\n });\n\n var MIXIN_GUARD_MODE = {\n beginKeywords: 'when', endsWithParent: true,\n contains: [{beginKeywords: 'and not'}].concat(VALUE) // using this form to override VALUE’s 'function' match\n };\n\n /* Rule-Level Modes */\n\n var RULE_MODE = {\n begin: INTERP_IDENT_RE + '\\\\s*:', returnBegin: true, end: '[;}]',\n relevance: 0,\n contains: [\n {\n className: 'attribute',\n begin: INTERP_IDENT_RE, end: ':', excludeEnd: true,\n starts: {\n endsWithParent: true, illegal: '[<=$]',\n relevance: 0,\n contains: VALUE\n }\n }\n ]\n };\n\n var AT_RULE_MODE = {\n className: 'keyword',\n begin: '@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\\\b',\n starts: {end: '[;{}]', returnEnd: true, contains: VALUE, relevance: 0}\n };\n\n // variable definitions and calls\n var VAR_RULE_MODE = {\n className: 'variable',\n variants: [\n // using more strict pattern for higher relevance to increase chances of Less detection.\n // this is *the only* Less specific statement used in most of the sources, so...\n // (we’ll still often loose to the css-parser unless there's '//' comment,\n // simply because 1 variable just can't beat 99 properties :)\n {begin: '@' + IDENT_RE + '\\\\s*:', relevance: 15},\n {begin: '@' + IDENT_RE}\n ],\n starts: {end: '[;}]', returnEnd: true, contains: VALUE_WITH_RULESETS}\n };\n\n var SELECTOR_MODE = {\n // first parse unambiguous selectors (i.e. those not starting with tag)\n // then fall into the scary lookahead-discriminator variant.\n // this mode also handles mixin definitions and calls\n variants: [{\n begin: '[\\\\.#:&\\\\[>]', end: '[;{}]' // mixin calls end with ';'\n }, {\n begin: INTERP_IDENT_RE, end: '{'\n }],\n returnBegin: true,\n returnEnd: true,\n illegal: '[<=\\'$\"]',\n relevance: 0,\n contains: [\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n MIXIN_GUARD_MODE,\n IDENT_MODE('keyword', 'all\\\\b'),\n IDENT_MODE('variable', '@{' + IDENT_RE + '}'), // otherwise it’s identified as tag\n IDENT_MODE('selector-tag', INTERP_IDENT_RE + '%?', 0), // '%' for more consistent coloring of @keyframes \"tags\"\n IDENT_MODE('selector-id', '#' + INTERP_IDENT_RE),\n IDENT_MODE('selector-class', '\\\\.' + INTERP_IDENT_RE, 0),\n IDENT_MODE('selector-tag', '&', 0),\n {className: 'selector-attr', begin: '\\\\[', end: '\\\\]'},\n {className: 'selector-pseudo', begin: /:(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\"'.]+/},\n {begin: '\\\\(', end: '\\\\)', contains: VALUE_WITH_RULESETS}, // argument list of parametric mixins\n {begin: '!important'} // eat !important after mixin call or it will be colored as tag\n ]\n };\n\n RULES.push(\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n AT_RULE_MODE,\n VAR_RULE_MODE,\n RULE_MODE,\n SELECTOR_MODE\n );\n\n return {\n name: 'Less',\n case_insensitive: true,\n illegal: '[=>\\'/<($\"]',\n contains: RULES\n };\n}", "function less(hljs) {\n var IDENT_RE = '[\\\\w-]+'; // yes, Less identifiers may begin with a digit\n var INTERP_IDENT_RE = '(' + IDENT_RE + '|@{' + IDENT_RE + '})';\n\n /* Generic Modes */\n\n var RULES = [], VALUE = []; // forward def. for recursive modes\n\n var STRING_MODE = function(c) { return {\n // Less strings are not multiline (also include '~' for more consistent coloring of \"escaped\" strings)\n className: 'string', begin: '~?' + c + '.*?' + c\n };};\n\n var IDENT_MODE = function(name, begin, relevance) { return {\n className: name, begin: begin, relevance: relevance\n };};\n\n var PARENS_MODE = {\n // used only to properly balance nested parens inside mixin call, def. arg list\n begin: '\\\\(', end: '\\\\)', contains: VALUE, relevance: 0\n };\n\n // generic Less highlighter (used almost everywhere except selectors):\n VALUE.push(\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n STRING_MODE(\"'\"),\n STRING_MODE('\"'),\n hljs.CSS_NUMBER_MODE, // fixme: it does not include dot for numbers like .5em :(\n {\n begin: '(url|data-uri)\\\\(',\n starts: {className: 'string', end: '[\\\\)\\\\n]', excludeEnd: true}\n },\n IDENT_MODE('number', '#[0-9A-Fa-f]+\\\\b'),\n PARENS_MODE,\n IDENT_MODE('variable', '@@?' + IDENT_RE, 10),\n IDENT_MODE('variable', '@{' + IDENT_RE + '}'),\n IDENT_MODE('built_in', '~?`[^`]*?`'), // inline javascript (or whatever host language) *multiline* string\n { // @media features (it’s here to not duplicate things in AT_RULE_MODE with extra PARENS_MODE overriding):\n className: 'attribute', begin: IDENT_RE + '\\\\s*:', end: ':', returnBegin: true, excludeEnd: true\n },\n {\n className: 'meta',\n begin: '!important'\n }\n );\n\n var VALUE_WITH_RULESETS = VALUE.concat({\n begin: '{', end: '}', contains: RULES\n });\n\n var MIXIN_GUARD_MODE = {\n beginKeywords: 'when', endsWithParent: true,\n contains: [{beginKeywords: 'and not'}].concat(VALUE) // using this form to override VALUE’s 'function' match\n };\n\n /* Rule-Level Modes */\n\n var RULE_MODE = {\n begin: INTERP_IDENT_RE + '\\\\s*:', returnBegin: true, end: '[;}]',\n relevance: 0,\n contains: [\n {\n className: 'attribute',\n begin: INTERP_IDENT_RE, end: ':', excludeEnd: true,\n starts: {\n endsWithParent: true, illegal: '[<=$]',\n relevance: 0,\n contains: VALUE\n }\n }\n ]\n };\n\n var AT_RULE_MODE = {\n className: 'keyword',\n begin: '@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\\\b',\n starts: {end: '[;{}]', returnEnd: true, contains: VALUE, relevance: 0}\n };\n\n // variable definitions and calls\n var VAR_RULE_MODE = {\n className: 'variable',\n variants: [\n // using more strict pattern for higher relevance to increase chances of Less detection.\n // this is *the only* Less specific statement used in most of the sources, so...\n // (we’ll still often loose to the css-parser unless there's '//' comment,\n // simply because 1 variable just can't beat 99 properties :)\n {begin: '@' + IDENT_RE + '\\\\s*:', relevance: 15},\n {begin: '@' + IDENT_RE}\n ],\n starts: {end: '[;}]', returnEnd: true, contains: VALUE_WITH_RULESETS}\n };\n\n var SELECTOR_MODE = {\n // first parse unambiguous selectors (i.e. those not starting with tag)\n // then fall into the scary lookahead-discriminator variant.\n // this mode also handles mixin definitions and calls\n variants: [{\n begin: '[\\\\.#:&\\\\[>]', end: '[;{}]' // mixin calls end with ';'\n }, {\n begin: INTERP_IDENT_RE, end: '{'\n }],\n returnBegin: true,\n returnEnd: true,\n illegal: '[<=\\'$\"]',\n relevance: 0,\n contains: [\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n MIXIN_GUARD_MODE,\n IDENT_MODE('keyword', 'all\\\\b'),\n IDENT_MODE('variable', '@{' + IDENT_RE + '}'), // otherwise it’s identified as tag\n IDENT_MODE('selector-tag', INTERP_IDENT_RE + '%?', 0), // '%' for more consistent coloring of @keyframes \"tags\"\n IDENT_MODE('selector-id', '#' + INTERP_IDENT_RE),\n IDENT_MODE('selector-class', '\\\\.' + INTERP_IDENT_RE, 0),\n IDENT_MODE('selector-tag', '&', 0),\n {className: 'selector-attr', begin: '\\\\[', end: '\\\\]'},\n {className: 'selector-pseudo', begin: /:(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\"'.]+/},\n {begin: '\\\\(', end: '\\\\)', contains: VALUE_WITH_RULESETS}, // argument list of parametric mixins\n {begin: '!important'} // eat !important after mixin call or it will be colored as tag\n ]\n };\n\n RULES.push(\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n AT_RULE_MODE,\n VAR_RULE_MODE,\n RULE_MODE,\n SELECTOR_MODE\n );\n\n return {\n name: 'Less',\n case_insensitive: true,\n illegal: '[=>\\'/<($\"]',\n contains: RULES\n };\n}", "function h(){if(!h.called){h.called=!0;var e=document.querySelectorAll(\"pre code\");x.forEach.call(e,p)}}", "set Less(value) {}", "function switchMoreLess(lk,t,ctnt){\n t = t || \"more\";\n if (t == \"more\"){var opp = \"less\"}\n else if (t == \"less\"){var opp = \"more\"}\n // changing content\n $(lk).closest('.see_more_span').find('.see_more_content').html(ctnt + \"...\");\n // changing link text\n $(lk).closest('.see_' + t + '_link').html('see ' + opp);\n // toggling class\n $(lk).removeClass('see_' + t + '_link');\n $(lk).addClass('see_' + opp + '_link');\n}", "function lessContent(){\n less.style.display = 'none';\n}", "get Less() {}", "onShowLessFormat () {\n if (!this.pvc.formatter) return\n this.pvc.formatter.doLess()\n }", "function addMoreLess() {\n $('.toggle_more').click(function () {\n $(this).hide();\n $(this).nextAll('.more_less').css({display:'inline'});\n $(this).siblings('.toggle_less').css({display:'inline'});\n });\n\n $('.toggle_less').click(function () {\n $(this).hide();\n $(this).prevAll('.more_less').hide();\n $(this).siblings('.toggle_more').css({display:'inline'});\n });\n}", "prep(src) {\n\n // console.log('Before -----> \\n', src)\n\n let h = this.src.use_for[0] // TODO: add props here\n src = '\\t\\t let _pref = `${_id}<-'+h+'<-`\\n' + src\n\n FDEFS2.lastIndex = 0\n let call_id = 0 // Function call id (to make each call unique)\n\n do {\n var m = FDEFS2.exec(src)\n if (m) {\n let fkeyword = m[1].trim()\n let fname = m[2]\n let fargs = m[3]\n\n if (fkeyword === 'function') {\n // TODO: add _ids to inline functions\n } else {\n let off = m.index + m[0].indexOf('(')\n if (this.std[fname]) {\n src = this.postfix(src, m, ++call_id)\n //console.log(src)\n off+=4 // 'std_'\n }\n // Quick fix\n FDEFS2.lastIndex = off\n }\n }\n } while (m)\n\n // console.log('After ----->\\n', u.wrap_idxs(src))\n\n return u.wrap_idxs(src, 'std_')\n }", "function BootstrapThemeroller(){\n\t/*\n\t *check if less variables are provided in url #, if yes, then reload the style\n\t */\n\tthis.initTheme = function(){\n\t\tvar lessKeyValStringArray = location.hash.substring(1).split('&');\n\t\tvar lessKeyValStringArraySize = lessKeyValStringArray.length;\n\n\t\tfor(keyValStrinIndex=0;keyValStrinIndex<lessKeyValStringArraySize;keyValStrinIndex++){\n\t\t\tlessKeyValPair = lessKeyValStringArray[keyValStrinIndex].split('=');\n\t\t\tif(lessKeyValPair.length==2){\n\t\t\t\tvar selector = '[less-var=\"'+lessKeyValPair[0]+'\"]';\n\t\t\t\t$(selector).val(lessKeyValPair[1]).change();\n\t\t\t}\n\t\t}\n\t}\n\n\tthis.getUpdatedLessVars = function(){\n\t\tvar finalLessMap = {};\n\t\t$('[themeroller=\"true\"] , .input-append.color input').each(function(index){\n\t\t var val = $(this).val();\n\t\t var lessVar = $(this).attr('less-var');\n\t\t\t \n\t\t if($.trim(val)!=''){\n\t\t\tfinalLessMap[lessVar] = val;\n\t\t }\n\t\t});\n\t\treturn finalLessMap;\n\t};\n\n\tthis.updateUrl = function(){\n\t\t\tvar finalLessMap = this.getUpdatedLessVars();\n\t\t\tvar lessString ='';\n\t\t\tfor(key in finalLessMap){\n\t\t\t\tlessString += key+ '='+finalLessMap[key]+'&';\n\n\t\t\t}\n\t\t\tlocation.hash = lessString;\n\t};\n\tthis.downloadTheme = function(){\n\t\t\tvar finalLessMap = themeRoller.getUpdatedLessVars();\n\t\t\tvar css = [\"reset.less\",\"scaffolding.less\",\"grid.less\",\"layouts.less\",\"type.less\",\"code.less\",\"labels-badges.less\",\"tables.less\",\"forms.less\",\"buttons.less\",\"sprites.less\",\"button-groups.less\",\"navs.less\",\"navbar.less\",\"breadcrumbs.less\",\"pagination.less\",\"pager.less\",\"thumbnails.less\",\"alerts.less\",\"progress-bars.less\",\"hero-unit.less\",\"tooltip.less\",\"popovers.less\",\"modals.less\",\"dropdowns.less\",\"accordion.less\",\"carousel.less\",\"wells.less\",\"close.less\",\"utilities.less\",\"component-animations.less\",\"responsive-utilities.less\",\"responsive-767px-max.less\",\"responsive-768px-979px.less\",\"responsive-1200px-min.less\",\"responsive-navbar.less\"]\n\t\t\t, js = [\"bootstrap-transition.js\",\"bootstrap-modal.js\",\"bootstrap-dropdown.js\",\"bootstrap-scrollspy.js\",\"bootstrap-tab.js\",\"bootstrap-tooltip.js\",\"bootstrap-popover.js\",\"bootstrap-alert.js\",\"bootstrap-button.js\",\"bootstrap-collapse.js\",\"bootstrap-carousel.js\",\"bootstrap-typeahead.js\"]\n\t\t\t, vars = finalLessMap\n\t\t\t, img = [\"glyphicons-halflings.png\",\"glyphicons-halflings-white.png\"];\n\t\t\t\n\t\t\t\n\t\t\t$.ajax({\n\t\t\ttype: 'POST'\n\t\t , url: 'http://bootstrap.herokuapp.com'\n\t\t , dataType: 'jsonpi'\n\t\t , params: {\n\t\t\t js: js\n\t\t\t, css: css\n\t\t\t, vars: vars\n\t\t\t, img: img\n\t\t }\n\t\t })\n\t\t};\n\n\tthis.updateColorPicker = function(){\n\t\t var val = $(this).val();\n\t\t var lessVar = $(this).attr('less-var');\n\t\t \n\t\t var parentEle = $(this).parent();\n\t\t if($.trim(val)==''){\n\t\t\tval = parentEle.attr('data-color');\n\t\t }\n\t\t\tvar colorpicker = parentEle.data('colorpicker');\n\t\t\tcolorpicker.update(val);\n\t\t\tvar lessMap = {};\n\t\t\tlessMap[lessVar] = val;\n\t\t\tless.modifyVars(lessMap);\n\t\t\tthemeRoller.updateUrl();\n\t };\n\tthis.updateTextFields = function(){\n\t\t var val = $(this).val();\n\t\t var lessVar = $(this).attr('less-var');\n\t\t\t \n\t\t if($.trim(val)==''){\n\t\t\tval = $(this).attr('placeholder');\n\t\t }\n\t\t\t\n\t\t\tvar lessMap = {};\n\t\t\tlessMap[lessVar] = val;\n\t\t\tless.modifyVars(lessMap);\n\t\t\tthemeRoller.updateUrl();\n\t };\n\t\n}", "insertCss() { }", "function cssRebuild(data) { //need to bind this as {cssFile:__name__} before call\n let cssFile;\n function statistic(data) {\n // data = [[2,\"./mm_las/pages/articleList/articleList.wxss\"]]\n // data = [['.',1,\"nav{ width: 100%; display: inline-block; position: relative; }\\n\"]]\n function addStat(id) {\n\n // console.log(9999,id,!importCnt[id])\n if (!importCnt[id]) importCnt[id] = 1, statistic(pureData[id]);\n else ++importCnt[id];\n }\n if (typeof data === \"number\") return addStat(data);\n if(data){\n for (let content of data)\n if (typeof content === \"object\" && content[0] == 2) addStat(content[1]); \n }\n \n\n }\n\n function makeup(data) {\n\n\n var isPure = typeof data === \"string\";\n // console.log(8888,isPure)\n if (onlyTest) {\n statistic(data);\n if (!isPure) {\n if (data.length == 1 && data[0][0] == 2){\n data = data[0][1];\n // if(pureData[data]){\n // data = pureData[data];\n // return \"\"\n // }\n }else{\n return \"\";\n }\n }\n if (!actualPure[data] && !blockCss.includes(changeExt(toDir(cssFile, frameName), \"\"))) {\n console.log(\"Regard \" + cssFile + \" as pure import file.\");\n actualPure[data] = cssFile;\n }\n return \"\";\n }\n let res = [],\n attach = \"\";\n// {\n// './mm_las/pages/articleList/articleList.wxss': 'H:\\\\miniparse\\\\build\\\\_442977007_2恋爱聊天话术情话助手_build\\\\mm_las\\\\pages\\\\articleList\\\\articleList.wxss',\n// './mm_las/pages/detail/detail.wxss': 'H:\\\\miniparse\\\\build\\\\_442977007_2恋爱聊天话术情话助手_build\\\\mm_las\\\\pages\\\\detail\\\\detail.wxss',\n// './mm_las/pages/user/iyqm.wxss': 'H:\\\\miniparse\\\\build\\\\_442977007_2恋爱聊天话术情话助手_build\\\\mm_las\\\\pages\\\\user\\\\iyqm.html',\n// './mm_las/pages/user/tgds/iwzsc.wxss': 'H:\\\\miniparse\\\\build\\\\_442977007_2恋爱聊天话术情话助手_build\\\\mm_las\\\\pages\\\\user\\\\tgds\\\\iwzsc.html',\n// './mm_las/pages/user/vip/izffgb.wxss': 'H:\\\\miniparse\\\\build\\\\_442977007_2恋爱聊天话术情话助手_build\\\\mm_las\\\\pages\\\\user\\\\vip\\\\izffgb.html'\n// }\n if (isPure && actualPure[data] != cssFile) {\n if (actualPure[data]) return '@import \"' + changeExt(toDir(actualPure[data], cssFile), \".wxss\") + '\";\\n';\n else {\n res.push(\"/*! Import by _C[\" + data + \"], whose real path we cannot found. */\");\n attach = \"/*! Import end */\";\n }\n }\n let exactData = isPure ? pureData[data] : data;\n if(isPure && actualPure[data] == cssFile && commonStyleData[data]){\n exactData = commonStyleData[data];\n }\n\n \n\n\n for (let content of exactData)\n if (typeof content === \"object\") {\n switch (content[0]) {\n case 0: //rpx\n res.push(content[1] + \"rpx\");\n break;\n case 1: //add suffix, ignore it for restoring correct!\n break;\n case 2: //import\n res.push(makeup(content[1]));\n break;\n }\n } else res.push(content);\n return res.join(\"\") + attach;\n }\n\n return () => {\n cssFile = this.cssFile;\n // console.log(99999,cssFile,data)\n if (!result[cssFile]) result[cssFile] = \"\";\n result[cssFile] += makeup(data);\n };\n }", "function mutate_1(ast) {\n\ttry {\n\t\t//var ast = UglifyJS.parse(code);\n\t\tvar_insert_init();\n\t\ttotal_for_mutate = [];\n\t\t//already_mutate = [];\n\t\ttotal_for_mutate = collectMostReferenceVar(ast);\n\t\tcntr_set.varName = generateMutateName_1();\n\t\tif( cntr_set.varName == \"GENERATE_NO_NAME\" )\n\t\t\treturn \"MUTATE_END\";\n\n\t\tvar ast_new = ast.transform(var_transformer);\n\n\t\treturn ast_new;\t\n\t} catch(ex) {\n\t\tconsole.log(\"EEEE: \" + ex);\n\t\treturn;\n\t}\n\t\n}", "function compileLess() {\n return gulp.src('less/style.less')\n .pipe(less())\n .pipe(gulp.dest('dist/css'))\n}", "function css(){ /*...*/ }", "function toggleMoreLess() {\n\n\t\t\tif (!$nav_panels.children('.page_link:visible').hasClass('last')) {\n\t\t\t\t$nav_panels.children('.more').show();\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$nav_panels.children('.more').hide();\n\t\t\t}\n\n\t\t\tif (!$nav_panels.children('.page_link:visible').hasClass('first')) {\n\t\t\t\t$nav_panels.children('.less').show();\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$nav_panels.children('.less').hide();\n\t\t\t}\n\t\t}", "minify() {\n\n }", "function RepeaterModifier() {\n }", "htmlForSpeed() {\nvar html;\n//-----------\nreturn html = `<!--========================================================-->\n<span class=\"spanSpeed av${this.ix}\" >\nSpeed (log<sub>2</sub> scale):\n${this.htmlForSpeedCtrl()}\n</span> <!--class=\"spanSpeed av${this.ix}\"-->`;\n}", "function prepareContent(t,lk,pc){\n if (t == \"more\"){ \n switchMoreLess(lk,\"more\",pc);}\n else if (t == \"less\"){\n var cSize = $(lk).data('content-size');\n // substring limit set as 20 if not passed by user, else users limit\n var c = pc.substring(0, parseInt(cSize + 1));\n switchMoreLess(lk,\"less\",c);\n }\n}", "function allHtmlFn(){\n\tcompileAllPugFiles(pugDocDitectory);\n}", "function compile() {\n\n}", "function uustylequick(node) { // @param Node:\r\n // @return Hash: { prop: \"val\", ... }\r\n return uustyle(node, 4);\r\n}", "function resetLess() {\n\tdelete require.cache[ require.resolve( \"gulp-less\" ) ];\n\tdelete require.cache[ require.resolve( \"less\" ) ];\n\tgulpLess = require( \"gulp-less\" ); // eslint-disable-line global-require\n}", "function Assign_Free_Lex() {\r\n}", "function mutate(ast) {\n\ttry {\n\t\t//var ast = UglifyJS.parse(code);\n\t\tvar_insert_init();\n\t\ttotal_for_mutate = [];\n\t\t//already_mutate = [];\n\t\ttotal_for_mutate = collectMostReferenceVar(ast);\n\t\tcntr_set.varName = generateMutateName();\n\t\tif( cntr_set.varName == \"GENERATE_NO_NAME\" )\n\t\t\treturn \"MUTATE_END\";\n\n\t\tvar ast_new = ast.transform(var_transformer);\n\n\t\treturn ast_new;\t\n\t} catch(ex) {\n\t\tconsole.log(\"EEEE: \" + ex);\n\t\treturn;\n\t}\n\t\n}", "function less(id) {\n\t // Cette fonction cache l'infobulle\n\t div = eval(document.getElementById(id));\n\t if (div) {div.style.display='none';}\n\t}", "function TMP(){return;}", "function TMP(){return;}", "injectStyle() {\n const lessFile = path.join(\n atom.packages.getLoadedPackage('pdfjs-viewer').path,\n 'pdfjs', 'web', 'viewer.less')\n var css = atom.themes.loadLessStylesheet(lessFile)\n const invertColors = atom.config.get('pdfjs-viewer.invertColors')\n if (invertColors) {\n css += '.page, .thumbnailImage {filter: invert(100%);}\\n'\n }\n this.element.contentDocument.getElementById('viewer-less').innerText = css\n }", "function Dz(html,js,win,fun){this.js=js;this.fun=fun;this.html=html;this.htmlBr=function(html){return'<pre><code class=\"language-markup\">'+html+'</code></pre>';};this.win=win;// this.jsBr = (function (js) {\n// return js.replace(/;/g, ';<Br>');\n//\n// })(this.js);\nthis.jsBr=function(js){return'<pre><code class=\"language-javascript\">'+js+'</code></pre>';}(this.js);}/////////////////// End of objects", "function StyleUtility()\n{\n}", "function Assign_Lex_Other() {\r\n}", "function setCodeExamples(){\n\n\t\n\n\tvar html=\"\";\n\t$('*[data-language]').each(function(){\n\t\tvar code=$(this).html();\n\t\tcode=code.replace(/</g,\"&lt;\");\n\t \tcode=code.replace(/>/g,\"&gt;\");\n\t \tcode=$.trim(code);\n\n\t \tif(code!==\"\"){\n\t\t \thtml+=\"<h3>\"+$(this).attr('data-language-label')+\"</h3>\";\n\t\t \thtml+='<pre class=\"'+$(this).attr('data-language')+' line-numbers\"><code class=\"'+$(this).attr('data-language')+' line-numbers\">'+code+'</code></pre>';\n\t\t}\n\t});\n\n $('#code_prisim').html(html);\n if(html==\"\"){\n $('#headPreview').hide();\n\t}\n\t\n\tsetTimeout(function(){\n\t\t$('.code-toolbar').attr('tabindex','0').addClass('prismButtonListenerAdded');\n\t\t$(document).on('click','.code-toolbar .toolbar-item a',function(){\n\t\t\t$(this).parents('.code-toolbar:first').focus();\n\t\t})\n\t\t$('.code-toolbar .toolbar-item a').attr('tabindex','0').attr(\"href\",\"javascript:void(0)\").attr('role','button');\n\t\t$('.code-toolbar').focusin(function(){\t\n\t\t\t$(this).find('.toolbar').css('opacity','1')\n\t\t})\n\t\t$('.code-toolbar').focusout(function(){\n\t\t\t$(this).find('.toolbar').removeAttr('style')\n\t\t})\n\t},200)\n\t\n\n}", "function minimizedElements() {\n let minimized_elements = $(\"#content\");\n\n minimized_elements.each(function () {\n let t = $(this).text();\n if (t.length < 200) return;\n\n $(this).html(\n t.slice(0, 200) +\n '<span>... </span><a href=\"#\" class=\"more\">More</a>' +\n '<span style=\"display:none;\">' +\n t.slice(300, t.length) +\n ' <a href=\"#\" class=\"less\">Less</a></span>'\n );\n });\n\n $(\"a.more\", minimized_elements).click(function (event) {\n event.preventDefault();\n $(this)\n .hide()\n .prev()\n .hide();\n $(this)\n .next()\n .show();\n });\n\n $(\"a.less\", minimized_elements).click(function (event) {\n event.preventDefault();\n $(this)\n .parent()\n .hide()\n .prev()\n .show()\n .prev()\n .show();\n });\n}", "function link(nextEntry,prevEntry){if(nextEntry!==prevEntry){if(nextEntry)nextEntry.p=prevEntry;//p stands for previous, 'prev' didn't minify\nif(prevEntry)prevEntry.n=nextEntry;//n stands for next, 'next' didn't minify\n}}", "function codestyling() {\n\t\t$('pre code').each(function(i, e) {\n\t\t\thljs.highlightBlock(e);\n\n\t\t\tif(!$(this).hasClass('language-text')) {\n\t\t\t\tvar code = $(this);\n\t\t\t\tvar lines = code.html().split(/\\n/).length;\n\t\t\t\tvar numbers = [];\n\t\t\t\tfor (i = 1; i < lines; i++) {\n\t\t\t\t\tnumbers += '<span class=\"line\">' + i + '</span>';\n\t\t\t\t}\n\t\t\t\tcode.parent().append('<div class=\"lines\">' + numbers + '</div>');\n\t\t\t}\n\t\t});\n\t}", "function inlinedTemplates() { }", "function changeCss(elnum, amount, Class, a, b, c , d, e, f, g, j, k) {\n if( amount > 1 ) { if( elnum ) { except = elnum - 1; } } \n for( y = 0; y < amount; y++) { \n if( amount > 1 ) { elnum = y; } \n for( i = 3; i < 11; i++) {\n if( arguments[i] ) {\n x = arguments[i];\n var s = document.querySelectorAll(Class); \n if(x.match('height') ) s[ elnum ].style.height = x.substr(8);\n if(x.match('margin') ) s[ elnum ].style.margin = x.substr(8);\n if(x.match('padding')) s[ elnum ].style.padding = x.substr(9);\n if(x.match('background') ) s[ elnum ].style.background = x.substr(12);\n if(x.match('backgroundImage'))s[ elnum ].style.backgroundImage = x.substr(12);\n if(x.match('width') ) s[ elnum ].style.width = x.substr(7);\n if(x.match('textDecor') ) s[ elnum ].style.textDecoration = x.substr(11);\n if(x.match('fontSize') ) s[ elnum ].style.fontSize = x.substr(10); \n if(x.match('color') ) s[ elnum ].style.color = x.substr(7);\n if(x.match('bgColor') ) s[ elnum ].style.backgroundColor = x.substr(9);\n if(x.match('borderRadius') ) s[ elnum ].style.borderRadius = x.substr(14);\n if(x.match('boxShadow') ) s[ elnum ].style.boxShadow = x.substr(11);\n if(x.match('fontWeight') ) s[ elnum ].style.fontWeight = x.substr(12);\n if(x.match('marginTop') ) s[ elnum ].style.marginTop = x.substr(11);\n if(x.match('marginRight') ) s[ elnum ].style.marginRight = x.substr(13);\n if(x.match('marginBottom') ) s[ elnum ].style.marginBottom = x.substr(14);\n if(x.match('marginLeft') ) s[ elnum ].style.marginLeft = x.substr(12);\n if(x.match('paddingTop') ) s[ elnum ].style.paddingTop = x.substr(12);\n if(x.match('paddingRight') ) s[ elnum ].style.paddingRight = x.substr(14);\n if(x.match('paddingBottom') ) s[ elnum ].style.paddingBottom = x.substr(15);\n if(x.match('paddingLeft') ) s[ elnum ].style.paddingLeft = x.substr(13);\n if(x.match('position') ) s[ elnum ].style.position = x.substr(10);\n if(x.match('top') ) s[ elnum ].style.top = x.substr(5);\n if(x.match('right') ) s[ elnum ].style.right = x.substr(7);\n if(x.match('cursor') ) s[ elnum ].style.cursor = x.substr(7);\n if(x.match('minHeight') ) s[ elnum ].style.minHeight = x.substr(11);\n if(x.match('innerHTML') ) s[ elnum ].innerHTML = x.substr(11);\n }\n }\n } \n}", "function setLightSensitives(){\n\ttransformables = new Array(\"ul\", \"li\", \"a.selected\", \"div.tabContent\", \"#pageContainer\", \"#mainHeader\");\n}", "function _loadStyles() {\n var request = new XMLHttpRequest();\n request.open(\"GET\", \"LiveDevelopment/main.less\", true);\n request.onload = function onLoad(event) {\n var parser = new less.Parser();\n parser.parse(request.responseText, function onParse(err, tree) {\n console.assert(!err, err);\n $(\"<style>\" + tree.toCSS() + \"</style>\")\n .appendTo(window.document.head);\n });\n };\n request.send(null);\n }", "function onBefore(curr, next, opts, fwd) {\n\tjQuery(next).find('.desc').css({'top':'-110px','opacity':'0'}); \n}", "function walker() {\n\n}", "function mouseOverHelp(i) {\n return function() {\n target.innerHTML = helperTags[i].tooltip\n };\n }", "function WieldyJS(text, compress) {\n if (text == null) {\n text = \"\";\n }\n if (compress == null) {\n compress = false;\n }\n this.addHtmlToOutput = __bind(this.addHtmlToOutput, this);\n\n this.processAttributes = __bind(this.processAttributes, this);\n\n this.processSelector = __bind(this.processSelector, this);\n\n this.processEmbeddedLine = __bind(this.processEmbeddedLine, this);\n\n this.processNextLine = __bind(this.processNextLine, this);\n\n this.closeTag = __bind(this.closeTag, this);\n\n this.closeLowerLevelTags = __bind(this.closeLowerLevelTags, this);\n\n this.processCurrentLevel = __bind(this.processCurrentLevel, this);\n\n this.text = text;\n this.compress = compress;\n this.compile();\n }", "function PuckerAndBloatModifier() {\n }", "function compile_less(examples_dir, explorer_pkg, callback) {\n console.log('Compiling example less files');\n\n var importFile = '';\n boltUtil.listFiles(examples_dir, /example.less$/).forEach(function(file) {\n var full_path = path.resolve(examples_dir + '/' + file.path);\n \n importFile += '/* ' + full_path + ' */\\n';\n importFile += '@import \"' + full_path +'\";\\n\\n';\n });\n \n var output_file = path.resolve(explorer_pkg + '/lib/views/landing_view/examples.less');\n \n less.render(\n importFile, { paths: ['/'] },\n function(cssFile, error, cssContents) {\n if (error) {\n console.error('error parsing less file: ' + error);\n } else {\n fs.writeFile(cssFile, cssContents, function(err) {\n if (err) {\n console.error('error writing less file: ' + err);\n }\n });\n }\n }.bind(null, output_file));\n \n callback && callback();\n}", "function Assign_Lex() {\r\n}", "function preview_page(e1,e2) {\r\n var caret = get_caret(e1);\r\n var edits = document.getElementById(e1);\r\n var preview = document.getElementById(e2);\r\n preview.innerHTML = edits.value;\r\n /* manage URLS */\r\n preview.innerHTML = preview.innerHTML.replace(/\\[url\\](.+?)\\[\\/url]/gi,'<a href=\"$1\">$1</a>');\r\n preview.innerHTML = preview.innerHTML.replace(/\\[url\\=([^\\]]+)](.+?)\\[\\/url]/gi,'<a href=\"$1\">$2</a>');\r\n /* manage images */\r\n preview.innerHTML = preview.innerHTML.replace(/\\[img](.+?)\\[\\/img]/gi, '<img src=$1 />'); /* TODO: img h,w limit */\r\n /* manage font sizes -- TODO editor button */\r\n preview.innerHTML = preview.innerHTML.replace(/\\[size=([1-9][0-9]+?)](.+?)\\[\\/size]/gi,'<span style=\"font-size: $1\">$2</span>');\r\n /* manage strong tags */\r\n preview.innerHTML = preview.innerHTML.replace(/\\[b\\](.+?)\\[\\/b]/gi,'<strong>$1</strong>');\r\n /* manage emphasize tags */\r\n preview.innerHTML = preview.innerHTML.replace(/\\[i\\](.+?)\\[\\/i]/gi,'<i>$1</i>');\r\n /* manage code blocks -- see jsed.css */\r\n preview.innerHTML = preview.innerHTML.replace(/\\[code\\](.+?)\\[\\/code]/gi,'<div class=\"code\"><code>$1</code></div>');\r\n /* manage quote blocks -- see jsed.css */\r\n preview.innerHTML = preview.innerHTML.replace( /\\[quote\\](.+?)\\[\\/quote]/gi, '<div class=\"quote\">$1</div>');\r\n /* table stuff -- I'm still thinking about this */\r\n /* preview.innerHTML = preview.innerHTML.replace( /\\[table\\](.+?)\\[\\/table]/gi, '<table>$1</table>' );\r\n preview.innerHTML = preview.innerHTML.replace( /\\[tr\\](.+?)\\[\\/tr]/gi, '<tr>$1</tr>' );\r\n preview.innerHTML = preview.innerHTML.replace( /\\[td\\](.+?)\\[\\/td]/gi, '<td>$1</td>' ); */\r\n /* list stuff */\r\n preview.innerHTML = preview.innerHTML.replace(/\\[ol\\]/gi,'<ol>');\r\n preview.innerHTML = preview.innerHTML.replace(/\\[ul\\]/gi,'<ul>');\r\n preview.innerHTML = preview.innerHTML.replace(/\\[\\/ol]/gi,'</ol>');\r\n preview.innerHTML = preview.innerHTML.replace(/\\[\\/ul]/gi,'</ul>');\r\n preview.innerHTML = preview.innerHTML.replace(/\\[\\*\\]/gi,'<li>');\r\n /* convert linebreaks */\r\n preview.innerHTML = preview.innerHTML.replace( /(?:\\r\\n|\\n|\\r)/g, '<br />' );\r\n set_caret(edits,caret);\r\n}", "function janPrin(t,e) {\n\t\tif (!e) {\n\t\t\t//plugin wordpress\n\t\t\tgravador = jsCSSEditor_gravador;\n\t\t\te = t;\n\t\t}\n\t\t//debJ('e.ctrlKey='+e.ctrlKey+'e.shiftKey='+e.shiftKey);\n\t\tif (!e.ctrlKey && !e.shiftKey) {\n\t\t\treturn;\n\t\t}\n\t\tif (!browse.ie) {\n\t\t\ttry {\n\t\t\t\te.stopPropagation();\n\t\t\t} catch (e) {\n\t\t\t}\n\t\t}\n\t\t//objNav(e);\n\t\t//lert('e='+e);\n\t\t//return;\n\t\tjsCSSEditorD[0] = targetEvent(e);\n\t\t//objNav(jsCSSEditorD[0]);\n\t\t//lert(1);\n\t\ttry {\n\t\t\tdoc = e.target.ownerDocument;\n\t\t} catch (e) {\n\t\t\t//ie\n\t\t\t//lert('ie='+erro(e));\n\t\t\tdoc = jsCSSEditorD[0].document;\n\t\t}\n\t\tjsCSSEditorD[1] = doc.styleSheets;\n\t\t//bjNav(top);\n\t\t//objNav(doc.styleSheets);\n\t\tvar fs = '';\n\t\tfor (var i=0;i<doc.styleSheets.length;i++) {\n\t\t\t//fs += ','+substrAt(substrAt(document.styleSheets[i].href,'//'),'/');\n\t\t\ttry {\n\t\t\t\t//ocorre ERRO com estilos criados pelo GMap...\n\t\t\t\t//ebJ(i+' css at '+doc.styleSheets[i].href+(doc.styleSheets[i].href?' sim':' nao'));\n\t\t\t\tif (doc.styleSheets[i].href) {// && right(doc.styleSheets[i].href,4).toLowerCase()=='.css') {\n\t\t\t\t\t//ebJ('xx='+escape(absoluteUrl(doc.styleSheets[i].href)));\n\t\t\t\t\tfs += ','+i+'~'+escape(absoluteUrl(doc.styleSheets[i].href));\n\t\t\t\t\t//lert(document.styleSheets[i].href);\n\t\t\t\t} else {\n\t\t\t\t\t//fs +=',~~'+i;\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\talert(doc.styleSheets[i].href+' '+erro(e));\n\t\t\t}\n\t\t\t//objNav(document.styleSheets[i]);\n\t\t}\n\t\tif (fs.length==0) {\n\t\t\talert('no css style sheet');\n\t\t\treturn;\n\t\t} else {\n\t\t\tfs = fs.substring(1);\n\t\t}\n\t\tvar w = new winDep(top,gravador+'?_fls='+fs\n\t\t\t+'&_loc='+escape(window.location));\n\t\tw.tipo = 3;\n\t\t//w.frame = true;\n\t\t//w.debug = true;\n\t\tw.centrada = false;\n\t\tw.abre();\n\t}", "function rewriteHover() {\n\tvar gbl = document.getElementById(\"hover-global\");\n\n\tif(gbl == null)\n\t\treturn;\n\n\tvar nodes = getElementsByClass(\"hoverable\", gbl);\n\n\tfor (var i = 0; i < nodes.length; i++) {\n\t\tnodes[i].onmouseover = function() {\n\t\t\tthis.className += \" over\";\n\t\t}\n\t\tnodes[i].onmouseout = function() {\n\t\t\tthis.className = this.className.replace(new RegExp(\" over\\\\b\"), \"\");\n\t\t}\n\t}\n}", "function hstrip(eme){\r\n\teme = eme.replace(/\\n/g,\"\\\\n\")\r\n\teme = eme.replace(/<a.+?addclass.+?see more<\\/a>/g,\"\");/*special case: \"see more\" is a meme-spreading group. adding that to your blocklist will generate A TON of false-positivies.*/\r\n\teme = eme.replace(/<\\/?a ?.+?>/g,\"\");/*don't look *inside* tags*/\r\n\teme = eme.replace(/<\\/?i ?.+?>/g,\"\");/*don't look *inside* tags*/\r\n\teme = eme.replace(/<\\/?img ?.+?>/g,\"\");/*don't look *inside* tags*/\r\n\teme = eme.replace(/<\\/?div ?.+?>/g,\"\");/*don't look *inside* tags*/\r\n\teme = eme.replace(/<\\/?h5 ?.+?>/g,\"\");/*don't look *inside* tags*/\r\n\teme = eme.replace(/<\\/?li ?.+?>/g,\"\");/*don't look *inside* tags*/\r\n\teme = eme.replace(/<\\/?form ?.+?>/g,\"\");/*don't look *inside* tags*/\r\n\teme = eme.replace(/<\\/?span ?.+?>/g,\"\");/*don't look *inside* tags*/\r\n\teme = eme.replace(/<\\/?label ?.+?>/g,\"\");/*don't look *inside* tags*/\r\n\teme = eme.replace(/&quot;/g,'\"');/*basic stuff that apparently caused problems.*/\r\n\teme = eme.replace(/&amp;/g,'&');\r\n\teme = eme.replace(/&lt;/g,'<');\r\n\teme = eme.replace(/&gt;/g,'>');\r\n\treturn eme\r\n}", "function nonMutatingConcat(original, attach) {\n // Add your code below this line\n\n\n // Add your code above this line\n}", "function css() {\n return gulp.src(paths.less)\n .pipe(plugins.plumber())\n .pipe(plugins.rename('main.min.css'))\n .pipe(plugins.sourcemaps.init())\n .pipe(plugins.less({\n compress: false\n }))\n .pipe(plugins.sourcemaps.write(''))\n .pipe(gulp.dest(paths.dev));\n}", "function link(nextEntry,prevEntry){if(nextEntry!==prevEntry){if(nextEntry)nextEntry.p=prevEntry;//p stands for previous, 'prev' didn't minify\n\tif(prevEntry)prevEntry.n=nextEntry;//n stands for next, 'next' didn't minify\n\t}}", "function expandShorthandsIn(jsCode) {\r\n var describeCode = \"(node => node.nodeName + (node.id ? '#' + node.id : '') + (node.classList.length ? '.' + node.classList[0] : ''))(\";\r\n if (\"ActiveXObject\" in window) { /* ie hack */\r\n describeCode = \"(function(node){ return node.nodeName + (node.id ? '#' + node.id : '') + (node.classList.length ? '.' + node.classList[0] : '') })(\";\r\n }\r\n return (jsCode\r\n .replace(/^\\$\\$\\(/g, 'document.querySelectorAll(')\r\n .replace(/^\\$\\(/g, 'document.querySelector(')\r\n .replace(/\\b\\$\\$\\(/g, 'document.querySelectorAll(')\r\n .replace(/\\b\\$\\(/g, 'document.querySelector(')\r\n .replace(/(\\;|\\,|\\(|\\)|\\+|\\-|\\*|\\/|\\=|\\<|\\>|\\||\\&|\\\\|\\s)\\$\\$\\(/g, '$1document.querySelectorAll(')\r\n .replace(/(\\;|\\,|\\(|\\)|\\+|\\-|\\*|\\/|\\=|\\<|\\>|\\||\\&|\\\\|\\s)\\$\\(/g, '$1document.querySelector(')\r\n .replace(/^eFP\\(/g, 'document.elementFromPoint(')\r\n .replace(/^eFP\\b/g, 'document.elementFromPoint.bind(document)')\r\n .replace(/\\beFP\\(/g, 'document.elementFromPoint(')\r\n .replace(/\\beFP\\b/g, 'document.elementFromPoint.bind(document)')\r\n .replace(/^gCS\\(/g, 'getComputedStyle(')\r\n .replace(/^gCS\\b/g, 'getComputedStyle.bind(window)')\r\n .replace(/^rAF\\(/g, 'requestAnimationFrame(')\r\n .replace(/^rAF\\b/g, 'requestAnimationFrame.bind(window)')\r\n .replace(/\\bgCS\\(/g, 'getComputedStyle(')\r\n .replace(/\\bgCS\\b/g, 'getComputedStyle.bind(window)')\r\n .replace(/\\brAF\\(/g, 'requestAnimationFrame(')\r\n .replace(/\\brAF\\b/g, 'requestAnimationFrame.bind(window)')\r\n .replace(/\\.gBCW\\(\\)/g, '.getBoundingClientRect().width')\r\n .replace(/\\.gBCH\\(\\)/g, '.getBoundingClientRect().height')\r\n .replace(/\\.gBCL\\(\\)/g, '.getBoundingClientRect().left')\r\n .replace(/\\.gBCT\\(\\)/g, '.getBoundingClientRect().top')\r\n .replace(/\\.gBCR\\(\\)/g, '.getBoundingClientRect().right')\r\n .replace(/\\.gBCB\\(\\)/g, '.getBoundingClientRect().bottom')\r\n .replace(/^describe\\(/g, describeCode)\r\n .replace(/\\bdescribe\\(/g, describeCode));\r\n}", "function showLess() {\n vm.rangeNum = vm.limitNum;\n }", "function isLess(a, b){\n if (a<b){\n return true;\n// Write code below this line\n\n// Write code above this line \n } else{\n// Write code below this line\n\n// Write code above this line \n return false;\n }\n // Write code below this line\n\n// Write code above this line\n}", "function cssLess() {\n return src(url_src + 'less/style.less')\n .pipe(less({\n paths: [path.join(__dirname, 'less', 'includes')]\n })).pipe(\n autoprefixer({\n browsers: ['last 4 versions'],\n cascade: false\n })\n ).pipe(dest(url_dest + 'less/'));\n}", "function preProcess($elem){\n\t\t_preProcess0($elem, REPLACERS[0]);\n\t\t_preProcess0($elem, REPLACERS[1]);\n\t\t_preProcess0($elem, REPLACERS[2]);\n\t\t_preProcess1($elem, REPLACERS[0]);\n\t\t_preProcess1($elem, REPLACERS[1]);\n\t\t_preProcess1($elem, REPLACERS[2]);\n\t\treturn $elem;\n\t}", "function LESS(){\n return parent.gulp.src(parent.CONFIG.less)\n .pipe(parent.less())\n .pipe(parent.gulp.dest((parent.dist ? parent.CONFIG.distRoot : parent.CONFIG.tmpRoot) + '/assets'));\n}", "function ttMouseOver(foo) {\nif (tooltipsOn && getCookie(\"wiki-tiploader\") != \"no\") {\n$(\"#WikiaArticle\").mouseover(hideTip);\n$(\"#WikiaArticle\").append('<div id=\"tfb\" class=\"htt\"></div><div id=\"templatetfb\" class=\"htt\"><div>');\n$tfb = $(\"#tfb\");\n$ttfb = $(\"#templatetfb\");\n$htt = $(\"#tfb,#templatetfb\");\nif(foo==1){\n$(\"#WikiaArticle span.ajaxttlink\").each(bindTT);\n}\n$(\"#WikiaArticle span.tttemplatelink\").mouseover(showTemplateTip).mouseout(hideTemplateTip).mousemove(moveTip);\n}\n}", "function addCodeToHtml(){ \n let bSortCodeBlock = document.getElementById(\"bubble-sort-code-block\");\n let mSortCodeBlock = document.getElementById(\"merge-sort-code-block\");\n let qSortCodeBlock = document.getElementById(\"quick-sort-code-block\");\n let bSortInfoBlock = document.getElementById(\"bubble-sort-info-block\");\n let mSortInfoBlock = document.getElementById(\"merge-sort-info-block\");\n let qSortInfoBlock = document.getElementById(\"quick-sort-info-block\");\n bSortCodeBlock.innerHTML = `${getBubbleSortCodeString()}`;\n mSortCodeBlock.innerHTML = `${getMergeSortCodeString()}`;\n qSortCodeBlock.innerHTML = `${getQuickSortCodeString()}`;\n bSortInfoBlock.innerHTML = `${getBubbleSortInfoString()}`;\n mSortInfoBlock.innerHTML = `${getMergeSortInfoString()}`;\n qSortInfoBlock.innerHTML = `${getQuickSortInfoString()}`;\n}", "function prepend() {\n \n}", "function less(){\n if(selector[1].checked){\n selector[0].checked = false;\n }\n\n for(let i = 0; i < showLess.length; i++){\n let current = showLess[i];\n for(let j = 1; j < current.childNodes.length; j++){\n current.childNodes[j].style.display = 'none';\n }\n }\n\n for(let i = 0; i < showLess2.length; i++){\n let current = showLess2[i];\n for(let j = 1; j < current.childNodes.length; j++){\n current.childNodes[j].style.display = 'none';\n }\n }\n}", "function mk_block_toSource(){return\"Markdown.mk_block( \"+uneval(this.toString())+\", \"+uneval(this.trailing)+\", \"+uneval(this.lineNumber)+\" )\";}// node", "function resetModification() {\n try {\n document.getElementsByClassName('infobox')[0].style.display = '';\n } catch (err) {\n /** do we need to do something about this error? **/\n }\n\n try {\n document.getElementById('mw-panel').style.display = '';\n } catch (err) { /** do we need to do something about this error? **/ }\n\n document.getElementById('content').style.marginLeft = '12em';\n document.getElementById('content').style.marginRight = '';\n document.getElementById('content').style.fontSize = '';\n document.getElementById('content').style.fontFamily = '';\n var references = document.getElementsByClassName('reference');\n for(var i = references.length -1; i>=0; i--) {\n references[i].style.display = \"\";\n }\n var links = document.getElementsByTagName(\"a\");\n for(var i = links.length -1; i>=0; i--) {\n links[i].setAttribute(\"style\", \"color:#0645ad\")\n }\n}", "function Ze(){if(ea)t.innerHTML=ha;else if(ia)t.innerHTML=ia;$e();eb&&hb.call(window,eb);nb();eb=-1;bb=[];cb={};ac=j;Zb=0;$b=[];w.Cc();Bb=0;Cb=[];document.documentElement.className=\"js no-treesaver\";document.documentElement.style.display=\"block\"}", "function Assign_Lex_Lex() {\r\n}", "function add_css$2() {\n \tvar style = element(\"style\");\n \tstyle.id = \"svelte-42yfje-style\";\n \tstyle.textContent = \".cl-editor-modal.svelte-42yfje.svelte-42yfje{position:absolute;top:37px;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);max-width:520px;width:100%;height:140px;backface-visibility:hidden;z-index:11}.cl-editor-overlay.svelte-42yfje.svelte-42yfje{position:absolute;background-color:rgba(255,255,255,.5);height:100%;width:100%;left:0;top:0;z-index:10}.modal-box.svelte-42yfje.svelte-42yfje{position:absolute;top:0;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);max-width:500px;width:calc(100% - 20px);padding-bottom:36px;z-index:1;background-color:#FFF;text-align:center;font-size:14px;box-shadow:rgba(0,0,0,.2) 0 2px 3px;-webkit-backface-visibility:hidden;backface-visibility:hidden}.modal-title.svelte-42yfje.svelte-42yfje{font-size:24px;font-weight:700;margin:0 0 20px;padding:2px 0 4px;display:block;border-bottom:1px solid #EEE;color:#333;background:#fbfcfc}.modal-label.svelte-42yfje.svelte-42yfje{display:block;position:relative;margin:15px 12px;height:29px;line-height:29px;overflow:hidden}.modal-label.svelte-42yfje input.svelte-42yfje{position:absolute;top:0;right:0;height:27px;line-height:25px;border:1px solid #DEDEDE;background:#fff;font-size:14px;max-width:330px;width:70%;padding:0 7px;transition:all 150ms}.modal-label.svelte-42yfje input.svelte-42yfje:focus{outline:none}.input-error.svelte-42yfje input.svelte-42yfje{border:1px solid #e74c3c}.input-info.svelte-42yfje.svelte-42yfje{display:block;text-align:left;height:25px;line-height:25px;transition:all 150ms}.input-info.svelte-42yfje span.svelte-42yfje{display:block;color:#69878f;background-color:#fbfcfc;border:1px solid #DEDEDE;padding:1px 7px;width:150px}.input-error.svelte-42yfje .input-info.svelte-42yfje{margin-top:-29px}.input-error.svelte-42yfje .msg-error.svelte-42yfje{color:#e74c3c}.modal-button.svelte-42yfje.svelte-42yfje{position:absolute;bottom:10px;right:0;text-decoration:none;color:#FFF;display:block;width:100px;height:35px;line-height:33px;margin:0 10px;background-color:#333;border:none;cursor:pointer;font-family:\\\"Lato\\\",Helvetica,Verdana,sans-serif;font-size:16px;transition:all 150ms}.modal-submit.svelte-42yfje.svelte-42yfje{right:110px;background:#2bc06a}.modal-reset.svelte-42yfje.svelte-42yfje{color:#555;background:#e6e6e6}\";\n \tappend(document.head, style);\n }", "function compil_html() {\n return src(configs.html.in)\n // .pipe(htmlmin({ collapseWhitespace: true }))\n .pipe(dest(configs.html.out))\n .pipe(connect.reload());\n}", "function debug_clone_formatter(){\n let debug_height_check = numberParse($(\".debug\").css(\"height\"))\n $(\".booleans:not(:first)\").remove()\n $.map($(\".booleans\").adv_clone({\n items:booleans[debug_counter].length\n }),function(d,i){\n debug_placement = topic.indexOf($(\".topic > h2 \").text())\n $(\".booleans > h2 \").eq(i).text(booleans[topic.indexOf($(\".topic > h2 \").text())][i])\n debug[\"debug object.self\"][2] ? console.log(debug_placement) : \"\"\n debug[\"debug object.self\"][2] ? console.log($(\".booleans > h2 \").eq(i).text(),booleans[i]) : \"\"\n })\n\n var debug_height_check_increase = 2.4 * numberParse($(\".booleans\").css(\"height\")) * $(\".booleans\").length\n\n $(\".debug\").css({\n \"height\": (debug_height_check > debug_height_check_increase ? debug_height_check : debug_height_check_increase),\n \"border-radius\":1.7* numberParse($(\".booleans\").css(\"height\")) * $(\".booleans\").length\n })\n }", "function pPostMoreHover() {\n\n\t\tpPostMore.hover(function() {\n\n\t\t\t$(this).css({\n\t\t\t\t'background-color' \t: royalHex2Rgba( pPost_more_bg_hcol, pPost_more_bg_hcol_tr ),\n\t\t\t\t'color' \t\t\t: pPost_more_txt_hcol,\n\t\t\t\t'border-color' \t\t: pPost_more_bd_hcol\n\t\t\t});\n\n\t\t}, function() {\n\n\t\t\tpPostMore.css({\n\t\t\t\t'background-color' \t : royalHex2Rgba( pPost_more_bg_col, pPost_more_bg_col_tr ),\n\t\t\t\t'color' \t\t\t : pPost_more_txt_col,\n\t\t\t\t'border-top-color' \t : pPost_more_bd_tp[2],\n\t\t\t\t'border-right-color' : pPost_more_bd_rt[2],\n\t\t\t\t'border-bottom-color' : pPost_more_bd_bt[2],\n\t\t\t\t'border-left-color' : pPost_more_bd_lt[2]\n\t\t\t});\n\n\t\t});\n\n\t}", "function sprinkles() {\n\n\t}", "function el(a){this.$f=a;this.Pg=\"\";this.lm=new RegExp(this.Ca,\"g\")}", "function isLess(a, b) {\n // Fix this code\n return a < b;\n}", "function Hilitor(e,t){var i=document.getElementById(e)||document.body,n=t||\"MARK\",r=new RegExp(\"^(?:\"+n+\"|SCRIPT|FORM|SPAN)$\"),o=[\"#ff6\",\"#a0ffff\",\"#9f9\",\"#f99\",\"#f6f\"],s=[],h=0,a=\"\",l=new RegExp(\"^[^\\\\w]+|[^\\\\w]+$\",\"g\"),g=new RegExp(\"[^\\\\w'-]+\",\"g\");this.setEndRegExp=function(e){return l=e},this.setBreakRegExp=function(e){return g=e},this.setMatchType=function(e){switch(e){case\"left\":this.openLeft=!1,this.openRight=!0;break;case\"right\":this.openLeft=!0,this.openRight=!1;break;case\"open\":this.openLeft=this.openRight=!0;break;default:this.openLeft=this.openRight=!1}},this.setRegex=function(e){if(e=(e=(e=e.replace(l,\"\")).replace(g,\"|\")).replace(/^\\||\\|$/g,\"\")){var t=\"(\"+e+\")\";return this.openLeft||(t=\"\\\\b\"+t),this.openRight||(t+=\"\\\\b\"),a=new RegExp(t,\"i\")}return!1},this.getRegex=function(){var e=a.toString();return e=(e=e.replace(/(^\\/(\\\\b)?|\\(|\\)|(\\\\b)?\\/i$)/g,\"\")).replace(/\\|/g,\" \")},this.hiliteWords=function(e){if(void 0!==e&&e&&a&&!r.test(e.nodeName)){if(e.hasChildNodes())for(var t=0;t<e.childNodes.length;t++)this.hiliteWords(e.childNodes[t]);if(3==e.nodeType&&(nv=e.nodeValue)&&(regs=a.exec(nv))){s[regs[0].toLowerCase()]||(s[regs[0].toLowerCase()]=o[h++%o.length]);var i=document.createElement(n);i.appendChild(document.createTextNode(regs[0])),i.style.backgroundColor=s[regs[0].toLowerCase()],i.style.color=\"#000\";var l=e.splitText(regs.index);l.nodeValue=l.nodeValue.substring(regs[0].length),e.parentNode.insertBefore(i,l)}}},this.remove=function(){for(var e=document.getElementsByTagName(n);e.length&&(el=e[0]);){var t=el.parentNode;t.replaceChild(el.firstChild,el),t.normalize()}},this.apply=function(e){if(this.remove(),void 0!==e&&e)return this.setRegex(e)&&this.hiliteWords(i),a}}", "function makeSmaller() {\n\n}", "function f(a){a.className?\"string\"==typeof a.className&&(a.className=a.className.split(/\\s+/)):a.className=[];for(var b=Ia.sourceNormalizers,c=0;c<b.length;c++)b[c](a)}", "function lt(e,t,a,r,f,o,i){if(t){var s,c=e.splitSpaces?dt(t,e.trailingSpace):t,u=e.cm.state.specialChars,l=!1;if(u.test(t)){s=document.createDocumentFragment();for(var d=0;;){u.lastIndex=d;var _=u.exec(t),p=_?_.index-d:t.length-d;if(p){var g=document.createTextNode(c.slice(d,d+p));vo&&wo<9?s.appendChild(n(\"span\",[g])):s.appendChild(g),e.map.push(e.pos,e.pos+p,g),e.col+=p,e.pos+=p}if(!_)break;d+=p+1;var h=void 0;if(\"\\t\"==_[0]){var b=e.cm.options.tabSize,y=b-e.col%b;h=s.appendChild(n(\"span\",m(y),\"cm-tab\")),h.setAttribute(\"role\",\"presentation\"),h.setAttribute(\"cm-text\",\"\\t\"),e.col+=y}else\"\\r\"==_[0]||\"\\n\"==_[0]?(h=s.appendChild(n(\"span\",\"\\r\"==_[0]?\"鈵�\":\"鈵�\",\"cm-invalidchar\")),h.setAttribute(\"cm-text\",_[0]),e.col+=1):(h=e.cm.options.specialCharPlaceholder(_[0]),h.setAttribute(\"cm-text\",_[0]),vo&&wo<9?s.appendChild(n(\"span\",[h])):s.appendChild(h),e.col+=1);e.map.push(e.pos,e.pos+1,h),e.pos++}}else e.col+=t.length,s=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,s),vo&&wo<9&&(l=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),a||r||f||l||i){var v=a||\"\";r&&(v+=r),f&&(v+=f);var w=n(\"span\",[s],v,i);return o&&(w.title=o),e.content.appendChild(w)}e.content.appendChild(s)}}", "function _compile(html) {\n var code = 'var r=[]; var __temp;\\n'\n\n code += parse(re, html, add);\n code += 'return r.join(\"\");';\n code = 'with(obj || {}){' + code + '}';\n\n return new Function('obj', 'ctx', code.replace(/[\\r\\t\\n]/g, ''));\n }", "function modLives(modification)\n{\n\tnumLives = numLives + modification;\n}", "function colourCode(c)\n{\n\thtmlTag = /(&lt;([\\s\\S]*?)&gt;)/gi;\n\ttableTag = /(&lt;(table|tbody|th|tr|td|\\/table|\\/tbody|\\/th|\\/tr|\\/td)([\\s\\S]*?)&gt;)/gi;\n\tcommentTag = /(&lt;!--([\\s\\S]*?)&gt;)/gi;\n\timageTag = /(&lt;img([\\s\\S]*?)&gt;)/gi;\n\tobjectTag = /(&lt;(object|\\/object)([\\s\\S]*?)&gt;)/gi;\n\tlinkTag = /(&lt;(a|\\/a)([\\s\\S]*?)&gt;)/gi;\n\tscriptTag = /(&lt;(script|\\/script)([\\s\\S]*?)&gt;)/gi;\n\theadlinkTag = /(&lt;link([^&]*?)(borders.css)([^&]*?)&gt;<br\\/>)/gi;\n\tc = c.replace(headlinkTag,\"\");\n\theadlinkTag2 = /(&lt;link([^&]*?)(borders.css)([^&]*?)&gt;)/gi;\n\tc = c.replace(headlinkTag2,\"\");\n\n\tb2 = \"</font>\";\n\tb1 = \"<font color=#000080>\";\n\tc = c.replace(headlinkTag,\"\");\n\tc = c.replace(htmlTag,b1+\"$1\"+b2);\n\tc = c.replace(tableTag,\"<font color=#008080>$1\"+b2);\n\tc = c.replace(commentTag,\"<font color=#808080>$1\"+b2);\n\tc = c.replace(imageTag,\"<font color=#800080>$1\"+b2);\n\tc = c.replace(objectTag,\"<font color=#840000>$1\"+b2);\n\tc = c.replace(linkTag,\"<font color=#008000>$1\"+b2);\n\tc = c.replace(scriptTag,\"<font color=#800000>$1\"+b2);\n\treturn c;\n}", "function styles() {\n return gulp.src('website/frontend/static/less/styles.less')\n .pipe(less())\n .pipe(cleanCSS())\n .pipe(gulp.dest('website/frontend/static/css'))\n}", "function makeBigger() {\n\n}", "function cssClean() {\n return gulp\n .src([\"./src/css/*.less\", \"./src/css/*.css\"])\n .pipe(less())\n .pipe(csso())\n .pipe(gulp.dest(\"dist/css\"));\n}", "function preprocess(){\n\t// add requirements etc. here\n\n}", "function add_css(target) {\n\t\tappend_styles(target, \"svelte-1gtarpt\", \".hide-div.svelte-1gtarpt.svelte-1gtarpt{visibility:hidden}.fabs.svelte-1gtarpt.svelte-1gtarpt{bottom:0;position:fixed;margin:1em;right:0;z-index:998}.fab.svelte-1gtarpt.svelte-1gtarpt{display:block;width:56px;height:56px;border-radius:50%;text-align:center;color:#f0f0f0;margin:25px auto 0;box-shadow:0 0 4px rgba(0, 0, 0, .14), 0 4px 8px rgba(0, 0, 0, .28);cursor:pointer;-webkit-transition:all .1s ease-out;transition:all .1s ease-out;position:relative;z-index:998;overflow:hidden;background:#42a5f5}.fab.svelte-1gtarpt.svelte-1gtarpt:not(:last-child){width:0;height:0;margin:20px auto 0;opacity:0;visibility:hidden;line-height:40px}.fab:not(:last-child).is-visible.svelte-1gtarpt.svelte-1gtarpt{width:40px;height:40px;margin:15px auto 10;opacity:1;visibility:visible}.fab.svelte-1gtarpt.svelte-1gtarpt:nth-last-child(1){-webkit-transition-delay:25ms;transition-delay:25ms}.fab.svelte-1gtarpt.svelte-1gtarpt:not(:last-child):nth-last-child(2){-webkit-transition-delay:20ms;transition-delay:20ms}.fab.svelte-1gtarpt.svelte-1gtarpt:not(:last-child):nth-last-child(3){-webkit-transition-delay:40ms;transition-delay:40ms}.fab.svelte-1gtarpt.svelte-1gtarpt:not(:last-child):nth-last-child(4){-webkit-transition-delay:60ms;transition-delay:60ms}.fab.svelte-1gtarpt.svelte-1gtarpt:not(:last-child):nth-last-child(5){-webkit-transition-delay:80ms;transition-delay:80ms}.fab.svelte-1gtarpt.svelte-1gtarpt:active,.fab.svelte-1gtarpt.svelte-1gtarpt:focus,.fab.svelte-1gtarpt.svelte-1gtarpt:hover{box-shadow:0 0 6px rgba(0, 0, 0, .16), 0 6px 12px rgba(0, 0, 0, .32)}.chat.svelte-1gtarpt.svelte-1gtarpt{position:fixed;right:85px;bottom:20px;width:400px;font-size:12px;line-height:22px;font-family:'Roboto';font-weight:500;-webkit-font-smoothing:antialiased;font-smoothing:antialiased;opacity:0;box-shadow:1px 1px 100px 2px rgba(0, 0, 0, 0.22);border-radius:10px;-webkit-transition:all .2s ease-out;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.chat_header.svelte-1gtarpt.svelte-1gtarpt{font-size:13px;font-family:'Roboto';font-weight:500;color:#f3f3f3;height:55px;background:#42a5f5;border-top-left-radius:10px;border-top-right-radius:10px;padding-top:8px}.chat.is-visible.svelte-1gtarpt.svelte-1gtarpt{opacity:1;-webkit-animation:svelte-1gtarpt-zoomIn .2s cubic-bezier(.42, 0, .58, 1);animation:svelte-1gtarpt-zoomIn .2s cubic-bezier(.42, 0, .58, 1)}.chat_option.svelte-1gtarpt.svelte-1gtarpt{float:left;font-size:15px;list-style:none;position:relative;height:100%;width:100%;text-align:relative;margin-right:10px;letter-spacing:0.5px;font-weight:400\\n }.chat_option.svelte-1gtarpt img.svelte-1gtarpt{border-radius:50%;width:55px;float:left;margin:-30px 20px 10px 20px;border:4px solid rgba(0, 0, 0, 0.21)}.chat_option.svelte-1gtarpt .agent.svelte-1gtarpt{font-size:12px;font-weight:300}.chat_option.svelte-1gtarpt .online.svelte-1gtarpt{opacity:0.4;font-size:11px;font-weight:300}.chat_body.svelte-1gtarpt.svelte-1gtarpt{background:#fff;width:100%;display:inline-block;text-align:center;overflow-y:auto}.chat_body.svelte-1gtarpt p.svelte-1gtarpt{padding:20px;color:#888\\n }.chat_field.svelte-1gtarpt.svelte-1gtarpt{position:relative;margin:5px 0 5px 0;width:50%;font-family:'Roboto';font-size:12px;line-height:30px;font-weight:500;color:#4b4b4b;-webkit-font-smoothing:antialiased;font-smoothing:antialiased;border:none;outline:none;display:inline-block}.chat_field.chat_message.svelte-1gtarpt.svelte-1gtarpt{height:30px;resize:none;font-size:13px;font-weight:400}.fab_field.svelte-1gtarpt.svelte-1gtarpt{width:100%;display:inline-block;text-align:center;background:#fff;border-top:1px solid #eee;border-bottom-right-radius:10px;border-bottom-left-radius:10px}.fab_field.svelte-1gtarpt a.svelte-1gtarpt{display:inline-block;text-align:center}#fab_send.svelte-1gtarpt.svelte-1gtarpt{float:right;background:rgba(0, 0, 0, 0)}.fab_field.svelte-1gtarpt .fab.svelte-1gtarpt{width:35px;height:35px;box-shadow:none;margin:5px}.chat_converse.svelte-1gtarpt.svelte-1gtarpt{position:relative;background:#fff;margin:6px 0 0px 0;height:300px;min-height:0;font-size:12px;line-height:18px;overflow-y:auto;width:100%;float:right;padding-bottom:30px}.chat.svelte-1gtarpt .chat_converse .chat_msg_item.svelte-1gtarpt{position:relative;margin:8px 0 15px 0;padding:8px 10px;max-width:60%;display:block;word-wrap:break-word;border-radius:3px;-webkit-animation:svelte-1gtarpt-zoomIn .5s cubic-bezier(.42, 0, .58, 1);animation:svelte-1gtarpt-zoomIn .5s cubic-bezier(.42, 0, .58, 1);clear:both;z-index:999}.chat.svelte-1gtarpt .chat_converse .chat_msg_item .chat_avatar.svelte-1gtarpt{position:absolute;top:0}.chat.svelte-1gtarpt .chat_converse .chat_msg_item.chat_msg_item_admin .chat_avatar.svelte-1gtarpt{left:-52px;background:rgba(0, 0, 0, 0.03)}.chat.svelte-1gtarpt .chat_converse .chat_msg_item .chat_avatar.svelte-1gtarpt,.chat_avatar.svelte-1gtarpt img.svelte-1gtarpt{width:40px;height:40px;text-align:center;border-radius:50%}.chat.svelte-1gtarpt .chat_converse .chat_msg_item.chat_msg_item_admin.svelte-1gtarpt{margin-left:60px;float:left;background:rgba(0, 0, 0, 0.03);color:#666}.chat.svelte-1gtarpt .chat_converse .chat_msg_item.chat_msg_item_admin.svelte-1gtarpt:before{content:'';position:absolute;top:15px;left:-12px;z-index:998;border:6px solid transparent;border-right-color:rgba(255, 255, 255, .4)}input.svelte-1gtarpt.svelte-1gtarpt{position:relative;width:90%;font-family:'Roboto';font-size:12px;line-height:20px;font-weight:500;color:#4b4b4b;-webkit-font-smoothing:antialiased;font-smoothing:antialiased;outline:none;background:#fff;display:inline-block;resize:none;padding:5px;border-radius:3px}.svelte-1gtarpt.svelte-1gtarpt::-webkit-scrollbar{width:6px}.svelte-1gtarpt.svelte-1gtarpt::-webkit-scrollbar-track{border-radius:0}.svelte-1gtarpt.svelte-1gtarpt::-webkit-scrollbar-thumb{margin:2px;border-radius:10px;background:rgba(0, 0, 0, 0.2)}.is-float.svelte-1gtarpt.svelte-1gtarpt{box-shadow:0 0 6px rgba(0, 0, 0, .16), 0 6px 12px rgba(0, 0, 0, .32)}@-webkit-keyframes svelte-1gtarpt-zoomIn{0%{-webkit-transform:scale(0);transform:scale(0);opacity:0.0}100%{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes svelte-1gtarpt-zoomIn{0%{-webkit-transform:scale(0);transform:scale(0);opacity:0.0}100%{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@-webkit-keyframes svelte-1gtarpt-load{0%{-webkit-transform:scale(0);transform:scale(0);opacity:0.0}50%{-webkit-transform:scale(1.5);transform:scale(1.5);opacity:1}100%{-webkit-transform:scale(1);transform:scale(1);opacity:0}}@keyframes svelte-1gtarpt-load{0%{-webkit-transform:scale(0);transform:scale(0);opacity:0.0}50%{-webkit-transform:scale(1.5);transform:scale(1.5);opacity:1}100%{-webkit-transform:scale(1);transform:scale(1);opacity:0}}@media only screen and (min-width: 300px){.chat.svelte-1gtarpt.svelte-1gtarpt{width:250px}}@media only screen and (min-width: 480px){.chat.svelte-1gtarpt.svelte-1gtarpt{width:300px}.chat_field.svelte-1gtarpt.svelte-1gtarpt{width:65%}}@media only screen and (min-width: 768px){.chat.svelte-1gtarpt.svelte-1gtarpt{width:300px}.chat_field.svelte-1gtarpt.svelte-1gtarpt{width:65%}}@media only screen and (min-width: 1024px){.chat.svelte-1gtarpt.svelte-1gtarpt{width:300px}.chat_field.svelte-1gtarpt.svelte-1gtarpt{width:65%}}@-webkit-keyframes svelte-1gtarpt-ripple{100%{opacity:0;-moz-transform:scale(5);-ms-transform:scale(5);webkit-transform:scale(5);-webkit-transform:scale(5);transform:scale(5)}}@keyframes svelte-1gtarpt-ripple{100%{opacity:0;-moz-transform:scale(5);-ms-transform:scale(5);webkit-transform:scale(5);-webkit-transform:scale(5);transform:scale(5)}}.svelte-1gtarpt.svelte-1gtarpt::-webkit-input-placeholder{color:#bbb}.svelte-1gtarpt.svelte-1gtarpt:-ms-input-placeholder{color:#bbb}.svelte-1gtarpt.svelte-1gtarpt::-moz-placeholder{color:#bbb}.svelte-1gtarpt.svelte-1gtarpt:-moz-placeholder{color:#bbb}.label-color.svelte-1gtarpt.svelte-1gtarpt{color:black}\");\n\t}", "function col_Diff()\n{\n var i=0;\n \n $(\".YetToVisitedNode\").each(function() {\n\n\t\t\t\t\t\t\tif(i%2 == 0 && !$(this).hasClass('evenItinerary'))\n\t\t\t\t\t\t\t{\n \t\t\t\t\t\t\tif($(this).hasClass('oddItinerary'))\n \t\t\t\t\t\t\t{\n \t\t\t\t\t\t\t\t$(this).removeClass('oddItinerary');\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t$(this).addClass('evenItinerary');\n\t\t\t\t\t\t\t}\n \t\t\t\t\t\telse if(i%2 != 0 && !$(this).hasClass('oddItinerary'))\n \t\t\t\t\t\t{\n \t\t\t\t\t\t\tif($(this).hasClass('evenItinerary'))\n \t\t\t\t\t\t\t{\n \t\t\t\t\t\t\t\t$(this).removeClass('evenItinerary');\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t$(this).addClass('oddItinerary');\n \t\t\t\t\t\t}\n\t\t\t\t\t\ti++;\n});\n\n\t\t\t\t\t\ti=1;\n\n\t\t\t\t\t\t$(\".visitedNode\").each(function() {\n\t\n \t\t\t\t\tif(i%2 == 0 && !$(this).hasClass('evenItinerary'))\n\t\t\t\t\t\t{\n \t\t\t\t\t\tif($(this).hasClass('oddItinerary'))\n \t\t\t\t\t\t{\n \t\t\t\t\t\t\t$(this).removeClass('oddItinerary');\n \t\t\t\t\t\t}\n \t\t\t\t\t\t$(this).addClass('evenItinerary');\n \t\t\t\t\t}\n \t\t\t\t\telse if(i%2 != 0 && !$(this).hasClass('oddItinerary'))\n \t\t\t\t\t{\n \t\t\t\t\t\tif($(this).hasClass('evenItinerary'))\n \t\t\t\t\t\t{\n \t\t\t\t\t\t\t$(this).removeClass('evenItinerary');\n \t\t\t\t\t\t}\n \t\t\t\t\t\t$(this).addClass('oddItinerary');\n \t\t\t\t\t\t }\n\t\t\t\t\t\ti++;\n\t\t\t\t\t\t});\n\t\t\t\t\t\t//Adding colore difference code ends here\n }", "function codeReporter(fun) {\n less_fun = fun.replace(/\\(\\)/, '');\n // Convert line to HTML.\n line = \"<li>\" + code_lines.length + \"<code>\" + fun + \"</code>\" +\n \"<span class='code_modal_link'><a href='#' onclick='display_function_modal(\" + less_fun +\n \")'>view</a></span></li>\";\n // Add line to (global) code_lines.\n code_lines.unshift(line);\n // Recreate contents of code-box.\n $(\"#code-box-content\").html(code_lines.slice(0,5));\n}", "static defineModifier() {\n let mod = new Modifier;\n return (tag) => {\n if (tag.modified.indexOf(mod) > -1)\n return tag;\n return Modifier.get(tag.base || tag, tag.modified.concat(mod).sort((a, b) => a.id - b.id));\n };\n }", "injectModifier(codeSource) {\n let oldNode = new RcmTreeNode(this, this)\n for (let field in this) {\n delete this[field]\n }\n\n this.type = 'InjectedModifier'\n this.code = codeSource\n this.oldNode = oldNode\n this.parent = oldNode.parent\n }", "function ColorMadness(){\n function uncolor(){\n $('.postContainer, .post_comment_list').find('font[color], font[size]').each(function(){\n $(this).removeAttr('size').removeAttr('face').removeAttr('color').css('color','#c17d00');\n $(this).find('b').each(function(){\n $(this).replaceWith($(this).contents());\n });\n if ( $(this).parent().is('b') ) {\n $(this).parent().replaceWith($(this).parent().contents());\n }\n });\n }\n\n uncolor();\n\n //Observer\n let target = $('.post_comment_list');\n let config = { childList: true, subtree: true };\n let observer = new MutationObserver( mutations => uncolor() );\n\n target.each( (index, element) => observer.observe(element, config) );\n }", "function main() {\r\n$(\".md a\").each(function(){\r\n\tif($(this).attr(\"title\")!=\"\")\r\n\t{\r\n\t\t$(this).wrap(\"<span'></span>\");\r\n\t\t$(this).parent().html($(this).parent().html() + \"<span style='background-color:skyblue;border:1px solid black;font-weight:bold;padding:0 4px 0 4px;'>\" + $(this).attr(\"title\") + \"</span>\");\r\n\t}\r\n})\r\n}", "function shortenPart(part, minus){\n part.currentText = part.currentText.substring(minus);\n part.reduced = true;\n }", "function normalizeSource (lines) {\n\t_.each(lines, function (line, i) {\n\t\tline = line.replace(/#.*/gi, '');\n\t\tline = line.replace(/\\/\\*.*\\*\\//gi, '');\n\t\tline = line.replace(/^\\s+/gi, '');\n\t\tline = line.replace(/\\s+$/gi, '');\n\t\tline = line.replace(/\\s+/gi, ' ');\n\t\tlines[i] = line;\n\t});\n}" ]
[ "0.6211167", "0.6073777", "0.6073777", "0.60543406", "0.6041548", "0.6041548", "0.5771404", "0.56556684", "0.5642153", "0.56293935", "0.5623135", "0.56225723", "0.5603504", "0.5551451", "0.5365977", "0.5313776", "0.5303798", "0.52269864", "0.52080464", "0.5173901", "0.517376", "0.5171723", "0.51124984", "0.51053905", "0.5071808", "0.50580657", "0.505109", "0.5044324", "0.49961996", "0.49913722", "0.49814957", "0.49752", "0.49674588", "0.49674588", "0.49646688", "0.49562675", "0.49505278", "0.4949627", "0.4938541", "0.49380946", "0.49373987", "0.4933102", "0.493183", "0.49297908", "0.4927", "0.49234664", "0.491994", "0.4912838", "0.49077836", "0.48903996", "0.48811245", "0.488007", "0.48712373", "0.486964", "0.48605654", "0.4858384", "0.48536155", "0.48535532", "0.48534316", "0.48479876", "0.4831548", "0.48140043", "0.48123166", "0.48118693", "0.47978804", "0.4783655", "0.47760734", "0.47643867", "0.47637984", "0.47629175", "0.47610646", "0.4757657", "0.47556219", "0.47476348", "0.47472286", "0.47427362", "0.47398376", "0.47387195", "0.4735329", "0.47343147", "0.47277158", "0.47227708", "0.47211182", "0.47200432", "0.4718213", "0.47114262", "0.47112", "0.4704939", "0.47044772", "0.46962532", "0.46797872", "0.4670887", "0.46702233", "0.466916", "0.4666679", "0.466658", "0.46642497", "0.4662007", "0.46593416", "0.4659169", "0.46581662" ]
0.0
-1
Spin takes a positive or negative amount within [360, 360] indicating the change of hue. Values outside of this range will be wrapped into this range.
function spin(color, amount) { var hsl = tinycolor(color).toHsl(); var hue = (hsl.h + amount) % 360; hsl.h = hue < 0 ? 360 + hue : hue; return tinycolor(hsl); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _spin(color, amount) {\n var hsl = tinycolor(color).toHsl();\n var hue = (hsl.h + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return tinycolor(hsl);\n }", "function _spin(color, amount) {\n\t var hsl = tinycolor(color).toHsl();\n\t var hue = (hsl.h + amount) % 360;\n\t hsl.h = hue < 0 ? 360 + hue : hue;\n\t return tinycolor(hsl);\n\t}", "function _spin(color, amount) {\n var hsl = tinycolor(color).toHsl();\n var hue = (hsl.h + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return tinycolor(hsl);\n } // Combination Functions", "function spin(color, amount) {\n\t var hsl = tinycolor(color).toHsl();\n\t var hue = (hsl.h + amount) % 360;\n\t hsl.h = hue < 0 ? 360 + hue : hue;\n\t return tinycolor(hsl);\n\t}", "function spin(color, amount) {\n\t var hsl = tinycolor(color).toHsl();\n\t var hue = (hsl.h + amount) % 360;\n\t hsl.h = hue < 0 ? 360 + hue : hue;\n\t return tinycolor(hsl);\n\t}", "function spin(color, amount) {\n\t\t\tvar hsl = tinycolor(color).toHsl();\n\t\t\tvar hue = (mathRound(hsl.h) + amount) % 360;\n\t\t\thsl.h = hue < 0 ? 360 + hue : hue;\n\t\t\treturn tinycolor(hsl);\n\t}", "function spin(color, amount) {\n\t\t\tvar hsl = tinycolor(color).toHsl();\n\t\t\tvar hue = (mathRound(hsl.h) + amount) % 360;\n\t\t\thsl.h = hue < 0 ? 360 + hue : hue;\n\t\t\treturn tinycolor(hsl);\n\t}", "function spin(color, amount) {\n\t var hsl = tinycolor(color).toHsl();\n\t var hue = (mathRound(hsl.h) + amount) % 360;\n\t hsl.h = hue < 0 ? 360 + hue : hue;\n\t return tinycolor(hsl);\n\t}", "spin(amount) {\n const hsl = this.toHsl();\n const hue = (hsl.h + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return new TinyColor(hsl);\n }", "function spin(color, amount) {\n var hsl = tinycolor(color).toHsl();\n var hue = (hsl.h + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return tinycolor(hsl);\n } // Combination Functions", "function spin(color, amount) {\n var hsl = tinycolor(color).toHsl();\n var hue = (mathRound(hsl.h) + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return tinycolor(hsl);\n}", "function spin(color, amount) {\n var hsl = tinycolor(color).toHsl();\n var hue = (mathRound(hsl.h) + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return tinycolor(hsl);\n }", "function spin(color, amount) {\n var hsl = tinycolor(color).toHsl();\n var hue = (mathRound(hsl.h) + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return tinycolor(hsl);\n }", "function spin(color, amount) {\n var hsl = tinycolor(color).toHsl();\n var hue = (mathRound(hsl.h) + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return tinycolor(hsl);\n }", "function spin(color, amount) {\n var hsl = tinycolor(color).toHsl();\n var hue = (mathRound(hsl.h) + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return tinycolor(hsl);\n }", "function spin(color, amount) {\n var hsl = tinycolor(color).toHsl();\n var hue = (mathRound(hsl.h) + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return tinycolor(hsl);\n }", "function spinWheel() {\n // Rotate the spinner arrow\n rotation = (rotation + 12) % 360;\n arrow.setAttributeNS(null, \"transform\", \"rotate(\"+rotation+\",150,150)\");\n // Highlight the slice the arrow is above\n var newSlice = Math.floor(rotation / (360/numSlices));\n if (newSlice != currentSlice) {\n slices[currentSlice].toggleOverlay();\n slices[newSlice].toggleOverlay();\n currentSlice = newSlice;\n }\n}", "function spin_controller(){\n game_content.spin_degrees = game_content.spin_degrees + 4;\n if(game_content.spin_degrees > 360){\n game_content.spin_degrees = 0;\n }\n}", "spin() {\n if (this.balanceValue - this.betValue >= 0) {\n this.setWinValue(0);\n this.machine.spinReels();\n let balance = Math.round((this.balanceValue) * 10) / 10 - Math.round((this.betValue) * 10) / 10;\n this.setBalance(Math.round(balance * 10) / 10);\n if (this.balanceValue == 0) {\n this.btnSpin.interactive = false;\n }\n }\n }", "function hueMod(h) {\n return h % 360;\n}", "function singleSpin() {\n if((bet_i>cash_i) || (bet_i===0)){\n bet.className=\"error\";\n stoploop_i = true;\n return stoploop_i;\n }\n\n spin_i++;\n if (rouletteBlackRed()){\n cash_i+=bet_i;\n win_i++;\n\n if(onwin_i===0) {\n stoploop_i = true;\n }\n else {\n bet_i = Math.floor(bet_i * onwin_i);\n }\n }\n else {\n cash_i-=bet_i;\n lose_i++;\n\n if(onlose_i===0) {\n stoploop_i = true;\n }\n else {\n bet_i = Math.floor(bet_i * onlose_i);\n }\n }\n return stoploop_i;\n }", "function spin(){\nchange -= turn;\ndraw();\n}", "rotate(){\r\n if(this.state.spinTime > 2800) {\r\n clearTimeout(this.spinTimer);\r\n this.stopRotateWheel();\r\n } else {\r\n const spinAngle = this.rngSpinAngle - this.easeOut(this.state.spinTime, 0, this.rngSpinAngle, this.rngSpinTime);\r\n \r\n this.setState({\r\n startAngle: this.state.startAngle + spinAngle * Math.PI / 180,\r\n spinTime: this.state.spinTime + 30,\r\n }, () => {\r\n this.drawRouletteWheel();\r\n clearTimeout(this.spinTimer);\r\n this.spinTimer = setTimeout(() => this.rotate(), 30);\r\n })\r\n }\r\n }", "function alterHues() {\n for (let i = 0; i < hues.length; i++) {\n hues[i] = (hues[i] + 1) % 360;\n }\n}", "set freeSpin(value) {}", "function spinGameWheel(){\r\n var $wheel = $(\".game-match\").find(\".spinner\").find(\".game-wheel\");\r\n\r\n TweenMax.to($wheel,2.5,{rotation: 360,ease:Back.easeInOut});\r\n }", "function colorSpin1() {\n\tvar colorTimer1 = setInterval(colorChange, 20);\n\tsetTimeout(function(){clearInterval(colorTimer1);}, 1000);\n}", "spinTo(angle) {\n const {hubContext} = this;\n const r = maxCusps - this.cusps;\n hubContext.transform({\n pos: [-maxCusps + r * Math.cos(angle), r * Math.sin(angle)],\n rot: -(maxCusps / this.cusps - 1) * angle,\n });\n }", "function spin() {\n\tlargeImage.style.transform += \"rotate(0.1deg)\";\n\tsetInterval(spin, 40);\n}", "function spin(){\n rand = Math.floor(Math.random() * 38);\n var position = createWheel(rand);\n return position;\n}", "function checkSpin() {\n\tif (getEl(\"balance\").value < 1) {\n\t\tconsole.log(\"Out of money! Please insert coin(s)!\");\n\t} else {\n\t\tgetEl(\"balance\").value--;\n\t\treturnColor();\n\t\tgetEl(\"spin\").disabled = true;\n\t\tgetEl(\"balance\").disabled = true;\n\t\tgetEl(\"debug\").disabled = true;\n\t\tspin(getEl(\"images1-1\"), getEl(\"images1-2\"), 2000);\n\t\tspin(getEl(\"images2-1\"), getEl(\"images2-2\"), 2500);\n\t\tspin(getEl(\"images3-1\"), getEl(\"images3-2\"), 3000);\n\t\tsetTimeout(checkWin, 3001);\n\t}\n}", "function HueShift(h,s) { \n h+=s; while (h>=360.0) h-=360.0; while (h<0.0) h+=360.0; return h; \n}", "function spin(e) {\n\t\tsetInterval(function() {\n\t\t\tif ( (($window.scrollTop() + $window.height()) > e.offset().top) && $window.scrollTop() < (e.offset().top + e.height())) {\n\t\t\t\t//spinReset = true;\n\t\t\t\tdeg = deg + 0.5;\n\t\t\t\t//console.log(deg);\n\t\t\t\te.css('-webkit-transform', 'rotate(' + deg + 'deg)');\n\t\t\t} else if ( $window.scrollTop() > ($intelRevo.offset().top + e.height()) && (($window.scrollTop() + $window.height()) < $archWhl.offset().top) ) {\n\t\t\t\t//spinReset = true;\n\t\t\t\tdeg = 0;\n\t\t\t}\n\t\t}, 100);\n\t}", "function spinKnob(theta) {\n $knob.removeClass();\n if (theta === 0) {\n $knob.attr(\"icon-content\", \"\\ue608\");\n } else if (theta < 90) {\n $knob.attr(\"icon-content\", \"\\ue607\");\n } else if (theta < 180) {\n $knob.attr(\"icon-content\", \"\\ue606\");\n } else if (theta < 270) {\n $knob.attr(\"icon-content\", \"\\ue605\");\n } else {\n $knob.attr(\"icon-content\", \"\\ue604\");\n }\n $indicator.css(\"transform\", \"rotate(\" + theta + \"deg)\");\n }", "function spin()\n {\n if(Math.round(data_came['time']) != data_came['time'] || data_came['time']<1){\n callback.prizeHintNo();\n return false;\n }\n // can we spin the wheel?\n if(canSpin){\n var rounds = data_came['rounds']?parseInt(data_came['rounds']):game.rnd.between(2, 4);\n //var degrees = data_came['degrees']?data_came['degrees']:game.rnd.between(0, 360);\n var one = 360/data_prizes.length;\n var degrees = null;\n if($.isArray(data_came['prizes'])){\n if(data_came['time'] > data_came['prizes'].length){\n degrees = data_came['prizes'][game.rnd.between(0, data_came['prizes'].length-1)];\n }else{\n degrees = parseInt(data_came['prizes'][data_came['time']-1]);\n }\n }else{\n degrees = parseInt(data_came['prizes']);\n }\n if(degrees){\n degrees = parseInt(degrees*one-one+game.rnd.between(1, (one-2)>2?one-2:1));\n }else{\n data_came['time'] = 0;\n }\n //degrees = degrees?parseInt(degrees*one-one+game.rnd.between(1, (one-2)>2?one-2:1)):game.rnd.between(0, 360);\n // resetting text field\n prizeText.text = \"\";\n // before the wheel ends spinning, we already know the prize according to \"degrees\" rotation and the number of slices\n prize = slices - 1 - Math.floor(degrees / (360 / slices));\n // now the wheel cannot spin because it's already spinning\n canSpin = false;\n // animation tweeen for the spin: duration 3s, will rotate by (360 * rounds + degrees) degrees\n // the quadratic easing will simulate friction\n var spinTween = game.add.tween(wheel).to({angle: 360 * rounds + degrees}, 3000, Phaser.Easing.Quadratic.Out, true);\n // once the tween is completed, call winPrize function\n spinTween.onComplete.add(winPrize, game);\n }\n }", "function screenSpin() {\r\n\tif (allStatsLoaded) {\r\n\t\tshakeWrapper.classList.remove(\"spin\");\r\n\t\t//pause for one frame to allow update\r\n\t\tvoid shakeWrapper.offsetWidth;\r\n\t\tshakeWrapper.classList.add(\"spin\");\r\n\t}\r\n}", "function HueShift(h, s) {\n h += s;\n while (h >= 360.0) h -= 360.0;\n while (h < 0.0) h += 360.0;\n return h;\n}", "function spinWheel(){ \n\t\tif (curIteration > 1) {\n\t\t\t$('.nextCategoryArrow').removeClass(\"hidden\");\n\t\t\t$('#spinWheel').css(\"opacity\", \"0\");\n\t\t\t$('#titleImg_category').css(\"opacity\", \"0\");\n\t\t\t$('#title').css(\"opacity\", \"0\");\n\t\t\t$('#wheelCycleBtn').css(\"opacity\", \"0\");\n\t\t\ttheTime = 6000;\n\t\t}else{\n\t\t\ttheTime = 0;\n\t\t}\n\t\tsetTimeout(function() {\n\t\t\tdegrees+=120; $('.spinWheel').css('transform', 'rotate(' + degrees + 'deg)'); \n\t\t\t$('.nextCategoryArrow').addClass(\"hidden\");\n\t\t\t$('#spinWheel').css(\"opacity\", \"1\");\n\t\t\t$('#titleImg_category').css(\"opacity\", \"1\");\n\t\t\t$('#title').css(\"opacity\", \"1\");\n\t\t\t$('#wheelCycleBtn').css(\"opacity\", \"1\");\n\t\t}, theTime);\n\t}", "function setSpinner(son, mom, base, speed){\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t// spin 360\r\n\tvar autospin, posXori = 1, mdown=false, posXori, tickAmount = speed, autoId = 0;\r\n\t \r\n\tfunction moveBack(){\r\n\t\ti++;\r\n\t\tif(i > spinMax - 1){\r\n\t\t\ti=0;\r\n\t\t}\r\n\t\tspinner(i)\r\n\t}\r\n\t\r\n\tfunction moveForward(){\r\n\t\ti--;\r\n\t\tif(i < 0){\r\n\t\t\ti = spinMax-1;\r\n\t\t}\r\n\t\tspinner(i);\r\n\t}\r\n\t\r\n\tmom.appendChild(son);\r\n\t\t\r\n\tspinner = function(sp){\r\n\t\t// spinner frame has all the to be spinner images on x gap space, so we can place them on x=spinId*image width, so we give illusion of spin, haha\r\n\t\t// display -none vs block- is too much on processor, using one div with images as train, moving x direction is so far, best to spin \r\n\t\tarrFrame[1].style.left = -gap*sp;\r\n\t\t//trace(sp)\r\n\t}\r\n\r\n}", "function spin(){\n bet = $(\"#betAmount\").val();\n if(bet == 0){\n $(\"#betError\").text(\"You must input a valid bet amount\");\n $(\"#betError\").show();\n return;\n }else{\n $(\"#betError\").hide();\n }\n $(\"#winnings\").hide();\n $(\"#buttonSpin\").prop(\"disabled\", true);\n startSpinTimer = setInterval(spinTimer, 200);\n }// spin", "function toggleSpinning() {\n // Toggle the spinning animation\n if (game === undefined) {\n new ChutesAndLadders;\n }\n \n if (isSpinning) {\n // Stop the arrow\n isSpinning = false;\n clearInterval(toggleSpinning.spinInt);\n spinButton.removeAttribute(\"disabled\");\n game.turn();\n }\n else {\n // Start spinning the arrow\n isSpinning = true;\n toggleSpinning.spinInt = setInterval(spinWheel, 1000/60);\n // Set how long the wheel will be spinning\n var duration = Math.floor(Math.random() * 2000) + 1000;\n setTimeout(toggleSpinning, duration);\n // Disable the spin button\n spinButton.setAttribute(\"disabled\", \"true\");\n }\n}", "function rotateSlider(event) {\n if (event.deltaY >= 0) {\n rotate += 10;\n this.style.transform = \"rotate(\" + rotate + \"deg)\";\n this.style.filter = \"hue-rotate(\" + rotate + \"deg)\";\n }\n else {\n rotate -= 10;\n this.style.transform = \"rotate(\" + rotate + \"deg)\";\n this.style.filter = \"hue-rotate(\" + rotate + \"deg)\";\n }\n}", "function startSpin () {\t\t\n\t\t// start each reel spinning\n\t\t$('.slot-one').addClass('spinning1');\n\t\t$('.slot-two').addClass('spinning2');\n\t\t$('.slot-three').addClass('spinning3');\t\t\n\t\t// stop reels\n\t\tstopSpin();\n\t}", "function fix360(v)\n{\n\twhile(v < 0.0)v += 360;\n\twhile(v > 360)v -= 360;\n\treturn v;\n}", "function spinAmount() {\n\t return spinValues[Math.floor((Math.random()*spinValues.length))];\n}", "function makeSpin(elem) {\n\n return spinner;\n}", "stopRotateWheel() {\r\n let { startAngle, arc } = this.state;\r\n const { baseSize } = this.props;\r\n const canvas = this.refs.canvas;\r\n const ctx = canvas.getContext('2d');\r\n const degrees = startAngle * 180 / Math.PI + 90;\r\n const arcd = arc * 180 / Math.PI;\r\n const index = Math.floor((360 - degrees % 360) / arcd);\r\n ctx.save();\r\n ctx.font = 'bold 25px Roboto, Arial';\r\n ctx.fillStyle = 'white';\r\n const text = this.state.cuisineArr[index]\r\n ctx.fillText(text, baseSize - ctx.measureText(text).width / 2, baseSize);\r\n ctx.restore();\r\n if(this.state.spinTime === 2820){\r\n this.setState({cuisine: text, spinTime: 0})\r\n this.props.changeCuisine(text)\r\n this.toggleSpinState();\r\n }\r\n }", "function wrap360(degrees) { return (degrees%360+360) % 360; }", "function incrementHue(hue, incrementValues){\n return Math.abs(Math.round(hue + incrementValues[0]) % 360);\n}", "function lerp (pct, lower, upper) {\n var range = upper - lower;\n var color = range * pct + lower;\n\n return Math.round(color);\n }", "DisplaySpinn(){\n let spinn=this.state.dataSpinn[this.state.value]\n if (spinn>=0){\n return(\n <Icon2 name=\"spinner-rotate-forward\" size={spinn*4} color='green'/>\n )\n }else{\n return(\n <Icon2 name=\"spinner-rotate-forward\" size={spinn*4} color='red'/>\n )\n }\n }", "function startSpin(whatSpinner, direction)\n{\n\tdocument.thisLoop = setInterval(function ()\n\t{\n\t\tnextStep(whatSpinner, direction);\n\t}, 125); //125 ms\n}", "function startSpin(id) {\n\t\t\treturn function() {\t\t\n\t\t\t\tvar animation = mSpinners[id];\n\t\t\t\t\n\t\t\t\t// Start the webkit animation\n\t\t\t\tanimation.startTime = Date.now();\n\t\t\t\tanimation.element.style.webkitTransform = \"rotateY(\"+animation.degrees+\"deg)\";\n\t\t\t\t\n\t\t\t\t// Start our loop\n\t\t\t\tsetTimeout(spinLoop(id), 0);\n\t\t\t}\n\t\t}", "function ClampAngle(angle : float, min : float, max : float)\n\n{\n\nif(angle < -360F)\n\nangle += 360F;\n\nif(angle > 360F)\n\nangle -= 360F;\n\nreturn Mathf.Clamp(angle, min, max);\n\n}", "function limitR(r) {\n return (r + 360) % 360;\n }", "function bound01(n, max) {\n if (isOnePointZero(n)) {\n n = '100%';\n }\n var isPercent = isPercentage(n);\n n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));\n // Automatically convert percentage into number\n if (isPercent) {\n n = parseInt(String(n * max), 10) / 100;\n }\n // Handle floating point rounding errors\n if (Math.abs(n - max) < 0.000001) {\n return 1;\n }\n // Convert into [0, 1] range if it isn't already\n if (max === 360) {\n // If n is a hue given in degrees,\n // wrap around out-of-range values into [0, 360] range\n // then convert into [0, 1].\n n = (n < 0 ? (n % max) + max : n % max) / parseFloat(String(max));\n } else {\n // If n not a hue given in degrees\n // Convert into [0, 1] range if it isn't already.\n n = (n % max) / parseFloat(String(max));\n }\n return n;\n }", "function startSpin()\n{\n if (localStorage.clickcount && localStorage.clickcount >= 50) {\n localStorage.clickcount = Number(localStorage.clickcount)-50;\n document.getElementById(\"money-bani\").innerHTML = localStorage.clickcount + \" BANI\";\n // Ensure that spinning can't be clicked again while already running.\n if (wheelSpinning == false) {\n // Based on the power level selected adjust the number of spins for the wheel, the more times is has\n // to rotate with the duration of the animation the quicker the wheel spins.\n if (wheelPower == 1) {\n theWheel.animation.spins = 3;\n } else if (wheelPower == 2) {\n theWheel.animation.spins = 8;\n } else if (wheelPower == 3) {\n theWheel.animation.spins = 15;\n }\n\n // Begin the spin animation by calling startAnimation on the wheel object.\n theWheel.startAnimation();\n // document.getElementById('spin_button').disabled = \"true\";\n\n // Set to true so that power can't be changed and spin button re-enabled during\n // the current animation. The user will have to reset before spinning again.\n wheelSpinning = true;\n document.getElementById(\"spin_button\").disabled = true;\n }\n }\n else {\n alert(\"Nu mai ai bani!\");\n }\n}", "function bound01(n, max) {\n if (isOnePointZero(n)) {\n n = '100%';\n }\n var isPercent = isPercentage(n);\n n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));\n // Automatically convert percentage into number\n if (isPercent) {\n n = parseInt(String(n * max), 10) / 100;\n }\n // Handle floating point rounding errors\n if (Math.abs(n - max) < 0.000001) {\n return 1;\n }\n // Convert into [0, 1] range if it isn't already\n if (max === 360) {\n // If n is a hue given in degrees,\n // wrap around out-of-range values into [0, 360] range\n // then convert into [0, 1].\n n = (n < 0 ? (n % max) + max : n % max) / parseFloat(String(max));\n }\n else {\n // If n not a hue given in degrees\n // Convert into [0, 1] range if it isn't already.\n n = (n % max) / parseFloat(String(max));\n }\n return n;\n}", "function bound01(n, max) {\n if (isOnePointZero(n)) {\n n = '100%';\n }\n var isPercent = isPercentage(n);\n n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));\n // Automatically convert percentage into number\n if (isPercent) {\n n = parseInt(String(n * max), 10) / 100;\n }\n // Handle floating point rounding errors\n if (Math.abs(n - max) < 0.000001) {\n return 1;\n }\n // Convert into [0, 1] range if it isn't already\n if (max === 360) {\n // If n is a hue given in degrees,\n // wrap around out-of-range values into [0, 360] range\n // then convert into [0, 1].\n n = (n < 0 ? (n % max) + max : n % max) / parseFloat(String(max));\n }\n else {\n // If n not a hue given in degrees\n // Convert into [0, 1] range if it isn't already.\n n = (n % max) / parseFloat(String(max));\n }\n return n;\n}", "function bound01(n, max) {\n if (isOnePointZero(n)) {\n n = '100%';\n }\n var isPercent = isPercentage(n);\n n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));\n // Automatically convert percentage into number\n if (isPercent) {\n n = parseInt(String(n * max), 10) / 100;\n }\n // Handle floating point rounding errors\n if (Math.abs(n - max) < 0.000001) {\n return 1;\n }\n // Convert into [0, 1] range if it isn't already\n if (max === 360) {\n // If n is a hue given in degrees,\n // wrap around out-of-range values into [0, 360] range\n // then convert into [0, 1].\n n = (n < 0 ? (n % max) + max : n % max) / parseFloat(String(max));\n }\n else {\n // If n not a hue given in degrees\n // Convert into [0, 1] range if it isn't already.\n n = (n % max) / parseFloat(String(max));\n }\n return n;\n}", "function bound01(n, max) {\n if (isOnePointZero(n)) {\n n = '100%';\n }\n var isPercent = isPercentage(n);\n n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));\n // Automatically convert percentage into number\n if (isPercent) {\n n = parseInt(String(n * max), 10) / 100;\n }\n // Handle floating point rounding errors\n if (Math.abs(n - max) < 0.000001) {\n return 1;\n }\n // Convert into [0, 1] range if it isn't already\n if (max === 360) {\n // If n is a hue given in degrees,\n // wrap around out-of-range values into [0, 360] range\n // then convert into [0, 1].\n n = (n < 0 ? (n % max) + max : n % max) / parseFloat(String(max));\n }\n else {\n // If n not a hue given in degrees\n // Convert into [0, 1] range if it isn't already.\n n = (n % max) / parseFloat(String(max));\n }\n return n;\n}", "function bound01(n, max) {\n if (isOnePointZero(n)) {\n n = '100%';\n }\n var isPercent = isPercentage(n);\n n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));\n // Automatically convert percentage into number\n if (isPercent) {\n n = parseInt(String(n * max), 10) / 100;\n }\n // Handle floating point rounding errors\n if (Math.abs(n - max) < 0.000001) {\n return 1;\n }\n // Convert into [0, 1] range if it isn't already\n if (max === 360) {\n // If n is a hue given in degrees,\n // wrap around out-of-range values into [0, 360] range\n // then convert into [0, 1].\n n = (n < 0 ? (n % max) + max : n % max) / parseFloat(String(max));\n }\n else {\n // If n not a hue given in degrees\n // Convert into [0, 1] range if it isn't already.\n n = (n % max) / parseFloat(String(max));\n }\n return n;\n}", "function bound01(n, max) {\n if (isOnePointZero(n)) {\n n = '100%';\n }\n var isPercent = isPercentage(n);\n n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));\n // Automatically convert percentage into number\n if (isPercent) {\n n = parseInt(String(n * max), 10) / 100;\n }\n // Handle floating point rounding errors\n if (Math.abs(n - max) < 0.000001) {\n return 1;\n }\n // Convert into [0, 1] range if it isn't already\n if (max === 360) {\n // If n is a hue given in degrees,\n // wrap around out-of-range values into [0, 360] range\n // then convert into [0, 1].\n n = (n < 0 ? (n % max) + max : n % max) / parseFloat(String(max));\n }\n else {\n // If n not a hue given in degrees\n // Convert into [0, 1] range if it isn't already.\n n = (n % max) / parseFloat(String(max));\n }\n return n;\n}", "function bound01(n, max) {\n if (isOnePointZero(n)) {\n n = '100%';\n }\n var isPercent = isPercentage(n);\n n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));\n // Automatically convert percentage into number\n if (isPercent) {\n n = parseInt(String(n * max), 10) / 100;\n }\n // Handle floating point rounding errors\n if (Math.abs(n - max) < 0.000001) {\n return 1;\n }\n // Convert into [0, 1] range if it isn't already\n if (max === 360) {\n // If n is a hue given in degrees,\n // wrap around out-of-range values into [0, 360] range\n // then convert into [0, 1].\n n = (n < 0 ? n % max + max : n % max) / parseFloat(String(max));\n } else {\n // If n not a hue given in degrees\n // Convert into [0, 1] range if it isn't already.\n n = n % max / parseFloat(String(max));\n }\n return n;\n}", "function spin() {\n start.src = './img/blur.png';\n start.classList.add('spin');\n speak();\n setTimeout(function() {\n start.classList.remove('spin');\n }, 1000);\n \n}", "set normalSmoothingAngle(value) {}", "function spinning() {\n\tpush();\n\ttranslate(width / 2, height / 2);\n\trotate(start3);\n\timage(plan2, 180, 180, 150, 150);\n\tstart3 += radians(2);\n\tpop();\n}", "function colorSlider() {\n seek_slider.oninput = function() {\n\n var value = (this.value-this.min)/(this.max-this.min)*100;\n this.style.background = 'linear-gradient(to right, #fff 0%, #fff ' + value + '%, rgb(156, 152, 152) ' + value + '%, rgb(156, 152, 152) 100%)';\n };\n \n \n}" ]
[ "0.7569416", "0.7567256", "0.7511435", "0.74026567", "0.74026567", "0.73911095", "0.73911095", "0.7389199", "0.73602784", "0.73437786", "0.7305738", "0.7286768", "0.7286768", "0.7286768", "0.7286768", "0.7286768", "0.6322526", "0.63052016", "0.61720943", "0.60072523", "0.5930827", "0.59132105", "0.5900536", "0.5757447", "0.5752874", "0.5747827", "0.57351005", "0.57276136", "0.5673041", "0.56216854", "0.5546289", "0.5524247", "0.5513603", "0.5490367", "0.5469116", "0.54523104", "0.5435405", "0.54183674", "0.54174876", "0.5412861", "0.54025257", "0.5392251", "0.53828543", "0.53600705", "0.5340015", "0.53383696", "0.5312545", "0.5287923", "0.52875936", "0.5284256", "0.5278425", "0.52592576", "0.5231214", "0.52043617", "0.51983225", "0.519783", "0.51925796", "0.51914847", "0.51914847", "0.51914847", "0.51914847", "0.51914847", "0.51914847", "0.51890427", "0.5188795", "0.51539814", "0.5149366", "0.51435417" ]
0.73059875
35
Combination Functions Thanks to jQuery xColor for some of the ideas behind these <
function complement(color) { var hsl = tinycolor(color).toHsl(); hsl.h = (hsl.h + 180) % 360; return tinycolor(hsl); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function blendColors(c0, c1, p) {\n var f=parseInt(c0.slice(1),16),\n t=parseInt(c1.slice(1),16),\n R1=f>>16,\n G1=f>>8&0x00FF,\n B1=f&0x0000FF,\n R2=t>>16,\n G2=t>>8&0x00FF,\n B2=t&0x0000FF;\n return \"#\"+(0x1000000+(Math.round((R2-R1)*p)+R1)*0x10000\n +(Math.round((G2-G1)*p)+G1)*0x100+(\n Math.round((B2-B1)*p)+B1)).toString(16).slice(1);\n}", "function Multifunction(a, b, c, d) {\n if ((b >= c[0]) && (b < c[1])) {\n $(a).css({ \"background-color\": d[0] });\n //alert(b + ' '+ c[0] + ' '+ c[1]);\n } else if ((b >= c[1]) && (b < c[2])) {\n $(a).css({ \"background-color\": d[1] });\n //alert(b + ' '+ c[1] + ' '+ c[2]);\n } else if ((b >= c[2]) && (b < c[3])) {\n $(a).css({ \"background-color\": d[2] });\n //alert(b + ' '+ c[2] + ' '+ c[3]);\n } else if ((b >= c[3]) && (b < c[4])) {\n $(a).css({ \"background-color\": d[3] });\n //alert(b + ' '+ c[3] + ' '+ c[4]);\n } else if ((b >= c[4]) && (b < c[5])) {\n $(a).css({ \"background-color\": d[4] });\n //alert(b + ' '+ c[4] + ' '+ c[5]);\n } else if (b >= c[5]) {\n $(a).css({ \"background-color\": d[5] });\n //alert(b + ' '+ c[5]);\n } else {\n //alert('derp');\n }\n}", "function addColors() {\n\tvar temp = \"rgb(\" + generateRGB() + \", \" + generateRGB() + \", \" + generateRGB() + \")\";\n\treturn temp;\n}", "function color() {\n return colorValue() + colorValue() + colorValue();\n}", "function __generateColorCombinations() {\n var combinations = {};\n for (var s = 1; s <= colorCount; s++) {\n for (var p = 1; p <= colorCount; p++) {\n combinations[(s + (p * colorCount)) - colorCount] = {pri: p - 1, sec: s - 1}\n }\n }\n return combinations;\n}", "function complexColorRange(hex1, hex2, hex3, count) {\n var countL = 0; //count for the left part\n var countR = 0; //count for the right part\n if (count % 2 === 1) { //odd numbers are easy\n countL = countR = Math.ceil(count / 2); //just divide and use the ceiling function\n } else { // but even numbers, one element needs to be hex2\n countL = count / 2;\n countR = countL + 1;\n }\n var colorL = hexColorRange(hex1, hex2, countL);\n var colorR = hexColorRange(hex2, hex3, countR);\n colorL.pop() //pop the top because it the same value at the start of colorR\n return colorL.concat(colorR); //put them together\n\n}", "function colorfn(a) {\n return intervalChoice(a, [\n function() { return c0; },\n x0,\n lerpColorFactory(c0, c1),\n x1,\n lerpColorFactory(c1, c2),\n x2,\n lerpColorFactory(c2, c3),\n x3,\n lerpColorFactory(c3, c4),\n x4,\n function() { return c4; }\n ]);\n}", "function blendColors (args) {\n let base = [0, 0, 0, 0]\n let mix\n let added\n while (added = args.shift()) {\n if (typeof added[3] === 'undefined') {\n added[3] = 1\n }\n // check if both alpha channels exist.\n if (base[3] && added[3]) {\n mix = [0, 0, 0, 0]\n // alpha\n mix[3] = 1 - (1 - added[3]) * (1 - base[3])\n // red\n mix[0] = Math.round((added[0] * added[3] / mix[3]) + (base[0] * base[3] * (1 - added[3]) / mix[3]))\n // green\n mix[1] = Math.round((added[1] * added[3] / mix[3]) + (base[1] * base[3] * (1 - added[3]) / mix[3]))\n // blue\n mix[2] = Math.round((added[2] * added[3] / mix[3]) + (base[2] * base[3] * (1 - added[3]) / mix[3]))\n\n } else if (added) {\n mix = added\n } else {\n mix = base\n }\n base = mix\n }\n\n return mix\n}", "function getColorsModules() {\n return [{\n // The module that recognizes colors\n name: \"Colors\",\n precedence: 1,\n kernel: function(value) {\n var colors = matchColors(value);\n if (colors == null) {\n return false;\n }\n // Construct some 'div's\n var ret = \"\",\n width = principal,\n height = principal;\n $$.each(colors, function(color, ix) {\n ret += makeSwatch(color, width, height) + \" \";\n });\n return ret;\n }\n },{\n // The module that recognizes color ranges\n name: \"ColorRanges\",\n precedence: 1,\n kernel: function(value) {\n var colors = matchColorRange(value);\n if (colors == null) {\n return false;\n }\n if (colors.length == 2) {\n // Construct a fade from one color to the other\n var ret = \"\",\n width = 2,\n height = principal,\n a = color2Rgb(colors[0]),\n b = color2Rgb(colors[1]),\n nSteps = 200;\n // Convert 'a' and 'b' to a common base\n var maxBase = Math.max(a.base, b.base);\n a = rgbScaleBase(a, maxBase);\n b = rgbScaleBase(b, maxBase);\n // Calculate a delta color\n var delta = {\n r: (b.r - a.r) / nSteps,\n g: (b.g - a.g) / nSteps,\n b: (b.b - a.b) / nSteps\n };\n ret += colors[0] + \"&nbsp;\";\n for (var i = 0; i <= nSteps; ++i) {\n var color = rgb2Hex({\n r: a.r + i * delta.r,\n g: a.g + i * delta.g,\n b: a.b + i * delta.b,\n base: maxBase\n });\n ret += '<div style=\"width: ' + width + 'px; height: ' + height + 'px; background-color: ' + color + '; '\n + 'display: inline-block; padding: 0px;\" '\n + 'onmouseover=\"rangeMouseOver(\\'' + color + '\\')\" '\n // + (i == 0 || i == nSteps ? 'onmouseout=\"$(\\'#rangeMouseOver\\').empty();\" ' : '')\n + '></div>';\n }\n ret += \"&nbsp;\" + colors[1]\n + '<br />'\n + '<div id=\"rangeMouseOver\"></div>';\n return ret;\n } else {\n return false;\n }\n }\n }];\n}", "function shadeBlendConvert(p, from, to) {\n if(typeof(p)!=\"number\"||p<-1||p>1||typeof(from)!=\"string\"||(from[0]!='r'&&from[0]!='#')||(typeof(to)!=\"string\"&&typeof(to)!=\"undefined\"))return null; //ErrorCheck\n if(!this.sbcRip)this.sbcRip=function(d){\n var l=d.length,RGB=new Object();\n if(l>9){\n d=d.split(\",\");\n if(d.length<3||d.length>4)return null;//ErrorCheck\n RGB[0]=i(d[0].slice(4)),RGB[1]=i(d[1]),RGB[2]=i(d[2]),RGB[3]=d[3]?parseFloat(d[3]):-1;\n }else{\n switch(l){case 8:case 6:case 3:case 2:case 1:return null;} //ErrorCheck\n if(l<6)d=\"#\"+d[1]+d[1]+d[2]+d[2]+d[3]+d[3]+(l>4?d[4]+\"\"+d[4]:\"\"); //3 digit\n d=i(d.slice(1),16),RGB[0]=d>>16&255,RGB[1]=d>>8&255,RGB[2]=d&255,RGB[3]=l==9||l==5?r(((d>>24&255)/255)*10000)/10000:-1;\n }\n return RGB;}\n var i=parseInt,r=Math.round,h=from.length>9,h=typeof(to)==\"string\"?to.length>9?true:to==\"c\"?!h:false:h,b=p<0,p=b?p*-1:p,to=to&&to!=\"c\"?to:b?\"#000000\":\"#FFFFFF\",f=sbcRip(from),t=sbcRip(to);\n if(!f||!t)return null; //ErrorCheck\n if(h)return \"rgb(\"+r((t[0]-f[0])*p+f[0])+\",\"+r((t[1]-f[1])*p+f[1])+\",\"+r((t[2]-f[2])*p+f[2])+(f[3]<0&&t[3]<0?\")\":\",\"+(f[3]>-1&&t[3]>-1?r(((t[3]-f[3])*p+f[3])*10000)/10000:t[3]<0?f[3]:t[3])+\")\");\n else return \"#\"+(0x100000000+(f[3]>-1&&t[3]>-1?r(((t[3]-f[3])*p+f[3])*255):t[3]>-1?r(t[3]*255):f[3]>-1?r(f[3]*255):255)*0x1000000+r((t[0]-f[0])*p+f[0])*0x10000+r((t[1]-f[1])*p+f[1])*0x100+r((t[2]-f[2])*p+f[2])).toString(16).slice(f[3]>-1||t[3]>-1?1:3);\n}", "function color() {\n var map = {\n \"black\" : [ 0/255,0/255,0/255 ],\n \"silver\": [ 192/255,192/255,192/255 ],\n \"gray\" : [ 128/255,128/255,128/255 ],\n \"white\" : [ 255/255,255/255,255/255 ],\n \"maroon\": [ 128/255,0/255,0/255 ],\n \"red\" : [ 255/255,0/255,0/255 ],\n \"purple\": [ 128/255,0/255,128/255 ],\n \"fuchsia\": [ 255/255,0/255,255/255 ],\n \"green\" : [ 0/255,128/255,0/255 ],\n \"lime\" : [ 0/255,255/255,0/255 ],\n \"olive\" : [ 128/255,128/255,0/255 ],\n \"yellow\": [ 255/255,255/255,0/255 ],\n \"navy\" : [ 0/255,0/255,128/255 ],\n \"blue\" : [ 0/255,0/255,255/255 ],\n \"teal\" : [ 0/255,128/255,128/255 ],\n \"aqua\" : [ 0/255,255/255,255/255 ],\n \"aliceblue\" : [ 240/255,248/255,255/255 ],\n \"antiquewhite\" : [ 250/255,235/255,215/255 ],\n \"aqua\" : [ 0/255,255/255,255/255 ],\n \"aquamarine\" : [ 127/255,255/255,212/255 ],\n \"azure\" : [ 240/255,255/255,255/255 ],\n \"beige\" : [ 245/255,245/255,220/255 ],\n \"bisque\" : [ 255/255,228/255,196/255 ],\n \"black\" : [ 0/255,0/255,0/255 ],\n \"blanchedalmond\" : [ 255/255,235/255,205/255 ],\n \"blue\" : [ 0/255,0/255,255/255 ],\n \"blueviolet\" : [ 138/255,43/255,226/255 ],\n \"brown\" : [ 165/255,42/255,42/255 ],\n \"burlywood\" : [ 222/255,184/255,135/255 ],\n \"cadetblue\" : [ 95/255,158/255,160/255 ],\n \"chartreuse\" : [ 127/255,255/255,0/255 ],\n \"chocolate\" : [ 210/255,105/255,30/255 ],\n \"coral\" : [ 255/255,127/255,80/255 ],\n \"cornflowerblue\" : [ 100/255,149/255,237/255 ],\n \"cornsilk\" : [ 255/255,248/255,220/255 ],\n \"crimson\" : [ 220/255,20/255,60/255 ],\n \"cyan\" : [ 0/255,255/255,255/255 ],\n \"darkblue\" : [ 0/255,0/255,139/255 ],\n \"darkcyan\" : [ 0/255,139/255,139/255 ],\n \"darkgoldenrod\" : [ 184/255,134/255,11/255 ],\n \"darkgray\" : [ 169/255,169/255,169/255 ],\n \"darkgreen\" : [ 0/255,100/255,0/255 ],\n \"darkgrey\" : [ 169/255,169/255,169/255 ],\n \"darkkhaki\" : [ 189/255,183/255,107/255 ],\n \"darkmagenta\" : [ 139/255,0/255,139/255 ],\n \"darkolivegreen\" : [ 85/255,107/255,47/255 ],\n \"darkorange\" : [ 255/255,140/255,0/255 ],\n \"darkorchid\" : [ 153/255,50/255,204/255 ],\n \"darkred\" : [ 139/255,0/255,0/255 ],\n \"darksalmon\" : [ 233/255,150/255,122/255 ],\n \"darkseagreen\" : [ 143/255,188/255,143/255 ],\n \"darkslateblue\" : [ 72/255,61/255,139/255 ],\n \"darkslategray\" : [ 47/255,79/255,79/255 ],\n \"darkslategrey\" : [ 47/255,79/255,79/255 ],\n \"darkturquoise\" : [ 0/255,206/255,209/255 ],\n \"darkviolet\" : [ 148/255,0/255,211/255 ],\n \"deeppink\" : [ 255/255,20/255,147/255 ],\n \"deepskyblue\" : [ 0/255,191/255,255/255 ],\n \"dimgray\" : [ 105/255,105/255,105/255 ],\n \"dimgrey\" : [ 105/255,105/255,105/255 ],\n \"dodgerblue\" : [ 30/255,144/255,255/255 ],\n \"firebrick\" : [ 178/255,34/255,34/255 ],\n \"floralwhite\" : [ 255/255,250/255,240/255 ],\n \"forestgreen\" : [ 34/255,139/255,34/255 ],\n \"fuchsia\" : [ 255/255,0/255,255/255 ],\n \"gainsboro\" : [ 220/255,220/255,220/255 ],\n \"ghostwhite\" : [ 248/255,248/255,255/255 ],\n \"gold\" : [ 255/255,215/255,0/255 ],\n \"goldenrod\" : [ 218/255,165/255,32/255 ],\n \"gray\" : [ 128/255,128/255,128/255 ],\n \"green\" : [ 0/255,128/255,0/255 ],\n \"greenyellow\" : [ 173/255,255/255,47/255 ],\n \"grey\" : [ 128/255,128/255,128/255 ],\n \"honeydew\" : [ 240/255,255/255,240/255 ],\n \"hotpink\" : [ 255/255,105/255,180/255 ],\n \"indianred\" : [ 205/255,92/255,92/255 ],\n \"indigo\" : [ 75/255,0/255,130/255 ],\n \"ivory\" : [ 255/255,255/255,240/255 ],\n \"khaki\" : [ 240/255,230/255,140/255 ],\n \"lavender\" : [ 230/255,230/255,250/255 ],\n \"lavenderblush\" : [ 255/255,240/255,245/255 ],\n \"lawngreen\" : [ 124/255,252/255,0/255 ],\n \"lemonchiffon\" : [ 255/255,250/255,205/255 ],\n \"lightblue\" : [ 173/255,216/255,230/255 ],\n \"lightcoral\" : [ 240/255,128/255,128/255 ],\n \"lightcyan\" : [ 224/255,255/255,255/255 ],\n \"lightgoldenrodyellow\" : [ 250/255,250/255,210/255 ],\n \"lightgray\" : [ 211/255,211/255,211/255 ],\n \"lightgreen\" : [ 144/255,238/255,144/255 ],\n \"lightgrey\" : [ 211/255,211/255,211/255 ],\n \"lightpink\" : [ 255/255,182/255,193/255 ],\n \"lightsalmon\" : [ 255/255,160/255,122/255 ],\n \"lightseagreen\" : [ 32/255,178/255,170/255 ],\n \"lightskyblue\" : [ 135/255,206/255,250/255 ],\n \"lightslategray\" : [ 119/255,136/255,153/255 ],\n \"lightslategrey\" : [ 119/255,136/255,153/255 ],\n \"lightsteelblue\" : [ 176/255,196/255,222/255 ],\n \"lightyellow\" : [ 255/255,255/255,224/255 ],\n \"lime\" : [ 0/255,255/255,0/255 ],\n \"limegreen\" : [ 50/255,205/255,50/255 ],\n \"linen\" : [ 250/255,240/255,230/255 ],\n \"magenta\" : [ 255/255,0/255,255/255 ],\n \"maroon\" : [ 128/255,0/255,0/255 ],\n \"mediumaquamarine\" : [ 102/255,205/255,170/255 ],\n \"mediumblue\" : [ 0/255,0/255,205/255 ],\n \"mediumorchid\" : [ 186/255,85/255,211/255 ],\n \"mediumpurple\" : [ 147/255,112/255,219/255 ],\n \"mediumseagreen\" : [ 60/255,179/255,113/255 ],\n \"mediumslateblue\" : [ 123/255,104/255,238/255 ],\n \"mediumspringgreen\" : [ 0/255,250/255,154/255 ],\n \"mediumturquoise\" : [ 72/255,209/255,204/255 ],\n \"mediumvioletred\" : [ 199/255,21/255,133/255 ],\n \"midnightblue\" : [ 25/255,25/255,112/255 ],\n \"mintcream\" : [ 245/255,255/255,250/255 ],\n \"mistyrose\" : [ 255/255,228/255,225/255 ],\n \"moccasin\" : [ 255/255,228/255,181/255 ],\n \"navajowhite\" : [ 255/255,222/255,173/255 ],\n \"navy\" : [ 0/255,0/255,128/255 ],\n \"oldlace\" : [ 253/255,245/255,230/255 ],\n \"olive\" : [ 128/255,128/255,0/255 ],\n \"olivedrab\" : [ 107/255,142/255,35/255 ],\n \"orange\" : [ 255/255,165/255,0/255 ],\n \"orangered\" : [ 255/255,69/255,0/255 ],\n \"orchid\" : [ 218/255,112/255,214/255 ],\n \"palegoldenrod\" : [ 238/255,232/255,170/255 ],\n \"palegreen\" : [ 152/255,251/255,152/255 ],\n \"paleturquoise\" : [ 175/255,238/255,238/255 ],\n \"palevioletred\" : [ 219/255,112/255,147/255 ],\n \"papayawhip\" : [ 255/255,239/255,213/255 ],\n \"peachpuff\" : [ 255/255,218/255,185/255 ],\n \"peru\" : [ 205/255,133/255,63/255 ],\n \"pink\" : [ 255/255,192/255,203/255 ],\n \"plum\" : [ 221/255,160/255,221/255 ],\n \"powderblue\" : [ 176/255,224/255,230/255 ],\n \"purple\" : [ 128/255,0/255,128/255 ],\n \"red\" : [ 255/255,0/255,0/255 ],\n \"rosybrown\" : [ 188/255,143/255,143/255 ],\n \"royalblue\" : [ 65/255,105/255,225/255 ],\n \"saddlebrown\" : [ 139/255,69/255,19/255 ],\n \"salmon\" : [ 250/255,128/255,114/255 ],\n \"sandybrown\" : [ 244/255,164/255,96/255 ],\n \"seagreen\" : [ 46/255,139/255,87/255 ],\n \"seashell\" : [ 255/255,245/255,238/255 ],\n \"sienna\" : [ 160/255,82/255,45/255 ],\n \"silver\" : [ 192/255,192/255,192/255 ],\n \"skyblue\" : [ 135/255,206/255,235/255 ],\n \"slateblue\" : [ 106/255,90/255,205/255 ],\n \"slategray\" : [ 112/255,128/255,144/255 ],\n \"slategrey\" : [ 112/255,128/255,144/255 ],\n \"snow\" : [ 255/255,250/255,250/255 ],\n \"springgreen\" : [ 0/255,255/255,127/255 ],\n \"steelblue\" : [ 70/255,130/255,180/255 ],\n \"tan\" : [ 210/255,180/255,140/255 ],\n \"teal\" : [ 0/255,128/255,128/255 ],\n \"thistle\" : [ 216/255,191/255,216/255 ],\n \"tomato\" : [ 255/255,99/255,71/255 ],\n \"turquoise\" : [ 64/255,224/255,208/255 ],\n \"violet\" : [ 238/255,130/255,238/255 ],\n \"wheat\" : [ 245/255,222/255,179/255 ],\n \"white\" : [ 255/255,255/255,255/255 ],\n \"whitesmoke\" : [ 245/255,245/255,245/255 ],\n \"yellow\" : [ 255/255,255/255,0/255 ],\n \"yellowgreen\" : [ 154/255,205/255,50/255 ] };\n\n var o, i = 1, a = arguments, c = a[0], alpha;\n\n if(a[0].length<4 && (a[i]*1-0)==a[i]) { alpha = a[i++]; } // first argument rgb (no a), and next one is numeric?\n if(a[i].length) { a = a[i], i = 0; } // next arg an array, make it our main array to walk through\n if(typeof c == 'string')\n c = map[c.toLowerCase()];\n if(alpha!==undefined)\n c = c.concat(alpha);\n for(o=a[i++]; i<a.length; i++) {\n o = o.union(a[i]);\n }\n return o.setColor(c);\n}", "function dualColor (){\n \n\tcounter += 1;\n\tdocument.getElementById('model__baseC').getAttribute('color');\n\tswitch (counter) {\n\t\tcase 1:\n\t\tdocument.getElementById('model__baseC').setAttribute('color', '0.4627 0.4627 0.4627 0.3549 0.3549 0.3549');\n\t\t\t\n\t\t\tbreak;\n\t\tcase 2:\n\t\tdocument.getElementById('model__baseC').setAttribute('color', '0.003922 0.1255 0.3059 0.1294 0.1294 0.1294');\n\t\t\tbreak;\n\t\tcase 3:\n\t\tdocument.getElementById('model__baseC').setAttribute('color', '0.2549 -0.5529 -0.5529 0.1294 0.1294 0.1294');\n\t\t\tbreak;\n\n\t\t\tcase 4:\n\t\tdocument.getElementById('model__baseC').setAttribute('color', '0.003922 0.5333 0.4275 0.1725 0.04314 0.09412');\n\t\t\tbreak;\n\n\t\tcase 5:\n\t\t\tcounter = 0;\n\t\t\tdocument.getElementById('model__baseC').setAttribute('color', '0.003922 0.003922 0.003922 0.1294 0.1294 0.1294');\n\t\t\tbreak;\n\t}\n\t\t\t\n\n}", "function encodePickingColor(i) {\n return [i + 1 & 255, i + 1 >> 8 & 255, i + 1 >> 16 & 255];\n}", "function color(x) {\n if(x <= 0) return \"green\";\n if(x <= 1) return \"lime\";\n if(x <= 2) return \"gold\";\n if(x <= 3) return \"orange\";\n if(x <= 4) return \"salmon\";\n if(x <= 5) return \"red\";\n return \"black\";\n }", "function setRandoColors(){\n\tc1 = makeHex(); // execute function twice for right and left gradients\n\tc2 = makeHex();\n\tconsole.log(c1, c2)\n\tcolor1.value = c1; // set values for backgrounds\n\tcolor2.value = c2;\n\tsetGradient() // call function to set background color\n}", "function chooseColors() {\r\n brushHue += 1;\r\n \r\n strokeWeight(weight += counter);\r\n \r\n if (weight > 15) {\r\n counter = -1\r\n } else if (weight < 5) {\r\n counter = 1\r\n }\r\n \r\n if (brushHue >= 360) {\r\n brushHue = 0;\r\n }\r\n \r\n stroke(brushHue, brushSaturation, brushBrightness);\r\n fill(brushHue, brushSaturation, brushBrightness);\r\n}", "createColors(color, num) {\n //receive hex color from parent, return array of colors for gradient\n //num is # of generated color in return array\n let a = []\n let red = parseInt( color.substring(1, 3), 16)\n let green = parseInt(color.substring(3, 5), 16)\n let blue = parseInt(color.substring(5,7), 16)\n \n let k = 0.8 \n //from lighter colder to darker warmer\n // console.log(red, green, blue)\n for (i=0;i<num;i++) {\n let new_red = (Math.floor(red*k)).toString(16)\n let new_green = (Math.floor(green*k)).toString(16)\n let new_blue = (Math.floor(blue*k)).toString(16)\n let new_color = '#'+new_red+new_green+new_blue\n k += 0.1\n a.push(new_color)\n }\n return a\n\n }", "function rangeColors(rangeNumber) {\n var colorArr = [];\n var red = new Color(232, 9, 26),\n white = new Color(255, 255, 255),\n green = new Color(6, 170, 60),\n start = green,\n end = red;\n // if (rangeNumber > 50) {\n // start = white,\n // end = red;\n // rangeNumber = rangeNumber % 51;\n // }\n var startColors = start.getColors(),\n endColors = end.getColors();\n for (var i = 0; i <= rangeNumber; i++) {\n var r = Interpolate(startColors.r, endColors.r, rangeNumber, i);\n var g = Interpolate(startColors.g, endColors.g, rangeNumber, i);\n var b = Interpolate(startColors.b, endColors.b, rangeNumber, i);\n var color = \"rgb(\" + r + \",\" + g + \",\" + b + \")\";\n colorArr.push(color);\n }\n\n function Interpolate(start, end, steps, count) {\n var s = start,\n e = end,\n final = s + (((e - s) / steps) * count);\n return Math.floor(final);\n }\n\n function Color(_r, _g, _b) {\n var r, g, b;\n var setColors = function(_r, _g, _b) {\n r = _r;\n g = _g;\n b = _b;\n };\n setColors(_r, _g, _b);\n this.getColors = function() {\n var colors = {\n r: r,\n g: g,\n b: b\n };\n return colors;\n };\n }\n return colorArr;\n}", "function clrs(i, j) {\n clr_list = [\n [0, 0, 0],\n [255, 255, 255],\n [204, 82, 82],\n [204, 163, 82],\n [163, 204, 82],\n [82, 204, 82],\n [82, 204, 163],\n [82, 163, 204],\n [82, 82, 204],\n [163, 82, 204],\n [204, 82, 163],\n [204, 82, 82]\n ];\n var tmp = clr_list[i];\n var foo = d3.rgb(tmp[0], tmp[1], tmp[2])\n return d3.rgb(tmp[0], tmp[1], tmp[2]).darker(2.5).brighter(j * 5);\n}", "function highcharts_color_set (base) {\n var colors = [];\n colors.push(Highcharts.Color(base).get());\n for (var i = 0; i < 9; i ++) {\n colors.push(Highcharts.Color(base).brighten((i - 3) / 14).get());\n }\n return colors;\n }", "function colorOptions (dificuldade) {\n\tfor (var i = 0 ; i<dificuldade;i++){\n\t\tcolorPick = colorGeneration();\n\t\tcolors[i].style.background = \"rgb(\"+colorPick[0]+\", \"+colorPick[1]+\", \"+colorPick[2]+\")\";\n\t}\n\tfor (var j = dificuldade; j< colors.length; j++){\n\t\tcolors[j].style.background = \"#232323\";\n\t}\n}", "function addColors(a1, a2){\r\n var array = [];\r\n for (var i=0; i<a1.length; i+=3){\r\n array.push(a1[i]+a2[i], a1[i+1]+a2[i+2], a1[i+3]+a2[i+3]);\r\n }\r\n return array;\r\n}", "function colorFrom(num){\n\tswitch(num){\n\t\tcase 1:\n\t\t\tdocument.getElementById('fromBin').style.backgroundColor = \"#E6E4EB\"; document.getElementById('fromBin').style.color = \"#010101\";\n\t\t\tdocument.getElementById('fromDec').style.backgroundColor = \"#515151\"; document.getElementById('fromDec').style.color = \"#FFFFFF\";\n\t\t\tdocument.getElementById('fromOct').style.backgroundColor = \"#515151\"; document.getElementById('fromOct').style.color = \"#FFFFFF\";\n\t\t\tdocument.getElementById('fromHex').style.backgroundColor = \"#515151\"; document.getElementById('fromHex').style.color = \"#FFFFFF\"; break;\n\t\tcase 2:\n\t\t\tdocument.getElementById('fromBin').style.backgroundColor = \"#515151\"; document.getElementById('fromBin').style.color = \"#FFFFFF\";\n\t\t\tdocument.getElementById('fromDec').style.backgroundColor = \"#E6E4EB\"; document.getElementById('fromDec').style.color = \"#010101\";\n\t\t\tdocument.getElementById('fromOct').style.backgroundColor = \"#515151\"; document.getElementById('fromOct').style.color = \"#FFFFFF\";\n\t\t\tdocument.getElementById('fromHex').style.backgroundColor = \"#515151\"; document.getElementById('fromHex').style.color = \"#FFFFFF\"; break;\n\t\tcase 3:\n\t\t\tdocument.getElementById('fromBin').style.backgroundColor = \"#515151\"; document.getElementById('fromBin').style.color = \"#FFFFFF\";\n\t\t\tdocument.getElementById('fromDec').style.backgroundColor = \"#515151\"; document.getElementById('fromDec').style.color = \"#FFFFFF\";\n\t\t\tdocument.getElementById('fromOct').style.backgroundColor = \"#E6E4EB\"; document.getElementById('fromOct').style.color = \"#010101\";\n\t\t\tdocument.getElementById('fromHex').style.backgroundColor = \"#515151\"; document.getElementById('fromHex').style.color = \"#FFFFFF\"; break;\n\t\tcase 4:\n\t\t\tdocument.getElementById('fromBin').style.backgroundColor = \"#515151\"; document.getElementById('fromBin').style.color = \"#FFFFFF\";\n\t\t\tdocument.getElementById('fromDec').style.backgroundColor = \"#515151\"; document.getElementById('fromDec').style.color = \"#FFFFFF\";\n\t\t\tdocument.getElementById('fromOct').style.backgroundColor = \"#515151\"; document.getElementById('fromOct').style.color = \"#FFFFFF\";\n\t\t\tdocument.getElementById('fromHex').style.backgroundColor = \"#E6E4EB\"; document.getElementById('fromHex').style.color = \"#010101\"; break;\n\t}\n\t\n}", "function changeEveryColorToRed(colors) {\n}", "function composeColor() {\n return [rand256(), rand256(), rand256()];\n}", "function blendColors(members,voteShade = true)\n{\n\tvar r = 0, g = 0 , b = 0, i, rgbColor;\n\tfor (i = 0; i < members.length; i++) \n\t{\n\t\tif(members[i].vote != undefined & voteShade == true)\n\t\t{\n\t\t\trgbColor = d3.rgb(partyColors[members[i].vote + partyNameSimplify(members[i].party_short_name)]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\trgbColor = d3.rgb(partyColors[\"Yea\"+partyNameSimplify(members[i].party_short_name)]);\n\t\t if(members[i].vote=='Abs') {\n\t\t\t rgbColor = d3.rgb(partyColors[\"Abs\"+partyNameSimplify(members[i].party_short_name)]);\n\t\t\t}\n\t\t}\n\t\tr = r + rgbColor.r;\n\t\tg = g + rgbColor.g;\n\t\tb = b + rgbColor.b; \n\t}\n\tr = r / members.length;\n\tg = g / members.length;\n\tb = b / members.length;\n\treturn d3.rgb(r,g,b).toString();\n}", "function getPickingColor(index) {\n return [index + 1 & 255, index + 1 >> 8 & 255, index + 1 >> 8 >> 8 & 255];\n}", "encodePickingColor(i, target = []) {\n target[0] = (i + 1) & 255;\n target[1] = ((i + 1) >> 8) & 255;\n target[2] = (((i + 1) >> 8) >> 8) & 255;\n return target;\n }", "function blendColors(colorA, colorB, amount) {\n\tconst [rA, gA, bA] = colorA.match(/\\w\\w/g).map((c) => parseInt(c, 16));\n\tconst [rB, gB, bB] = colorB.match(/\\w\\w/g).map((c) => parseInt(c, 16));\n\tconst r = Math.round(rA + (rB - rA) * amount).toString(16).padStart(2, '0');\n\tconst g = Math.round(gA + (gB - gA) * amount).toString(16).padStart(2, '0');\n\tconst b = Math.round(bA + (bB - bA) * amount).toString(16).padStart(2, '0');\n\treturn '#' + r + g + b;\n }", "function mini_color_call(){\n 'use strict';\n\n $('.miniColors').minicolors({\n animationSpeed: 50,\n animationEasing: 'swing',\n change: null,\n changeDelay: 0,\n control: 'hue',\n defaultValue: $defultColor,\n hide: null,\n hideSpeed: 100,\n inline: false,\n letterCase: 'lowercase',\n opacity: true,\n position: 'bottom left',\n show: null,\n showSpeed: 100,\n theme: 'bootstrap'\n });\n $('.miniColors2').minicolors({\n animationSpeed: 50,\n animationEasing: 'swing',\n change: null,\n changeDelay: 0,\n control: 'hue',\n defaultValue: $redActive,\n hide: null,\n hideSpeed: 100,\n inline: false,\n letterCase: 'lowercase',\n opacity: false,\n position: 'bottom right',\n show: null,\n showSpeed: 100,\n theme: 'bootstrap'\n });\n\n $('.miniColor3').minicolors({\n animationSpeed: 50,\n animationEasing: 'swing',\n change: null,\n changeDelay: 0,\n control: 'hue',\n defaultValue: $brownActive,\n hide: null,\n hideSpeed: 100,\n inline: false,\n letterCase: 'lowercase',\n opacity: true,\n position: 'top left',\n show: null,\n showSpeed: 100,\n theme: 'bootstrap'\n });\n $('.miniColor4').minicolors({\n animationSpeed: 50,\n animationEasing: 'swing',\n change: null,\n changeDelay: 0,\n control: 'hue',\n defaultValue: $lightBlueActive,\n hide: null,\n hideSpeed: 100,\n inline: false,\n letterCase: 'uppercase',\n opacity: true,\n position: 'top right',\n show: null,\n showSpeed: 100,\n theme: 'bootstrap'\n });\n}", "function colorGen($usr) {\n var hexArray = GM_getValue(\"hexArrayStore\", \"\") || [];\n var tempArray = [];\n\n // Convert string to hex\n var hexStr = $usr.text();\n var result = \"\";\n for (var i=0; i<hexStr.length; i++) {\n result += hexStr.charCodeAt(i).toString(16);\n }\n\n var hexName = result.split(\"\");//Splitting each character up with \"\"s and converting to hex\n\n var adder = 1;\n $.each(hexName, function(ind,num){\n num = (parseInt(num) + 1);\n if (num !== 0 && !isNaN(num)){//math\n adder = adder * num;\n }\n });\n adder = adder.toString().replace(\".\", \"\").split(\"0\").join(\"\");\n let start = adder.length-10;\n let end = adder.length-4;\n var firstThree = adder.toString().substring(start, end);//moremath\n var amt = 60;\n\n //Will loop twice, once for light and once for dark, then escapes to Robin colors\n for (i=0;i<2;i++){\n var r = firstThree.slice(0,2);\n var g = firstThree.slice(2,4);\n var b = firstThree.slice(4,6);\n if (rowAlternator) amt+=10; // TODO: Might want to rethink this\n var randR = (Math.seededRandom(r*100,120,175));\n var randG = (Math.seededRandom(g*100,120,175));\n var randB = (Math.seededRandom(b*100,120,175));\n // This is the randomizer, not much to know about this. Buncha math\n var suppress = (Math.seededRandom(firstThree*r*10,0,6));\n var modAmt =2 ;\n switch(suppress) {\n case 0:\n randR/=modAmt;\n break;\n case 1:\n randG/=modAmt;\n break;\n case 2:\n randB/=modAmt;\n break;\n case 4:\n randR/=modAmt;\n randG/=modAmt;\n break;\n case 5:\n randR/=modAmt;\n randB/=modAmt;\n break;\n case 6:\n randG/=modAmt;\n randB/=modAmt;\n break;\n default:\n break;\n }\n var hexR = (parseInt(randR) + parseInt(amt)).toString(16);\n var hexG = (parseInt(randG) + parseInt(amt)).toString(16);\n var hexB = (parseInt(randB) + parseInt(amt)).toString(16);\n amt=-40;\n tempArray.push(hexR + hexG + hexB); //pushing the 6 character string to a temporary array, one for light, one for dark\n }\n\n //Robin Colors\n var colors = [\"e50000\", \"db8e00\", \"ccc100\", \"02be01\", \"0083c7\", \"820080\"];\n var e = $usr.text().toLowerCase(),\n t = e.replace(/[^a-z0-9]/g, \"\"),\n n = parseInt(t, 36) % 6;\n\n //Cascading array used to add color schemes to master hex array on a 1:1 user:colorset basis\n //AKA, arrays within an array (multidimensional array)\n tempArray.push(colors[n]);\n hexArray.push(tempArray);\n //console.log(hexArray);\n GM_setValue(\"hexArrayStore\", hexArray); //Store array in scriptmonkey settings for later access\n }", "function shadeBlend(p,c0,c1) {\n const n=p<0?p*-1:p,u=Math.round,w=parseInt;\n if(c0.length>7){\n const f=c0.split(\",\"),t=(c1?c1:p<0?\"rgb(0,0,0)\":\"rgb(255,255,255)\").split(\",\"),R=w(f[0].slice(4)),G=w(f[1]),B=w(f[2]);\n return \"rgb(\"+(u((w(t[0].slice(4))-R)*n)+R)+\",\"+(u((w(t[1])-G)*n)+G)+\",\"+(u((w(t[2])-B)*n)+B)+\")\"\n }else{\n const f=w(c0.slice(1),16),t=w((c1?c1:p<0?\"#000000\":\"#FFFFFF\").slice(1),16),R1=f>>16,G1=f>>8&0x00FF,B1=f&0x0000FF;\n return \"#\"+(0x1000000+(u(((t>>16)-R1)*n)+R1)*0x10000+(u(((t>>8&0x00FF)-G1)*n)+G1)*0x100+(u(((t&0x0000FF)-B1)*n)+B1)).toString(16).slice(1)\n }\n }", "function colorForCurrent(){\n\n}", "function generateColor(red, green, blue)\n{\n paintColor[0] = red;\n paintColor[1] = green;\n paintColor[2] = blue;\n}", "function blendColors(colorA, colorB, amount) {\n let [rA, gA, bA] = colorA.match(/\\w\\w/g).map((c) => parseInt(c, 16));\n let [rB, gB, bB] = colorB.match(/\\w\\w/g).map((c) => parseInt(c, 16));\n let r = Math.round(rA + (rB - rA) * amount)\n .toString(16)\n .padStart(2, \"0\");\n let g = Math.round(gA + (gB - gA) * amount)\n .toString(16)\n .padStart(2, \"0\");\n let b = Math.round(bA + (bB - bA) * amount)\n .toString(16)\n .padStart(2, \"0\");\n return \"#\" + r + g + b;\n}", "tweenColors (from, to, pos) {\n // Check for has alpha, because rgba colors perform worse due to lack of\n // support in WebKit.\n var hasAlpha,\n ret;\n\n // Unsupported color, return to-color (#3920)\n if (!to.rgba.length || !from.rgba.length) {\n ret = to.input || 'none';\n\n // Interpolate\n } else {\n from = from.rgba;\n to = to.rgba;\n hasAlpha = (to[3] !== 1 || from[3] !== 1);\n ret = (hasAlpha ? 'rgba(' : 'rgb(') +\n Math.round(to[0] + (from[0] - to[0]) * (1 - pos)) + ',' +\n Math.round(to[1] + (from[1] - to[1]) * (1 - pos)) + ',' +\n Math.round(to[2] + (from[2] - to[2]) * (1 - pos)) +\n (hasAlpha ? (',' + (to[3] + (from[3] - to[3]) * (1 - pos))) : '') + ')';\n }\n return ret;\n }", "function highLight(div) {\n\n /*if(memEletSelect != div && memEletSelect != undefined && div.getAttribute(\"id\") !=\"g5k.\"){\n \n for( var i = 1; i < div.childNodes.length-1; i++){\n \n //in safari and chrome\n var color =div.childNodes[i].style.fill;\n if(color[0] === \"#\"){\n color = hexToRgb(color);\n color.r -= 50;\n color.g -= 50;\n color.b -= 50;\n div.childNodes[i].style.fill= \"rgb(\"+color.r+\",\"+color.g+\",\"+color.b+\")\";\n }\n //in opera and firefox\n if(color[0]===\"r\"){\n color=color.split(\",\");\n var r = parseInt(color[0].slice(4))-50;\n var g= parseInt(color[1]) -50;\n var b = parseInt(color[2].slice(0,color[2].length-1)) -50;\n div.childNodes[i].style.fill= \"rgb(\"+r+\",\"+g+\",\"+b+\")\";\n \n \n }\n }\n \n div.childNodes[i].style.border=\" solid 1px rgb(230,230,230)\";\n div.childNodes[i].style.backgroundColor=\"rgb(230,230,230)\";\n \n \n }*/\n\n if (memEletSelect === undefined && div.getAttribute(\"id\") != \"g5k.\") {\n\n for (var i = 1; i < (div.childNodes.length - 1) / 2; i++) {\n //in safari and chrome\n var color = div.childNodes[i].style.fill;\n if (color[0] === \"#\") {\n color = hexToRgb(color);\n color.r -= 50;\n color.g -= 50;\n color.b -= 50;\n div.childNodes[i].style.fill = \"rgb(\" + color.r + \",\" + color.g + \",\" + color.b + \")\";\n }\n //in opera and firefox\n if (color[0] === \"r\") {\n color = color.split(\",\");\n var r = parseInt(color[0].slice(4)) - 50;\n var g = parseInt(color[1]) - 50;\n var b = parseInt(color[2].slice(0, color[2].length - 1)) - 50;\n div.childNodes[i].style.fill = \"rgb(\" + r + \",\" + g + \",\" + b + \")\";\n\n\n }\n }\n\n div.style.border = \" solid 1px rgb(230,230,230)\";\n div.style.backgroundColor = \"rgb(230,230,230)\";\n memEletSelect = div;\n }\n}", "function shadeBlendConvert(p, from, to) {\n\t if(typeof(p)!=\"number\"||p<-1||p>1||typeof(from)!=\"string\"||(from[0]!='r'&&from[0]!='#')||(typeof(to)!=\"string\"&&typeof(to)!=\"undefined\"))return null; //ErrorCheck\n\t if(!this.sbcRip)this.sbcRip=function(d){\n\t var l=d.length,RGB=new Object();\n\t if(l>9){\n\t d=d.split(\",\");\n\t if(d.length<3||d.length>4)return null;//ErrorCheck\n\t RGB[0]=i(d[0].slice(4)),RGB[1]=i(d[1]),RGB[2]=i(d[2]),RGB[3]=d[3]?parseFloat(d[3]):-1;\n\t }else{\n\t switch(l){case 8:case 6:case 3:case 2:case 1:return null;} //ErrorCheck\n\t if(l<6)d=\"#\"+d[1]+d[1]+d[2]+d[2]+d[3]+d[3]+(l>4?d[4]+\"\"+d[4]:\"\"); //3 digit\n\t d=i(d.slice(1),16),RGB[0]=d>>16&255,RGB[1]=d>>8&255,RGB[2]=d&255,RGB[3]=l==9||l==5?r(((d>>24&255)/255)*10000)/10000:-1;\n\t }\n\t return RGB;}\n\t var i=parseInt,r=Math.round,h=from.length>9,h=typeof(to)==\"string\"?to.length>9?true:to==\"c\"?!h:false:h,b=p<0,p=b?p*-1:p,to=to&&to!=\"c\"?to:b?\"#000000\":\"#FFFFFF\",f=sbcRip(from),t=sbcRip(to);\n\t if(!f||!t)return null; //ErrorCheck\n\t if(h)return \"rgb(\"+r((t[0]-f[0])*p+f[0])+\",\"+r((t[1]-f[1])*p+f[1])+\",\"+r((t[2]-f[2])*p+f[2])+(f[3]<0&&t[3]<0?\")\":\",\"+(f[3]>-1&&t[3]>-1?r(((t[3]-f[3])*p+f[3])*10000)/10000:t[3]<0?f[3]:t[3])+\")\");\n\t else return \"#\"+(0x100000000+(f[3]>-1&&t[3]>-1?r(((t[3]-f[3])*p+f[3])*255):t[3]>-1?r(t[3]*255):f[3]>-1?r(f[3]*255):255)*0x1000000+r((t[0]-f[0])*p+f[0])*0x10000+r((t[1]-f[1])*p+f[1])*0x100+r((t[2]-f[2])*p+f[2])).toString(16).slice(f[3]>-1||t[3]>-1?1:3);\n\t}", "function generateJewelPalette(){\n flag = 'false';\n var vRed = generateJewel(generateRed()); //red\n var vOrange = generateJewel(generateOrange()); //orange\n var vYellow = generateJewel(generateYellow()); //yellow\n var vYellowGreen = generateJewel(generateYellowGreen()); //yellowGreen\n var vGreen = generateJewel(generateGreen()); //green\n var vGreenCyan = generateJewel(generateGreenCyan()); //greenCyan\n var vCyan = generateJewel(generateCyan()); //cyan\n var vCyanBlue = generateJewel(generateCyanBlue()); //cyanBlue\n var vBlue = generateJewel(generateBlue()); //blue\n var vBlueMagenta = generateJewel(generateBlueMagenta()); //blueMagenta\n var vMagenta = generateJewel(generateMagenta()); //magenta\n var vMagentaRed = generateJewel(generateMagentaRed()); //magentaRed\n \n debug('Red=' + vRed + ' | Orange=' + vOrange + ' | Yellow=' + vYellow + ' | yellowGreen' + vYellowGreen \n + ' | Green=' + vGreen + ' | GreenCyan=' + vGreenCyan + ' | Cyan=' + vCyan + ' | CyanBlue=' + vCyanBlue \n + ' | Blue=' + vBlue + ' | BlueMagenta=' + vBlueMagenta + ' | Magenta=' + vMagenta \n + ' | MagentaRed=' + vMagentaRed); \n return [vRed, vOrange, vYellow, vYellowGreen, vGreen, vGreenCyan, vCyan, vCyanBlue, vBlue, vBlueMagenta, vMagenta, vMagentaRed];\n}", "function colorFunction() {\r\n\t\tvar colorArray = ['#1ab394', '#f8ac59'];\r\n\r\n\t\treturn function(d, i) {\r\n\t \treturn colorArray[i];\r\n\t };\r\n\t}", "function RandomMix(color1, color2, color3, greyControl)\n{\n var randomIndex = int(random(2));\n\n var mixRatio1;\n var mixRatio2;\n var mixRatio3;\n \n if(randomIndex == 0)\n mixRatio1 = random(1.0)*greyControl;\n else\n mixRatio1 = random(1.0);\n \n \n if(randomIndex == 1)\n mixRatio2 = random(1.0)*greyControl;\n else\n mixRatio2 = random(1.0);\n \n if(randomIndex == 2)\n mixRatio3 = random(1.0)*greyControl;\n else\n mixRatio3 = random(1.0);\n\n var sum = mixRatio1 + mixRatio2 + mixRatio3;\n\n mixRatio1 /= sum;\n mixRatio2 /= sum;\n mixRatio3 /= sum;\n\n var theColor = color(mixRatio1 * red(color1) + mixRatio2 * red(color2) + mixRatio3 * red(color3),\n mixRatio1 * green(color1) + mixRatio2 * green(color2) + mixRatio3 * green(color3),\n mixRatio1 * blue(color1) + mixRatio2 * blue(color2) + mixRatio3 * blue(color3));\n\n return theColor;\n}", "function xcolor(x){\n\tx.style.color = \"#FF3333\";\n\terrors += 1;\n}", "function catColors(array, color){\n //your code here!\n}", "function lgColor(o){this.setOptions=function(o){for(i in o){var n=\"set\"+i.charAt(0).toUpperCase()+i.substr(1);if(this[n]){this[n](o[i])}else{this[i]=o[i]}}};this.setFromIntRGB=function(c){this.colorRGB=c};this.setFromFloatRGB=function(r,g,b){if(typeof(r)==\"object\"){g=r[1];b=r[2];r=r[0]}this.setFromByteRGB(Math.min(0,Math.max(255,(r*255)|0)),Math.min(0,Math.max(255,(g*255)|0)),Math.min(0,Math.max(255,(b*255)|0)))};this.setFromByteRGB=function(r,g,b){if(typeof(r)==\"object\"){g=r[1];b=r[2];r=r[0]}this.colorRGB=r<<16|g<<8|b};this.setFromFloatHSL=function(h,s,l){if(typeof(h)==\"object\"){s=h[1];l=h[2];h=h[0]}var a=this.hslToRgb(h,s,l);this.setFromFloatRGB(a[0],a[1],a[2])};this.setFromByteHSL=function(h,s,l){if(typeof(h)==\"object\"){s=h[1];l=h[2];h=h[0]}this.setFromFloatHSL(h/255,s/255,l/255)};this.getIntRGB=function(){return this.colorRGB};this.getHexRGB=function(){return dec2Hex(this.colorRGB,6)};this.getFloatRGB=function(){var a=this.getByteRGB();return[a[0]/255,a[1]/255,a[2]/255]};this.getByteRGB=function(){return[(c>>16)&255,(c>>8)&255,c&255]};this.getFloatHSL=function(){var a=this.getFloatRGB();return this.rgbToHsl(a[0],a[1],a[2])};this.getByteHSL=function(){var a=this.getFloatRGB();var b=this.rgbToHsl(a[0],a[1],a[2]);return[(h*255)&255,(s*255)&255,(l*255)&255]};this.convert=function(v,a,b){this[\"setFrom\"+a](v);return this[\"get\"+b]()};this.hToC=function(x,y,h){var c;if(h<0){h+=1}if(h>1){h-=1}if(h<1/6){c=x+(y-x)*h*6}else{if(h<1/2){c=y}else{if(h<2/3){c=x+(y-x)*(2/3-h)*6}else{c=x}}}return c};this.hslToRgb=function(h,s,l){var x;var y;var r;var g;var b;y=(l>.5)?l+s-l*s:l*(s+1);x=l*2-y;r=this.hToC(x,y,h+1/3);g=this.hToC(x,y,h);b=this.hToC(x,y,h-1/3);return[r,g,b]};this.rgbToHsl=function(r,g,b){var a=Math.max(r,g,b),mn=Math.min(r,g,b);var h,s,l=(a+mn)/2;if(a==mn){h=s=0}else{var d=a-mn;s=l>0.5?d/(2-a-mn):d/(a+mn);switch(a){case r:h=(g-b)/d+(g<b?6:0);break;case g:h=(b-r)/d+2;break;case b:h=(r-g)/d+4;break}h/=6}return[h,s,l]};this.setOptions({colorRGB:0});if(o){this.setOptions(o)}}", "function color(input)\n{\n var operands = input.split(\" \");\n if (operands[0] == operands[1]) return;\n\tif (operands[0] == operands[2]) return;\n if (operands.length > 3) return;\n\tif (operands.length < 2) return;\n else{\n chcolor(operands[0]);\n bkcolor(operands[1]);\n\t\tolcolor(operands[2]);\n }\n}", "function randomColor(){\r\n r = Math.floor(Math.random() * (230));\r\n g = Math.floor(Math.random() * (230));\r\n b = Math.floor(Math.random() * (230));\r\n jQuery(\".cls-2,.cls-4\").css('fill','rgb('+r+','+g+','+b+')');\r\n\r\n}", "function calculateColor( begin, end, pos ) {\r\n\t\tvar color = 'rgb' + ( $.support[ 'rgba' ] ? 'a' : '' ) + '(' +\r\n\t\t\tparseInt( ( begin[ 0 ] + pos * ( end[ 0 ] - begin[ 0 ] ) ), 10 ) + ',' +\r\n\t\t\tparseInt( ( begin[ 1 ] + pos * ( end[ 1 ] - begin[ 1 ] ) ), 10 ) + ',' +\r\n\t\t\tparseInt( ( begin[ 2 ] + pos * ( end[ 2 ] - begin[ 2 ] ) ), 10 );\r\n\t\tif ( $.support[ 'rgba' ] ) {\r\n\t\t\tcolor += ',' + ( begin && end ? parseFloat( begin[ 3 ] + pos * ( end[ 3 ] - begin[ 3 ] ) ) : 1 );\r\n\t\t}\r\n\t\tcolor += ')';\r\n\t\treturn color;\r\n\t}", "function rgbOrange() {\n var val1 = randRGB();\n var val2 = randRGB();\n var val3 = randRGB();\n return \"rgb(\" + (val1 + 20) + \", \" + val1 / 2.3 + \", \" + 0 + \")\";\n}", "function getColorX(x) {\n return x > 0 ? '#08298A' :\n '#FF8000';\n}", "function printColors() {\n\treturn \"<div class=\\\"column\\\">\" + mutateColor(hex, 255, 0, 0, 0, 1, true) + mutateColor(hex, 0, 255, 0, 0, 1, true) + mutateColor(hex, 0, 0, 255, 0, 1, true) + mutateColor(hex, 255, 255, 0, 0, 1, true) + mutateColor(hex, 0, 255, 255, 0, 1, true) + mutateColor(hex, 255, 0, 255, 0, 1, true) + mutateColor(hex, 255, 255, 255, 0, 1, true) + \"</div>\" +\n\t\t\t\"<div class=\\\"column\\\">\" + mutateColor(hex, 128, -32, 0, 0, 1, false) + mutateColor(hex, 0, 128, -32, 0, 1, false) + mutateColor(hex, -32, 0, 128, 0, 1, false) + mutateColor(hex, 128, 128, 0, 0, 1, false) + mutateColor(hex, 0, 128, 128, 0, 1, false) + mutateColor(hex, 128, 0, 128, 0, 1, false) + mutateColor(hex, 128, 128, 128, 0, 1, false) + \"</div>\" +\n\t\t\t\"<div class=\\\"column\\\">\" + mutateColor(hex, 32, 0, 0, 0, 7, false) + \"</div>\" +\n\t\t\t\"<div class=\\\"column\\\">\" + mutateColor(hex, 0, 32, 0, 0, 7, false) + \"</div>\" +\n\t\t\t\"<div class=\\\"column\\\">\" + mutateColor(hex, 0, 0, 32, 0, 7, false) + \"</div>\";\n}", "function chooseColor2(a) { \n return\ta > 400000 ? '#e93e3a' : \n\t\t\t\t\ta > 300000 ? '#ed683c' : \n\t\t\t\t\ta > 200000 ? '#f3903f' : \t\t\t\t\t\n\t\t\t\t\ta > 100000 ? '#fdc70c' : \n\t\t\t \t\t\t\t\t\t\t '#fff33b' ; \n}", "function ColorList() {}", "function matchMd(c) {\n //console.log(\"c: \", c);\n var x = jQuery.map(c, function(n, i) {\n var y = [calcColor(tinycolor(n[0]).toHexString())];\n return y;\n });\n //console.log(\"x: \", x);\n return x;\n }", "Blend() {}", "function setColorBasedOnValue (x) {\n\t\treturn x > 4 ? '#b30000' :\n\t\t\t\tx > 3 ? '#e34a33' :\n\t\t\t\tx > 2 ? '#fc8d59' :\n\t\t\t\tx > 1 ? '#fdcc8a' :\n\t\t\t\tx > 0 ? '#fef0d9' : '#990';\n\t}", "function blendColors(colorA, colorB, amount = 0.5)\n {\n const [rA, gA, bA] = colorA.match(/\\w\\w/g).map((c) => parseInt(c, 16));\n const [rB, gB, bB] = colorB.match(/\\w\\w/g).map((c) => parseInt(c, 16));\n\n const r = Math.round(rA + (rB - rA) * amount).toString(16).padStart(2, '0');\n const g = Math.round(gA + (gB - gA) * amount).toString(16).padStart(2, '0');\n const b = Math.round(bA + (bB - bA) * amount).toString(16).padStart(2, '0');\n\n return '#' + r + g + b;\n }", "function generateBrightPalette(){\n var vRed = generateBright(generateRed()); //red\n var vOrange = generateBright(generateOrange()); //orange\n var vYellow = generateBright(generateYellow()); //yellow\n var vYellowGreen = generateBright(generateYellowGreen()); //yellowGreen\n var vGreen = generateBright(generateGreen()); //green\n var vGreenCyan = generateBright(generateGreenCyan()); //greenCyan\n var vCyan = generateBright(generateCyan()); //cyan\n var vCyanBlue = generateBright(generateCyanBlue()); //cyanBlue\n var vBlue = generateBright(generateBlue()); //blue\n var vBlueMagenta = generateBright(generateBlueMagenta()); //blueMagenta\n var vMagenta = generateBright(generateMagenta()); //magenta\n var vMagentaRed = generateBright(generateMagentaRed()); //magentaRed\n \n debug('Red=' + vRed + ' | Orange=' + vOrange + ' | Yellow=' + vYellow + ' | yellowGreen' + vYellowGreen \n + ' | Green=' + vGreen + ' | GreenCyan=' + vGreenCyan + ' | Cyan=' + vCyan + ' | CyanBlue=' + vCyanBlue \n + ' | Blue=' + vBlue + ' | BlueMagenta=' + vBlueMagenta + ' | Magenta=' + vMagenta \n + ' | MagentaRed=' + vMagentaRed); \n return [vRed, vOrange, vYellow, vYellowGreen, vGreen, vGreenCyan, vCyan, vCyanBlue, vBlue, vBlueMagenta, vMagenta, vMagentaRed];\n}", "function getColor(i) {\n return i > 5 ? '#F30' :\n i > 4 ? '#F60' :\n i > 3 ? '#F90' :\n i > 2 ? '#FC0' :\n i > 1 ? '#FF0' :\n '#9F3';\n}", "function getColor(d) {\n return d.length>1? \"#ffffff\" : \n d[0]==1 ? \"#FECE00\":\n d[0]==2 ? \"#0065AE\" :\n d[0]==\"3B\" ? \"#99D4DE\":\n d[0]==3 ? \"#9F971A\":\n d[0]==4 ?\"#BE418D\":\n d[0]==5 ? \"#F19043\":\n d[0]==6 ? \"#84C28E\":\n d[0]==7 ?\"#F2A4B7\":\n d[0]==\"7B\" ? \"#84C28E\":\n d[0]==8?\"#CDACCF\":\n d[0]==9? \"#D5C900\":\n d[0]==10?\"#E4B327\":\n d[0]==11?\"#8C5E24\" :\n d[0]==12?\"#007E49\":\n d[0]==13?\"#99D4DE\":\n d[0]==14?\"#622280\":\n '#FC4E2A';\n}", "function chng_colors() {\r\n for (i = 0; i < num_players; i++) { $(players[curr_player].bg_name).css('opacity', '0'); }\r\n $(players[(curr_player + 1) % num_players].bg_name).css('opacity', '1');\r\n\r\n switch (num_players) {\r\n case 2:\r\n $('#bg-red').css('background-image', 'linear-gradient(-90deg, rgb(255, 0, 0), rgb(0, 0, 0))');\r\n $('#bg-blue').css('background-image', 'linear-gradient(90deg, rgb(0, 0, 255), rgb(0, 0, 0))');\r\n break;\r\n\r\n case 3:\r\n $('#bg-red').css('background-image', 'linear-gradient(-60deg, rgb(0, 0, 0), rgb(255, 0, 0))');\r\n $('#bg-blue').css('background-image', 'linear-gradient(60deg, rgb(0, 0, 0), rgb(0, 0, 255))');\r\n $('#bg-yellow').css('background-image', 'linear-gradient(0deg, rgb(0, 0, 0), rgb(255, 180, 0))');\r\n break;\r\n\r\n case 4:\r\n $('#bg-red').css('background-image', 'linear-gradient(-45deg, rgb(255, 0, 0), rgb(0, 0, 0))');\r\n $('#bg-blue').css('background-image', 'linear-gradient(45deg, rgb(0, 0, 0), rgb(0, 0, 255))');\r\n $('#bg-yellow').css('background-image', 'linear-gradient(-45deg, rgb(0, 0, 0), rgb(255, 180, 0))');\r\n $('#bg-green').css('background-image', 'linear-gradient(45deg, rgb(0, 180, 0), rgb(0, 0, 0))');\r\n break;\r\n }\r\n\r\n $('#grid tr').eq(first_empty[col_clicked]).find('td').eq(col_clicked).find('button').css(\"background-color\", players[curr_player].color);\r\n $('#grid tr').eq(first_empty[col_clicked]).find('td').eq(col_clicked).find('button').css(\"border-color\", players[curr_player].color);\r\n}", "function getPickingColor(index) {\n return [(index + 1) % 256, Math.floor((index + 1) / 256) % 256, Math.floor((index + 1) / 256 / 256) % 256];\n}", "function checkCombination (b1, b2, b3) {\n if (b1.innerHTML !== '' && b1.innerHTML == b2.innerHTML && b1.innerHTML == b3.innerHTML) {\n gameover = true;\n b1.style.backgroundColor = '#E8CDB2';\n b2.style.backgroundColor = '#E8CDB2';\n b3.style.backgroundColor = '#E8CDB2';\n }\n }", "operate(env, op, other) {\n var result = [];\n\n if (!(other instanceof CartoCSS.Tree.Color)) {\n other = other.toColor();\n }\n\n for (var c = 0; c < 3; c++) {\n result[c] = CartoCSS.Tree.operate(op, this.rgb[c], other.rgb[c]);\n }\n return new CartoCSS.Tree.Color(result);\n }", "function colormatch(){\n\n\nreminder = Math.abs(change % (2*Math.PI));\n\nif (reminder > 0 && reminder < quarter) obcolor= (by-b > 0)? paint[1]: paint[3];\nelse if (reminder > quarter && reminder < quarter*2) obcolor= (by-b > 0)? paint[2]: paint[0];\nelse if (reminder > quarter*2 && reminder < quarter*3 ) obcolor= (by-b > 0)? paint[3]: paint[1];\nelse if (reminder > quarter*3 && reminder < quarter*4) obcolor= (by-b > 0)? paint[0]: paint[2];\n\nif (bcolor == obcolor) return 0;\nelse return 1;\n}", "function coloredButtons() {\r\n\r\n\t\t\t\t$('.nectar-button.see-through[data-color-override], .nectar-button.see-through-2[data-color-override], .nectar-button.see-through-3[data-color-override]').each(function () {\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar $usingMaterialSkin = ($('body.material[data-button-style^=\"rounded\"]').length > 0) ? true : false;\r\n\t\t\t\t\t$(this).css('visibility', 'visible');\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($(this).hasClass('see-through-3') && $(this).attr('data-color-override') == 'false') {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar $color;\r\n\t\t\t\t\tvar $that;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($(this).attr('data-color-override') != 'false') {\r\n\t\t\t\t\t\t$color = $(this).attr('data-color-override');\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($(this).parents('.dark').length > 0) {\r\n\t\t\t\t\t\t\t$color = '#000000';\r\n\t\t\t\t\t\t}\telse {\r\n\t\t\t\t\t\t\t$color = '#ffffff';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (!$(this).hasClass('see-through-3')) {\r\n\t\t\t\t\t\t$(this).css('color', $color);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$(this).find('i').css('color', $color);\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar colorInt = parseInt($color.substring(1), 16);\r\n\t\t\t\t\tvar $hoverColor = ($(this).has('[data-hover-color-override]')) ? $(this).attr('data-hover-color-override') : 'no-override';\r\n\t\t\t\t\tvar $hoverTextColor = ($(this).has('[data-hover-text-color-override]')) ? $(this).attr('data-hover-text-color-override') : '#fff';\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar R = (colorInt & 0xFF0000) >> 16;\r\n\t\t\t\t\tvar G = (colorInt & 0x00FF00) >> 8;\r\n\t\t\t\t\tvar B = (colorInt & 0x0000FF) >> 0;\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar $opacityStr = ($(this).hasClass('see-through-3')) ? '1' : '0.75';\r\n\t\t\t\t\t\r\n\t\t\t\t\t$(this).css('border-color', 'rgba(' + R + ',' + G + ',' + B + ',' + $opacityStr + ')');\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Material theme skin buttons w/ icons starting\r\n\t\t\t\t\tif ($usingMaterialSkin) {\r\n\t\t\t\t\t\t$(this).find('i').css({\r\n\t\t\t\t\t\t\t'background-color': 'rgba(' + R + ',' + G + ',' + B + ',1)',\r\n\t\t\t\t\t\t\t'box-shadow': '0px 8px 15px rgba(' + R + ',' + G + ',' + B + ',0.24)'\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($(this).hasClass('see-through')) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$that = $(this);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$(this).on('mouseenter touchstart', function () {\r\n\t\t\t\t\t\t\t$that.css('border-color', 'rgba(' + R + ',' + G + ',' + B + ',1)');\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$(this).on('mouseleave touchtouchend', function () {\r\n\t\t\t\t\t\t\t$that.css('border-color', 'rgba(' + R + ',' + G + ',' + B + ',1)');\r\n\t\t\t\t\t\t\t$opacityStr = ($(this).hasClass('see-through-3')) ? '1' : '0.75';\r\n\t\t\t\t\t\t\t$that.css('border-color', 'rgba(' + R + ',' + G + ',' + B + ',' + $opacityStr + ')');\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$(this).find('i').css('color', $hoverTextColor);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($hoverColor != 'no-override') {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$that = $(this);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$(this).on('mouseenter touchstart', function () {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$that.css({\r\n\t\t\t\t\t\t\t\t\t'border-color': $hoverColor,\r\n\t\t\t\t\t\t\t\t\t'background-color': $hoverColor,\r\n\t\t\t\t\t\t\t\t\t'color': $hoverTextColor\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Material buttons w/ icons over\r\n\t\t\t\t\t\t\t\tif ($usingMaterialSkin) {\r\n\t\t\t\t\t\t\t\t\t$that.find('i').css({\r\n\t\t\t\t\t\t\t\t\t\t'background-color': '',\r\n\t\t\t\t\t\t\t\t\t\t'box-shadow': ''\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$(this).on('mouseleave touchtouchend', function () {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$opacityStr = ($(this).hasClass('see-through-3')) ? '1' : '0.75';\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif ($usingMaterialSkin) {\r\n\t\t\t\t\t\t\t\t\t$that.find('i').css({\r\n\t\t\t\t\t\t\t\t\t\t'background-color': 'rgba(' + R + ',' + G + ',' + B + ',1)',\r\n\t\t\t\t\t\t\t\t\t\t'box-shadow': '0px 8px 15px rgba(' + R + ',' + G + ',' + B + ',0.24)'\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif (!$that.hasClass('see-through-3')) {\r\n\t\t\t\t\t\t\t\t\t$that.css({\r\n\t\t\t\t\t\t\t\t\t\t'border-color': 'rgba(' + R + ',' + G + ',' + B + ',' + $opacityStr + ')',\r\n\t\t\t\t\t\t\t\t\t\t'background-color': 'transparent',\r\n\t\t\t\t\t\t\t\t\t\t'color': $color\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t$that.css({\r\n\t\t\t\t\t\t\t\t\t\t'border-color': 'rgba(' + R + ',' + G + ',' + B + ',' + $opacityStr + ')',\r\n\t\t\t\t\t\t\t\t\t\t'background-color': 'transparent'\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$that = $(this);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$(this).on('mouseenter touchstart', function () {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$that.css({\r\n\t\t\t\t\t\t\t\t\t'border-color': $hoverColor,\r\n\t\t\t\t\t\t\t\t\t'color': $hoverTextColor\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$(this).on('mouseleave touchtouchend', function () {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$opacityStr = ($that.hasClass('see-through-3')) ? '1' : '0.75';\r\n\t\t\t\t\t\t\t\t$that.css({\r\n\t\t\t\t\t\t\t\t\t'border-color': 'rgba(' + R + ',' + G + ',' + B + ',' + $opacityStr + ')',\r\n\t\t\t\t\t\t\t\t\t'color': $hoverTextColor\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\t$('.nectar-button:not(.see-through):not(.see-through-2):not(.see-through-3)[data-color-override]').each(function () {\r\n\t\t\t\t\t\r\n\t\t\t\t\t$(this).css('visibility', 'visible');\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($(this).attr('data-color-override') != 'false') {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar $color = $(this).attr('data-color-override');\r\n\r\n\t\t\t\t\t\t$(this)\r\n\t\t\t\t\t\t\t.removeClass('accent-color')\r\n\t\t\t\t\t\t\t.removeClass('extra-color-1')\r\n\t\t\t\t\t\t\t.removeClass('extra-color-2')\r\n\t\t\t\t\t\t\t.removeClass('extra-color-3')\r\n\t\t\t\t\t\t\t.css('background-color', $color);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// Solid color tilt \r\n\t\t\t\tif ($('.swiper-slide .solid_color_2').length > 0 || $('.tilt-button-inner').length > 0) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar $tiltButtonCssString = '';\r\n\t\t\t\t\tvar $color;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$('.swiper-slide .solid_color_2 a').each(function (i) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$(this).addClass('instance-' + i);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($(this).attr('data-color-override') != 'false') {\r\n\t\t\t\t\t\t\t$color = $(this).attr('data-color-override');\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tif ($(this).parents('.dark').length > 0) {\r\n\t\t\t\t\t\t\t\t$color = '#000000';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t$color = '#ffffff';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$(this).css('color', $color);\r\n\t\t\t\t\t\t$(this).find('i').css('color', $color);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar $currentColor = $(this).css('background-color'),\r\n\t\t\t\t\t\t$topColor = shadeColor($currentColor, 0.13),\r\n\t\t\t\t\t\t$bottomColor = shadeColor($currentColor, -0.15);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$tiltButtonCssString += '.swiper-slide .solid_color_2 a.instance-' + i + ':after { background-color: ' + $topColor + '; }' + ' .swiper-slide .solid_color_2 a.instance-' + i + ':before { background-color: ' + $bottomColor + '; } ';\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t$('.tilt-button-wrap a').each(function (i) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$(this).addClass('instance-' + i);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar $currentColor = $(this).css('background-color');\r\n\t\t\t\t\t\tvar $color;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($(this).attr('data-color-override') != 'false') {\r\n\t\t\t\t\t\t\t$color = $(this).attr('data-color-override');\r\n\t\t\t\t\t\t\t$(this).css('background-color', $color);\r\n\t\t\t\t\t\t\t$currentColor = $color;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar $topColor = shadeColor($currentColor, 0.13),\r\n\t\t\t\t\t\t$bottomColor = shadeColor($currentColor, -0.15);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$tiltButtonCssString += '.tilt-button-wrap a.instance-' + i + ':after { background-color: ' + $topColor + '; }' + ' .tilt-button-wrap a.instance-' + i + ':before { background-color: ' + $bottomColor + '; } ';\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Style\r\n\t\t\t\t\tnectarCreateStyle($tiltButtonCssString, 'tilt-button');\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// Transparent 3D\r\n\t\t\t\tif ($('.nectar-3d-transparent-button').length > 0) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar $3dTransButtonCssString = '';\r\n\t\t\t\t\t$('.nectar-3d-transparent-button').each(function (i) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar $that = $(this),\r\n\t\t\t\t\t\t$size \t\t= $that.attr('data-size'),\r\n\t\t\t\t\t\t$padding \t= 0,\r\n\t\t\t\t\t\tv1 \t\t\t\t= 1.5,\r\n\t\t\t\t\t\tv2 \t\t\t\t= 1.65,\r\n\t\t\t\t\t\t$font_size;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Size\r\n\t\t\t\t\t\tif ($size == 'large') {\r\n\t\t\t\t\t\t\t$padding \t\t= 46;\r\n\t\t\t\t\t\t\t$font_size \t= 16;\r\n\t\t\t\t\t\t\tv1 \t\t\t\t\t= 1.5;\r\n\t\t\t\t\t\t\tv2 \t\t\t\t\t= 1.7;\r\n\t\t\t\t\t\t} else if ($size == 'medium') {\r\n\t\t\t\t\t\t\t$padding \t\t= 30;\r\n\t\t\t\t\t\t\t$font_size \t= 16;\r\n\t\t\t\t\t\t} else if ($size == 'small') {\r\n\t\t\t\t\t\t\t$padding \t\t= 20;\r\n\t\t\t\t\t\t\t$font_size \t= 12;\r\n\t\t\t\t\t\t} else if ($size == 'jumbo') {\r\n\t\t\t\t\t\t\t$padding \t\t= 54;\r\n\t\t\t\t\t\t\t$font_size \t= 24;\r\n\t\t\t\t\t\t\tv1 \t\t\t\t\t= 1.5;\r\n\t\t\t\t\t\t\tv2 \t\t\t\t\t= 1.68;\r\n\t\t\t\t\t\t} else if ($size == 'extra_jumbo') {\r\n\t\t\t\t\t\t\t$padding \t\t= 100;\r\n\t\t\t\t\t\t\t$font_size \t= 64;\r\n\t\t\t\t\t\t\tv1 \t\t\t\t\t= 1.6;\r\n\t\t\t\t\t\t\tv2 \t\t\t\t\t= 1.6;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$that.find('svg text').attr('font-size', $font_size);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar $boundingRect = $(this).find('.back-3d .button-text')[0].getBoundingClientRect(),\r\n\t\t\t\t\t\t$text_width = $boundingRect.width,\r\n\t\t\t\t\t\t$text_height = $font_size * 1.5;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$that.css({\r\n\t\t\t\t\t\t\t'width': ($text_width + $padding * 1.5) + 'px',\r\n\t\t\t\t\t\t\t'height': ($text_height + $padding) + 'px'\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$that.find('> a').css({\r\n\t\t\t\t\t\t\t'height': ($text_height + $padding) + 'px'\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$that.find('.back-3d svg, .front-3d svg').css({\r\n\t\t\t\t\t\t\t'width': ($text_width + $padding * 1.5) + 'px',\r\n\t\t\t\t\t\t\t'height': ($text_height + $padding) + 'px'\r\n\t\t\t\t\t\t}).attr('viewBox', '0 0 ' + ($text_width + $padding) + ' ' + ($text_height + $padding));\r\n\r\n\t\t\t\t\t\t$that.find('svg text').attr('transform', 'matrix(1 0 0 1 ' + ($text_width + $padding * v1) / 2 + ' ' + (($text_height + $padding) / v2) + ')');\r\n\t\t\t\t\t\t$that.find('.front-3d, .back-3d').css('transform-origin', '50% 50% -' + ($text_height + $padding) / 2 + 'px');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Mask\r\n\t\t\t\t\t\t$(this).find('.front-3d svg > rect').attr('id', 'masked-rect-id-' + i);\r\n\t\t\t\t\t\t$(this).find('.front-3d defs mask').attr('id', 'button-text-mask-' + i);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$that.css('visibility', 'visible');\r\n\t\t\t\t\t\t$3dTransButtonCssString += '#masked-rect-id-' + i + ' { mask: url(#button-text-mask-' + i + '); -webkit-mask: url(#button-text-mask-' + i + ')} ';\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Extra jumbo resize\r\n\t\t\t\t\tcreateExtraJumboSize();\r\n\t\t\t\t\t$window.on('smartresize', createExtraJumboSize);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Style\r\n\t\t\t\t\tnectarCreateStyle($3dTransButtonCssString, 'nectar-td-button');\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Gradient btn init\r\n\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t$('.nectar-button[class*=\"color-gradient\"] .start').removeClass('loading');\r\n\t\t\t\t}, 150);\r\n\t\t\t\t// No grad for ff\r\n\t\t\t\tif (navigator.userAgent.toLowerCase().indexOf('firefox') > -1 || \r\n\t\t\t\tnavigator.userAgent.indexOf(\"MSIE \") > -1 || \r\n\t\t\t\tnavigator.userAgent.match(/Trident\\/7\\./)) {\r\n\t\t\t\t\t$('.nectar-button[class*=\"color-gradient\"] .start').addClass('no-text-grad');\r\n\t\t\t\t}\r\n\t\t\t}", "sameColor(c1, c2) {\n return c1.suitVal() % 2 == c2.suitVal() % 2;\n }", "generateColors(palette, allColorsFilterBy){\n let shades=[];\n let allColors = palette.colors;\n for(let key in allColors){\n shades = shades.concat(\n allColors[key].filter(colors =>(\n colors.id ===allColorsFilterBy\n ))\n )\n }\n //return all shades of given colors \n return shades.slice(1); \n }", "function chcolor(){if(v_chcolor == 1){ document.getElementById(\"sgb\").style.color=color[x];(x < color.length-1) ? x++ : x = 0;}}", "function color (i){\n\tif (i===0){\n\t\treturn \"rgb(1, 95, 102)\";\n\t} else if (i===1) {\n\t\treturn \"rgb(45, 241, 255)\";\n\t} else if (i===2) {\n\t\treturn \"rgb(34, 86, 150)\";\n\t} else if (i===3) {\n\t\treturn \"rgb(0, 132, 88)\";\n\t} else if (i===4) {\n\t\treturn \"rgb(56, 255, 188)\";\n\t} else if (i===5) {\n\t\treturn \"rgb(77, 168, 137)\";\n\t} else {\n\t\treturn \"rgb(1, 95, 102)\";\n\t}\n}", "_prepareColorShades(min, max) {\n let step = (max - min) / 5;\n this._shades = [];\n for (let i = 0; i < 5; i++) {\n this._shades.push(max - i * step);\n }\n }", "function pickHex(weight, color1, color2) {\n let w1 = weight;\n let w2 = 1 - w1;\n let rgb = [Math.round(color1.red * w1 + color2.red * w2),\n Math.round(color1.green * w1 + color2.green * w2),\n Math.round(color1.blue * w1 + color2.blue * w2)];\n return 'rgb(' + rgb[0] + ',' + rgb[1] + ',' + rgb[2] + ')';\n }", "function eleccion_color(){\r\n\r\n }", "function colorPicker(d) {\n if (d.genre == \"Blues\") {\n // Violet 1\n return \"#592ca1\";\n } else if (d.genre == \"Classical\") {\n // Violet 2\n return \"#8700aa\";\n } else if (d.genre == \"Comedy\") {\n // Violet clair\n return \"#dd55fd\";\n } else if (d.genre == \"Country\") {\n // Pastelle\n return \"#ff5699\";\n } else if (d.genre == \"Electronic\") {\n // Rouge\n return \"#aa0045\";\n } else if (d.genre == \"Flamenco\") {\n // Orange 1\n return \"#ff2a2a\";\n } else if (d.genre == \"Folk\") {\n // Orange 2\n return \"#ff6600\";\n } else if (d.genre == \"Funk\") {\n // Jaune 1\n return \"#fcfb1c\";\n } else if (d.genre == \"Hip hop\") {\n // Jaune 2\n return \"#fdd42a\";\n } else if (d.genre == \"House\") {\n // Jaune - vert\n return \"#eee566\";\n } else if (d.genre == \"Jazz\") {\n // Vert clair\n return \"#c7fc04\";\n } else if (d.genre == \"Latin\") {\n // Vert 1\n return \"#00ac00\";\n } else if (d.genre == \"Metal\") {\n // Vert 2\n return \"#24d000\";\n } else if (d.genre == \"Pop\") {\n // Vert - Bleu\n return \"#65df00\";\n } else if (d.genre == \"R&B and soul\") {\n // Bleu très clair\n return \"#4cd8fb\";\n } else if (d.genre == \"Reggae\") {\n // Bleu\n return \"#0074e5\";\n } else if (d.genre == \"Rock\") {\n // Bleu foncé\n return \"#0004c8\";\n } else {\n // Bleu encore plus foncé\n return \"#00006c\";\n }\n}", "function colorList(R, G, B) {\n // shapeCol = color(H, S, 100);\n shapeCol = color(\"white\");\n goldCol = color(\"white\");\n // userTypedColor = color(\"green\");\n // txtCol = color(\"beige\");\n introTxtCol = color(\"beige\");\n circleCol = color(\"beige\");\n circleCol.setAlpha(200);\n introTxtCol2 = color(37, 5, 245);\n bkCol = color(0, 0, 17);\n}", "function rgbc(a,b,c) {\n return 'rgb(' + a + ',' + b + ',' + c + ')';\n}", "function colorPicker(field_name_prefix)\n{\t\t\n\t$('#'+field_name_prefix+'picker').jPicker(\t\n\t\t{\n\t\t window:\n\t\t {\n\t\t\texpandable: true,\n\t\t\tupdateInputColor: true,\n\t\t\tbindToInput: true,\n\t\t\tinput: $('#'+field_name_prefix+'r,'+'#'+field_name_prefix+'g,'+'#'+field_name_prefix+'b'),\n\t\t\tposition:\n\t\t\t{\n\t\t\t x: 'screenCenter', // acceptable values \"left\", \"center\", \"right\", \"screenCenter\", or relative px value\n\t\t\t y: '500px', // acceptable values \"top\", \"bottom\", \"center\", or relative px value\n\t\t\t},\n\t\t\talphaSupport: true\n\t\t },\t\t \n\t\t color:\n\t\t {\t\t\t\n\t\t\tactive: new $.jPicker.Color({ r: $('#'+field_name_prefix+'r').val(), g: $('#'+field_name_prefix+'g').val(), b: $('#'+field_name_prefix+'b').val() })\n\t\t },\n\t\t images:\n\t\t {\n\t\t\tclientPath: 'application/modules/Administrator/layouts/scripts/js/jpicker/images/',\n\t\t }\n\t },\n\t function(color, context)\n\t\t{\n\t\t\tvar all = color.val('all');\n\t\t\t// alert('Color chosen - hex: ' + (all && '#' + all.hex || 'none') + ' - alpha: ' + (all && all.a + '%' || 'none') + ' r : '+ all.r + ' g : '+ all.g + ' b : '+ all.b);\n\t\t\t $('#'+field_name_prefix+'r').val(all.r);\t\t\t \n\t\t\t $('#'+field_name_prefix+'g').val(all.g);\n\t\t\t $('#'+field_name_prefix+'b').val(all.b);\n\t\t\t $('#'+field_name_prefix+'r,'+'#'+field_name_prefix+'g,'+'#'+field_name_prefix+'b').css(\n\t\t\t\t{\n\t\t\t\t backgroundColor: all && '#' + all.hex || 'transparent'\n\t\t\t\t});\n\t\t},\n function(color, context)\n {\n\t\t\t\n },\n function(color, context)\n {\n var all = this.color.active.val('all');\n\t\t\t//alert('Active Color chosen - hex: ' + (all && '#' + all.hex || 'none') + ' - alpha: ' + (all && all.a + '%' || 'none') + ' r : '+ all.r + ' g : '+ all.g + ' b : '+ all.b);\n\t\t\t $('#'+field_name_prefix+'r').val(all.r);\t\t\t \n\t\t\t $('#'+field_name_prefix+'g').val(all.g);\n\t\t\t $('#'+field_name_prefix+'b').val(all.b);\n\t\t\t $('#'+field_name_prefix+'r,'+'#'+field_name_prefix+'g,'+'#'+field_name_prefix+'b').css(\n\t\t\t\t{\n\t\t\t\t backgroundColor: all && '#' + all.hex || 'transparent'\n\t\t\t\t});\n }\t \n\t );\t\t \n}", "function _createColorVariations() {\n var colors = { waveColor: [], progressColor: [] };\n for (var c in colors) {\n var tmp = WP.UTILS.hex2rgb(this._params[c]);\n colors[c].push(tmp);\n tmp = WP.UTILS.rgb2hsv(tmp);\n colors[c].push(WP.UTILS.hsv2rgb({ h: tmp.h, s: tmp.s, v: tmp.v*1.4 }));\n }\n colors.dc = {\n r: (colors.waveColor[0].r - colors.progressColor[0].r),\n g: (colors.waveColor[0].g - colors.progressColor[0].g),\n b: (colors.waveColor[0].b - colors.progressColor[0].b)\n };\n return colors;\n }", "function colorMixer(rgbA, rgbB, amountToMix){\n var r = colorChannelMixer(rgbA[0],rgbB[0],amountToMix);\n var g = colorChannelMixer(rgbA[1],rgbB[1],amountToMix);\n var b = colorChannelMixer(rgbA[2],rgbB[2],amountToMix);\n return \"rgb(\"+r+\",\"+g+\",\"+b+\")\";\n}", "function generateCreamPalette(){\n flag = 'false';\n var vRed = generateCream(generateRed()); //red\n var vOrange = generateCream(generateOrange()); //orange\n var vYellow = generateCream(generateYellow()); //yellow\n var vYellowGreen = generateCream(generateYellowGreen()); //yellowGreen\n var vGreen = generateCream(generateGreen()); //green\n var vGreenCyan = generateCream(generateGreenCyan()); //greenCyan\n var vCyan = generateCream(generateCyan()); //cyan\n var vCyanBlue = generateCream(generateCyanBlue()); //cyanBlue\n var vBlue = generateCream(generateBlue()); //blue\n var vBlueMagenta = generateCream(generateBlueMagenta()); //blueMagenta\n var vMagenta = generateCream(generateMagenta()); //magenta\n var vMagentaRed = generateCream(generateMagentaRed()); //magentaRed\n \n debug('Red=' + vRed + ' | Orange=' + vOrange + ' | Yellow=' + vYellow + ' | yellowGreen' + vYellowGreen \n + ' | Green=' + vGreen + ' | GreenCyan=' + vGreenCyan + ' | Cyan=' + vCyan + ' | CyanBlue=' + vCyanBlue \n + ' | Blue=' + vBlue + ' | BlueMagenta=' + vBlueMagenta + ' | Magenta=' + vMagenta \n + ' | MagentaRed=' + vMagentaRed); \n return [vRed, vOrange, vYellow, vYellowGreen, vGreen, vGreenCyan, vCyan, vCyanBlue, vBlue, vBlueMagenta, vMagenta, vMagentaRed];\n}", "function jumbleTitleColors() {\n $(\"#title h1\").children().removeClass();\n var id;\n for (var i=1; i <= 10; i++) {\n id = \"#char\" + i.toString();\n $(id).addClass(returnRandomColorClass());\n }\n }", "function colorChange(array,i){\n\t\tvar wincombo=[[],[],[],[],[],[],[],[]];\n\twincombo[0]=[document.getElementById(\"1\"),document.getElementById(\"2\"),document.getElementById(\"3\")];\n\twincombo[1]=[document.getElementById(\"4\"),document.getElementById(\"5\"),document.getElementById(\"6\")];\n\twincombo[2]=[document.getElementById(\"7\"),document.getElementById(\"8\"),document.getElementById(\"9\")];\n\twincombo[3]=[document.getElementById(\"1\"),document.getElementById(\"4\"),document.getElementById(\"7\")];\n\twincombo[4]=[document.getElementById(\"2\"),document.getElementById(\"5\"),document.getElementById(\"8\")];\n\twincombo[5]=[document.getElementById(\"3\"),document.getElementById(\"6\"),document.getElementById(\"9\")];\n\twincombo[6]=[document.getElementById(\"1\"),document.getElementById(\"5\"),document.getElementById(\"9\")];\n\twincombo[7]=[document.getElementById(\"3\"),document.getElementById(\"5\"),document.getElementById(\"7\")];\n\t\tfor(var k=0;k<wincombo[i].length;k++){\n\t\t\twincombo[i][k].style.backgroundColor=\"coral\";\n\t\t\t}\n\t\t}", "function randomColorCode() {\n var colorCode = [\n 'FFEBFF','FFEBF5','FFEBEB','FFF5EB','FFFFEB','F5FFEB','EBFFEB','EBFFF5','EBFFFF','EBF5FF','EBEBFF','F5EBFF',\n 'FFCDFE','FFCDE5','FFCECD','FFE7CD','FEFFCD','E5FFCD','CDFFCE','CDFFE7','CDFEFF','CDE5FF','CECDFF','E7CDFF',\n 'FFAFFE','FFAFD6','FFB0AF','FFD8AF','FEFFAF','D6FFAF','AFFFB0','AFFFD8','AFFEFF','AFD6FF','B0AFFF','D8AFFF',\n 'FF91FE','FF91C7','FF9291','FFC991','FEFF91','C7FF91','91FF92','91FFC9','91FEFF','91C7FF','9291FF','C991FF',\n 'FF73FD','FF73B7','FF7573','FFBB73','FDFF73','B7FF73','73FF75','73FFBB','73FDFF','73B7FF','7573FF','BB73FF',\n 'FF55FD','FF55A8','FF5755','FFAC55','FDFF55','A8FF55','55FF57','55FFAC','55FDFF','55A8FF','5755FF','AC55FF',\n 'FF37FD','FF3799','FF3937','FF9D37','FDFF37','99FF37','37FF39','37FF9D','37FDFF','3799FF','3937FF','9D37FF',\n 'FF19FC','FF1989','FF1C19','FF8F19','FCFF19','89FF19','19FF1C','19FF8F','19FCFF','1989FF','1C19FF','8F19FF',\n 'FA00F7','FA007A','FA0300','FA8000','F7FA00','7AFA00','00FA03','00FA80','00F7FA','007AFA','0300FA','8000FA',\n 'DC00D9','DC006B','DC0300','DC7100','D9DC00','6BDC00','00DC03','00DC71','00D9DC','006BDC','0300DC','7100DC',\n 'BE00BC','BE005D','BE0200','BE6100','BCBE00','5DBE00','00BE02','00BE61','00BCBE','005DBE','0200BE','6100BE',\n 'A0009E','A0004E','A00200','A05200','9EA000','4EA000','00A002','00A052','009EA0','004EA0','0200A0','5200A0'\n ];\n _.shuffle(colorCode)\n var length = colorCode.length;\n var index = Math.floor( Math.random() * length );\n return colorCode[index];\n }", "function GetColorList() {\n // return ['#4e73df', '#1cc88a', '#36b9cc', '#e74a3b', '#e67e22', '#f6c23e', '#9b59b6', '#1abc9c', '#2ecc71', '#3498db'];\n return ['#1abc9c', '#2ecc71', '#3498db', '#9b59b6', '#34495e', '#16a085', '#27ae60', '#2980b9', '#8e44ad', '#2c3e50'];\n}", "brighter(){\n\t\tthis.addColorValue(\"red\", 30);\n\t\tthis.addColorValue(\"green\", 30);\n\t\tthis.addColorValue(\"blue\", 30);\n\t}", "function rgb(r, g, b) {\n \n}", "function colorTiles(index) {\n switch(true) {\n case (index < 10):\n return 'linear-gradient(to right,#e6007e 0,#a81815 100%)'\n break;\n case (index>=10 && index<20):\n return 'linear-gradient(to right,#009fe3 0,#522583 100%)'\n break;\n case (index>=20 && index<30):\n return 'linear-gradient(to right,#f2e500 0,#007f2d 100%)'\n break;\n case (index>=30 && index<40):\n return 'linear-gradient(to right,#ffed00 0,#e74011 100%)'\n break;\n case (index>=40 && index<50):\n return 'linear-gradient(to right, rgba(169,49,149,1) 0%, rgba(121,8,103,1) 100%)'\n break;\n case (index>=50 && index<60):\n return 'linear-gradient(to right, rgba(240,79,33,1) 0%, rgba(155,35,0,1) 100%)'\n break;\n case (index>=60 && index<70):\n return 'linear-gradient(to right, rgba(144,172,189,1) 0%, rgba(59,102,127,1) 100%)'\n break;\n case (index>=70 && index<numberOfTiles):\n return 'linear-gradient(to right, rgba(81,51,151,1) 0%, rgba(40,14,102,1) 100%)'\n break;\n }\n}", "function randomColors() {\r\n return '#' + Math.floor(Math.random() * 16777215).toString(16);\r\n}", "function initTable() {\r\nvar color = [\r\n '#FFFF00', // Bright yellow\r\n '#00FF00', // Bright green\r\n '#00FFFF', // Bright cyan\r\n '#FF00FF', // Bright pink\r\n '#FF0000', // Bright red\r\n '#AA00FF', // Bright purple\r\n '#FFAA00', // Bright orange\r\n '#00FFAA', // Bright blue-green\r\n\r\n '#FFFF55', // Light yellow\r\n '#55FF55', // Light green\r\n '#55FFFF', // Light cyan\r\n '#FF55FF', // Light pink\r\n '#FF5555', // Light red\r\n '#AA55FF', // Light purple\r\n '#FFAA55', // Light orange\r\n '#55FFAA', // Light blue-green\r\n \r\n '#FFFF00', // Bright yellow\r\n '#00FF00', // Bright green\r\n '#00FFFF', // Bright cyan\r\n '#FF00FF', // Bright pink\r\n '#FF0000', // Bright red\r\n '#AA00FF', // Bright purple\r\n '#FFAA00', // Bright orange\r\n '#00FFAA', // Bright blue-green\r\n\r\n '#FFFF55', // Light yellow\r\n '#55FF55', // Light green\r\n '#55FFFF', // Light cyan\r\n '#FF55FF', // Light pink\r\n '#FF5555', // Light red\r\n '#AA55FF', // Light purple\r\n '#FFAA55', // Light orange\r\n '#55FFAA', // Light blue-green\r\n \r\n '#FFFF00', // Bright yellow\r\n '#00FF00', // Bright green\r\n '#00FFFF', // Bright cyan\r\n '#FF00FF', // Bright pink\r\n '#FF0000', // Bright red\r\n '#AA00FF', // Bright purple\r\n '#FFAA00', // Bright orange\r\n '#00FFAA', // Bright blue-green\r\n\r\n '#FFFF55', // Light yellow\r\n '#55FF55', // Light green\r\n '#55FFFF', // Light cyan\r\n '#FF55FF', // Light pink\r\n '#FF5555', // Light red\r\n '#AA55FF', // Light purple\r\n '#FFAA55', // Light orange\r\n '#55FFAA', // Light blue-green\r\n \r\n '#FFFF00', // Bright yellow\r\n '#00FF00', // Bright green\r\n '#00FFFF', // Bright cyan\r\n '#FF00FF', // Bright pink\r\n '#FF0000', // Bright red\r\n '#AA00FF', // Bright purple\r\n '#FFAA00', // Bright orange\r\n '#00FFAA', // Bright blue-green\r\n\r\n '#FFFF55', // Light yellow\r\n '#55FF55', // Light green\r\n '#55FFFF', // Light cyan\r\n '#FF55FF', // Light pink\r\n '#FF5555', // Light red\r\n '#AA55FF', // Light purple\r\n '#FFAA55', // Light orange\r\n '#55FFAA', // Light blue-green\r\n \r\n '#FFFF00', // Bright yellow\r\n '#00FF00', // Bright green\r\n '#00FFFF', // Bright cyan\r\n '#FF00FF', // Bright pink\r\n '#FF0000', // Bright red\r\n '#AA00FF', // Bright purple\r\n '#FFAA00', // Bright orange\r\n '#00FFAA', // Bright blue-green\r\n\r\n '#FFFF55', // Light yellow\r\n '#55FF55', // Light green\r\n '#55FFFF', // Light cyan\r\n '#FF55FF', // Light pink\r\n '#FF5555', // Light red\r\n '#AA55FF', // Light purple\r\n '#FFAA55', // Light orange\r\n '#55FFAA', // Light blue-green \r\n \r\n '#FFFF00', // Bright yellow\r\n '#00FF00', // Bright green\r\n '#00FFFF', // Bright cyan\r\n '#FF00FF', // Bright pink\r\n '#FF0000', // Bright red\r\n '#AA00FF', // Bright purple\r\n '#FFAA00', // Bright orange\r\n '#00FFAA', // Bright blue-green\r\n\r\n '#FFFF55', // Light yellow\r\n '#55FF55', // Light green\r\n '#55FFFF', // Light cyan\r\n '#FF55FF', // Light pink\r\n '#FF5555', // Light red\r\n '#AA55FF', // Light purple\r\n '#FFAA55', // Light orange\r\n '#55FFAA', // Light blue-green\r\n]\r\n var symbols = [\r\n { slogan: \"speedDemon.js.\",\r\n icon: \"dashboard\"\r\n },\r\n { slogan: \"Perpetually lost.\",\r\n icon: \"map-marker\"\r\n },\r\n { slogan: \"Rebel without a cause.\",\r\n icon: \"rebel\"\r\n },\r\n { slogan: \"Powered by ESP8266.\",\r\n icon: \"microchip\"\r\n },\r\n { slogan: \"Was it supposed to do that?!\",\r\n icon: \"exclamation-triangle\"\r\n },\r\n { slogan: \"Headed toward the finish line.\",\r\n icon: \"flag-checkered\"\r\n },\r\n { slogan: \"Hang in there, baby.\",\r\n icon: \"heartbeat\"\r\n },\r\n { slogan: \"Really, really, really fast.\",\r\n icon: \"fast-forward\"\r\n },\r\n { slogan: \"Basically priceless.\",\r\n icon: \"diamond\"\r\n },\r\n { slogan: \"Fast as lightning!\",\r\n icon: \"bolt\"\r\n },\r\n { slogan: \"Eye on the prize.\",\r\n icon: \"eye\"\r\n },\r\n { slogan: \"????????\",\r\n icon: \"question-circle\"\r\n },\r\n { slogan: \"Pow-pow-power wheels!\",\r\n icon: \"power-off\"\r\n },\r\n { slogan: \"Uniquely unique.\",\r\n icon: \"snowflake-o\"\r\n },\r\n { slogan: \"Toot, toot! Ahh beep, beep!\",\r\n icon: \"bus\"\r\n },\r\n { slogan: \"A bit of a fixer-upper.\",\r\n icon: \"wrench\"\r\n },\r\n { slogan: \"IoT? Oh my!\",\r\n icon: \"wifi\"\r\n },\r\n { slogan: \"It's not a bug, it's a feature.\",\r\n icon: \"bug\"\r\n },\r\n { slogan: \"Um, no.\",\r\n icon: \"ban\"\r\n },\r\n { slogan: \"It's aliiive!\",\r\n icon: \"cogs\"\r\n },\r\n { slogan: \"Send help.\",\r\n icon: \"life-buoy\"\r\n },\r\n { slogan: \"A bot powered by magic. (And Javascript.)\",\r\n icon: \"magic\"\r\n },\r\n { slogan: \"LUV2CODE\",\r\n icon: \"heart\"\r\n },\r\n { slogan: \"It's not broken. It's... experimental.\",\r\n icon: \"flask\"\r\n },\r\n { slogan: \"Oh, dear.\",\r\n icon: \"frown-o\"\r\n },\r\n { slogan: \"Going places.\",\r\n icon: \"line-chart\"\r\n },\r\n { slogan: \"On fire! (Metaphorically, right?)\",\r\n icon: \"fire-extinguisher\"\r\n },\r\n { slogan: \"speedDemon.js.\",\r\n icon: \"dashboard\"\r\n },\r\n { slogan: \"Perpetually lost.\",\r\n icon: \"map-marker\"\r\n },\r\n { slogan: \"Rebel without a cause.\",\r\n icon: \"rebel\"\r\n },\r\n { slogan: \"Powered by ESP8266.\",\r\n icon: \"microchip\"\r\n },\r\n { slogan: \"Was it supposed to do that?!\",\r\n icon: \"exclamation-triangle\"\r\n },\r\n { slogan: \"Headed toward the finish line.\",\r\n icon: \"flag-checkered\"\r\n },\r\n { slogan: \"Hang in there, baby.\",\r\n icon: \"heartbeat\"\r\n },\r\n { slogan: \"Really, really, really fast.\",\r\n icon: \"fast-forward\"\r\n },\r\n { slogan: \"Basically priceless.\",\r\n icon: \"diamond\"\r\n },\r\n { slogan: \"Fast as lightning!\",\r\n icon: \"bolt\"\r\n },\r\n { slogan: \"Eye on the prize.\",\r\n icon: \"eye\"\r\n },\r\n { slogan: \"????????\",\r\n icon: \"question-circle\"\r\n },\r\n { slogan: \"Pow-pow-power wheels!\",\r\n icon: \"power-off\"\r\n },\r\n { slogan: \"Uniquely unique.\",\r\n icon: \"snowflake-o\"\r\n },\r\n { slogan: \"Toot, toot! Ahh beep, beep!\",\r\n icon: \"bus\"\r\n },\r\n { slogan: \"A bit of a fixer-upper.\",\r\n icon: \"wrench\"\r\n },\r\n { slogan: \"IoT? Oh my!\",\r\n icon: \"wifi\"\r\n },\r\n { slogan: \"It's not a bug, it's a feature.\",\r\n icon: \"bug\"\r\n },\r\n { slogan: \"Um, no.\",\r\n icon: \"ban\"\r\n },\r\n { slogan: \"It's aliiive!\",\r\n icon: \"cogs\"\r\n },\r\n { slogan: \"Send help.\",\r\n icon: \"life-buoy\"\r\n },\r\n { slogan: \"A bot powered by magic. (And Javascript.)\",\r\n icon: \"magic\"\r\n },\r\n { slogan: \"LUV2CODE\",\r\n icon: \"heart\"\r\n },\r\n { slogan: \"It's not broken. It's... experimental.\",\r\n icon: \"flask\"\r\n },\r\n { slogan: \"Oh, dear.\",\r\n icon: \"frown-o\"\r\n },\r\n { slogan: \"Going places.\",\r\n icon: \"line-chart\"\r\n },\r\n { slogan: \"On fire! (Metaphorically, right?)\",\r\n icon: \"fire-extinguisher\"\r\n },\r\n { slogan: \"speedDemon.js.\",\r\n icon: \"dashboard\"\r\n },\r\n { slogan: \"Perpetually lost.\",\r\n icon: \"map-marker\"\r\n },\r\n { slogan: \"Rebel without a cause.\",\r\n icon: \"rebel\"\r\n },\r\n { slogan: \"Powered by ESP8266.\",\r\n icon: \"microchip\"\r\n },\r\n { slogan: \"Was it supposed to do that?!\",\r\n icon: \"exclamation-triangle\"\r\n },\r\n { slogan: \"Headed toward the finish line.\",\r\n icon: \"flag-checkered\"\r\n },\r\n { slogan: \"Hang in there, baby.\",\r\n icon: \"heartbeat\"\r\n },\r\n { slogan: \"Really, really, really fast.\",\r\n icon: \"fast-forward\"\r\n },\r\n { slogan: \"Basically priceless.\",\r\n icon: \"diamond\"\r\n },\r\n { slogan: \"Fast as lightning!\",\r\n icon: \"bolt\"\r\n },\r\n { slogan: \"Eye on the prize.\",\r\n icon: \"eye\"\r\n },\r\n { slogan: \"????????\",\r\n icon: \"question-circle\"\r\n },\r\n { slogan: \"Pow-pow-power wheels!\",\r\n icon: \"power-off\"\r\n },\r\n { slogan: \"Uniquely unique.\",\r\n icon: \"snowflake-o\"\r\n },\r\n { slogan: \"Toot, toot! Ahh beep, beep!\",\r\n icon: \"bus\"\r\n },\r\n { slogan: \"A bit of a fixer-upper.\",\r\n icon: \"wrench\"\r\n },\r\n { slogan: \"IoT? Oh my!\",\r\n icon: \"wifi\"\r\n },\r\n { slogan: \"It's not a bug, it's a feature.\",\r\n icon: \"bug\"\r\n },\r\n { slogan: \"Um, no.\",\r\n icon: \"ban\"\r\n },\r\n { slogan: \"It's aliiive!\",\r\n icon: \"cogs\"\r\n },\r\n { slogan: \"Send help.\",\r\n icon: \"life-buoy\"\r\n },\r\n { slogan: \"A bot powered by magic. (And Javascript.)\",\r\n icon: \"magic\"\r\n },\r\n { slogan: \"LUV2CODE\",\r\n icon: \"heart\"\r\n },\r\n { slogan: \"It's not broken. It's... experimental.\",\r\n icon: \"flask\"\r\n },\r\n { slogan: \"Oh, dear.\",\r\n icon: \"frown-o\"\r\n },\r\n { slogan: \"Going places.\",\r\n icon: \"line-chart\"\r\n },\r\n { slogan: \"On fire! (Metaphorically, right?)\",\r\n icon: \"fire-extinguisher\"\r\n },\r\n { slogan: \"speedDemon.js.\",\r\n icon: \"dashboard\"\r\n },\r\n { slogan: \"Perpetually lost.\",\r\n icon: \"map-marker\"\r\n },\r\n { slogan: \"Rebel without a cause.\",\r\n icon: \"rebel\"\r\n },\r\n { slogan: \"Powered by ESP8266.\",\r\n icon: \"microchip\"\r\n },\r\n { slogan: \"Was it supposed to do that?!\",\r\n icon: \"exclamation-triangle\"\r\n },\r\n { slogan: \"Headed toward the finish line.\",\r\n icon: \"flag-checkered\"\r\n },\r\n { slogan: \"Hang in there, baby.\",\r\n icon: \"heartbeat\"\r\n },\r\n { slogan: \"Really, really, really fast.\",\r\n icon: \"fast-forward\"\r\n },\r\n { slogan: \"Basically priceless.\",\r\n icon: \"diamond\"\r\n },\r\n { slogan: \"Fast as lightning!\",\r\n icon: \"bolt\"\r\n },\r\n { slogan: \"Eye on the prize.\",\r\n icon: \"eye\"\r\n },\r\n { slogan: \"????????\",\r\n icon: \"question-circle\"\r\n },\r\n { slogan: \"Pow-pow-power wheels!\",\r\n icon: \"power-off\"\r\n },\r\n { slogan: \"Uniquely unique.\",\r\n icon: \"snowflake-o\"\r\n },\r\n { slogan: \"Toot, toot! Ahh beep, beep!\",\r\n icon: \"bus\"\r\n },\r\n { slogan: \"A bit of a fixer-upper.\",\r\n icon: \"wrench\"\r\n },\r\n { slogan: \"IoT? Oh my!\",\r\n icon: \"wifi\"\r\n },\r\n { slogan: \"It's not a bug, it's a feature.\",\r\n icon: \"bug\"\r\n },\r\n { slogan: \"Um, no.\",\r\n icon: \"ban\"\r\n },\r\n { slogan: \"It's aliiive!\",\r\n icon: \"cogs\"\r\n },\r\n { slogan: \"Send help.\",\r\n icon: \"life-buoy\"\r\n },\r\n { slogan: \"A bot powered by magic. (And Javascript.)\",\r\n icon: \"magic\"\r\n },\r\n { slogan: \"LUV2CODE\",\r\n icon: \"heart\"\r\n },\r\n { slogan: \"It's not broken. It's... experimental.\",\r\n icon: \"flask\"\r\n },\r\n { slogan: \"Oh, dear.\",\r\n icon: \"frown-o\"\r\n },\r\n { slogan: \"Going places.\",\r\n icon: \"line-chart\"\r\n },\r\n { slogan: \"On fire! (Metaphorically, right?)\",\r\n icon: \"fire-extinguisher\"\r\n }\r\n]\r\n botDirectory = [];\r\n var initQuery = new azure.TableQuery().select(['PartitionKey', 'RowKey', 'command', 'distance'])\r\n //.where('PartitionKey gt ?', lastUpdate);\r\n tableService.queryEntities('outTable', initQuery, null, function (error, result, response) {\r\n if (!error) {\r\n\r\n // For each row of table, check to see if bot is listed in bot directory\r\n for (i = 0; i < result.entries.length; i++) {\r\n\r\n function checkExist(botname) { return botname.botName == result.entries[i].RowKey._; }\r\n\r\n var botIndex = botDirectory.findIndex(checkExist);\r\n\r\n // If bot is already in bot directory, update content\r\n if (botIndex >= 0) {\r\n botDirectory[botIndex].currentCommand = \"\" + botDirectory[botIndex].currentCommand + \".\" + result.entries[i].command._ + \"\";\r\n botDirectory[botIndex].totalDistance = botDirectory[botIndex].totalDistance + parseInt(result.entries[i].distance._);\r\n }\r\n\r\n // If bot is not in bot directory, add an entry for it\r\n else {\r\n botDirectory.push(\r\n {\r\n botName: result.entries[i].RowKey._,\r\n botID: \"bot\" + result.entries[i].PartitionKey._,\r\n currentCommand: result.entries[i].command._,\r\n totalDistance: parseInt(result.entries[i].distance._),\r\n botColor: color[0],\r\n slogan: symbols[0].slogan,\r\n symbol: symbols[0].icon\r\n }\r\n );\r\n color.push(color.shift());\r\n symbols.push(symbols.shift());\r\n }\r\n }\r\n lastUpdate = result.entries[result.entries.length - 1].PartitionKey._;\r\n socket.emit('initData', botDirectory);\r\n console.log('Initial entries sent up to ' + lastUpdate);\r\n console.log(botDirectory);\r\n }\r\n });\r\n }", "function getColors(datalen) {\n const colorList =\n ['rgb(0,255,0)', 'rgb(0,0,255)', 'rgb(255,255,0)', 'rgb(0,255,255)', 'rgb(255,0,255)', 'rgb(192,192,192)',\n 'rgb(128,128,128)', 'rgb(128,0,0)', 'rgb(128,128,0)', 'rgb(0,128,0)', 'rgb(128,0,128)', 'rgb(0,128,128)',\n 'rgb(0,0,128)', 'rgb(0,255,0)', 'rgb(0,0,255)', 'rgb(255,255,0)', 'rgb(0,255,255)', 'rgb(255,0,255)',\n 'rgb(192,192,192)', 'rgb(128,128,128)', 'rgb(128,0,0)', 'rgb(128,128,0)', 'rgb(0,128,0)', 'rgb(128,0,128)',\n 'rgb(0,128,128)', 'rgb(0,0,128)', 'rgb(0,255,0)', 'rgb(0,0,255)', 'rgb(255,255,0)', 'rgb(0,255,255)',\n 'rgb(255,0,255)', 'rgb(192,192,192)', 'rgb(128,128,128)', 'rgb(128,0,0)', 'rgb(128,128,0)', 'rgb(0,128,0)',\n 'rgb(128,0,128)', 'rgb(0,128,128)', 'rgb(0,0,128)', 'rgb(0,255,0)', 'rgb(0,0,255)', 'rgb(255,255,0)',\n 'rgb(0,255,255)', 'rgb(255,0,255)', 'rgb(192,192,192)', 'rgb(128,128,128)', 'rgb(128,0,0)', 'rgb(128,128,0)',\n 'rgb(0,128,0)', 'rgb(128,0,128)', 'rgb(0,128,128)', 'rgb(0,0,128)',\n 'rgb(0,255,0)', 'rgb(0,0,255)', 'rgb(255,255,0)', 'rgb(0,255,255)', 'rgb(255,0,255)', 'rgb(192,192,192)',\n 'rgb(128,128,128)', 'rgb(128,0,0)', 'rgb(128,128,0)', 'rgb(0,128,0)', 'rgb(128,0,128)', 'rgb(0,128,128)',\n 'rgb(0,0,128)', 'rgb(0,255,0)', 'rgb(0,0,255)', 'rgb(255,255,0)', 'rgb(0,255,255)', 'rgb(255,0,255)',\n 'rgb(192,192,192)', 'rgb(128,128,128)', 'rgb(128,0,0)', 'rgb(128,128,0)', 'rgb(0,128,0)', 'rgb(128,0,128)',\n 'rgb(0,128,128)', 'rgb(0,0,128)', 'rgb(0,255,0)', 'rgb(0,0,255)', 'rgb(255,255,0)', 'rgb(0,255,255)',\n 'rgb(255,0,255)', 'rgb(192,192,192)', 'rgb(128,128,128)', 'rgb(128,0,0)', 'rgb(128,128,0)', 'rgb(0,128,0)',\n 'rgb(128,0,128)', 'rgb(0,128,128)', 'rgb(0,0,128)', 'rgb(0,255,0)', 'rgb(0,0,255)', 'rgb(255,255,0)',\n 'rgb(0,255,255)', 'rgb(255,0,255)', 'rgb(192,192,192)', 'rgb(128,128,128)', 'rgb(128,0,0)', 'rgb(128,128,0)',\n 'rgb(0,128,0)', 'rgb(128,0,128)', 'rgb(0,128,128)', 'rgb(0,0,128)'\n ];\n return colorList.slice(0, datalen);\n}", "function recolor(val){\n\n\t\tjc = 0;\n\t\t\n\t\tpolies.getLayers().forEach(\n\t\t\tfunction(x){\n\t\t\t\tx.setStyle({color:getColor(refData[val][jc].dist)});\n\t\t\t\tjc +=1;\n\t\t\t\treturn x;\n\t\t\t\t\n\t\t\t}\n\t\t);\n\t\treturn 1;\n\t\t\n\t}", "function setMatchColor() {\n var random = randomNumber(0, numDivs - 1);\n matchColor1 = $cb.eq(random).data('color');\n $('#color-to-pick').data('matchcolor', matchColor1);\n var substring1 = matchColor1.substr(1,2);\n var substring2 = matchColor1.substr(3,2);\n var substring3 = matchColor1.substr(5,2);\n $('#red').text(substring1).css('background-color', '#fff');\n $('#green').text(substring2).css('background-color', '#fff');\n $('#blue').text(substring3).css('background-color', '#fff');\n\n }", "function getColor() {\n var i = 0;\n while (takenColor[i]) {\n i++;\n }\n takenColor[i] = true;\n return color[i];\n}", "function fromHexClicked(){colorFrom(4); fromHex = true, fromBin =false, fromDec = false, fromOct = false;}", "function toHexClicked(){colorTo(4); toHex = true, toDec = false; toBin = false, toOct = false;}", "function colorgenerator() {\n let colours = [],\n i;\n for (i = 0; i < 372; i++){\n colours[i] = 'hsl(' + i + ', 100%, 50%)';\n if (i > 359) {\n colours[i] = 'hsl(0, 100%, 100%)';\n }\n }\n colours = colours.toString();\n //console.log(colours);\n root.style.setProperty(\"--colours\", colours);\n}", "function shading() {\n var $cells = $('.grid-cell');\n $cells.each(function () {\n if ((columns % 2) == 0) {\n if ((Math.floor($i / columns) + $i) % 2 == 1) $(this).addClass('black')\n else $(this).addClass('white');\n $i++;\n } else {\n if (($i % 2) == 1) $(this).addClass('black')\n else $(this).addClass('white');\n $i++;\n }\n\n });\n $i = 0;\n }", "function changeColor() {\n red = Math.floor(Math.random() * 255);\n green = Math.floor(Math.random() * 255);\n blue = Math.floor(Math.random() * 255);\n\n return red, green, blue;\n}", "function colorMixer(rgbA, rgbB, amountToMix) {\r\n\t\tvar r = colorChannelMixer(rgbA[0], rgbB[0], amountToMix),\r\n\t\t\tg = colorChannelMixer(rgbA[1], rgbB[1], amountToMix),\r\n\t\t\tb = colorChannelMixer(rgbA[2], rgbB[2], amountToMix);\r\n\t\treturn 'rgb(' + r + ',' + g + ',' + b + ')';\r\n\t}", "function colorKeys(baseColor) {\n $(\"div.cTable\").empty();\n\n $(\"div.cTable\").append(\n \"<h5>Click any color key below to change the base used in combinations.</h5>\"\n );\n\n $(\"div.cTable\").append(\"<h6><em>Google Material Design main '500' colors (click on to set family)</em></h6>\");\n cTable(\"MD\", baseColor, \"mdarray\", mdMainColors);\n $(\"div.cTable\").append(\"<h6><em>Currently Selected MD Family</em></h6>\");\n cTable(\"MD \" + currentFamilyMdColor, baseColor, \"mdarray\", justFamilyMdColors(currentFamilyMdColor));\n\n $(\"div.cTable\").append(\"<h6><em>Standard combinations</em></h6>\");\n cTable(\"Complement\", baseColor, \"complement\");\n cTable(\"Complement ryb\", baseColor, \"complementryb\");\n cTable(\"Split Complement\", baseColor, \"splitcomplement\");\n cTable(\"Split Complement ryb\", baseColor, \"splitcomplementryb\");\n cTable(\"Triad\", baseColor, \"triad\");\n cTable(\"Triad ryb\", baseColor, \"triadryb\");\n cTable(\"Tetrad\", baseColor, \"tetrad\");\n cTable(\"Tetrad ryb\", baseColor, \"tetradryb\");\n cTable(\"Monochromatic\", baseColor, \"monochromatic\");\n cTable(\"Analogous\", baseColor, \"analogous\");\n }", "function blend(c, a) {\n return 255 + (c - 255) * a;\n}", "function blend(c, a) {\n return 255 + (c - 255) * a;\n}" ]
[ "0.6467974", "0.64331746", "0.6368882", "0.6324223", "0.62776595", "0.62546605", "0.61677694", "0.61373454", "0.61044", "0.60893404", "0.6024644", "0.6017669", "0.60097945", "0.599612", "0.59838575", "0.5972702", "0.59632844", "0.5948893", "0.59428334", "0.5942087", "0.5940953", "0.59290326", "0.5922628", "0.59064066", "0.5905887", "0.58791786", "0.5857752", "0.58573514", "0.5855987", "0.5839563", "0.58382463", "0.58356947", "0.58327645", "0.5821631", "0.5809605", "0.5807909", "0.5790691", "0.5768596", "0.5760079", "0.5735464", "0.5728963", "0.57224613", "0.57174224", "0.570179", "0.5700356", "0.5694465", "0.5694388", "0.5693251", "0.5686713", "0.5681129", "0.56764483", "0.56760865", "0.5674206", "0.56711197", "0.5670933", "0.56698", "0.56690294", "0.5668761", "0.56571454", "0.5655845", "0.565535", "0.5647983", "0.56440574", "0.5641056", "0.5639675", "0.5624262", "0.56214315", "0.56196076", "0.5618905", "0.5611674", "0.5604376", "0.5603307", "0.5587772", "0.55826265", "0.5576459", "0.5568639", "0.5566062", "0.5556184", "0.5555296", "0.554782", "0.5542756", "0.5542719", "0.55412686", "0.5531437", "0.55223584", "0.55218303", "0.5518434", "0.551302", "0.5509658", "0.5508741", "0.5502674", "0.54898703", "0.5489342", "0.54867417", "0.5485632", "0.54853636", "0.548368", "0.54806966", "0.546994", "0.54681396", "0.54681396" ]
0.0
-1
Return a valid alpha value [0,1] with all invalid values being set to 1
function boundAlpha(a) { a = parseFloat(a); if (isNaN(a) || a < 0 || a > 1) { a = 1; } return a; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get Alpha0() {}", "set Alpha0(value) {}", "function boundAlpha(a) {\n a = parseFloat(a);\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n return a;\n }", "function boundAlpha(a) {\n a = parseFloat(a);\n\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n\n return a;\n }", "set Alpha1(value) {}", "function boundAlpha(a) {\n a = parseFloat(a);\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n return a;\n}", "function boundAlpha(a) {\n a = parseFloat(a);\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n return a;\n}", "function boundAlpha(a) {\n a = parseFloat(a);\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n return a;\n}", "function boundAlpha(a) {\n a = parseFloat(a);\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n return a;\n}", "function boundAlpha(a) {\n a = parseFloat(a);\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n return a;\n}", "function boundAlpha(a) {\n a = parseFloat(a);\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n return a;\n}", "function boundAlpha(a) {\n a = parseFloat(a);\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n return a;\n}", "function boundAlpha(a) {\n a = parseFloat(a);\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n return a;\n}", "function boundAlpha(a) {\n\t a = parseFloat(a);\n\t if (isNaN(a) || a < 0 || a > 1) {\n\t a = 1;\n\t }\n\t return a;\n\t}", "function boundAlpha(a) {\n a = parseFloat(a);\n\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n\n return a;\n }", "function boundAlpha(a) {\n\t a = parseFloat(a);\n\t\n\t if (isNaN(a) || a < 0 || a > 1) {\n\t a = 1;\n\t }\n\t\n\t return a;\n\t}", "function boundAlpha(a) {\n\t a = parseFloat(a);\n\t\n\t if (isNaN(a) || a < 0 || a > 1) {\n\t a = 1;\n\t }\n\t\n\t return a;\n\t}", "function boundAlpha(a) {\n\t a = parseFloat(a);\n\t\n\t if (isNaN(a) || a < 0 || a > 1) {\n\t a = 1;\n\t }\n\t\n\t return a;\n\t}", "function boundAlpha(a) {\n\t a = parseFloat(a);\n\t if (isNaN(a) || a < 0 || a > 1) {\n\t a = 1;\n\t }\n\t return a;\n\t}", "function boundAlpha(a) {\n a = parseFloat(a);\n\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n\n return a;\n }", "function boundAlpha(a) {\n a = parseFloat(a);\n\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n\n return a;\n }", "function boundAlpha(a) {\n a = parseFloat(a);\n\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n\n return a;\n }", "function boundAlpha(a) {\n a = parseFloat(a);\n\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n\n return a;\n }", "function boundAlpha(a) {\n a = parseFloat(a);\n\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n\n return a;\n }", "function boundAlpha(a) {\n a = parseFloat(a);\n\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n\n return a;\n }", "function boundAlpha(a) {\n a = parseFloat(a);\n\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n\n return a;\n }", "function boundAlpha(a) {\n\t\t\ta = parseFloat(a);\n\n\t\t\tif (isNaN(a) || a < 0 || a > 1) {\n\t\t\t\t\ta = 1;\n\t\t\t}\n\n\t\t\treturn a;\n\t}", "function boundAlpha(a) {\n\t\t\ta = parseFloat(a);\n\n\t\t\tif (isNaN(a) || a < 0 || a > 1) {\n\t\t\t\t\ta = 1;\n\t\t\t}\n\n\t\t\treturn a;\n\t}", "function validInt(num, alpha)\n{\n\tif (typeof num === \"number\")\n\t{\n\t\tif (isNaN(num) || num < 0)\n\t\t\treturn alpha? 255 : 0;\n\t\tif (num <= 1 && alpha)\n\t\t\tnum *= 255;\n\t\treturn Math.round(num);\n\t}\n\treturn validInt(parseFloat(num), alpha);\n}", "get Alpha1() {}", "set Alpha2(value) {}", "set Alpha8(value) {}", "function Alpha(){}", "set Alpha4(value) {}", "set AlphaChannel(value) {}", "set Alpha9(value) {}", "set Alpha3(value) {}", "set Alpha(value) {\n this._alpha = value;\n }", "set Alpha(value) {\n this._alpha = value;\n }", "get Alpha8() {}", "function GetAlphaValue() {\r\n\t\tvar _DETECTOR_LNG\t=\t$('#' + DOM_FieldID_DetectorLng).val ();\t\r\n\t\t\t\r\n\t\tvar alpha = ((+_DETECTOR_LNG + 90) * (Math.PI / 180));\r\n\r\n\t\treturn alpha;\r\n\t}", "set Alpha5(value) {}", "set Alpha7(value) {}", "get Alpha4() {}", "get Alpha9() {}", "get Alpha3() {}", "function validate(value) {\n return (value != '') && \n (0 <= value <= 255) && \n (value - Math.floor(value) === 0);\n}", "function isValid(alpha) {\n return alpha && alpha.length == 26 &&\n (new Set(alpha)).size == 26\n}", "get Alpha5() {}", "set InputAlpha(value) {\n this._inputTextAlpha = value;\n }", "allowAlpha(e) {\n\t\t\n\t}", "function getAlpha(rgba) {\r\n rgba = rgba.match(/^rgba?[\\s+]?\\([\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+(\\.\\d{1,2})?|\\.\\d{1,2})[\\s+]?/i);\r\n return (rgba && rgba.length === 6) ? rgba[4] : '1';\r\n }", "function getAlpha(rgba) {\n rgba = rgba.match(/^rgba?[\\s+]?\\([\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+(\\.\\d{1,2})?|\\.\\d{1,2})[\\s+]?/i);\n return (rgba && rgba.length === 6) ? rgba[4] : '1';\n }", "get AlphaChannel() {}", "function validAlphabet(letter){\n\tif(letter>26){\n\t\treturn letter-26;\n\t}else if(letter<=0){\n\t\treturn letter+26;\n\t}else{\n\t\treturn letter;\n\t}\n}", "function acp_get_alpha_value_from_color( value ) {\n\tvar alphaVal;\n\n\t// Remove all spaces from the passed in value to help our RGBa regex.\n\tvalue = value.replace( / /g, '' );\n\n\tif ( value.match( /rgba\\(\\d+\\,\\d+\\,\\d+\\,([^\\)]+)\\)/ ) ) {\n\t\talphaVal = parseFloat( value.match( /rgba\\(\\d+\\,\\d+\\,\\d+\\,([^\\)]+)\\)/ )[1] ).toFixed( 2 ) * 100;\n\t\talphaVal = parseInt( alphaVal );\n\t} else {\n\t\talphaVal = 100;\n\t}\n\n\treturn alphaVal;\n}", "getElement(element, alpha) {\n let gx = [element.length];\n for (let i = 0; i < element.length; i++) {\n if (element[i] > 255) {\n element[i] = element[i] - 255;\n }\n gx[i] = alpha[element[i]];\n }\n return gx;\n }", "function getAlphaColor(color, alpha) {\n\t\tif(alpha < 1) {\n\t\t\tif(color.indexOf(\"rgb\") == -1) {\n\t\t\t\tcolor = color.replace('#','');\n\t\t\t r = parseInt(color.substring(0,2), 16);\n\t\t\t g = parseInt(color.substring(2,4), 16);\n\t\t\t b = parseInt(color.substring(4,6), 16);\n\n\t\t\t return 'rgba('+r+','+g+','+b+','+alpha+')';\n\t\t\t} else {\n\t\t\t\tif(color.indexOf(\"rgba\") == -1)\n\t\t\t\t\tcolor = color.replace(\"rgb\", \"rgba\");\n\t\t\t\telse {\n\t\t\t\t\tvar stringParts = color.split(\",\");\n\t\t\t\t\tstringParts[stringParts.length-1] = alpha+\")\";\n\t\t\t\t\treturn stringParts.join(\",\");\n\t\t\t\t}\n\n\t\t\t\treturn color.replace(\")\", \", \"+alpha+\")\");\n\t\t\t}\n\t\t}\n\n\t\treturn color;\n\t}", "getAlphaNumericValues(value) {\n let valueInInt = 0;\n switch (value) {\n case '0':\n valueInInt = 0;\n break;\n case '1':\n valueInInt = 1;\n break;\n case '2':\n valueInInt = 2;\n break;\n case '3':\n valueInInt = 3;\n break;\n case '4':\n valueInInt = 4;\n break;\n case '5':\n valueInInt = 5;\n break;\n case '6':\n valueInInt = 6;\n break;\n case '7':\n valueInInt = 7;\n break;\n case '8':\n valueInInt = 8;\n break;\n case '9':\n valueInInt = 9;\n break;\n case 'A':\n valueInInt = 10;\n break;\n case 'B':\n valueInInt = 11;\n break;\n case 'C':\n valueInInt = 12;\n break;\n case 'D':\n valueInInt = 13;\n break;\n case 'E':\n valueInInt = 14;\n break;\n case 'F':\n valueInInt = 15;\n break;\n case 'G':\n valueInInt = 16;\n break;\n case 'H':\n valueInInt = 17;\n break;\n case 'I':\n valueInInt = 18;\n break;\n case 'J':\n valueInInt = 19;\n break;\n case 'K':\n valueInInt = 20;\n break;\n case 'L':\n valueInInt = 21;\n break;\n case 'M':\n valueInInt = 22;\n break;\n case 'N':\n valueInInt = 23;\n break;\n case 'O':\n valueInInt = 24;\n break;\n case 'P':\n valueInInt = 25;\n break;\n case 'Q':\n valueInInt = 26;\n break;\n case 'R':\n valueInInt = 27;\n break;\n case 'S':\n valueInInt = 28;\n break;\n case 'T':\n valueInInt = 29;\n break;\n case 'U':\n valueInInt = 30;\n break;\n case 'V':\n valueInInt = 31;\n break;\n case 'W':\n valueInInt = 32;\n break;\n case 'X':\n valueInInt = 33;\n break;\n case 'Y':\n valueInInt = 34;\n break;\n case 'Z':\n valueInInt = 35;\n break;\n case ' ':\n valueInInt = 36;\n break;\n case '$':\n valueInInt = 37;\n break;\n case '%':\n valueInInt = 38;\n break;\n case '*':\n valueInInt = 39;\n break;\n case '+':\n valueInInt = 40;\n break;\n case '-':\n valueInInt = 41;\n break;\n case '.':\n valueInInt = 42;\n break;\n case '/':\n valueInInt = 43;\n break;\n case ':':\n valueInInt = 44;\n break;\n default:\n // throw new BarcodeException('Not a valid input');\n }\n return valueInInt;\n }", "set Alpha6(value) {}", "toCSSString(alpha) {\r\n const [h, s, l] = this.toCSSValues();\r\n if (alpha !== undefined) {\r\n // cast to [0, 1]\r\n alpha = Math.min(1, Math.max(0, alpha));\r\n return `hsla(${h}, ${s}%, ${l}%, ${alpha})`;\r\n }\r\n else {\r\n return `hsl(${h}, ${s}%, ${l}%)`;\r\n }\r\n }", "function elu(x, alpha) {\n if (alpha === void 0) { alpha = 1; }\n // TODO(cais): Add support for alpha values other than 1.\n if (alpha !== 1) {\n throw new errors_1.NotImplementedError(\"Support for alpha values other than 1 (\" + alpha + \") is not implemented \" +\n \"yet.\");\n }\n return tfc.elu(x);\n}", "function elu(x, alpha) {\n if (alpha === void 0) { alpha = 1; }\n // TODO(cais): Add support for alpha values other than 1.\n if (alpha !== 1) {\n throw new errors_1.NotImplementedError(\"Support for alpha values other than 1 (\" + alpha + \") is not implemented \" +\n \"yet.\");\n }\n return tfc.elu(x);\n}", "fillAlpha(arr) {\n\t\tconst alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split(''),\n\t\tstart = alpha.indexOf(arr[0]),\n\t\tend = alpha.indexOf(arr[arr.length-1]),\n\t\tfullAlpha = alpha.slice(start, end + 1);\t\t\n\n\t\treturn fullAlpha;\n\t}", "get alphanumeric() {\n return this.addValidator({\n message: (value, label) => `Expected ${label} to be alphanumeric, got \\`${value}\\``,\n validator: value => /^[a-z\\d]+$/i.test(value)\n });\n }", "function ValidateAlpha(evt)\n {\n var keyCode = (evt.which) ? evt.which : evt.keyCode;\n if ((keyCode < 65 || keyCode > 90) && (keyCode < 97 || keyCode > 123) && keyCode != 32){ \n return false;\n }\n return true;\n }" ]
[ "0.7021053", "0.698131", "0.68436676", "0.68300396", "0.6810301", "0.6782784", "0.6782784", "0.6782784", "0.6782784", "0.6782784", "0.6782784", "0.6782784", "0.6776724", "0.6739779", "0.6733091", "0.6706063", "0.6706063", "0.6706063", "0.6696229", "0.6649467", "0.6649467", "0.6649467", "0.6649467", "0.6649467", "0.6649467", "0.6649467", "0.66288936", "0.66288936", "0.6494683", "0.6275804", "0.62114716", "0.6154253", "0.61448264", "0.6116278", "0.6098975", "0.6084747", "0.6062891", "0.6015207", "0.6015207", "0.6012677", "0.583182", "0.5827823", "0.5820425", "0.5788055", "0.57544726", "0.5727119", "0.5702388", "0.56883", "0.56858706", "0.5675358", "0.5665398", "0.56571925", "0.562962", "0.5624959", "0.5609766", "0.55895627", "0.55824256", "0.556902", "0.5567103", "0.55649376", "0.55555695", "0.5544648", "0.5544648", "0.55169505", "0.5506058", "0.5498715" ]
0.67187935
41
Take input from [0, n] and return it as [0, 1]
function bound01(n, max) { if (isOnePointZero(n)) { n = "100%"; } var processPercent = isPercentage(n); n = mathMin(max, mathMax(0, parseFloat(n))); // Automatically convert percentage into number if (processPercent) { n = parseInt(n * max, 10) / 100; } // Handle floating point rounding errors if ((Math.abs(n - max) < 0.000001)) { return 1; } // Convert into [0, 1] range if it isn't already return (n % max) / parseFloat(max); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function first(n){\n let arry = [];\n for(let i = 0; i < n; i++){\n arry[i] = i + 1;\n }\n return arry;\n}", "function nthElement(input, n = 0) {\n if (n == 0) {\n return input[0];\n } else if (n < 0) {\n return [];\n } else {\n if (n > input.length) {\n return input;\n }\n let newArray = [];\n for (let i = 0; i < n; i++) {\n newArray.push(input[i]);\n }\n return newArray;\n }\n}", "function range(n) {\n var res = [],\n i = 1;\n while (i <= n) {\n res.push(i);\n i++;\n }\n return res;\n }", "function range(n) {\n var numbers = [];\n for (var i = 1; i <= n; i++)\n numbers.push(i);\n return numbers;\n}", "function getIntArray(n){\n\tlet array = [];\n\tfor(let i=0; i<=n; i++){\n\t\tarray.push(i);\n\t}\n\t\n\treturn array;\n}", "function range(n) {\n\treturn Array(n).fill().map(function (_, i) {\n\t\treturn i;\n\t});\n}", "function range(n) {\n a = [];\n for(i = 0; i < n; i++) {\n a[i] = i;\n }\n return a;\n}", "function getTriangNums(n) {\n // Returns a list of the first n triangular numbers\n \n var out = [1];\n var lastVal = 1;\n var newVal = 0;\n for (var i=2; i<=n; i++) {\n newVal = lastVal + i;\n out.push(newVal);\n lastVal = newVal;\n }\n return out;\n}", "function n() {\n return [0, 0];\n }", "function computeRange(i,n){\n let index = -1, arr=[];\n for (;index<n;index++) {\n arr.push(i);\n }\n return arr;\n}", "function n() {\n return [0, 0, 0];\n }", "static step1(n) {\n return n >= 1 ? 1 : 0;\n }", "function findNUniqueIntegersSumUpToZero(n) {\n let result = n % 2 === 0 ? [n, -n] : [0]\n for (let index = 1; index < n / 2; index++) {\n result.push(index, -index)\n }\n return result\n}", "static step0(n) {\n return n > 0 ? 1 : 0;\n }", "function arr(n){\n var newArr = [];\n for(var i = 0; i < n; i++){\n newArr.push(i);\n }\n return newArr;\n}", "function buildOddArray(n) {\n a = [];\n for(i = 0; i < n; i++) {\n a[i] = (2 * i) + 1;\n }\n return sumNeg(a);\n}", "function digitize(n) {\n //code here\n return Array.from(String(n)).map(Number).reverse();\n}", "function NonConsecutiveOnes(n) {\n let result = [];\n helper(\"\", n, result);\n return result;\n}", "function iRange(x, n) {\n var a = [];\n var i = 0;\n for (i = x; i <= n; i++) {\n a.push(i);\n }\n return a;\n}", "function stones(n, a, b) {\n let countSet = new Set()\n \n for(let i = 0; i < n; i++) {\n countSet.add(i * Math.max(a,b) + (n - i - 1) * Math.min(a,b));\n }\n \n return Array.from(countSet);\n}", "function x(n) {\n let i = 0, answer = [];\n while (i < n) {\n let j = 0, a = [];\n while (j < n) {\n a[j] = 0;\n j++;\n }\n answer.push(a);\n i++;\n }\n\n i = 0;\n while (i < n) {\n var k = 0;\n while (k < n) {\n if (i === k) {\n answer[i][k] = 1;\n }\n if (i + k === n - 1) {\n answer[i][k] = 1;\n }\n k++;\n }\n i++;\n }\n return answer;\n}", "function newArr(n, x) {\n var arr = [];\n for(; n >= 0; --n) {\n arr.push(x);\n }\n return arr;\n}", "function newArr(n, x) {\n var arr = [];\n for(; n >= 0; --n) {\n arr.push(x);\n }\n return arr;\n}", "function newArr(n, x) {\n var arr = [];\n for(; n >= 0; --n) {\n arr.push(x);\n }\n return arr;\n}", "function f(n) {\n return [0].indexOf(n - n + 0);\n}", "function powersOfTwo(n){\r\n for(var i=0,res =[] ; i<=n ; i++)\r\n\t res.push(2**i);\r\n return res;\r\n}", "function successors(n){\n\tif (n == 1) return [2, 4, 5];\n\tif (n == 2) return [1, 3, 4, 5, 6];\n\tif (n == 3) return [2, 5, 6];\n\tif (n == 4) return [1, 2, 5, 7, 8];\n\tif (n == 5) return [1, 2, 3, 4, 6, 7 ,8, 9];\n\tif (n == 6) return [2, 3, 5, 8 ,9];\n\tif (n == 7) return [4, 5, 8];\n\tif (n == 8) return [4, 5, 6 ,7, 9];\n\tif (n == 9) return [5, 6 , 8];\n}", "function nArray(n){\n const nArr = Array.from(Array(n))\n nArr.forEach(function(_, index){\n this[index] = index + 1;\n }, nArr)\n return nArr;\n}", "function sequence(n)\n{\n\tvar root = Math.sqrt(n);\n\tvar denom0 = 1;\n\tvar rest0 = -Math.floor(root);\n\tvar output = [];\n\tfor(var i = 0; i < 500; i++)\n\t{\n\t\tvar denom1 = n - rest0 * rest0;\n\t\tvar next = Math.floor(denom0 * (root - rest0) / denom1);\n\t\tdenom0 = Math.round(denom1 / denom0);\n\t\trest0 = -rest0 - denom0 * next;\n\t\toutput.push(next);\n\t}\n\treturn output;\n}", "function createOddArray(n) {\n var oddArr = [];\n for (var i = 1; i <= n; i += 2) {\n oddArr.push(i)\n }\n return oddArr\n}", "function dblLinear(n) {\n let u = [1];\n let x = 0;\n let y = 0;\n for (let i=0; i < n; i++) {\n let a = 2 * u[x] + 1;\n let b = 3 * u[y] + 1;\n if (a <= b) {\n u.push(a);\n x++\n if (a === b) y++;\n } else {\n u.push(b);\n y++;\n }\n }\n return u[n];\n}", "function powersOfTwo(n){\n let array = [] \n for(let i = 0; i <= n; i++){\n array.push(Math.pow(2, i))\n}\n return array\n }", "function fib(n) {\n\tconst result = [0,1];\n\n\tfor(let i=2; i<=n; i++){\n\n\t\tresult[i] = result[i-1] + result[i-2];\n\t}\n\n\treturn result[n];\n\t// return result; //returns whole array\n}", "function sumZero(n) {\n const output = [];\n \n if (n % 2 === 1) {\n output.push(0);\n }\n \n for (let i = 1; i <= Math.floor(n / 2); i++) {\n output.push(i, i * -1);\n }\n \n return output\n}", "function i(n){return n}", "function climb(n){\n //make a results array and make n the first element\n var results = [n];\n var newVal;\n //function to check odd or even\n var checkModulus = function(n) {\n //if var is 0 or 1, then return\n if(n ===0 || n === 1) {\n return;\n }\n //check if odd or even\n if(n % 2 === 0) {\n //if even, divide by 2 and unshift result into array\n newVal = n / 2;\n results.unshift(newVal);\n checkModulus(newVal)\n }\n //if odd, subtract 1 and then divide by 2 and unshift to result\n else {\n newVal = ((n - 1) / 2);\n results.unshift(newVal);\n checkModulus(newVal)\n }\n }\n checkModulus(n)\n //return results\n return results;\n \n}", "function fibonacci(n) {\n if (n <= 2) {\n return [0, 1].slice(0, n)\n } else {\n const prev = fibonacci(n - 1)\n prev.push(prev[prev.length - 2] + prev[prev.length - 1]);\n return prev;\n }\n}", "function range(n, m){\n var tmp = [];\n for (i = n; i < m; i++){\n tmp.push(n);\n }\n return tmp;\n}", "function integers_from(n) {\n return pair(n,\n function() {\n return integers_from(n + 1);\n });\n}", "function range(n, inverted) {\n\tvar ret = [];\n\tif (inverted) {\n\t\tfor (var i = 0; i < n; ++i) {\n\t\t\tret.push(n - i - 1);\n\t\t}\n\t} else {\n\t\tfor (var i = 0; i < n; ++i) {\n\t\t\tret.push(i);\n\t\t}\n\t}\n\treturn ret;\n}", "function getfirstElementTraditional(array, n = 1) {\n let tempArray = [];\n let i=0\n while(i <n){\n tempArray.push(array[i]);\n i++;\n }\n return tempArray;\n}", "function get_fac(n) {\n let res = [];\n res[0]=1;\n for (let i=1; i<=n; i++) {\n res[i] = res[i-1]*i;\n }\n return res;\n}", "function fib (n){\r\n var output = [];\r\n\r\n if(n === 1){\r\n output = [0];\r\n }else if ( n === 2){\r\n output = [1];\r\n }else{\r\n output = [0, 1];\r\n\r\n for(var i = 2; i < n; i++){\r\n output.push(output[output.length-2] + output[output.length-1]);\r\n }\r\n }\r\n\r\n return output;\r\n}", "function countdown1(n) {\n var arr = [];\n if (n >= 0) {\n for (var i = n; i >= 0; i--) {\n arr.push(i);\n }\n }\n return arr;\n}", "function fibonacci(n) {\n const result = [0, 1];\n\n for(let i = 0; i < n; i++) {\n result.push(result[result.length-2] + result[result.length-1]);\n }\n\n return result[n];\n}", "function generateIncreasingArray(n) {\n\tlet a = [...Array(n + 1).keys()].slice(1, n + 1);\n\treturn a;\n}", "function n(t,i){for(;i+1<t.length;i++)t[i]=t[i+1];t.pop()}", "function n(t,i){for(;i+1<t.length;i++)t[i]=t[i+1];t.pop()}", "function i(n=D){return[n[0],n[1],n[2],n[3],n[4],n[5]]}", "function convert(n) {\n\tvar output = [];\n\twhile(n > 0) {\n\t\toutput.unshift(n % 10);\n\t\tn = Math.floor(n / 10);\n\t}\n\treturn output;\n}", "function fibToN(n) {\n var fibSeq = [];\n var a = 0;\n var b = 1;\n var c = 1;\n while (a <= n) {\n fibSeq.push(a);\n a = b;\n b = c;\n c = a + b;\n }\n return fibSeq;\n}", "function dblLinear(n) {\n\tlet num = 2,\n\t\tind = 1,\n\t\ts = new Set();\n\ts.add(1);\n\twhile (true) {\n\t\tlet temp = num,\n\t\t\tcheck = 0;\n\t\tif ((temp - 1) % 3 == 0) {\n\t\t\ttemp = Math.floor((temp - 1) / 3);\n\t\t\tif (s.has(temp)) check = 1;\n\t\t}\n\t\ttemp = num;\n\t\tif ((temp - 1) % 2 == 0) {\n\t\t\ttemp = Math.floor((temp - 1) / 2);\n\t\t\tif (s.has(temp)) check = 1;\n\t\t}\n\t\tif (check == 1) {\n\t\t\ts.add(num);\n\t\t\tind++;\n\t\t}\n\t\tif (ind == n + 1) return num;\n\t\tnum += 1;\n\t}\n}", "function countup(n) {\n if (n < 1) {\n return [];\n } else {\n const countArray = countup(n - 1);\n countArray.push(n);\n return countArray;\n }\n}", "function countup(n) {\n if (n < 1) {\n return [];\n } else {\n const countArray = countup(n - 1);\n countArray.push(n);\n return countArray;\n }\n}", "function primesToN(n) {\n\tvar result = [];\n\tfor (var i = 2; i <= n; i++) {\n\t\tif (testPrime(i)) {\n\t\t\tresult.push(i);\n\t\t}\n\t}\n\treturn result;\n}", "function idMatrix(n) {\n return new Array(n).fill(0).map((_, index)=> {\n const row = new Array(n).fill(0);\n row[index] = 1;\n return row;\n });\n}", "function take(arr, n) {\n /*\n let a = [];\n if (arr.length === 0) return a;\n for (let i = 0; i < n; i++) {\n if (arr[i] || arr[i] === 0) {\n a.push(arr[i])\n }\n }\n return a;\n */\n\n return arr.slice(0, n);\n}", "function powerof (x,n) {\n if (n === 1){\n return x ;\n }\n return x * power(x,n-1);\n}", "function zeros(n) {\n return Array.apply(null, new Array(n)).map(Number.prototype.valueOf, 0);\n}", "function digitize(n) {\n return Array.from(n.toString()).map(Number).reverse()\n}", "function findBin(n) {\n let result = [];\n let myQueue = new Queue();\n var s1, s2;\n myQueue.enqueue(1);\n for (let i = 0; i < n; i++) {\n result.push(myQueue.dequeue());\n s1 = result[i] + '0';\n s2 = result[i] + '1';\n myQueue.enqueue(s1);\n myQueue.enqueue(s2);\n }\n return result;\n}", "function unary(n) {\n if (n == 0) {\n return '0'\n }\n return ('1').repeat(n - 1) + '0'\n}", "function copyInt_(x,n) {\n var i,c;\n for (c=n,i=0;i<x.length;i++) {\n x[i]=c & mask;\n c>>=bpe;\n }\n }", "function first(arr, n) {\n if (n == 0) {\n return []\n }\n if (!n) {\n return arr.slice(0, 1)\n }\n return arr.slice(0, n)\n\n}", "function binaryString(n) {\n if (n === 1) return ['0', '1'];\n let prev = binaryString(n - 1);\n let result = [];\n for (let i = 0; i < prev.length; i++) {\n result.push(`${prev[i]}0`);\n result.push(`${prev[i]}1`);\n }\n return result;\n}", "function makeArray(n) {\n\tlet allNums = [];\n\twhile(n--){\n\t\tallNums.push(Math.round(Math.random() * 1000));\n\t}\n\treturn allNums;\n}", "function countup(n) {\n if (n < 1) {\n return [];\n } else {\n alert(n)\n const countArray = countup(n - 1);\n //alert(n);\n //alert(countArray);\n countArray.push(n);\n //alert(countArray);\n return countArray;\n }\n}", "function generateIntegers(m, n) {\n let intSeries=[];\n for (let i=m; i<=n; i++){\n intSeries.push(i)\n }\n return intSeries;\n}", "function sequence(num) {\n var outputArr = [];\n for (i = 1; i <= num; i++) {\n outputArr.push(i);\n }\n return outputArr;\n}", "function generateIncreasingArray(n) {\n\ta = [...Array(n + 1).keys()].slice(1, n + 1);\n\treturn a;\n}", "function numarray(n) {\n resultArr = [n];\n for (i = 0; i < n; i++) {\n resultArr[i] = i ;\n }\n console.log(resultArr);\n}", "function shortestArrang(n) {\n let newArr = [];\n let start_number;\n n % 2 == 0 ? (start_number = n / 2) : (start_number = (n + 1) / 2);\n while (start_number > 0) {\n for (let i = start_number; i > 0; i--) {\n newArr.push(i);\n if (find_sum_elements_array(newArr) > n) {\n newArr = [];\n break;\n }\n if (find_sum_elements_array(newArr) === n) {\n return newArr;\n }\n }\n start_number--;\n }\n return [-1];\n}", "function fillArrayWithNumbers(n) {\n let array = Array.apply(null, Array(n));\n\n return array.map(function(x, i) { return i; });\n}", "function helper_stream(input) {\n let count = 1;\n let result = 1;\n \n for (let i = 1; i <= input; i = i+1) {\n if (count === 0) {\n count = result;\n result = result + 1;\n } else {\n count = count - 1;\n }\n }\n return result;\n}", "function mutateTheArray(n, a) {\n if (n === 1) {\n return a;\n }\n var result = new Array(n);\n \n for (let i = 0; i < n; i++) {\n let left = a[i-1] ? a[i-1] : 0;\n let curr = a[i]\n let right = a[i+1] ? a[i+1] : 0;\n \n result[i] = (left+curr+right)\n } \n return result; \n \n}", "function generateFib(n) {\n var arr = [0, 1];\n\n for (var i = 0; i < n; i++) {\n arr[i] = arr[i - 1] + arr[i - 2]\n }\n return arr;\n\n}", "function first(array, n = 1) {\n let firstNElems = array.slice(0, n);\n if (n < 0) {\n firstNElems = [];\n }\n return firstNElems;\n}", "function copyInt_(x, n) {\n var i, c;\n for (c = n, i = 0; i < x.length; i++) {\n x[i] = c & mask;\n c >>= bpe;\n }\n }", "function findTriangularNumber(n) {\n return n * (n + 1) / 2;\n}", "function fibonacciGenerator(n) {\n var output = [];\n if (n === 1) {\n output = [0];\n } else if (n === 2) {\n output = [0, 1];\n } else {\n output = [0, 1];\n\n for (var i = 2; i < n; i++) {\n output.push(output[output.length - 2] + output[output.length - 1]);\n }\n }\n return output;\n}", "function fibonacci(n) {\n if (n === 1) { return [1] };\n if (n === 2) { return [1, 1] };\n\n let seq = fibonacci(n - 1)\n seq.push(seq[seq.length - 1] + seq[seq.length - 2])\n return seq;\n}", "function first(array,n=1){\n if(n>0)\n return array.slice(0,n); \n else\n return []; \n}", "function choose(xs, n) {\n if (n > 1) {\n var result = [];\n choose(xs.slice(1), n - 1).forEach(function(c) {\n result.push([xs[0]].concat(c));\n result.push(c.concat([xs[0]]));\n });\n return result;\n } else {\n return xs.map(function(x) { return [x]; });\n }\n}", "function myfunction(array, n) {\n var x = prompt(\"Enter the size of the array\");\n for (i = 0; i <= x; i++) {\n\n }\n if (array == null)\n return void 0;\n if (n == null)\n return array[0];\n if (n < 0)\n return [];\n return array.slice(0, n);\n}", "function sequence(number) {\n let results = [];\n\n for (let idx = 1; idx <= number; idx +=1) {\n results.push(idx);\n }\n\n return results;\n}", "function nthFibo(n) {\r\n [a, b] = [0, 1]\r\n for (let i = 1; i < n; i++)\r\n [a, b] = [b, a + b]\r\n return a\r\n}", "function fib(n) {\n var fib = [0,1]\n\n while (fib.length < n) {\n fib.push(fib[fib.length - 1] + fib[fib.length -2]);\n }\n\n if (n <=1) {\n return fib.slice(0,2);\n }\n\n if (n == 0) {\n return 'nothing to return';\n }\n return fib;\n}", "function Sum1toN(n) {\r\n var sum = 0;\r\n for (var i = 1; i <= n; i++) {\r\n sum += i;\r\n }\r\n return sum;\r\n}", "function fibonacci(n) {\n\n n = n > 0 ? n : 0;\n var arr = [0, 1];\n while( arr.length < n ) {\n arr.push( arr[ arr.length - 2 ] + arr[ arr.length - 1 ] );\n }\n\n return arr.slice(0, n);\n}", "function generateIntegers(m, n) {\n const liczenie = [];\n while (m <= n) {\n liczenie.push(m);\n m++;\n }\n console.log(liczenie);\n //return liczenie;\n}", "function arrayNUglyNumbers(n) {\n let counter = 0, currentNumber = 1, uglyNumbers = [];\n while (counter != n) {\n if (isUgly(currentNumber)) {\n counter++;\n uglyNumbers.push(currentNumber);\n }\n currentNumber++;\n }\n return uglyNumbers;\n}", "function prime3(n) {\n const data = new Int8Array((n + 1) / 2);\n data[0] = 1;\n for(let i = 1; i < data.length; i+= 1) {\n if (data[i] === 0) {\n let k = 2 * i + 1;\n let u = i * (1 + k);\n if (u > data.length) { break; }\n for (let j = u; j < data.length; j += k) {\n data[j] = 1;\n }\n }\n }\n const result = [2];\n for(let i = 0; i < data.length; i += 1) {\n if (data[i] == 0) {\n result.push(2 * i + 1);\n }\n }\n return result;\n }", "function factorial(n){\n let res = []\n if (n>=0){\n res[0] = 1 ;\n }\n for( let i=1;i<=n;i++){\n res[i] = i*res[i-1];\n }\n return res[n]; \n }", "function numl(n){\r\n for(var i=1;i<=n;i++){\r\n var str=\"\"\r\n for(var j=i;j>1;j--){\r\n str=str+(j)\r\n }\r\n for(var k=1;k<=i;k++){\r\n str=str+(k)\r\n }\r\n console.log(str)\r\n }\r\n \r\n }", "function fibonacciSeries(n)\r\n{\r\n let arr=[];\r\n arr[0]=1;\r\n arr[1]=1;\r\n for(let i=2;i<n;i++)\r\n {\r\n arr[i]=arr[i-1]+arr[i-2];\r\n }\r\n return arr;\r\n}", "function fibIt(n) {\n const fibArr = [1, 1];\n\n while (fibArr.length < n) {\n fibArr.push(fibArr[fibArr.length - 2] + fibArr[fibArr.length - 1]);\n }\n\n return fibArr;\n}", "function get1To255(){\n var output = [];\n for(var i = 0; i <= 255; i++){\n output.push(i);\n }\n return output;\n}", "function randomNumber(n) {\n if (n && (n < 0 || n >= 100000)) {\n throw new Error(\"input 'n' must be greater than or equal to 0, and less than 1,000,000.\");\n }\n let binaryNumber = \"\";\n // m = n - 1 It is the inclusive upper limit of n.\n let m = Math.trunc(n) - 1;\n // Case when input is 0 or 1.\n if (m <= 0) {\n return 0;\n }\n let binaryNumPositionsQty = Math.floor(Math.log2(m)) + 1;\n for (let i = binaryNumPositionsQty; i > 0; i--) {\n let random = flip() ? 1 : 0;\n binaryNumber = random + binaryNumber;\n }\n let result = parseInt(binaryNumber, 2);\n return result >= n ? n - 1 : result;\n}", "function riempi(n){\n\tvar array = [];\n for (var a =0; a<n;a++){\n\tarray.push(randomPoint());}\n\treturn array;\n}", "function numb(n){\r\n var k=n+n-1;\r\n for(var i=k;i>=1;i-=2){\r\n var str=\"\";\r\n for(var j=1;j<=i;j++){\r\n str=str+(j)\r\n }\r\n console.log(str)\r\n }\r\n \r\n }", "function first(arr, n = 1) {\n const newArr = arr.filter((e, i) => i < n);\n return newArr.length === 1 ? newArr[0] : newArr \n}" ]
[ "0.71773195", "0.6694955", "0.6603095", "0.65995866", "0.65072536", "0.6461666", "0.6460382", "0.6378593", "0.6347146", "0.6345456", "0.63361126", "0.632006", "0.62995267", "0.62973386", "0.6272909", "0.6226265", "0.6222668", "0.6214539", "0.6192041", "0.61815333", "0.6180363", "0.6178198", "0.6178198", "0.6178198", "0.6130807", "0.61291456", "0.6103874", "0.6097102", "0.6059998", "0.60595995", "0.6024064", "0.6011528", "0.60109335", "0.60072726", "0.600658", "0.59977955", "0.5995436", "0.59910506", "0.5983425", "0.5972512", "0.5970292", "0.5970252", "0.5956619", "0.59463245", "0.5930505", "0.59064364", "0.5901034", "0.5901034", "0.5900294", "0.5895476", "0.5890004", "0.58595616", "0.58524185", "0.58524185", "0.5849879", "0.5835943", "0.5835801", "0.5835384", "0.58345824", "0.5834337", "0.5826867", "0.5821272", "0.5818042", "0.5814431", "0.5806655", "0.58047813", "0.5801219", "0.57978785", "0.5794548", "0.579122", "0.5789062", "0.578358", "0.57747", "0.57661986", "0.5762925", "0.57625806", "0.5757834", "0.5757742", "0.5756387", "0.5754918", "0.5748442", "0.5747725", "0.5738696", "0.5728212", "0.5724713", "0.57236713", "0.57216316", "0.570976", "0.5708009", "0.57022417", "0.5700935", "0.56984997", "0.56952494", "0.5693085", "0.5680051", "0.5679578", "0.56787026", "0.5677428", "0.56757534", "0.56737345", "0.5672173" ]
0.0
-1
Force a number between 0 and 1
function clamp01(val) { return mathMin(1, mathMax(0, val)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function normalize(value) {\n\tif (value > 1) {\n\t\tvalue = 1;\n\t} else if (value < 0) {\n\t\tvalue = 0;\n\t}\n\treturn value;\n}", "function clamp01(val) {\n return Math.min(1, Math.max(0, val));\n }", "function clamp01(val) {\n return Math.min(1, Math.max(0, val));\n}", "function clamp01(val) {\n return Math.min(1, Math.max(0, val));\n}", "function clamp01(val) {\n return Math.min(1, Math.max(0, val));\n}", "function clamp01(val) {\n return Math.min(1, Math.max(0, val));\n}", "function clamp01(val) {\n return Math.min(1, Math.max(0, val));\n}", "function clamp01(val) {\n return Math.min(1, Math.max(0, val));\n}", "function clamp01(val) {\n return Math.min(1, Math.max(0, val));\n}", "function clamp01(val) {\n return Math.min(1, Math.max(0, val));\n}", "function clamp01(val) {\n return mathMin(1, mathMax(0, val));\n }", "function clamp01(val) {\n\t return Math.min(1, Math.max(0, val));\n\t}", "function clamp01(val) {\r\n return mathMin(1, mathMax(0, val));\r\n }", "function clamp01(val) {\n\t return mathMin(1, mathMax(0, val));\n\t}", "function clamp01(val) {\n\t return mathMin(1, mathMax(0, val));\n\t}", "function clamp01(val) {\n\t return mathMin(1, mathMax(0, val));\n\t}", "function clamp01(val) {\n\t\t\treturn mathMin(1, mathMax(0, val));\n\t}", "function clamp01(val) {\n\t\t\treturn mathMin(1, mathMax(0, val));\n\t}", "function clamp01(val) {\n return mathMin(1, mathMax(0, val));\n }", "function clamp01(val) {\n return mathMin(1, mathMax(0, val));\n }", "function clamp01(val) {\n return mathMin(1, mathMax(0, val));\n }", "function clamp01(val) {\n return mathMin(1, mathMax(0, val));\n }", "function clamp01(val) {\n return mathMin(1, mathMax(0, val));\n }", "function clamp01(val) {\n return mathMin(1, mathMax(0, val));\n }", "function clamp01(val) {\n return mathMin(1, mathMax(0, val));\n }", "function clamp01(val) {\n return mathMin(1, mathMax(0, val));\n }", "function clamp01(val) {\n return mathMin(1, mathMax(0, val));\n }", "function clamp01(val) {\n return mathMin(1, mathMax(0, val));\n }", "function clamp01(val) {\n return mathMin(1, mathMax(0, val));\n }", "function fnRelu(value) { return value > 0 ? value : 0 }", "function i(e){return 0===e?0:1===e?1:2===e?2:3<=e%100&&e%100<=10?3:11<=e%100?4:5}", "function i(e){return 0===e?0:1===e?1:2===e?2:3<=e%100&&e%100<=10?3:11<=e%100?4:5}", "function i(e){return 0===e?0:1===e?1:2===e?2:3<=e%100&&e%100<=10?3:11<=e%100?4:5}", "function change(val){\r\n if(val > 0){\r\n return '' + val + '';\r\n }else if(val < 0){\r\n return '' + val + '';\r\n }\r\n return val;\r\n }", "function change(val){\r\n if(val > 0){\r\n return '' + val + '';\r\n }else if(val < 0){\r\n return '' + val + '';\r\n }\r\n return val;\r\n }", "function change(val){\r\n if(val > 0){\r\n return '' + val + '';\r\n }else if(val < 0){\r\n return '' + val + '';\r\n }\r\n return val;\r\n }", "function change(val){\r\n if(val > 0){\r\n return '' + val + '';\r\n }else if(val < 0){\r\n return '' + val + '';\r\n }\r\n return val;\r\n }", "function change(val){\r\n if(val > 0){\r\n return '' + val + '';\r\n }else if(val < 0){\r\n return '' + val + '';\r\n }\r\n return val;\r\n }", "function change(val){\r\n if(val > 0){\r\n return '' + val + '';\r\n }else if(val < 0){\r\n return '' + val + '';\r\n }\r\n return val;\r\n }", "function t(e){return 0===e?0:1===e?1:2===e?2:3<=e%100&&e%100<=10?3:11<=e%100?4:5}", "function t(e){return 0===e?0:1===e?1:2===e?2:3<=e%100&&e%100<=10?3:11<=e%100?4:5}", "function t(e){return 0===e?0:1===e?1:2===e?2:3<=e%100&&e%100<=10?3:11<=e%100?4:5}", "function range_1(num)\n{\n var temp = num;\n if (num > 1) temp = num - 1;\n if (num < 0) temp = num + 1;\n return temp;\n}", "function validateNumber(value) {\n if (value % 1 === 0 && value > 0) {\n return true;\n } else {\n console.log(\" **** Please enter a whole number above zero. ****\");\n }\n}", "static constrain(v){\r\n while(v<0){v+=1;}\r\n while(v>1){v-=1;}\r\n return v;\r\n }", "function clamp(x){\n return Math.min(Math.max(x, 0.0), 1.0)\n}", "function oneIfNotZero(n) {\n return ((n | -n) >> 31) & 1;\n}", "function boundNumber(num) {\n if (num === 0) {\n return num;\n } else if (num < 0) {\n return -boundNumber(-num);\n } else {\n return Math.max(1e-6, Math.min(num, 1e20));\n }\n }", "function r(a){return a%100==11?!0:a%10!=1}", "function verifsint(value, max, min) {\n assert(typeof (value) == 'number', 'cannot write a non-number as a number')\n assert(value <= max, 'value larger than maximum allowed value')\n assert(value >= min, 'value smaller than minimum allowed value')\n assert(Math.floor(value) === value, 'value has a fractional component')\n}", "function verifsint(value, max, min) {\n assert(typeof (value) == 'number', 'cannot write a non-number as a number')\n assert(value <= max, 'value larger than maximum allowed value')\n assert(value >= min, 'value smaller than minimum allowed value')\n assert(Math.floor(value) === value, 'value has a fractional component')\n}", "function sign(val){return val >= 0?1:-1;}", "function M(t) {\n return \"number\" == typeof t && Number.isInteger(t) && !q(t) && t <= Number.MAX_SAFE_INTEGER && t >= Number.MIN_SAFE_INTEGER;\n}", "function clamp(value){return $window.Math.max(0,$window.Math.min(value||0,100));}", "function imply( val ) {\n return (val === true ? 1 : val ? val : 0);\n }", "function verifsint(value, max, min) {\n\t assert.ok(typeof (value) == 'number',\n\t 'cannot write a non-number as a number');\n\n\t assert.ok(value <= max, 'value larger than maximum allowed value');\n\n\t assert.ok(value >= min, 'value smaller than minimum allowed value');\n\n\t assert.ok(Math.floor(value) === value, 'value has a fractional component');\n\t}", "function verifsint(value, max, min) {\n\t assert.ok(typeof (value) == 'number',\n\t 'cannot write a non-number as a number');\n\n\t assert.ok(value <= max, 'value larger than maximum allowed value');\n\n\t assert.ok(value >= min, 'value smaller than minimum allowed value');\n\n\t assert.ok(Math.floor(value) === value, 'value has a fractional component');\n\t}", "function clamped(num) {\n if (field.minValue !== undefined) {\n num = Math.max(num, field.minValue);\n }\n if (field.maxValue !== undefined) {\n num = Math.min(num, field.maxValue);\n }\n return num;\n }", "function checkNumber (number)\r\n{\r\n\treturn (number>1)? 's' : '';\r\n}", "function randomNumGenerator1orNeg1() {\r\n let generatedNumber = Math.random();\r\n console.log(generatedNumber);\r\n\r\n if (generatedNumber <= 0.4) {\r\n return 1;\r\n }\r\n else {\r\n return -1;\r\n }\r\n\r\n\r\n}", "function v(num) {\r\n\tif (output.value == '0') {\r\n\t\toutput.value = num;\r\n\t} else {\r\n\t\toutput.value = output.value + num;\r\n\t}\r\n}", "function normalize (v) {\n v = v - Math.floor(v)\n if (v < 0) {\n v = v + 1\n }\n return v\n}", "function VZ(number){if(number<0) return -1; else return 1;}", "function clamp(value, min, max) {\n // TODO: Your code goes here.\n return 1337;\n}", "function V(t) {\n return \"number\" == typeof t && Number.isInteger(t) && !U(t) && t <= Number.MAX_SAFE_INTEGER && t >= Number.MIN_SAFE_INTEGER;\n}", "function wrapNum(x, range, includeMax) {\n var max = range[1],\n min = range[0],\n d = max - min;\n return x === max && includeMax ? x : ((x - min) % d + d) % d + min;\n } // @function falseFn(): Function" ]
[ "0.697331", "0.69500285", "0.6934323", "0.6934323", "0.6934323", "0.6934323", "0.6934323", "0.6934323", "0.6934323", "0.69342405", "0.68888277", "0.68779397", "0.68736076", "0.6842573", "0.6842573", "0.6842573", "0.6836512", "0.6836512", "0.6824807", "0.6824807", "0.6824807", "0.6824807", "0.6824734", "0.6824734", "0.6824734", "0.6824734", "0.6824734", "0.6824734", "0.6824734", "0.6508765", "0.64473295", "0.64473295", "0.64473295", "0.63789165", "0.63789165", "0.63789165", "0.63789165", "0.63789165", "0.63789165", "0.63475007", "0.63475007", "0.63475007", "0.62086576", "0.61709404", "0.6105109", "0.6095559", "0.60695446", "0.6062995", "0.60625637", "0.6058833", "0.6058833", "0.6044745", "0.60179293", "0.60072756", "0.6003376", "0.5999431", "0.5999431", "0.59922045", "0.5988972", "0.59817535", "0.5976783", "0.5965496", "0.59632766", "0.5929713", "0.5924575", "0.59125304" ]
0.68928826
41
Parse a base16 hex value into a base10 integer
function parseIntFromHex(val) { return parseInt(val, 16); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseIntFromHex(val) {\n return parseInt(val, 16);\n }", "function parseIntFromHex(val) {\n return parseInt(val, 16);\n }", "function parseIntFromHex(val) {\n return parseInt(val, 16);\n }", "function parseIntFromHex(val) {\n return parseInt(val, 16);\n }", "function parseIntFromHex(val) {\n return parseInt(val, 16);\n }", "function parseIntFromHex(val) {\n return parseInt(val, 16);\n }", "function parseIntFromHex(val) {\n return parseInt(val, 16);\n }", "function parseIntFromHex(val) {\n return parseInt(val, 16);\n }", "function parseIntFromHex(val) {\n return parseInt(val, 16);\n}", "function parseIntFromHex(val) {\n\t return parseInt(val, 16);\n\t}", "function parseHex(val) {\n return parseInt(val, 16);\n }", "function parseHex(val) {\n return parseInt(val, 16);\n }", "function parseHex(val) {\n return parseInt(val, 16);\n }", "function parseHex(val) {\n return parseInt(val, 16);\n }", "function parseIntFromHex(val) {\n\t return parseInt(val, 16);\n\t}", "function parseIntFromHex(val) {\n\t return parseInt(val, 16);\n\t}", "function parseIntFromHex(val) {\n\t return parseInt(val, 16);\n\t}", "function parseIntFromHex(val) {\n\t return parseInt(val, 16);\n\t}", "function parseHex(val) {\r\n return parseInt(val, 16);\r\n }", "function parseIntFromHex(val) {\n\t\t\treturn parseInt(val, 16);\n\t}", "function parseIntFromHex(val) {\n\t\t\treturn parseInt(val, 16);\n\t}", "function parseHex(val) {\n return parseInt(val, 16);\n }", "function parseHex(val) {\n return parseInt(val, 16);\n}", "function hexstr2int(str)\n{\n\tvar i = 0;\n\tif (is_hexdigit(str)==true) i = parseInt(str, [16]);\n\treturn i;\n}", "function char(x) { return parseInt(x, 16); }", "function hex2number(num) {\n\treturn parseInt(num, 16);\n}", "function hexToDigit(s) {\r\n var result = 0;\r\n var sl = Math.min(s.length, 2);\r\n for (var i = 0; i < sl; ++i) {\r\n result <<= 4;\r\n result |= charToHex(s.charCodeAt(i))\r\n }\r\n return result;\r\n}", "function readInt16() {\n var result = (str.charCodeAt(position) << 8) + str.charCodeAt(position + 1);\n position += 2;\n return result;\n }", "function readInt16() {\n var result = ((str.charCodeAt(position) << 8)\n + str.charCodeAt(position + 1));\n position += 2;\n return result;\n }", "function readInt16() {\n\t\tvar result = (\n\t\t\t(str.charCodeAt(position) << 8)\n\t\t\t+ str.charCodeAt(position + 1));\n\t\tposition += 2;\n\t\treturn result;\n\t}", "function readInt16() {\n\t\tvar result = (\n\t\t\t(str.charCodeAt(position) << 8)\n\t\t\t+ str.charCodeAt(position + 1));\n\t\tposition += 2;\n\t\treturn result;\n\t}", "function readInt16() {\n\t\tvar result = (\n\t\t\t(str.charCodeAt(position) << 8)\n\t\t\t+ str.charCodeAt(position + 1));\n\t\tposition += 2;\n\t\treturn result;\n\t}", "readInt16() {\n const result = ((this.str.charCodeAt(this.position) << 8)\n + this.str.charCodeAt(this.position + 1));\n this.position += 2;\n return result;\n }", "function hexToInt(hex) {\n if (hex.length % 2 != 0) {\n hex = \"0\" + hex;\n }\n var num = parseInt(hex, 16);\n var maxVal = Math.pow(2, hex.length / 2 * 8);\n if (num > maxVal / 2 - 1) {\n num = num - maxVal\n }\n return num;\n}", "function dec(hex) {\r\n return parseInt(hex, 16);\r\n }", "function dec(hex) {\r\n return parseInt(hex, 16);\r\n }", "function parseShort(str, base) {\n var n = parseInt(str, base);\n return (n << 16) >> 16;\n}", "function hexadecimalToInteger(string) {\n const DIGITS = {1:1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9,\n a: 10, b: 11, c: 12, d: 13, e: 14, f: 15 };\n\n string = string.toLowerCase();\n\n let arrayOfDigits = Array.from(string, digit => DIGITS[digit]);\n let value = 0;\n arrayOfDigits.forEach(digit => (value = (value * 16) + digit));\n return value;\n}", "function _base36To16(value) {\n return (new BN(value, 36)).toString(16);\n}", "function _base36To16(value) {\n return (new BN(value, 36)).toString(16);\n}", "function _base36To16(value) {\n return (new BN(value, 36)).toString(16);\n}", "function toBase10(number) {\n\n var x = number.toLowerCase();\n Logger.debug(\"x = \" + x)\n\n if (!x.startsWith('0b') && !x.startsWith('0x') && parseInt(x, 10).toString(10) == x.replace(/^0+/, '')) {\n Logger.debug('>>> Base 10: ' + parseInt(x, 10).toString(10) + ' = ' + x);\n return parseInt(x, 10);\n } else if (x.startsWith('0b') && (parseInt(x.substring(2), 2).toString(2) == x.substring(2).replace(/^0+/, ''))) {\n Logger.debug('>>> Base 2: ' + parseInt(x.substring(2), 2).toString(2) + ' = ' + x.substring(2));\n return parseInt(x.substring(2), 2);\n } else if (x.startsWith('0x') && (parseInt(x.substring(2), 16).toString(16) == x.substring(2).replace(/^0+/, ''))) {\n Logger.debug('>>> Base 16: ' + parseInt(x.substring(2), 16).toString(16) + ' = ' + x.substring(2));\n return parseInt(x.substring(2), 16);\n } else {\n Logger.debug('>>> ???')\n return NaN;\n }\n}", "function dec(hex) {\n return parseInt(hex, 16);\n }", "function dec(hex) {\n return parseInt(hex, 16);\n }", "function dec(hex) {\n return parseInt(hex, 16);\n }", "function readInt16(){\n checkLen(2);\n var int = buf.readInt16LE(pos);\n pos += 2;\n return int.toString();\n }", "function convertToHex(binary){\n var parts = binary.match(/.{1,4}/g);\n var hexString =\"\";\n //console.log(parts)\n for (var i = 0; i < parts.length; i++) {\n //console.log(parseInt(parts[i],2));\n hexString = hexString + parseInt(parts[i],2).toString(16);\n }\n //console.log(hexString)\n return hexString\n}", "function processHEX(val) {\n //does the hex contain extra char?\n var hex = (val.length >6)?val.substr(1, val.length - 1):val;\n // is it a six character hex?\n if (hex.length > 3) {\n\n //scrape out the numerics\n var r = hex.substr(0, 2);\n var g = hex.substr(2, 2);\n var b = hex.substr(4, 2);\n\n // if not six character hex,\n // then work as if its a three character hex\n } else {\n\n // just concat the pieces with themselves\n var r = hex.substr(0, 1) + hex.substr(0, 1);\n var g = hex.substr(1, 1) + hex.substr(1, 1);\n var b = hex.substr(2, 1) + hex.substr(2, 1);\n\n }\n // return our clean values\n return [\n parseInt(r, 16),\n parseInt(g, 16),\n parseInt(b, 16)\n ]\n}", "function processHEX(val) {\n //does the hex contain extra char?\n var hex = (val.length >6)?val.substr(1, val.length - 1):val;\n // is it a six character hex?\n if (hex.length > 3) {\n\n //scrape out the numerics\n var r = hex.substr(0, 2);\n var g = hex.substr(2, 2);\n var b = hex.substr(4, 2);\n\n // if not six character hex,\n // then work as if its a three character hex\n } else {\n\n // just concat the pieces with themselves\n var r = hex.substr(0, 1) + hex.substr(0, 1);\n var g = hex.substr(1, 1) + hex.substr(1, 1);\n var b = hex.substr(2, 1) + hex.substr(2, 1);\n\n }\n // return our clean values\n return [\n parseInt(r, 16),\n parseInt(g, 16),\n parseInt(b, 16)\n ]\n}", "function dec2hex(v) {return v.toString(16);}", "function dec2hex(v) {return v.toString(16);}", "function getIntFromBits(hex, start, end = undefined) {\n const bin = encUtils.hexToBinary(hex);\n const bits = bin.slice(start, end);\n const int = encUtils.binaryToNumber(bits);\n return int;\n}", "function parseHexUtf16(str, start, end) {\n\t var result = '';\n\t while (start < end) {\n\t // UTF-16, so swizzle the bytes\n\t result += String.fromCharCode(\n\t (hexToInt(str.charCodeAt(start + 2)) << 12) |\n\t (hexToInt(str.charCodeAt(start + 3)) << 8) |\n\t (hexToInt(str.charCodeAt(start)) << 4) |\n\t hexToInt(str.charCodeAt(start + 1)));\n\t start += 4;\n\t }\n\t return result;\n\t}", "function parseHexUtf16(str, start, end) {\n var result = '';\n while (start < end) {\n // UTF-16, so swizzle the bytes\n result += String.fromCharCode(\n (hexToInt(str.charCodeAt(start + 2)) << 12) |\n (hexToInt(str.charCodeAt(start + 3)) << 8) |\n (hexToInt(str.charCodeAt(start)) << 4) |\n hexToInt(str.charCodeAt(start + 1)));\n start += 4;\n }\n return result;\n}", "function parseHexUtf16(str, start, end) {\n var result = '';\n while (start < end) {\n // UTF-16, so swizzle the bytes\n result += String.fromCharCode(\n (hexToInt(str.charCodeAt(start + 2)) << 12) |\n (hexToInt(str.charCodeAt(start + 3)) << 8) |\n (hexToInt(str.charCodeAt(start)) << 4) |\n hexToInt(str.charCodeAt(start + 1)));\n start += 4;\n }\n return result;\n}", "function parseHexUtf16(str, start, end) {\n var result = '';\n while (start < end) {\n // UTF-16, so swizzle the bytes\n result += String.fromCharCode(\n (hexToInt(str.charCodeAt(start + 2)) << 12) |\n (hexToInt(str.charCodeAt(start + 3)) << 8) |\n (hexToInt(str.charCodeAt(start)) << 4) |\n hexToInt(str.charCodeAt(start + 1)));\n start += 4;\n }\n return result;\n}", "function parseHexUtf16(str, start, end) {\n var result = '';\n while (start < end) {\n // UTF-16, so swizzle the bytes\n result += String.fromCharCode(\n (hexToInt(str.charCodeAt(start + 2)) << 12) |\n (hexToInt(str.charCodeAt(start + 3)) << 8) |\n (hexToInt(str.charCodeAt(start)) << 4) |\n hexToInt(str.charCodeAt(start + 1)));\n start += 4;\n }\n return result;\n}", "function parseHexUtf16(str, start, end) {\n var result = '';\n while (start < end) {\n // UTF-16, so swizzle the bytes\n result += String.fromCharCode(\n (hexToInt(str.charCodeAt(start + 2)) << 12) |\n (hexToInt(str.charCodeAt(start + 3)) << 8) |\n (hexToInt(str.charCodeAt(start)) << 4) |\n hexToInt(str.charCodeAt(start + 1)));\n start += 4;\n }\n return result;\n}", "function parseHexUtf16(str, start, end) {\n var result = '';\n while (start < end) {\n // UTF-16, so swizzle the bytes\n result += String.fromCharCode(\n (hexToInt(str.charCodeAt(start + 2)) << 12) |\n (hexToInt(str.charCodeAt(start + 3)) << 8) |\n (hexToInt(str.charCodeAt(start)) << 4) |\n hexToInt(str.charCodeAt(start + 1)));\n start += 4;\n }\n return result;\n}", "function parseHexUtf16(str, start, end) {\n var result = '';\n while (start < end) {\n // UTF-16, so swizzle the bytes\n result += String.fromCharCode(\n (hexToInt(str.charCodeAt(start + 2)) << 12) |\n (hexToInt(str.charCodeAt(start + 3)) << 8) |\n (hexToInt(str.charCodeAt(start)) << 4) |\n hexToInt(str.charCodeAt(start + 1)));\n start += 4;\n }\n return result;\n}" ]
[ "0.74533725", "0.74018306", "0.7292385", "0.7292385", "0.7292385", "0.7292385", "0.7292385", "0.7292385", "0.72538525", "0.7246096", "0.72154737", "0.72154737", "0.72154737", "0.72154737", "0.72031677", "0.72031677", "0.72031677", "0.72031677", "0.7200139", "0.7143342", "0.7143342", "0.71412027", "0.7135194", "0.6820543", "0.6776161", "0.67342204", "0.6717305", "0.6696365", "0.66615593", "0.66590035", "0.66590035", "0.66590035", "0.65840465", "0.65485364", "0.64353454", "0.64353454", "0.6415093", "0.6413497", "0.6405694", "0.6405694", "0.6405694", "0.63851887", "0.63450944", "0.63450944", "0.63450944", "0.63248867", "0.62673193", "0.62308663", "0.62308663", "0.62191904", "0.62191904", "0.6202016", "0.61971897", "0.6186221", "0.6186221", "0.6186221", "0.6186221", "0.6186221", "0.6186221", "0.6186221" ]
0.72455937
41
Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1 <
function isOnePointZero(n) { return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPositivePercentValue(val) { return val / currentSerie.maxRange * 100; }", "function unit (value) {\n\t return low.number(value) &&\n\t value >= 0.0 && value <= 1.0\n\t}", "function checkPercent(num1, num2){\n\n ans = (100 - (num1/num2)*100).toFixed(2);\n return Math.abs(ans);\n\n }", "function checkPercent(num1, num2){\n\n ans = (100 - (num1/num2)*100).toFixed(2);\n return Math.abs(ans);\n\n }", "function pctChange(val){\r\n if(val > 0){\r\n return '' + val + '%';\r\n }else if(val < 0){\r\n return '' + val + '%';\r\n }\r\n return val;\r\n }", "function pctChange(val){\r\n if(val > 0){\r\n return '' + val + '%';\r\n }else if(val < 0){\r\n return '' + val + '%';\r\n }\r\n return val;\r\n }", "function pctChange(val){\r\n if(val > 0){\r\n return '' + val + '%';\r\n }else if(val < 0){\r\n return '' + val + '%';\r\n }\r\n return val;\r\n }", "function pctChange(val){\r\n if(val > 0){\r\n return '' + val + '%';\r\n }else if(val < 0){\r\n return '' + val + '%';\r\n }\r\n return val;\r\n }", "function pctChange(val){\r\n if(val > 0){\r\n return '' + val + '%';\r\n }else if(val < 0){\r\n return '' + val + '%';\r\n }\r\n return val;\r\n }", "function pctChange(val){\r\n if(val > 0){\r\n return '' + val + '%';\r\n }else if(val < 0){\r\n return '' + val + '%';\r\n }\r\n return val;\r\n }", "normalizeValue(val){\n val = Number(val);\n if(val % 1 != 0) val = parseFloat(val.toFixed(2));\n return val;\n }", "function isPercentage(range, value) {\n return ((value * (range[1] - range[0])) / 100) + range[0];\n }", "function float(num) {\n return num * 0.1 * 10;\n}", "function isPercentage ( range, value ) {\n\t\t\treturn ((value * ( range[1] - range[0] )) / 100) + range[0];\n\t\t}", "function isPercentage ( range, value ) {\r\n\t\t\treturn ((value * ( range[1] - range[0] )) / 100) + range[0];\r\n\t\t}", "function percentOf(val, percent) {\r\n return (val * percent) / 100;\r\n}", "function r(num) {\n return Math.round((num + Number.EPSILON) * 100) / 100;\n}", "function isPercentage(range, value) {\n return ((value * (range[1] - range[0])) / 100) + range[0];\n }", "function isPercentage ( range, value ) {\n\t\treturn ((value * ( range[1] - range[0] )) / 100) + range[0];\n\t}", "function isPercentage ( range, value ) {\n\t\treturn ((value * ( range[1] - range[0] )) / 100) + range[0];\n\t}", "function isPercentage ( range, value ) {\n\t\treturn ((value * ( range[1] - range[0] )) / 100) + range[0];\n\t}", "function isPercentage ( range, value ) {\n\t\treturn ((value * ( range[1] - range[0] )) / 100) + range[0];\n\t}", "function isPercentage ( range, value ) {\n\t\treturn ((value * ( range[1] - range[0] )) / 100) + range[0];\n\t}", "function isPercentage ( range, value ) {\n\t\treturn ((value * ( range[1] - range[0] )) / 100) + range[0];\n\t}", "function isPercentage ( range, value ) {\n\t\treturn ((value * ( range[1] - range[0] )) / 100) + range[0];\n\t}", "function isPercentage ( range, value ) {\n\t\treturn ((value * ( range[1] - range[0] )) / 100) + range[0];\n\t}", "function isPercentage ( range, value ) {\n\t\treturn ((value * ( range[1] - range[0] )) / 100) + range[0];\n\t}", "function isPercentage ( range, value ) {\n\t\treturn ((value * ( range[1] - range[0] )) / 100) + range[0];\n\t}", "function isPercentage ( range, value ) {\n\t\treturn ((value * ( range[1] - range[0] )) / 100) + range[0];\n\t}", "function isPercentage ( range, value ) {\n\t\treturn ((value * ( range[1] - range[0] )) / 100) + range[0];\n\t}", "function isPercentage ( range, value ) {\n\t\treturn ((value * ( range[1] - range[0] )) / 100) + range[0];\n\t}", "function isPercentage ( range, value ) {\n\t\treturn ((value * ( range[1] - range[0] )) / 100) + range[0];\n\t}", "function isPercentage ( range, value ) {\r\n\t\treturn ((value * ( range[1] - range[0] )) / 100) + range[0];\r\n\t}", "function isPercentage ( range, value ) {\r\n\t\treturn ((value * ( range[1] - range[0] )) / 100) + range[0];\r\n\t}", "function isPercentage(range, value) {\n return (value * (range[1] - range[0])) / 100 + range[0];\n }", "function isPercentage(range, value) {\n return (value * (range[1] - range[0])) / 100 + range[0];\n }", "function isPercentage(range, value) {\n return (value * (range[1] - range[0])) / 100 + range[0];\n }", "function isPercentage(range, value) {\n return (value * (range[1] - range[0])) / 100 + range[0];\n }", "function isPercentage(range, value) {\n return (value * (range[1] - range[0])) / 100 + range[0];\n }", "function t(e){return 0===e?0:1===e?1:2===e?2:3<=e%100&&e%100<=10?3:11<=e%100?4:5}", "function t(e){return 0===e?0:1===e?1:2===e?2:3<=e%100&&e%100<=10?3:11<=e%100?4:5}", "function t(e){return 0===e?0:1===e?1:2===e?2:3<=e%100&&e%100<=10?3:11<=e%100?4:5}", "function getNegativePercentValue(val) { return val / Math.abs(currentSerie.minRange) * 100; }", "function isPercentage(range, value) {\n return ((value * (range[1] - range[0])) / 100) + range[0];\n }", "function Round(x){\nif (x <0.001) {x = \"<0.001\"};\nif (x >1) {x = \"1.0000\"};\nreturn x;\n}", "function conveterNum(num){\n return num/ 100;\n }", "function bound01(n, max) {\n\t if (isOnePointZero(n)) { n = \"100%\"; }\n\t\n\t var processPercent = isPercentage(n);\n\t n = mathMin(max, mathMax(0, parseFloat(n)));\n\t\n\t // Automatically convert percentage into number\n\t if (processPercent) {\n\t n = parseInt(n * max, 10) / 100;\n\t }\n\t\n\t // Handle floating point rounding errors\n\t if ((math.abs(n - max) < 0.000001)) {\n\t return 1;\n\t }\n\t\n\t // Convert into [0, 1] range if it isn't already\n\t return (n % max) / parseFloat(max);\n\t}", "function bound01(n, max) {\n\t if (isOnePointZero(n)) { n = \"100%\"; }\n\t\n\t var processPercent = isPercentage(n);\n\t n = mathMin(max, mathMax(0, parseFloat(n)));\n\t\n\t // Automatically convert percentage into number\n\t if (processPercent) {\n\t n = parseInt(n * max, 10) / 100;\n\t }\n\t\n\t // Handle floating point rounding errors\n\t if ((Math.abs(n - max) < 0.000001)) {\n\t return 1;\n\t }\n\t\n\t // Convert into [0, 1] range if it isn't already\n\t return (n % max) / parseFloat(max);\n\t}", "function bound01(n, max) {\n\t if (isOnePointZero(n)) { n = \"100%\"; }\n\t\n\t var processPercent = isPercentage(n);\n\t n = mathMin(max, mathMax(0, parseFloat(n)));\n\t\n\t // Automatically convert percentage into number\n\t if (processPercent) {\n\t n = parseInt(n * max, 10) / 100;\n\t }\n\t\n\t // Handle floating point rounding errors\n\t if ((Math.abs(n - max) < 0.000001)) {\n\t return 1;\n\t }\n\t\n\t // Convert into [0, 1] range if it isn't already\n\t return (n % max) / parseFloat(max);\n\t}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = n * 100 + \"%\";\n }\n\n return n;\n }", "function bound01(n, max) {\r\n if (isOnePointZero(n)) { n = \"100%\"; }\r\n\r\n var processPercent = isPercentage(n);\r\n n = mathMin(max, mathMax(0, parseFloat(n)));\r\n\r\n // Automatically convert percentage into number\r\n if (processPercent) {\r\n n = parseInt(n * max, 10) / 100;\r\n }\r\n\r\n // Handle floating point rounding errors\r\n if ((math.abs(n - max) < 0.000001)) {\r\n return 1;\r\n }\r\n\r\n // Convert into [0, 1] range if it isn't already\r\n return (n % max) / parseFloat(max);\r\n }", "function percentOfValue(p1, p2) {\r\n return Math.round((p1 / p2) * 100);\r\n}", "function i(e){return 0===e?0:1===e?1:2===e?2:3<=e%100&&e%100<=10?3:11<=e%100?4:5}", "function i(e){return 0===e?0:1===e?1:2===e?2:3<=e%100&&e%100<=10?3:11<=e%100?4:5}", "function i(e){return 0===e?0:1===e?1:2===e?2:3<=e%100&&e%100<=10?3:11<=e%100?4:5}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "function convertToPercentage(n) {\n\t if (n <= 1) {\n\t n = (n * 100) + \"%\";\n\t }\n\t\n\t return n;\n\t}", "function convertToPercentage(n) {\n\t if (n <= 1) {\n\t n = (n * 100) + \"%\";\n\t }\n\t\n\t return n;\n\t}", "function convertToPercentage(n) {\n\t if (n <= 1) {\n\t n = (n * 100) + \"%\";\n\t }\n\t\n\t return n;\n\t}", "function math1 (value) {\r\n\treturn (value * 1.5) - 1;\r\n}", "function toPct(e) {\n return e + \"%\"\n }", "function percentage() {\n return percent;\n}", "function bound01(n, max) {\n if (isOnePointZero(n)) {\n n = \"100%\";\n }\n\n var processPercent = isPercentage(n);\n n = mathMin(max, mathMax(0, parseFloat(n)));\n\n // Automatically convert percentage into number\n if (processPercent) {\n n = parseInt(n * max, 10) / 100;\n }\n\n // Handle floating point rounding errors\n if (Math.abs(n - max) < 0.000001) {\n return 1;\n }\n\n // Convert into [0, 1] range if it isn't already\n return n % max / parseFloat(max);\n }", "function toBarPerc(n) {\nreturn (-1 + n) * 100;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n return `${Number(n) * 100}%`;\n }\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n return Number(n) * 100 + \"%\";\n }\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n return Number(n) * 100 + \"%\";\n }\n return n;\n}" ]
[ "0.71113557", "0.67602676", "0.6753145", "0.6753145", "0.67486286", "0.67486286", "0.67486286", "0.67486286", "0.67486286", "0.67486286", "0.6707342", "0.6642832", "0.66188645", "0.66137123", "0.66105145", "0.65965676", "0.659426", "0.65884614", "0.65817165", "0.65817165", "0.65817165", "0.65817165", "0.65817165", "0.65817165", "0.65817165", "0.65817165", "0.65817165", "0.65817165", "0.65817165", "0.65817165", "0.65817165", "0.65817165", "0.6574739", "0.6574739", "0.655305", "0.655305", "0.655305", "0.655305", "0.655305", "0.6514713", "0.6514713", "0.6514713", "0.6485217", "0.648367", "0.64670676", "0.64196163", "0.64140034", "0.6412048", "0.6412048", "0.63846403", "0.63668144", "0.6362517", "0.63508457", "0.63508457", "0.63508457", "0.63448435", "0.63448435", "0.63448435", "0.63448435", "0.63448435", "0.63448435", "0.63448435", "0.63448435", "0.63448435", "0.63448435", "0.63448435", "0.63448435", "0.63448435", "0.63448435", "0.63448435", "0.63448435", "0.63448435", "0.63448435", "0.63448435", "0.63448435", "0.63448435", "0.63448435", "0.63448435", "0.63448435", "0.63448435", "0.63448435", "0.63448435", "0.63448435", "0.63448435", "0.63448435", "0.63448435", "0.63448435", "0.63448435", "0.63448435", "0.63448435", "0.634167", "0.634167", "0.634167", "0.6336488", "0.6335271", "0.6319739", "0.6318711", "0.63136613", "0.63002944", "0.629963", "0.629963" ]
0.0
-1
Check to see if string passed in is a percentage
function isPercentage(n) { return typeof n === "string" && n.indexOf('%') != -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isPercentage(n) {\n return typeof n === 'string' && n.includes('%');\n }", "function isPercentage(n) {\n return typeof n === 'string' && n.includes('%');\n}", "function isPercentage(n) {\n\t return typeof n === 'string' && n.indexOf('%') !== -1;\n\t}", "function isPercentage(n) {\n return typeof n === 'string' && n.indexOf('%') !== -1;\n}", "function isPercentage(n) {\n return typeof n === 'string' && n.indexOf('%') !== -1;\n}", "function isPercentage(n) {\n return typeof n === 'string' && n.indexOf('%') !== -1;\n}", "function isPercentage(n) {\n return typeof n === 'string' && n.indexOf('%') !== -1;\n}", "function isPercentage(n) {\n return typeof n === 'string' && n.indexOf('%') !== -1;\n}", "function isPercentage(n) {\n return typeof n === 'string' && n.indexOf('%') !== -1;\n}", "function isPercentage(n) {\n return typeof n === 'string' && n.indexOf('%') !== -1;\n}", "function isPercentage(n) {\n return typeof n === \"string\" && n.indexOf('%') != -1;\n }", "function isPercentage(n) {\n\t return typeof n === \"string\" && n.indexOf('%') != -1;\n\t}", "function isPercentage(n) {\n\t return typeof n === \"string\" && n.indexOf('%') != -1;\n\t}", "function isPercentage(n) {\n\t return typeof n === \"string\" && n.indexOf('%') != -1;\n\t}", "function isPercentage(n) {\n return typeof n === 'string' && n.indexOf('%') !== -1;\n}", "function isPercentage(n) {\n\t return typeof n === \"string\" && n.indexOf(\"%\") != -1;\n\t}", "function isPercentage(n) {\n return typeof n === \"string\" && n.indexOf('%') != -1;\n }", "function isPercentage(n) {\n return typeof n === \"string\" && n.indexOf('%') != -1;\n }", "function isPercentage(n) {\n return typeof n === \"string\" && n.indexOf('%') != -1;\n }", "function isPercentage(n) {\n return typeof n === \"string\" && n.indexOf('%') != -1;\n }", "function isPercentage(n) {\r\n return typeof n === \"string\" && n.indexOf('%') != -1;\r\n }", "function isPercentage(n) {\n\t\t\treturn typeof n === \"string\" && n.indexOf('%') != -1;\n\t}", "function isPercentage(n) {\n\t\t\treturn typeof n === \"string\" && n.indexOf('%') != -1;\n\t}", "function isPercentage(n) {\n return typeof n === \"string\" && n.indexOf('%') != -1;\n }", "function isPercentage(n) {\n return typeof n === \"string\" && n.indexOf('%') != -1;\n }", "function isPercentage(n) {\n return typeof n === \"string\" && n.indexOf('%') != -1;\n }", "function isPercentage(n) {\n return typeof n === \"string\" && n.indexOf('%') != -1;\n }", "function isPercentage(n) {\n return typeof n === \"string\" && n.indexOf('%') != -1;\n }", "function isPercentage(n) {\n return typeof n === \"string\" && n.indexOf('%') != -1;\n }", "function isPercentage(n) {\n return typeof n === \"string\" && n.indexOf('%') != -1;\n }", "function isPercent(value) {\n return value instanceof Percent;\n}", "function isPercentage ( range, value ) {\n\t\t\treturn ((value * ( range[1] - range[0] )) / 100) + range[0];\n\t\t}", "function isPercentage ( range, value ) {\n\t\treturn ((value * ( range[1] - range[0] )) / 100) + range[0];\n\t}", "function isPercentage ( range, value ) {\n\t\treturn ((value * ( range[1] - range[0] )) / 100) + range[0];\n\t}", "function isPercentage ( range, value ) {\n\t\treturn ((value * ( range[1] - range[0] )) / 100) + range[0];\n\t}", "function isPercentage ( range, value ) {\n\t\treturn ((value * ( range[1] - range[0] )) / 100) + range[0];\n\t}", "function isPercentage ( range, value ) {\n\t\treturn ((value * ( range[1] - range[0] )) / 100) + range[0];\n\t}", "function isPercentage ( range, value ) {\n\t\treturn ((value * ( range[1] - range[0] )) / 100) + range[0];\n\t}", "function isPercentage ( range, value ) {\n\t\treturn ((value * ( range[1] - range[0] )) / 100) + range[0];\n\t}", "function isPercentage ( range, value ) {\n\t\treturn ((value * ( range[1] - range[0] )) / 100) + range[0];\n\t}", "function isPercentage ( range, value ) {\n\t\treturn ((value * ( range[1] - range[0] )) / 100) + range[0];\n\t}", "function isPercentage ( range, value ) {\n\t\treturn ((value * ( range[1] - range[0] )) / 100) + range[0];\n\t}", "function isPercentage ( range, value ) {\n\t\treturn ((value * ( range[1] - range[0] )) / 100) + range[0];\n\t}", "function isPercentage ( range, value ) {\n\t\treturn ((value * ( range[1] - range[0] )) / 100) + range[0];\n\t}", "function isPercentage ( range, value ) {\n\t\treturn ((value * ( range[1] - range[0] )) / 100) + range[0];\n\t}", "function isPercentage ( range, value ) {\n\t\treturn ((value * ( range[1] - range[0] )) / 100) + range[0];\n\t}", "function isPercentage ( range, value ) {\r\n\t\treturn ((value * ( range[1] - range[0] )) / 100) + range[0];\r\n\t}", "function isPercentage ( range, value ) {\r\n\t\treturn ((value * ( range[1] - range[0] )) / 100) + range[0];\r\n\t}", "function isPercentage ( range, value ) {\r\n\t\t\treturn ((value * ( range[1] - range[0] )) / 100) + range[0];\r\n\t\t}", "function isPercentage(range, value) {\n return ((value * (range[1] - range[0])) / 100) + range[0];\n }", "function isPercentage(range, value) {\n return ((value * (range[1] - range[0])) / 100) + range[0];\n }", "function isPercentage(range, value) {\n return (value * (range[1] - range[0])) / 100 + range[0];\n }", "function isPercentage(range, value) {\n return (value * (range[1] - range[0])) / 100 + range[0];\n }", "function isPercentage(range, value) {\n return (value * (range[1] - range[0])) / 100 + range[0];\n }", "function isPercentage(range, value) {\n return (value * (range[1] - range[0])) / 100 + range[0];\n }", "function isPercentage(range, value) {\n return (value * (range[1] - range[0])) / 100 + range[0];\n }", "function isPercentage(range, value) {\n return ((value * (range[1] - range[0])) / 100) + range[0];\n }", "function string2PPValue(inString) {\n var matches = /^(.+?)(%)?$/.exec(inString);\n var value, isRatio;\n return matches && isFinite(value = parseFloat(matches[1])) ? {\n value: (isRatio = !!(matches[2] && value)) ? value / 100 : value,\n isRatio: isRatio\n } : null; // 0% -> 0\n }", "function parsePercent$1(percent, all) {\n\t switch (percent) {\n\t case 'center':\n\t case 'middle':\n\t percent = '50%';\n\t break;\n\t\n\t case 'left':\n\t case 'top':\n\t percent = '0%';\n\t break;\n\t\n\t case 'right':\n\t case 'bottom':\n\t percent = '100%';\n\t break;\n\t }\n\t\n\t if (typeof percent === 'string') {\n\t if (_trim(percent).match(/%$/)) {\n\t return parseFloat(percent) / 100 * all;\n\t }\n\t\n\t return parseFloat(percent);\n\t }\n\t\n\t return percent == null ? NaN : +percent;\n\t }", "function parsePercent(str, defaultValue) {\n if (str) {\n return parseFloat(str) / 100;\n } else {\n return defaultValue;\n }\n}", "function parsePercent(percent, all) {\n switch (percent) {\n case 'center':\n case 'middle':\n percent = '50%';\n break;\n\n case 'left':\n case 'top':\n percent = '0%';\n break;\n\n case 'right':\n case 'bottom':\n percent = '100%';\n break;\n }\n\n if (typeof percent === 'string') {\n if (_trim(percent).match(/%$/)) {\n return parseFloat(percent) / 100 * all;\n }\n\n return parseFloat(percent);\n }\n\n return percent == null ? NaN : +percent;\n}", "function percent(str) {\n\tvar num = '', percentPos = str.indexOf('%'), leftNumPos = -1, rightNumPos = percentPos - 1;\n\tfor (var i = rightNumPos; i >= 0 && (isFinite(str[i]) || str[i] == '.'); i--) {\n\t\tnum += str[i];\n\t\tleftNumPos = i;\n\t}\n\tnum = num.split('').reverse().join('');\n\treturn {\n\t\tsubstr: num + '%',\n\t\tnum: num / 100\n\t};\n}", "function percentage() {\n return percent;\n}", "function percentage() {\n if (this.currentInput.indexOf(\"%\") == -1) {\n this.currentInput = this.currentInput * 100;\n this.currentInput = this.currentInput.toString() + \"%\";\n }\n this.displayCurrentInput();\n}", "function percentage() {\n if (current_input.indexOf(\"%\") == -1) {\n current_input = current_input * 100;\n current_input = current_input.toString() + \"%\";\n }\n displayCurrentInput();\n}", "function _percentConverter(stringPercent){\n return parseFloat(stringPercent);\n}" ]
[ "0.8826205", "0.88141215", "0.8740373", "0.87375885", "0.87375885", "0.87375885", "0.87375885", "0.87375885", "0.87375885", "0.87375885", "0.8734519", "0.8724306", "0.8724306", "0.8724306", "0.8717392", "0.86989266", "0.8688172", "0.8688172", "0.8688172", "0.8688172", "0.8686717", "0.86670494", "0.86670494", "0.86489767", "0.86489767", "0.86489767", "0.86489767", "0.86489767", "0.86489767", "0.86489767", "0.7284265", "0.7135596", "0.71153337", "0.71153337", "0.71153337", "0.71153337", "0.71153337", "0.71153337", "0.71153337", "0.71153337", "0.71153337", "0.71153337", "0.71153337", "0.71153337", "0.71153337", "0.71153337", "0.71057177", "0.71057177", "0.7101086", "0.708575", "0.70204103", "0.7012961", "0.7012961", "0.7012961", "0.7012961", "0.7012961", "0.6938641", "0.68342584", "0.6817715", "0.68038195", "0.6715277", "0.66820616", "0.6682003", "0.6638649", "0.6596312", "0.65762866" ]
0.8745909
29
Force a hex value to have 2 characters
function pad2(c) { return c.length == 1 ? '0' + c : '' + c; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hex(val) {\n\t\t\tval = val.toString(16);\n\t\t\tif (val.length < 2) val = '0'+val;\n\t\t\treturn val;\n\t\t}", "function hex(val) {\n var hex_rep = val.toString(16);\n return (hex_rep.length === 1) ? '0' + hex_rep : hex_rep;\n}", "function twoCh (val) {\n val = '0' + String(val)\n return val.substr(val.length - 2)\n}", "function hexcode(v) { return v < 10 ? 0x30 + v : 0x61 + v - 10 }", "function hex2(x)\n{\n\treturn hexify(Math.floor(reblock(x)%16))\n}", "toHex() {\n const value = this.value.toString(16).toUpperCase();\n return new Hex(`#${value}`);\n }", "function fullHex(hex) {\n return hex.length == 4 ? ['#', hex.substring(1, 2), hex.substring(1, 2), hex.substring(2, 3), hex.substring(2, 3), hex.substring(3, 4), hex.substring(3, 4)].join('') : hex;\n }", "function hex8(val) {\n\tvar n = val & 0xFF,\n\t\tstr = n.toString(16).toUpperCase();\n\twhile (str.length < 2)\n\tstr = \"0\" + str;\n\treturn str;\n}", "function asHex(value) {\n return Array.from(value)\n .map(function (i) { return (\"00\" + i.toString(16)).slice(-2); })\n .join('');\n}", "function flipHexString(hexValue, hexDigits) {\n var h = hexValue.substr(0, 2);\n for (var i = 0; i < hexDigits; ++i) {\n h += hexValue.substr(2 + (hexDigits - 1 - i) * 2, 2);\n }\n return h;\n}", "_formatHexLength(color) {\n // We don't want to format anything if the user is\n // intentionally clearing the color or using transparent\n if (color === '' || color === 'transparent') {\n return color;\n }\n // Remove hash if present\n let formattedColor = color.split('#').pop();\n\n // If valid 3 digits, double it\n if (/(^[0-9A-F]{3}$)/i.test(formattedColor)) {\n formattedColor = formattedColor\n .split('')\n .map(function(channel) {\n return channel + channel;\n })\n .join('');\n }\n // Add hash back\n formattedColor = `#${formattedColor}`;\n\n return formattedColor;\n }", "function hexify(x) {\n return isNaN(x) ? \"00\" : hexDigits[(x - x % 16) / 16] + hexDigits[x % 16];\n }", "function toHexWord(value) {\n return toHex(value, 4);\n}", "function toHexWord(value) {\n return toHex(value, 4);\n}", "function value2Hex(val) {\n val = Math.round(val).toString(16);\n // Must zero-pad for under-long things\n return color.base == 256 && val.length < 2 ? \"0\" + val : val;\n }", "toHex() {\n const value = this.value.toString(16).toUpperCase();\n return new Hex(`#${value}`);\n }", "function asHex(value) {\n return Array.from(value).map(function (i) {\n return (\"00\" + i.toString(16)).slice(-2);\n }).join('');\n}", "function strvalue_2_hexstring_33(str,len){\n\tvar returnValue='';\n\tfor(var i=str.length-2;i>-2;i-=2){\n\t\tif(i == -1) \n\t\t\treturnValue = returnValue + byte_2_hex(parseInt(str.substr(0,1),16)+0x33);\n\t\telse\n\t\t\treturnValue = returnValue + byte_2_hex(parseInt(str.substr(i,2),16)+0x33);\n\t}\n\twhile(returnValue.length<len*2){\n\t\treturnValue=returnValue + '3';\n\t}\n\treturn returnValue;\n}", "function number2hex2(num) {\n\treturn (\"0\"+num.toString(16).toUpperCase()).slice(-2);\n}", "function fullHex(hex) {\n return hex.length == 4 ?\n [ '#',\n hex.substring(1, 2), hex.substring(1, 2)\n , hex.substring(2, 3), hex.substring(2, 3)\n , hex.substring(3, 4), hex.substring(3, 4)\n ].join('') : hex\n }", "function hex(b) {\n return ('0' + b.toString(16)).substr(-2);\n}", "getHexColorValue() {\n let hexRepresentation = _.map(_.slice(this.props.value, 0, 3), (val)=>{\n let hexVal = val.toString(16);\n return hexVal.length === 1 ? '0' + hexVal : hexVal;\n }).join('');\n return '#' + hexRepresentation;\n }", "function fullHex(hex) {\r\n return hex.length == 4 ?\r\n [ '#',\r\n hex.substring(1, 2), hex.substring(1, 2)\r\n , hex.substring(2, 3), hex.substring(2, 3)\r\n , hex.substring(3, 4), hex.substring(3, 4)\r\n ].join('') : hex\r\n}", "function f(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;\n// must be an even number of digits\nvar a=t.length;$(a%2===0,\"Invalid hex string\"),r>a/2&&(r=a/2);for(var s=0;r>s;s++){var l=parseInt(t.substr(2*s,2),16);$(!isNaN(l),\"Invalid hex string\"),e[n+s]=l}return o._charsWritten=2*s,s}", "function hexVal (c) {\n return (\n c < 58 ? c - 48 : // 0 - 9\n c < 71 ? c - 55 : // A - F\n c - 87 // a - f\n );\n}", "function _hex(n) {\n var str = n.toString(16).toUpperCase();\n return str.length == 2 ? str : '0' + str;\n}", "function hexPair(num) {\n num = Math.floor(num);\n return Math.min(Math.max(num, 16), 255).toString(16);\n}", "hex(x) {\n var hexDigits = new Array(\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"a\",\"b\",\"c\",\"d\",\"e\",\"f\");\n return isNaN(x) ? \"00\" : hexDigits[(x - x % 16) / 16] + hexDigits[x % 16];\n }", "function fullHex(hex) {\n return hex.length == 4 ?\n [ '#',\n hex.substring(1, 2), hex.substring(1, 2)\n , hex.substring(2, 3), hex.substring(2, 3)\n , hex.substring(3, 4), hex.substring(3, 4)\n ].join('') : hex\n}", "function fullHex(hex) {\n return hex.length == 4 ?\n [ '#',\n hex.substring(1, 2), hex.substring(1, 2)\n , hex.substring(2, 3), hex.substring(2, 3)\n , hex.substring(3, 4), hex.substring(3, 4)\n ].join('') : hex\n}", "function createEscapedHex( number ){\n return fromCharCode(parseInt( number.toString(16) , 16));\n}", "function correctHex(hex) {\n if (!hex || hex.length < consts_1.MIN_HEX_LENGTH) {\n return 'ffffff'; // not a valid color--default to white\n }\n if (hex.length >= consts_1.MAX_HEX_LENGTH) {\n return hex.substring(0, consts_1.MAX_HEX_LENGTH);\n }\n return hex.substring(0, consts_1.MIN_HEX_LENGTH);\n}", "function hexify (number) {\n const hexChars = ['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f']\n if (isNaN(number)) {\n return '00'\n }\n return hexChars[(number - number % 16) / 16] + hexChars[number % 16]\n }", "function decToHex(d) { var dr = Number(d).toString(16); while(dr.length < 4) { dr = '0'+dr; } return '0x'+dr.toUpperCase(); }", "function byte_2_hex(num){\n\tif(num<16)\n\t\treturn '0'+num.toString(16);\n\telse\n\t\treturn num.toString(16);\n}", "function hex16(val) {\n\treturn hex8(val >> 8) + hex8(val);\n}", "function hex1(x)\n{\n\treturn hexify(Math.floor(reblock(x)/16))\n}", "function _hexify(i) {\n var s = i.toString(16).toUpperCase();\n // Pad out to two hex digits if necessary.\n if (s.length < 2) {\n s = '0' + s;\n }\n return s;\n }", "function toHex(n){return (n<16?\"0\":\"\")+n.toString(16);}", "function formatHex(t) { //char\n // not compatible with GWT...\n // return String.format(\"\\\\u%04x\", (int)t);\n var sb = '';\n sb += '\\\\u';\n var s = t.charCodeAt(0).toString(16);\n for (var i = s.length; i < 4; i++) {\n sb += '0';\n }\n sb += s;\n return sb;\n }", "function ensure0x(hex = '') {\n const hexString = hex.toString();\n if (typeof hexString === 'string' && hexString.indexOf('0x') !== 0) {\n return `0x${hexString}`;\n }\n return hexString;\n}", "function hexSingle(n) {\r\n\t\tn = parseInt(n,10); \r\n\t\tif (isNaN(n)) return \"00\";\r\n\t\tn = Math.max(0,Math.min(n,255));\r\n\t\treturn \"0123456789ABCDEF\".charAt((n-n%16)/16) + \"0123456789ABCDEF\".charAt(n%16);\t\r\n\t}", "function cutHex(h) {\n if (h.charAt(1) === \"x\") {\n return h.substring(2, 8);\n } else {\n return h.substring(1, 7);\n }\n}", "function __hex($num) {\r\nvar str = \"\";\r\nfor(var j = 7; j >= 0; j--)\r\nstr += _chars.charAt(($num >> (j * 4)) & 0x0F);\r\nreturn str;\r\n}", "function toColorHex(value) {\n let colorHex = value.toString(16);\n\n if(colorHex.length < 2) {\n colorHex = `0${colorHex}`;\n }\n\n return colorHex;\n}", "function hex16(val) {\n val &= 0xFFFF;\n var hex = val.toString(16).toUpperCase();\n return (\"0000\" + hex).slice(-4);\n}", "function two(x) {\r\n var d = '00' + x\r\n return d.substr(d.length - 2)\r\n }", "function hextodec(hex_value){\n if (hex_value.length % 2) { hex_value = '0' + hex_value; }\n var bn = BigInt('0x' + hex_value);\n var d = bn.toString(10);\n return d;\n}", "function binToHex(a) {\r\n\tvar newVal = \"\";\r\n\tfor (i = 0; i < a.length/8; i++) \r\n\t\tnewVal += (\"00\" + parseInt(a.slice(8*i, 8*i+8),2).toString(16)).slice(-2);\r\n\treturn newVal;\r\n}", "function toHex(value) {\n // For BN, call on the hex string\n if (typeof (value) !== \"string\") {\n return toHex(value.toString(16));\n }\n // If negative, prepend the negative sign to the normalized positive value\n if (value[0] === \"-\") {\n // Strip off the negative sign\n value = value.substring(1);\n // Cannot have mulitple negative signs (e.g. \"--0x04\")\n if (value[0] === \"-\") {\n logger.throwArgumentError(\"invalid hex\", \"value\", value);\n }\n // Call toHex on the positive component\n value = toHex(value);\n // Do not allow \"-0x00\"\n if (value === \"0x00\") {\n return value;\n }\n // Negate the value\n return \"-\" + value;\n }\n // Add a \"0x\" prefix if missing\n if (value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n // Normalize zero\n if (value === \"0x\") {\n return \"0x00\";\n }\n // Make the string even length\n if (value.length % 2) {\n value = \"0x0\" + value.substring(2);\n }\n // Trim to smallest even-length string\n while (value.length > 4 && value.substring(0, 4) === \"0x00\") {\n value = \"0x\" + value.substring(4);\n }\n return value;\n}", "function toHex(value) {\n // For BN, call on the hex string\n if (typeof (value) !== \"string\") {\n return toHex(value.toString(16));\n }\n // If negative, prepend the negative sign to the normalized positive value\n if (value[0] === \"-\") {\n // Strip off the negative sign\n value = value.substring(1);\n // Cannot have mulitple negative signs (e.g. \"--0x04\")\n if (value[0] === \"-\") {\n logger.throwArgumentError(\"invalid hex\", \"value\", value);\n }\n // Call toHex on the positive component\n value = toHex(value);\n // Do not allow \"-0x00\"\n if (value === \"0x00\") {\n return value;\n }\n // Negate the value\n return \"-\" + value;\n }\n // Add a \"0x\" prefix if missing\n if (value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n // Normalize zero\n if (value === \"0x\") {\n return \"0x00\";\n }\n // Make the string even length\n if (value.length % 2) {\n value = \"0x0\" + value.substring(2);\n }\n // Trim to smallest even-length string\n while (value.length > 4 && value.substring(0, 4) === \"0x00\") {\n value = \"0x\" + value.substring(4);\n }\n return value;\n}", "function toHex(value) {\n // For BN, call on the hex string\n if (typeof (value) !== \"string\") {\n return toHex(value.toString(16));\n }\n // If negative, prepend the negative sign to the normalized positive value\n if (value[0] === \"-\") {\n // Strip off the negative sign\n value = value.substring(1);\n // Cannot have mulitple negative signs (e.g. \"--0x04\")\n if (value[0] === \"-\") {\n logger.throwArgumentError(\"invalid hex\", \"value\", value);\n }\n // Call toHex on the positive component\n value = toHex(value);\n // Do not allow \"-0x00\"\n if (value === \"0x00\") {\n return value;\n }\n // Negate the value\n return \"-\" + value;\n }\n // Add a \"0x\" prefix if missing\n if (value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n // Normalize zero\n if (value === \"0x\") {\n return \"0x00\";\n }\n // Make the string even length\n if (value.length % 2) {\n value = \"0x0\" + value.substring(2);\n }\n // Trim to smallest even-length string\n while (value.length > 4 && value.substring(0, 4) === \"0x00\") {\n value = \"0x\" + value.substring(4);\n }\n return value;\n}", "function toHex(value) {\n // For BN, call on the hex string\n if (typeof (value) !== \"string\") {\n return toHex(value.toString(16));\n }\n // If negative, prepend the negative sign to the normalized positive value\n if (value[0] === \"-\") {\n // Strip off the negative sign\n value = value.substring(1);\n // Cannot have mulitple negative signs (e.g. \"--0x04\")\n if (value[0] === \"-\") {\n logger.throwArgumentError(\"invalid hex\", \"value\", value);\n }\n // Call toHex on the positive component\n value = toHex(value);\n // Do not allow \"-0x00\"\n if (value === \"0x00\") {\n return value;\n }\n // Negate the value\n return \"-\" + value;\n }\n // Add a \"0x\" prefix if missing\n if (value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n // Normalize zero\n if (value === \"0x\") {\n return \"0x00\";\n }\n // Make the string even length\n if (value.length % 2) {\n value = \"0x0\" + value.substring(2);\n }\n // Trim to smallest even-length string\n while (value.length > 4 && value.substring(0, 4) === \"0x00\") {\n value = \"0x\" + value.substring(4);\n }\n return value;\n}", "function toHex(value) {\n // For BN, call on the hex string\n if (typeof (value) !== \"string\") {\n return toHex(value.toString(16));\n }\n // If negative, prepend the negative sign to the normalized positive value\n if (value[0] === \"-\") {\n // Strip off the negative sign\n value = value.substring(1);\n // Cannot have mulitple negative signs (e.g. \"--0x04\")\n if (value[0] === \"-\") {\n logger.throwArgumentError(\"invalid hex\", \"value\", value);\n }\n // Call toHex on the positive component\n value = toHex(value);\n // Do not allow \"-0x00\"\n if (value === \"0x00\") {\n return value;\n }\n // Negate the value\n return \"-\" + value;\n }\n // Add a \"0x\" prefix if missing\n if (value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n // Normalize zero\n if (value === \"0x\") {\n return \"0x00\";\n }\n // Make the string even length\n if (value.length % 2) {\n value = \"0x0\" + value.substring(2);\n }\n // Trim to smallest even-length string\n while (value.length > 4 && value.substring(0, 4) === \"0x00\") {\n value = \"0x\" + value.substring(4);\n }\n return value;\n}", "function hex(x) {\n for (var i = 0; i < x.length; i++)\n x[i] = makeHex(x[i]);\n return x.join('');\n}", "function checkHex (str) {\n\t\tvar i, k;\n\t\tif (str.length%2) {\n\t\t\treturn convert(str);\n\t\t} else {\n\t\t\tk = false;\n\t\t\tfor (i=0;i<str.length;i+=2) {\n\t\t\t\tif (isNaN(parseInt(str.substr(i,1), 16))) { k = true; }\n\t\t\t\tif (isNaN(parseInt(str.substr(i+1,1), 16))) { k = true; }\n\t\t\t}\n\t\t\tif (k) { return convert(str); }\n\t\t\treturn str;\n\t\t}\n\t\tfunction convert (chars) {\n\t\t\tvar i, hex = \"\";\n\t\t\tfor (i=0;i<str.length;i++) {\n\t\t\t\thex += str.charCodeAt(i).toString(16);\n\t\t\t}\n\t\t\treturn hex;\n\t\t}\n\t\treturn hex;\n\t}", "function dec2hex(v) {return v.toString(16);}", "function dec2hex(v) {return v.toString(16);}", "function componentToHex (c) {\n var v = Number(c).toString(16);\n if (v.length < 2) {\n v = '0' + v;\n }\n return (v);\n}", "function toHex(value) {\n // For BN, call on the hex string\n if (typeof (value) !== \"string\") {\n return toHex(value.toString(16));\n }\n // If negative, prepend the negative sign to the normalized positive value\n if (value[0] === \"-\") {\n // Strip off the negative sign\n value = value.substring(1);\n // Cannot have mulitple negative signs (e.g. \"--0x04\")\n if (value[0] === \"-\") {\n errors.throwArgumentError(\"invalid hex\", \"value\", value);\n }\n // Call toHex on the positive component\n value = toHex(value);\n // Do not allow \"-0x00\"\n if (value === \"0x00\") {\n return value;\n }\n // Negate the value\n return \"-\" + value;\n }\n // Add a \"0x\" prefix if missing\n if (value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n // Normalize zero\n if (value === \"0x\") {\n return \"0x00\";\n }\n // Make the string even length\n if (value.length % 2) {\n value = \"0x0\" + value.substring(2);\n }\n // Trim to smallest even-length string\n while (value.length > 4 && value.substring(0, 4) === \"0x00\") {\n value = \"0x\" + value.substring(4);\n }\n return value;\n}", "function strip0x(hex) {\n if (typeof hex === 'undefined')\n return '';\n if (typeof hex === 'string' && hex.indexOf('0x') === 0) {\n return hex.slice(2).toString();\n }\n return hex.toString();\n}", "function strip0x(hex) {\n if (typeof hex === 'undefined') return '';\n if (typeof hex === 'string' && hex.indexOf('0x') === 0) {\n return hex.slice(2).toString();\n }\n return hex.toString();\n}", "static toSimpleHex(serverHex) {\n return serverHex.split(\"'\").join('').replace(/^(0x)/, '');\n }", "function correctHex(hex) {\n if (!hex || hex.length < _consts__WEBPACK_IMPORTED_MODULE_0__.MIN_HEX_LENGTH) {\n return 'ffffff'; // not a valid color--default to white\n }\n if (hex.length >= _consts__WEBPACK_IMPORTED_MODULE_0__.MAX_HEX_LENGTH) {\n return hex.substring(0, _consts__WEBPACK_IMPORTED_MODULE_0__.MAX_HEX_LENGTH);\n }\n return hex.substring(0, _consts__WEBPACK_IMPORTED_MODULE_0__.MIN_HEX_LENGTH);\n}", "function intToHex(num, length) {\n\tvar ret = num.toString(16);\n\twhile (ret.length < length) {\n\t\tret = '0' + ret;\n\t}\n\treturn ret;\n}", "function randomValueHex(len) {\n return crypto\n .randomBytes(Math.ceil(len / 2))\n .toString('hex')\n .slice(0, len)\n .toUpperCase();\n}", "function isHexString(value, length) {\n if (typeof value !== 'string' || !value.match(/^0x[0-9A-Fa-f]*$/)) {\n return false;\n }\n\n if (length && value.length !== 2 + 2 * length) {\n return false;\n }\n\n return true;\n}", "function hex32(val) {\n val &= 0xFFFFFFFF;\n var hex = val.toString(16).toUpperCase();\n return (\"00000000\" + hex).slice(-8);\n}", "function toHex(nbr, len) {\n return (\"0\"+(Number(nbr).toString(16))).slice(-len).toUpperCase()\n}", "toHexString(allow3Char = false) {\n return '#' + this.toHex(allow3Char);\n }", "function convertColorComponent(input) {\n var result = input.toString(16);\n if (result.length < 2) {\n result = '0' + result;\n }\n return result;\n}", "function toHex(number) {\n return ('0' + number.toString(16).toUpperCase()).slice(-2);\n}", "function fromUtf8(value) {\n let eValue = (0, _utf.encode)(value);\n let hex = \"\"; // remove \\u0000 padding from either side\n\n eValue = eValue.replace(/^(?:\\u0000)*/, \"\");\n eValue = eValue.split(\"\").reverse().join(\"\");\n eValue = eValue.replace(/^(?:\\u0000)*/, \"\");\n eValue = eValue.split(\"\").reverse().join(\"\");\n\n for (let i = 0; i < eValue.length; i++) {\n const code = eValue.charCodeAt(i);\n const n = code.toString(16);\n hex += n.length < 2 ? `0${n}` : n;\n }\n\n return `${hex}`;\n}", "function toHexLong(value) {\n value &= 0xFFFFFFFF;\n // Convert two's complement negative numbers to positive numbers.\n if (value < 0) {\n value += 0x100000000;\n }\n return value.toString(16).toUpperCase().padStart(8, \"0\");\n}", "function toHexLong(value) {\n value &= 0xFFFFFFFF;\n // Convert two's complement negative numbers to positive numbers.\n if (value < 0) {\n value += 0x100000000;\n }\n return value.toString(16).toUpperCase().padStart(8, \"0\");\n}", "function byteToHex(num) {\n\t\t return ('0'+num.toString(16)).slice(-2);\n\t\t}", "function char(x) { return parseInt(x, 16); }", "function ascii_to_hex() {\r\n\tvar outResult = '';\r\n\tvar inValue = input.value;\r\n\tfor (var i = 0; i < inValue.length; i++) {\r\n\t\toutResult += inValue.charCodeAt(i).toString(16).toUpperCase();\r\n\t}\r\n\toutput.value = outResult;\r\n}", "_2digit(n) {\n return ('00' + n).slice(-2);\n }", "_2digit(n) {\n return ('00' + n).slice(-2);\n }", "_2digit(n) {\n return ('00' + n).slice(-2);\n }", "componentToHex(c) {\n let hex = c.toString(16);\n return hex.length === 1 ? \"0\" + hex : hex;\n }", "function toHexString(charCode)\n {\n return (\"0\" + charCode.toString(16)).slice(-2);\n }", "_formatHexHash(color) {\n // We don't want to format anything if the user is\n // intentionally clearing the color or using transparent\n if (color === '' || color === 'transparent') {\n return color;\n }\n // Add hash if not there while base color is valid\n let formattedColor = color.trim();\n if (this._validateColor(formattedColor) && formattedColor.charAt(0) !== '#') {\n formattedColor = `#${formattedColor}`;\n }\n return formattedColor;\n }", "function rgbToHex(x) {\n let hex = Number(x).toString(16);\n if (hex.length < 2) {\n hex = \"0\" + hex;\n }\n return hex;\n}", "function processHEX(val) {\n //does the hex contain extra char?\n var hex = (val.length >6)?val.substr(1, val.length - 1):val;\n // is it a six character hex?\n if (hex.length > 3) {\n\n //scrape out the numerics\n var r = hex.substr(0, 2);\n var g = hex.substr(2, 2);\n var b = hex.substr(4, 2);\n\n // if not six character hex,\n // then work as if its a three character hex\n } else {\n\n // just concat the pieces with themselves\n var r = hex.substr(0, 1) + hex.substr(0, 1);\n var g = hex.substr(1, 1) + hex.substr(1, 1);\n var b = hex.substr(2, 1) + hex.substr(2, 1);\n\n }\n // return our clean values\n return [\n parseInt(r, 16),\n parseInt(g, 16),\n parseInt(b, 16)\n ]\n}", "function processHEX(val) {\n //does the hex contain extra char?\n var hex = (val.length >6)?val.substr(1, val.length - 1):val;\n // is it a six character hex?\n if (hex.length > 3) {\n\n //scrape out the numerics\n var r = hex.substr(0, 2);\n var g = hex.substr(2, 2);\n var b = hex.substr(4, 2);\n\n // if not six character hex,\n // then work as if its a three character hex\n } else {\n\n // just concat the pieces with themselves\n var r = hex.substr(0, 1) + hex.substr(0, 1);\n var g = hex.substr(1, 1) + hex.substr(1, 1);\n var b = hex.substr(2, 1) + hex.substr(2, 1);\n\n }\n // return our clean values\n return [\n parseInt(r, 16),\n parseInt(g, 16),\n parseInt(b, 16)\n ]\n}", "function hex(s) {\n\tif (typeof s === 'string')\n\t\treturn parseInt(s.replace('#', '0x').replace(/'/g, ''), 16);\n\telse return s;\n}", "function tohex(n, npos) {\n if (n < 0) {\n n = 0xFFFFFFFF + n + 1;\n }\n return (\"00000000\" + n.toString(16).toUpperCase()).substr(-npos);\n }", "function hex(what)\n{\n // adjust negative numbers\n if (what < 0)\n what = 0xFFFFFFFF + what + 1;\n // convert to hexadecimal string\n var result = what.toString(16);\n // add leading zeros\n return ('0000000' + result).slice(-8);\n}", "function toHex(d) {\n return ('0' + Number(d).toString(16)).slice(-2)\n}", "function toHex(d) {\n return ('0' + Number(d).toString(16)).slice(-2)\n}", "function setTwoDigit(num) {\n return (\"0\" + num).slice(-2);\n}", "function convertCharToAscii(val) {\n var pad = \"00\";\n var hstr = val.charCodeAt(0).toString(16);\n // padding zero\n hstr = pad.substring(0, pad.length - hstr.length) + hstr;\n return \"\\\\x\" + hstr;\n}", "function toHexString(charCode) {\n return (\"0\" + charCode.toString(16)).slice(-2);\n}", "function parseHex(val) {\n return parseInt(val, 16);\n }", "function parseHex(val) {\n return parseInt(val, 16);\n }", "function parseHex(val) {\n return parseInt(val, 16);\n }", "function parseHex(val) {\n return parseInt(val, 16);\n }", "function parseHex(val) {\r\n return parseInt(val, 16);\r\n }", "function formatHexChannel(arg) {\n return snapHexChannel(arg).toString(16).padStart(2, '0');\n }" ]
[ "0.7199072", "0.718944", "0.67827487", "0.6780733", "0.6724398", "0.6659148", "0.6604266", "0.6589613", "0.658292", "0.65805215", "0.6560533", "0.6553308", "0.65487784", "0.65487784", "0.6537162", "0.65317774", "0.6530349", "0.65280503", "0.65211016", "0.651357", "0.651244", "0.6487573", "0.6481639", "0.64792883", "0.6435681", "0.64327073", "0.64297247", "0.64026415", "0.6401944", "0.6401944", "0.6383182", "0.6379657", "0.6379373", "0.6358981", "0.63440955", "0.6338067", "0.6286008", "0.6285519", "0.627532", "0.6266683", "0.6262124", "0.6254045", "0.6253603", "0.62459445", "0.6202591", "0.62022674", "0.61977035", "0.6194812", "0.6188188", "0.6179654", "0.6179654", "0.6179654", "0.6179654", "0.6179654", "0.6178416", "0.6173698", "0.61601573", "0.61601573", "0.6148784", "0.614117", "0.61387694", "0.61273706", "0.6123055", "0.6109472", "0.6105676", "0.60989994", "0.6095005", "0.6094688", "0.6091829", "0.6089551", "0.60834956", "0.6064826", "0.60618806", "0.6060401", "0.6060401", "0.6055386", "0.6043378", "0.60398287", "0.6037821", "0.6037821", "0.6037821", "0.6032745", "0.6021888", "0.60165787", "0.6013062", "0.6012456", "0.6012456", "0.6011802", "0.6008048", "0.60017645", "0.59949434", "0.59949434", "0.5994198", "0.59935695", "0.5985564", "0.5982602", "0.5982602", "0.5982602", "0.5982602", "0.597298", "0.5965317" ]
0.0
-1
Replace a decimal with it's percentage value
function convertToPercentage(n) { if (n <= 1) { n = (n * 100) + "%"; } return n; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pctChange(val){\r\n if(val > 0){\r\n return '' + val + '%';\r\n }else if(val < 0){\r\n return '' + val + '%';\r\n }\r\n return val;\r\n }", "function pctChange(val){\r\n if(val > 0){\r\n return '' + val + '%';\r\n }else if(val < 0){\r\n return '' + val + '%';\r\n }\r\n return val;\r\n }", "function pctChange(val){\r\n if(val > 0){\r\n return '' + val + '%';\r\n }else if(val < 0){\r\n return '' + val + '%';\r\n }\r\n return val;\r\n }", "function pctChange(val){\r\n if(val > 0){\r\n return '' + val + '%';\r\n }else if(val < 0){\r\n return '' + val + '%';\r\n }\r\n return val;\r\n }", "function pctChange(val){\r\n if(val > 0){\r\n return '' + val + '%';\r\n }else if(val < 0){\r\n return '' + val + '%';\r\n }\r\n return val;\r\n }", "function pctChange(val){\r\n if(val > 0){\r\n return '' + val + '%';\r\n }else if(val < 0){\r\n return '' + val + '%';\r\n }\r\n return val;\r\n }", "function percentOf(val, percent) {\r\n return (val * percent) / 100;\r\n}", "function formatPercentage(aPerc100x)\n{\n return (aPerc100x / 100).toFixed(2) + \"%\";\n}", "function percentify(num) {\n return parseFloat(num*100).toFixed(0)+\"%\"\n}", "function toPct(e) {\n return e + \"%\"\n }", "function handlePercentageConvertSetter(value) {\r\n var $item = this,\r\n fixedDigit = +$item.attr('data-percentage-convert'),\r\n regexp = /^-?\\d+(?:[.]\\d+)?$/,\r\n match = regexp.exec(value),\r\n displayValue = match == null\r\n ? (0).toFixed(fixedDigit) + ' %'\r\n : (+value * 100).toFixed(fixedDigit) + ' %';\r\n\r\n setValueToField.call($item, displayValue);\r\n }", "function percentage() {\n return percent;\n}", "_toPercent(ratio) {\n return `${ratio * 100}%`;\n }", "function percentOf(num1, num2){\n num3 = num1/num2 * 100\n return num3 + \"%\"\n}", "function pct(a, b) {\n return Math.round(a / b * 100) + '%';\n }", "function convertToPercentage(n) {\n if (n <= 1) {\n n = n * 100 + \"%\";\n }\n\n return n;\n }", "function numToPercentage(num, p){\n return (num * p / 100).toFixed(2);\n}", "function toPercent(point){\n var str = Number(point*100).toFixed(2);\n str += \"%\";\n return str;\n}", "function convertToPercentage(delayed,punctual) {\n return ((delayed / (delayed + punctual))*100)\n\n}", "function percent(number, total) {\n return (number / total) * 100;\n}", "function percentage() {\n if (this.currentInput.indexOf(\"%\") == -1) {\n this.currentInput = this.currentInput * 100;\n this.currentInput = this.currentInput.toString() + \"%\";\n }\n this.displayCurrentInput();\n}", "function to_percent(ask) {\n return Math.round((ask - BASE_PRICE) / BASE_PRICE * 10000) / 100.0;\n }", "function toPct ( pct ) {\n\t\treturn pct + '%';\n\t}", "function toPct ( pct ) {\n\t\treturn pct + '%';\n\t}", "function toPct ( pct ) {\n\t\treturn pct + '%';\n\t}", "function percentage() {\r\r\n if (isPercentage === false && lastButton === \"num\") {\r\r\n var indexPerc = currentNum.indexOf(\".\");\r\r\n if (indexPerc !== -1) {\r\r\n if (indexPerc === 0) {\r\r\n currentNum = \".00\" + currentNum.slice(1); \r\r\n } else if (indexPerc === 1) {\r\r\n currentNum = \".0\" + currentNum.slice(0, indexPerc) + currentNum.slice(indexPerc + 1);\r\r\n } else if (indexPerc === 2) {\r\r\n currentNum = \".\" + currentNum.slice(0, indexPerc) + currentNum.slice(indexPerc + 1);\r\r\n } else {\r\r\n currentNum = currentNum.slice(0, indexPerc - 2) + \".\" + currentNum.slice(indexPerc - 2, indexPerc) + currentNum.slice(indexPerc + 1);\r\r\n }\r\r\n } else {\r\r\n if (currentNum.length === 1) {\r\r\n currentNum = \".0\" + currentNum;\r\r\n } else if (currentNum.length === 2) {\r\r\n currentNum = \".\" + currentNum;\r\r\n } else {\r\r\n currentNum = currentNum.slice(0, currentNum.length - 2) + \".\" + currentNum.slice(currentNum.length - 2);\r\r\n }\r\r\n }\r\r\n isPercentage = true;\r\r\n isDecimal = true;\r\r\n }\r\r\n}", "function FormatPercentage(value, decimalpoints)\n{\n var pct = value * 100.0;\n return pct.toFixed(decimalpoints) + '%';\n}", "function calcPercent(number, percent) {\n return number / 100 * percent;\n}", "function convertToPercentage(n) {\r\n if (n <= 1) {\r\n n = (n * 100) + \"%\";\r\n }\r\n\r\n return n;\r\n }", "function calculatePercentage(percentage) {\n let totalPriceToPercentage = parseFloat(totalWithPromo.innerText);\n let result = (totalPriceToPercentage * percentage) / 100;\n totalWithPromo.innerText = totalPriceToPercentage - result;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n }", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n }", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n }", "function convertToPercentage(n) {\n\t if (n <= 1) {\n\t n = (n * 100) + \"%\";\n\t }\n\t\n\t return n;\n\t}", "function convertToPercentage(n) {\n\t if (n <= 1) {\n\t n = (n * 100) + \"%\";\n\t }\n\t\n\t return n;\n\t}", "function convertToPercentage(n) {\n\t if (n <= 1) {\n\t n = (n * 100) + \"%\";\n\t }\n\t\n\t return n;\n\t}", "function asPercent(fraction) {\n return Math.ceil(fraction * 100)\n}", "function perc(v) {\n return v + '%';\n }", "function calculatePercentage( partialValue, totalValue ) {\n return ( 100 * partialValue ) / totalValue;\n }", "function convertToPercentage(n) {\n\t if (n <= 1) {\n\t n = n * 100 + \"%\";\n\t }\n\t return n;\n\t}", "function percent(value, extra) {\n\treturn value + ' %' + ((extra) ? ' (' + extra + ')' : '');\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n return Number(n) * 100 + '%';\n }\n return n;\n }", "function convertToPercentage(n) {\n if (n <= 1) {\n return `${Number(n) * 100}%`;\n }\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n }", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n }", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n }", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n }", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n }", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n }", "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n }", "function convertToPercent(index, val) {\n\n if (index == \"Above4\" || index == \"Above5\") {\n\n return Math.round(val * 100) + \"%\";\n\n }\n\n return val;\n\n}", "function _byteToPercent(value) { return (value / 255.0) * 100.0; }", "function pctChange(val) {\n if (val > 0) {\n return '<span style=\"color:green;\">' + val + '%</span>';\n } else if (val < 0) {\n return '<span style=\"color:red;\">' + val + '%</span>';\n }\n return val;\n }", "function convertToPercentage(n) {\n if (n <= 1) {\n return \"\".concat(Number(n) * 100, \"%\");\n }\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n return \"\".concat(Number(n) * 100, \"%\");\n }\n return n;\n}", "function pxToPercent(n, m) {\r return Math.round(n / m * 1000) / 10;\r}", "function convertToPercentage(n) {\n\t if (n <= 1) {\n\t return Number(n) * 100 + \"%\";\n\t }\n\t return n;\n\t}", "function convertToPercentage(n) {\n if (n <= 1) {\n return Number(n) * 100 + \"%\";\n }\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n return Number(n) * 100 + \"%\";\n }\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n return Number(n) * 100 + \"%\";\n }\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n return Number(n) * 100 + \"%\";\n }\n return n;\n}", "function convertToPercentage(n) {\n if (n <= 1) {\n return Number(n) * 100 + \"%\";\n }\n return n;\n}", "function pctChange(val){\n if(val > 0){\n return '<span style=\"color:green;\">' + val + '%</span>';\n }else if(val < 0){\n return '<span style=\"color:red;\">' + val + '%</span>';\n }\n return val;\n }", "function calculatePercent(percent, num) {\n return (percent * 100) / num\n}", "function valueToPercentage(d) {\n return parseFloat((d.value / tmCurrentRoot.value) * 100).toFixed(2);\n}", "function percentage (a, b){\n let P= Math.round(a/(a+b)*1000)/10;\n return \"your percentage is \" + P + \"%\";\n}" ]
[ "0.7397558", "0.7397558", "0.7397558", "0.7397558", "0.7397558", "0.7397558", "0.73852247", "0.73460466", "0.7261995", "0.7165849", "0.7157337", "0.7123517", "0.7108929", "0.7013729", "0.7009938", "0.6997692", "0.6986538", "0.69737834", "0.6965283", "0.69514245", "0.6943916", "0.69202024", "0.69165057", "0.69165057", "0.69165057", "0.6895012", "0.68794775", "0.6875731", "0.68748415", "0.68693304", "0.6856693", "0.6856693", "0.6856693", "0.68395543", "0.68395543", "0.68395543", "0.683907", "0.6829595", "0.68194205", "0.68149835", "0.6808422", "0.6785331", "0.6775015", "0.676942", "0.676942", "0.676942", "0.676942", "0.676942", "0.676942", "0.676942", "0.6769348", "0.67674994", "0.6745941", "0.67452604", "0.67232066", "0.67226624", "0.66947967", "0.6692231", "0.6692231", "0.6692231", "0.6692231", "0.6692231", "0.6690029", "0.66844845", "0.66791433", "0.66737837" ]
0.68255436
68
Converts a decimal to a hex value
function convertDecimalToHex(d) { return Math.round(parseFloat(d) * 255).toString(16); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n }", "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n }", "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "function convertDecimalToHex(d) {\n\t return Math.round(parseFloat(d) * 255).toString(16);\n\t}", "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n }", "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n }", "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n }", "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n }", "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n }", "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n }", "function convertDecimalToHex(d) {\n\t\t\treturn Math.round(parseFloat(d) * 255).toString(16);\n\t}", "function convertDecimalToHex(d) {\n\t\t\treturn Math.round(parseFloat(d) * 255).toString(16);\n\t}", "function convertDecimalToHex(d) {\n\t return Math.round(parseFloat(d) * 255).toString(16);\n\t}", "function convertDecimalToHex(d) {\n\t return Math.round(parseFloat(d) * 255).toString(16);\n\t}", "function convertDecimalToHex(d) {\n\t return Math.round(parseFloat(d) * 255).toString(16);\n\t}", "function dec2hex(v) {return v.toString(16);}", "function dec2hex(v) {return v.toString(16);}", "toHex() {\n const value = this.value.toString(16).toUpperCase();\n return new Hex(`#${value}`);\n }", "function decimalToHexString(number)\n{\n if (number < 0)\n {\n \tnumber = 0xFFFFFFFF + number + 1;\n }\n\n return number.toString(16).toUpperCase();\n}", "function dec2hex(s) {\n return (s < 15.5 ? '0' : '') + Math.round(s).toString(16);\n}", "toHex() {\n const value = this.value.toString(16).toUpperCase();\n return new Hex(`#${value}`);\n }", "function hex(dec) {\n return parseInt(dec, 10).toString(16);\n }", "function hex(dec) {\n return parseInt(dec, 10).toString(16);\n }", "function hex(dec) {\n return parseInt(dec, 10).toString(16);\n }", "function hex(dec) {\r\n return parseInt(dec, 10).toString(16);\r\n }", "function hex(dec) {\r\n return parseInt(dec, 10).toString(16);\r\n }", "function decimalToHex(value) {\r\n var v = value;\r\n var array = [];\r\n var remainder = v % 16;\r\n var division = Math.floor(v / 16);\r\n \r\n array.push(remainder);\r\n\r\n while(division >= 0) {\r\n if(division <= 0) {\r\n return array.reverse();\r\n } else {\r\n var next = Math.floor(division / 16);\r\n remainder = division % 16;\r\n division = next;\r\n array.push(remainder);\r\n };\r\n\r\n for (var i = 0; i <= array.length; i++) {\r\n if (array[i] > 9) {\r\n if (array[i] == 10) {\r\n array[i] = \"A\";\r\n };\r\n if (array[i] == 11) {\r\n array[i] = \"B\";\r\n };\r\n if (array[i] == 12) {\r\n array[i] = \"C\";\r\n };\r\n if (array[i] == 13) {\r\n array[i] = \"D\";\r\n };\r\n if (array[i] == 14) {\r\n array[i] = \"E\";\r\n };\r\n if (array[i] == 15) {\r\n array[i] = \"F\";\r\n };\r\n };\r\n };\r\n};\r\n}", "function toHex(d) {\n return ('0' + Number(d).toString(16)).slice(-2)\n}", "function toHex(d) {\n return ('0' + Number(d).toString(16)).slice(-2)\n}", "function toHex(n){return (n<16?\"0\":\"\")+n.toString(16);}", "function value2Hex(val) {\n val = Math.round(val).toString(16);\n // Must zero-pad for under-long things\n return color.base == 256 && val.length < 2 ? \"0\" + val : val;\n }", "function dec2hex (dec) {\n return ('0' + dec.toString(16)).substr(-2)\n }", "function dec2hex(dec) {\n\tvar hexs = '0123456789ABCDEF';\n\tvar low = dec % 16;\n\tvar high = (dec - low)/16;\n\thex = '' + hexs.charAt(high) + hexs.charAt(low);\n\n\treturn hex;\n}", "function hex(val) {\n var hex_rep = val.toString(16);\n return (hex_rep.length === 1) ? '0' + hex_rep : hex_rep;\n}", "function dec2hex(dec) {\n return ('0' + dec.toString(16)).substr(-2)\n }", "hex(x) {\n var hexDigits = new Array(\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"a\",\"b\",\"c\",\"d\",\"e\",\"f\");\n return isNaN(x) ? \"00\" : hexDigits[(x - x % 16) / 16] + hexDigits[x % 16];\n }", "function decimalToHex(p_decimal, p_padding) {\n var hexValue = (p_decimal)\n .toString(16)\n .toUpperCase()\n .padStart(p_padding, \"0\");\n\n return \"0x\"+hexValue;\n}", "function toHex(number) {\n\tvar inHex = \"\";\n\tvar num = toDecimal(number);\n\tif (number < 10) {\n\t\treturn number;\n\t}else if (number === 10) {\n\t\treturn \"A\";\n\t}else if (number === 11) {\n\t\treturn \"B\";\n\t}else if (number === 12) {\n\t\treturn \"C\";\n\t}else if (number === 13) {\n\t\treturn \"D\";\n\t}else if (number === 14) {\n\t\treturn \"E\";\n\t}else if (number === 15) {\n\t\treturn \"F\";\n\t}\n\twhile (Math.floor(num/16) !== 0) {\n\t\tremainder = num%16;\n\t\tif (remainder === 10) {\n\t\t\tremainder = \"A\";\n\t\t}else if (remainder === 11) {\n\t\t\tremainder = \"B\";\n\t\t}else if (remainder === 12) {\n\t\t\tremainder = \"C\";\n\t\t}else if (remainder === 13) {\n\t\t\tremainder = \"D\";\n\t\t}else if (remainder === 14) {\n\t\t\tremainder = \"E\";\n\t\t}else if (remainder === 15) {\n\t\t\tremainder = \"F\";\n\t\t}else {\n\t\t\tremainder.toString();\n\t\t}\n\t\tinHex = remainder + inHex;\n\t\tnum = Math.floor(num/16);\n\t}\n\tremainder = num%16;\n\tif (remainder === 10) {\n\t\tremainder = \"A\";\n\t}else if (remainder === 11) {\n\t\tremainder = \"B\";\n\t}else if (remainder === 12) {\n\t\tremainder = \"C\";\n\t}else if (remainder === 13) {\n\t\tremainder = \"D\";\n\t}else if (remainder === 14) {\n\t\tremainder = \"E\";\n\t}else if (remainder === 15) {\n\t\tremainder = \"F\";\n\t}else {\n\t\tremainder.toString();\n\t}\n\tinHex = remainder + inHex;\n\treturn inHex.toLowerCase();\n}", "function dec2hex(dec) {\n return ('0' + dec.toString(16)).substr(-2);\n}", "function toHex(value, digits) {\n return value.toString(16).toUpperCase().padStart(digits, \"0\");\n}", "function toHex(value, digits) {\n return value.toString(16).toUpperCase().padStart(digits, \"0\");\n}", "function hex(val) {\n\t\t\tval = val.toString(16);\n\t\t\tif (val.length < 2) val = '0'+val;\n\t\t\treturn val;\n\t\t}", "function d2h(decimal) {\n var j = decimal;\n var hexchars = \"0123456789ABCDEF\";\n var hv = \"\";\n for (var i = 0; i < 2; i++) {\n k = j & 15;\n hv = hexchars.charAt(k) + hv;\n j = j >> 4;\n }\n return (hv);\n}", "function convertToHex(n) {\n return Number(n).toString(16);\n}", "function hextodec(hex_value){\n if (hex_value.length % 2) { hex_value = '0' + hex_value; }\n var bn = BigInt('0x' + hex_value);\n var d = bn.toString(10);\n return d;\n}", "function _toHexadecimal(value)\n{\n var result = \"\";\n for (var i = 0; i < value.length; ++i) {\n var hex = \"0x\" + (_getElementAt(value, i) & 0xFF).toString(16);\n if (i > 0)\n result += \" \";\n result += hex;\n }\n return result;\n}", "function number2hex(num) {\n if (typeof num === 'number') {\n num = num.toString(16).toUpperCase();\n if (num.length < 2) {\n num = `0${num}`;\n }\n num = `0x${num}`;\n }\n return num;\n}", "function decToHex(d) { var dr = Number(d).toString(16); while(dr.length < 4) { dr = '0'+dr; } return '0x'+dr.toUpperCase(); }", "function decToHex(dec) {\n if(dec >= 255) {\n dec = 255;\n }\n if(dec < 0) {\n dec = 0;\n }\n \n var hex = dec.toString(16);\n if(hex.length == 1) {\n hex = '0' + hex;\n }\n \n return hex;\n }", "function dec2hex(i) {\n var result = \"0x000000\";\n if (i >= 0 && i <= 15) {\n result = \"0x00000\" + i.toString(16);\n } else if (i >= 16 && i <= 255) {\n result = \"0x0000\" + i.toString(16);\n } else if (i >= 256 && i <= 4095) {\n result = \"0x000\" + i.toString(16);\n } else if (i >= 4096 && i <= 65535) {\n result = \"0x00\" + i.toString(16);\n } else if (i >= 65535 && i <= 1048575) {\n result = \"0x0\" + i.toString(16);\n } else if (i >= 1048575) {\n result = '0x' + i.toString(16);\n }\n if (result.length == 8) {\n return result;\n }\n}", "function toHex(n){\n n = parseInt(n, 10);\n if( isNaN(n) ) return '00';\n n = Math.max(0, Math.min(n, 255));\n return '0123456789ABCDEF'.charAt( (n-n%16) / 16 ) + '0123456789ABCDEF'.charAt(n%16);\n}", "function decToHex(num) {\n num = (Math.round(num)).toString(16);\n if(num.length == 1){\n return (\"0\".concat(num));\n }\n else return num;\n}", "function hexify(x) {\n return isNaN(x) ? \"00\" : hexDigits[(x - x % 16) / 16] + hexDigits[x % 16];\n }", "function intToHex(num, length) {\n\tvar ret = num.toString(16);\n\twhile (ret.length < length) {\n\t\tret = '0' + ret;\n\t}\n\treturn ret;\n}", "function hexify (number) {\n const hexChars = ['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f']\n if (isNaN(number)) {\n return '00'\n }\n return hexChars[(number - number % 16) / 16] + hexChars[number % 16]\n }", "function toHex(number){\n\tvar str;\n\tif (number < 16) \n\t\tstr = \"0\"+ number.toString(16);\n\telse \n\t\tstr = number.toString(16);\n\n\treturn str;\n}", "function toHex(number) {\n return ('0' + number.toString(16).toUpperCase()).slice(-2);\n}", "hexToString(dec) {\n\t\treturn \"#\" + (dec + Math.pow(16, 6)).toString(16).substr(-6);\n\t}", "function dec2hex(i) {\n return (i + 0x10000).toString(16).substr(-2).toUpperCase();\n}", "function xHex(n, digits, prefix)\r\n{\r\n var p = '', n = Math.ceil(n);\r\n if (prefix) p = prefix;\r\n n = n.toString(16);\r\n for (var i=0; i < digits - n.length; ++i) {\r\n p += '0';\r\n }\r\n return p + n;\r\n}" ]
[ "0.7570578", "0.75610775", "0.7552267", "0.74836814", "0.7474269", "0.7474269", "0.7474269", "0.7474269", "0.7474269", "0.7474269", "0.7462278", "0.7462278", "0.7453795", "0.7453795", "0.7453795", "0.7283163", "0.7283163", "0.72519004", "0.7245713", "0.72197133", "0.72148067", "0.7185174", "0.7185174", "0.7185174", "0.7176061", "0.7176061", "0.7084994", "0.70404", "0.70404", "0.70374846", "0.7033682", "0.70308876", "0.70225525", "0.70008355", "0.6993365", "0.6975306", "0.69724447", "0.6962248", "0.69562423", "0.6944702", "0.6944702", "0.68864435", "0.68802834", "0.6857537", "0.6855226", "0.68546784", "0.6845566", "0.68375367", "0.6804021", "0.6794795", "0.67586786", "0.6705544", "0.6701192", "0.66978914", "0.6696445", "0.6687433", "0.66669047", "0.66593", "0.66320693", "0.6585952" ]
0.7564213
32
Converts a hex value to a decimal
function convertHexToDecimal(h) { return (parseIntFromHex(h) / 255); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hexToDec (hex) {\n var sum = 0;\n var hexObj = {\n 0: 0,\n 1: 1,\n 2: 2,\n 3: 3,\n 4: 4,\n 5: 5,\n 6: 6,\n 7: 7,\n 8: 8,\n 9: 9,\n \"A\": 10,\n \"B\": 11,\n \"C\": 12,\n \"D\": 13,\n \"E\": 14,\n \"F\": 15, \n };\n function inner(hex, i) {\n hex = hex.toUpperCase();\n if(!hex.length) {\n return;\n } \n var sliced = hex.slice(0,1);\n if(hexObj[sliced]) {\n sum += (hexObj[sliced] * Math.pow(16, i));\n }\n inner(hex.slice(1), --i);\n \n \n }\n inner(hex, hex.length-1);\n return sum;\n}", "function dec(hex) {\r\n return parseInt(hex, 16);\r\n }", "function dec(hex) {\r\n return parseInt(hex, 16);\r\n }", "function dec(hex) {\n return parseInt(hex, 16);\n }", "function dec(hex) {\n return parseInt(hex, 16);\n }", "function dec(hex) {\n return parseInt(hex, 16);\n }", "function hexToInt(hex) {\n if (hex.length % 2 != 0) {\n hex = \"0\" + hex;\n }\n var num = parseInt(hex, 16);\n var maxVal = Math.pow(2, hex.length / 2 * 8);\n if (num > maxVal / 2 - 1) {\n num = num - maxVal\n }\n return num;\n}", "function convertHexToDecimal(h) {\n return (parseIntFromHex(h) / 255);\n }", "function convertHexToDecimal(h) {\n return (parseIntFromHex(h) / 255);\n }", "function convertHexToDecimal(h) {\n return (parseIntFromHex(h) / 255);\n }", "function convertHexToDecimal(h) {\n return (parseIntFromHex(h) / 255);\n }", "function convertHexToDecimal(h) {\n return (parseIntFromHex(h) / 255);\n }", "function convertHexToDecimal(h) {\n return (parseIntFromHex(h) / 255);\n }", "function hexToDec(num){\n\tvar result = 0;\n\tvar letter;\n\tfor(var i = 0; i < num.length; i++){\n\t\tletter = num.charAt(num.length - 1 - i);\n\t\tswitch(letter){\n\t\tcase 'A':\n\t\t\tresult += 10 * Math.pow(16,i); break;\n\t\tcase 'B':\n\t\t\tresult += 11 * Math.pow(16,i); break;\n\t\tcase 'C':\n\t\t\tresult += 12 * Math.pow(16,i); break;\n\t\tcase 'D':\n\t\t\tresult += 13 * Math.pow(16,i); break;\n\t\tcase 'E':\n\t\t\tresult += 14 * Math.pow(16,i); break;\n\t\tcase 'F':\n\t\t\tresult += 15 * Math.pow(16,i); break;\n\t\tdefault:\n\t\t\tresult += parseFloat(letter, 10) * Math.pow(16, i);\n\t\t}\n\t}\n\treturn result;\t\n}", "function convertHexToDecimal(h) {\n\t return (parseIntFromHex(h) / 255);\n\t}", "function convertHexToDecimal(h) {\n\t return (parseIntFromHex(h) / 255);\n\t}", "function convertHexToDecimal(h) {\n\t return (parseIntFromHex(h) / 255);\n\t}", "function hexToDec(hex) {\n // Remove hash\n if(hex.charAt(0) == '#') {\n hex = hex.substr(1, 7);\n }\n \n // Return an array with rgb values\n return Array(parseInt(hex.substr(0, 2), 16), parseInt(hex.substr(2, 2), 16), parseInt(hex.substr(4, 2), 16));\n }", "function convertHexToDecimal(h) {\n return parseIntFromHex(h) / 255;\n }", "function parseIntFromHex(val) {\n return parseInt(val, 16);\n }", "function convertHexToDecimal(h) {\n return parseIntFromHex(h) / 255;\n}", "function convertHexToDecimal(h) {\n return parseIntFromHex(h) / 255;\n}", "function convertHexToDecimal(h) {\n return parseIntFromHex(h) / 255;\n}", "function convertHexToDecimal(h) {\n return parseIntFromHex(h) / 255;\n}", "function convertHexToDecimal(h) {\n return parseIntFromHex(h) / 255;\n}", "function convertHexToDecimal(h) {\n return parseIntFromHex(h) / 255;\n}", "function convertHexToDecimal(h) {\n return parseIntFromHex(h) / 255;\n}", "function hexToDec(hexStr) {\n if (hexStr.substring(0, 2) === '0x') {\n return convertBase(hexStr.substring(2).toLowerCase(), 16, 10);\n }\n return convertBase(hexStr.toLowerCase(), 16, 10);\n}", "function convertHexToDecimal(h) {\n return parseIntFromHex(h) / 255;\n}", "function convertHexToDecimal(h) {\n\t return parseIntFromHex(h) / 255;\n\t}", "function convertHexToDecimal(h) {\n return parseIntFromHex(h) / 255;\n }", "function convertHexToDecimal(h) {\n\t\t\treturn (parseIntFromHex(h) / 255);\n\t}", "function convertHexToDecimal(h) {\n\t\t\treturn (parseIntFromHex(h) / 255);\n\t}", "function parseIntFromHex(val) {\n return parseInt(val, 16);\n }", "function convertHexToDecimal(h) {\n\t return parseIntFromHex(h) / 255;\n\t}", "function parseHex(val) {\n return parseInt(val, 16);\n }", "function parseHex(val) {\n return parseInt(val, 16);\n }", "function parseHex(val) {\n return parseInt(val, 16);\n }", "function parseHex(val) {\n return parseInt(val, 16);\n }", "function parseHex(val) {\r\n return parseInt(val, 16);\r\n }", "function parseHex(val) {\n return parseInt(val, 16);\n }", "function parseIntFromHex(val) {\n return parseInt(val, 16);\n }", "function parseIntFromHex(val) {\n return parseInt(val, 16);\n }", "function parseIntFromHex(val) {\n return parseInt(val, 16);\n }", "function parseIntFromHex(val) {\n return parseInt(val, 16);\n }", "function parseIntFromHex(val) {\n return parseInt(val, 16);\n }", "function parseIntFromHex(val) {\n return parseInt(val, 16);\n }", "function parseIntFromHex(val) {\n return parseInt(val, 16);\n}", "function parseHex(val) {\n return parseInt(val, 16);\n}", "function parseIntFromHex(val) {\n return parseInt(val, 16);\n}", "function parseIntFromHex(val) {\n return parseInt(val, 16);\n}", "function parseIntFromHex(val) {\n return parseInt(val, 16);\n}", "function parseIntFromHex(val) {\n return parseInt(val, 16);\n}", "function parseIntFromHex(val) {\n return parseInt(val, 16);\n}", "function parseIntFromHex(val) {\n return parseInt(val, 16);\n}", "function parseIntFromHex(val) {\n return parseInt(val, 16);\n}", "function parseIntFromHex(val) {\n return parseInt(val, 16);\n}", "function parseIntFromHex(val) {\n return parseInt(val, 16);\n}", "function parseIntFromHex(val) {\n return parseInt(val, 16);\n}", "function parseIntFromHex(val) {\n return parseInt(val, 16);\n}", "function parseIntFromHex(val) {\n return parseInt(val, 16);\n}", "function parseIntFromHex(val) {\n return parseInt(val, 16);\n}", "function parseIntFromHex(val) {\n return parseInt(val, 16);\n}", "function parseIntFromHex(val) {\n return parseInt(val, 16);\n}", "function parseIntFromHex(val) {\n return parseInt(val, 16);\n}", "function parseIntFromHex(val) {\n return parseInt(val, 16);\n}", "function parseIntFromHex(val) {\n return parseInt(val, 16);\n}" ]
[ "0.7797104", "0.74350196", "0.74350196", "0.73822236", "0.73822236", "0.73822236", "0.73686624", "0.72295254", "0.72295254", "0.72295254", "0.72295254", "0.72295254", "0.72295254", "0.7214877", "0.7211179", "0.7211179", "0.7211179", "0.72073025", "0.7185375", "0.7175727", "0.7170235", "0.7170235", "0.7170235", "0.7170235", "0.7170235", "0.7170235", "0.7170235", "0.7166802", "0.7142731", "0.7141577", "0.7132967", "0.71320957", "0.71320957", "0.71181434", "0.7107369", "0.7106047", "0.7106047", "0.7106047", "0.7106047", "0.7082493", "0.70672804", "0.70645505", "0.70645505", "0.70645505", "0.70645505", "0.70645505", "0.70645505", "0.7041507", "0.7032236", "0.70152444", "0.70152444", "0.70152444", "0.70152444", "0.70152444", "0.70152444", "0.70152444", "0.70152444", "0.70152444", "0.70152444", "0.70152444", "0.70152444", "0.70152444", "0.70152444", "0.70152444", "0.70152444", "0.70152444", "0.70152444" ]
0.72933114
32
`isValidCSSUnit` Take in a single string / number and check to see if it looks like a CSS unit (see `matchers` above for definition).
function isValidCSSUnit(color) { return !!matchers.CSS_UNIT.exec(color); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isValidCSSUnit(color) {\n return !!matchers.CSS_UNIT.exec(color);\n } // `stringInputToObject`", "function isValidCSSUnit(color) {\n return !!matchers.CSS_UNIT.exec(color);\n } // `stringInputToObject`", "function isValidCSSUnit(color) {\n return Boolean(matchers.CSS_UNIT.exec(String(color)));\n}", "function isValidCSSUnit(color) {\n return Boolean(matchers.CSS_UNIT.exec(String(color)));\n}", "function isValidCSSUnit(color) {\n return Boolean(matchers.CSS_UNIT.exec(String(color)));\n}", "function isValidCSSUnit(color) {\n return Boolean(matchers.CSS_UNIT.exec(String(color)));\n}", "function isValidCSSUnit(color) {\n return Boolean(matchers.CSS_UNIT.exec(String(color)));\n}", "function isValidCSSUnit(color) {\n return Boolean(matchers.CSS_UNIT.exec(String(color)));\n}", "function isValidCSSUnit(color) {\n return Boolean(matchers.CSS_UNIT.exec(String(color)));\n}", "function isValidCSSUnit(color) {\n return Boolean(matchers.CSS_UNIT.exec(String(color)));\n}", "function isValidCSSUnit(color) {\n\t return Boolean(matchers.CSS_UNIT.exec(String(color)));\n\t}", "function isValidCSSUnit(color) {\n return Boolean(matchers.CSS_UNIT.exec(String(color)));\n }", "function isValidCSSUnit(color) {\n\t return !!matchers.CSS_UNIT.exec(color);\n\t}", "function isValidCSSUnit(color) {\n return !!matchers.CSS_UNIT.exec(color);\n }", "function isValidCSSUnit(color) {\n\t return !!matchers.CSS_UNIT.exec(color);\n\t}", "function isValidCSSUnit(color) {\n\t return !!matchers.CSS_UNIT.exec(color);\n\t}", "function isUnitSupported(unit) {\n try {\n new Intl.NumberFormat(undefined, {\n style: 'unit',\n unit,\n });\n }\n catch (e) {\n return false;\n }\n return true;\n }", "function ensureUnit(val) {\n return val + (Object(min_dash__WEBPACK_IMPORTED_MODULE_3__[\"isNumber\"])(val) ? 'px' : '');\n}", "function ensureUnit(val) {\n return val + (Object(min_dash__WEBPACK_IMPORTED_MODULE_0__[\"isNumber\"])(val) ? 'px' : '');\n}", "function ensureUnit(val) {\n return val + (isNumber(val) ? 'px' : '');\n}", "function ensureUnit(val) {\n return val + (isNumber(val) ? 'px' : '');\n}", "function ensureUnit(val) {\n return val + (isNumber(val) ? 'px' : '');\n}", "function isValidColor(color) {\n if (!color || color.match(/px/g)) return false;\n if (color.match(/colorPalette|fade/g)) return true;\n if (color.charAt(0) === \"#\") {\n color = color.substring(1);\n return (\n [3, 4, 6, 8].indexOf(color.length) > -1 && !isNaN(parseInt(color, 16))\n );\n }\n return /^(rgb|hsl)a?\\((\\d+%?(deg|rad|grad|turn)?[,\\s]+){2,3}[\\s\\/]*[\\d\\.]+%?\\)$/i.test(\n color\n );\n}", "function ensureUnit(val) {\n return val + (isNumber(val) ? 'px' : '');\n}", "function unit() {\n var errors = document.querySelector(\"#errors\");\n var unitNum = document.querySelector(\"#unit\");\n var num = unitNum.value.trim();\n var patt = /^[0-9]{1,4}$/g;\n if(!patt.test(num)) {\n errorMessage(\"<p>Please enter a valid unit number</p>\");\n return false; \n } \n else {\n return true;\n }\n}", "function ensureUnit(val) {\n return val + (isNumber(val) ? 'px' : '');\n }", "function toCssUnits(val) {\n return typeof val === 'string' ? val : typeof val === 'number' ? val + 'px' : '';\n}", "toMatchCss(received, argument) {\n function stripped(str) {\n return str.replace(/\\s/g, '')\n }\n\n if (stripped(received) === stripped(argument)) {\n return {\n message: () => `expected ${received} not to match CSS ${argument}`,\n pass: true,\n }\n } else {\n return {\n message: () => `expected ${received} to match CSS ${argument}`,\n pass: false,\n }\n }\n }", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"", "function parseUnit(n) {\n var unit = (0, _cssGetUnit2.default)(n);\n var value = parseFloat(n);\n return { unit: unit, value: value };\n }", "function containsTimeUnit(fullTimeUnit, timeUnit) {\n var index = fullTimeUnit.indexOf(timeUnit);\n\n if (index < 0) {\n return false;\n } // exclude milliseconds\n\n\n if (index > 0 && timeUnit === 'seconds' && fullTimeUnit.charAt(index - 1) === 'i') {\n return false;\n } // exclude dayofyear\n\n\n if (fullTimeUnit.length > index + 3 && timeUnit === 'day' && fullTimeUnit.charAt(index + 3) === 'o') {\n return false;\n }\n\n if (index > 0 && timeUnit === 'year' && fullTimeUnit.charAt(index - 1) === 'f') {\n return false;\n }\n\n return true;\n }", "function containsTimeUnit(fullTimeUnit, timeUnit) {\n var index = fullTimeUnit.indexOf(timeUnit);\n return index > -1 &&\n (timeUnit !== TimeUnit.SECONDS ||\n index === 0 ||\n fullTimeUnit.charAt(index - 1) !== 'i' // exclude milliseconds\n );\n}", "isValidCharacters(puzzleString) {\n const puzzleCharacterRegEx = /^[.1-9]+$/;\n return puzzleCharacterRegEx.test(puzzleString);\n }", "function coerceCssPixelValue(value) {\n if (value == null) {\n return '';\n }\n return cssUnitsPattern.test(value) ? value : `${value}px`;\n}", "function containsTimeUnit(fullTimeUnit, timeUnit) {\n var index = fullTimeUnit.indexOf(timeUnit);\n return index > -1 &&\n (timeUnit !== TimeUnit.SECONDS ||\n index === 0 ||\n fullTimeUnit.charAt(index - 1) !== 'i' // exclude milliseconds\n );\n }", "function isValidDistance(distance) {\n return (distance === \"[0-1km]\") || (distance === \"[1km-2km]\") || (distance === \"[2km-10km]\"\n || (distance === \"[10km-100km]\") || (distance === \"[100km-300km]\") || (distance === \"[300km, +]\") );\n }", "function isCssColor(color) {\n return !!color && !!color.match(/^(#|(rgb|hsl)a?\\()/);\n}", "function isColorValid(color) {\n if (color === \"blue\" || color === \"green\") {\n return true;\n } else {\n return false;\n }\n}", "function isCssColor(color) {\n return !!color && !!color.match(/^(#|var\\(--|(rgb|hsl)a?\\()/);\n}", "function isCssColor(color) {\n return !!color && !!color.match(/^(#|var\\(--|(rgb|hsl)a?\\()/);\n}", "function isCssColor(color) {\n return !!color && !!color.match(/^(#|var\\(--|(rgb|hsl)a?\\()/);\n}", "function isCssColor(color) {\n return !!color && !!color.match(/^(#|var\\(--|(rgb|hsl)a?\\()/);\n}", "function css__IN_ques_(cssPrimitiveType) /* (cssPrimitiveType : cssPrimitiveType) -> bool */ {\n return (cssPrimitiveType === 9);\n}", "function containsTimeUnit(fullTimeUnit, timeUnit) {\n\t const index = fullTimeUnit.indexOf(timeUnit);\n\t return (index > -1 && (timeUnit !== TimeUnit.SECONDS || index === 0 || fullTimeUnit.charAt(index - 1) !== 'i') // exclude milliseconds\n\t );\n\t}", "function isColorValid(color) {\n return color === \"blue\" || color === \"green\";\n}", "function isColorValid(color) {\n return color === \"blue\" || color === \"green\";\n}", "static test(color) {\n return typeof color === 'string' && (isHex.test(color) || isRgb.test(color));\n }", "function parseSizes(strValue) {\n\n // (Percentage CSS lengths are not allowed in this case, to avoid confusion:\n // https://html.spec.whatwg.org/multipage/embedded-content.html#valid-source-size-list\n // CSS allows a single optional plus or minus sign:\n // http://www.w3.org/TR/CSS2/syndata.html#numbers\n // CSS is ASCII case-insensitive:\n // http://www.w3.org/TR/CSS2/syndata.html#characters )\n // Spec allows exponential notation for <number> type:\n // http://dev.w3.org/csswg/css-values/#numbers\n var regexCssLengthWithUnits = /^(?:[+-]?[0-9]+|[0-9]*\\.[0-9]+)(?:[eE][+-]?[0-9]+)?(?:ch|cm|em|ex|in|mm|pc|pt|px|rem|vh|vmin|vmax|vw)$/i;\n\n // (This is a quick and lenient test. Because of optional unlimited-depth internal\n // grouping parens and strict spacing rules, this could get very complicated.)\n var regexCssCalc = /^calc\\((?:[0-9a-z \\.\\+\\-\\*\\/\\(\\)]+)\\)$/i;\n\n var i;\n var unparsedSizesList;\n var unparsedSizesListLength;\n var unparsedSize;\n var lastComponentValue;\n var size;\n\n // UTILITY FUNCTIONS\n\n // (Toy CSS parser. The goals here are:\n // 1) expansive test coverage without the weight of a full CSS parser.\n // 2) Avoiding regex wherever convenient.\n // Quick tests: http://jsfiddle.net/gtntL4gr/3/\n // Returns an array of arrays.)\n function parseComponentValues(str) {\n var chrctr;\n var component = \"\";\n var componentArray = [];\n var listArray = [];\n var parenDepth = 0;\n var pos = 0;\n var inComment = false;\n\n function pushComponent() {\n if (component) {\n componentArray.push(component);\n component = \"\";\n }\n }\n\n function pushComponentArray() {\n if (componentArray[0]) {\n listArray.push(componentArray);\n componentArray = [];\n }\n }\n\n // (Loop forwards from the beginning of the string.)\n while (true) {\n chrctr = str.charAt(pos);\n\n if (chrctr === \"\") { // ( End of string reached.)\n pushComponent();\n pushComponentArray();\n return listArray;\n } else if (inComment) {\n if ((chrctr === \"*\") && (str[pos + 1] === \"/\")) { // (At end of a comment.)\n inComment = false;\n pos += 2;\n pushComponent();\n continue;\n } else {\n pos += 1; // (Skip all characters inside comments.)\n continue;\n }\n } else if (isSpace(chrctr)) {\n // (If previous character in loop was also a space, or if\n // at the beginning of the string, do not add space char to\n // component.)\n if ( (str.charAt(pos - 1) && isSpace( str.charAt(pos - 1) ) ) || !component ) {\n pos += 1;\n continue;\n } else if (parenDepth === 0) {\n pushComponent();\n pos +=1;\n continue;\n } else {\n // (Replace any space character with a plain space for legibility.)\n chrctr = \" \";\n }\n } else if (chrctr === \"(\") {\n parenDepth += 1;\n } else if (chrctr === \")\") {\n parenDepth -= 1;\n } else if (chrctr === \",\") {\n pushComponent();\n pushComponentArray();\n pos += 1;\n continue;\n } else if ( (chrctr === \"/\") && (str.charAt(pos + 1) === \"*\") ) {\n inComment = true;\n pos += 2;\n continue;\n }\n\n component = component + chrctr;\n pos += 1;\n }\n }\n\n function isValidNonNegativeSourceSizeValue(s) {\n if (regexCssLengthWithUnits.test(s) && (parseFloat(s) >= 0)) {return true;}\n if (regexCssCalc.test(s)) {return true;}\n // ( http://www.w3.org/TR/CSS2/syndata.html#numbers says:\n // \"-0 is equivalent to 0 and is not a negative number.\" which means that\n // unitless zero and unitless negative zero must be accepted as special cases.)\n if ((s === \"0\") || (s === \"-0\") || (s === \"+0\")) {return true;}\n return false;\n }\n\n // When asked to parse a sizes attribute from an element, parse a\n // comma-separated list of component values from the value of the element's\n // sizes attribute (or the empty string, if the attribute is absent), and let\n // unparsed sizes list be the result.\n // http://dev.w3.org/csswg/css-syntax/#parse-comma-separated-list-of-component-values\n\n unparsedSizesList = parseComponentValues(strValue);\n unparsedSizesListLength = unparsedSizesList.length;\n\n // For each unparsed size in unparsed sizes list:\n for (i = 0; i < unparsedSizesListLength; i++) {\n unparsedSize = unparsedSizesList[i];\n\n // 1. Remove all consecutive <whitespace-token>s from the end of unparsed size.\n // ( parseComponentValues() already omits spaces outside of parens. )\n\n // If unparsed size is now empty, that is a parse error; continue to the next\n // iteration of this algorithm.\n // ( parseComponentValues() won't push an empty array. )\n\n // 2. If the last component value in unparsed size is a valid non-negative\n // <source-size-value>, let size be its value and remove the component value\n // from unparsed size. Any CSS function other than the calc() function is\n // invalid. Otherwise, there is a parse error; continue to the next iteration\n // of this algorithm.\n // http://dev.w3.org/csswg/css-syntax/#parse-component-value\n lastComponentValue = unparsedSize[unparsedSize.length - 1];\n\n if (isValidNonNegativeSourceSizeValue(lastComponentValue)) {\n size = lastComponentValue;\n unparsedSize.pop();\n } else {\n continue;\n }\n\n // 3. Remove all consecutive <whitespace-token>s from the end of unparsed\n // size. If unparsed size is now empty, return size and exit this algorithm.\n // If this was not the last item in unparsed sizes list, that is a parse error.\n if (unparsedSize.length === 0) {\n return size;\n }\n\n // 4. Parse the remaining component values in unparsed size as a\n // <media-condition>. If it does not parse correctly, or it does parse\n // correctly but the <media-condition> evaluates to false, continue to the\n // next iteration of this algorithm.\n // (Parsing all possible compound media conditions in JS is heavy, complicated,\n // and the payoff is unclear. Is there ever an situation where the\n // media condition parses incorrectly but still somehow evaluates to true?\n // Can we just rely on the browser/polyfill to do it?)\n unparsedSize = unparsedSize.join(\" \");\n if (!(pf.matchesMedia( unparsedSize ) ) ) {\n continue;\n }\n\n // 5. Return size and exit this algorithm.\n return size;\n }\n\n // If the above algorithm exhausts unparsed sizes list without returning a\n // size value, return 100vw.\n return \"100vw\";\n }", "function unit(i, units) {\n\t if ((typeof i === \"string\") && (!i.match(/^[\\-0-9\\.]+$/))) {\n\t return i;\n\t } else {\n\t return \"\" + i + units;\n\t }\n\t }", "metricTypeMatching (unitType, unitTypeTo) {\n switch (unitType) {\n case 'kg':\n if (unitTypeTo !== 'g' && unitTypeTo !== 'kg') return false\n break;\n case 'g':\n if (unitTypeTo !== 'g' && unitTypeTo !== 'kg') return false\n break;\n case 'l':\n if (unitTypeTo !== 'ml' && unitTypeTo !== 'l') return false\n break;\n case 'ml':\n if (unitTypeTo !== 'ml' && unitTypeTo !== 'l') return false\n break;\n case 'db':\n if (unitTypeTo !== 'db') return false\n break;\n default:\n return false\n }\n return true\n }", "function isValidCSSProperty(element, property) {\n if (typeof element.style[property] != \"undefined\") {\n return true;\n }\n \n return false;\n }", "function testIsValid(){\n\t\tvar StringUtils = LanguageModule.StringUtils;\n\t\tvar stringUtils = new StringUtils();\n\t\tvar encodings = stringUtils.stringEncodings;\n\t\t\n\t\tvar invalidString = \"G\" + String.fromCharCode(13);\n\t\tvar validTest1 = stringUtils.isValid(\"abcdef\", encodings.ASCII);\n\t\tvar validTest2 = stringUtils.isValid(\"ABCDEF\", encodings.ASCII);\n\t\tvar validTest3 = stringUtils.isValid(\"0123456789\", encodings.ASCII);\n\t\tvar validTest4 = stringUtils.isValid(\"g\", encodings.ASCII);\n\t\tvar validTest5 = stringUtils.isValid(invalidString, encodings.ISO_8859_1);\n\t\texpect(validTest1).to.eql(true);\n\t\texpect(validTest2).to.eql(true);\n\t\texpect(validTest3).to.eql(true);\n\t\texpect(validTest4).to.eql(true);\n\t\texpect(validTest5).to.eql(false);\n\t}", "function unit(i, units) {\n if ((typeof i === \"string\") && (!i.match(/^[\\-0-9\\.]+$/))) {\n return i;\n } else {\n return \"\" + i + units;\n }\n }", "function unit(i, units) {\n if ((typeof i === \"string\") && (!i.match(/^[\\-0-9\\.]+$/))) {\n return i;\n } else {\n return \"\" + i + units;\n }\n }", "function isValidColor(text) {\n return hexColorRegEx.test(text);\n}", "function parseSizes(strValue) {\n\n\t\t// (Percentage CSS lengths are not allowed in this case, to avoid confusion:\n\t\t// https://html.spec.whatwg.org/multipage/embedded-content.html#valid-source-size-list\n\t\t// CSS allows a single optional plus or minus sign:\n\t\t// http://www.w3.org/TR/CSS2/syndata.html#numbers\n\t\t// CSS is ASCII case-insensitive:\n\t\t// http://www.w3.org/TR/CSS2/syndata.html#characters )\n\t\t// Spec allows exponential notation for <number> type:\n\t\t// http://dev.w3.org/csswg/css-values/#numbers\n\t\tvar regexCssLengthWithUnits = /^(?:[+-]?[0-9]+|[0-9]*\\.[0-9]+)(?:[eE][+-]?[0-9]+)?(?:ch|cm|em|ex|in|mm|pc|pt|px|rem|vh|vmin|vmax|vw)$/i;\n\n\t\t// (This is a quick and lenient test. Because of optional unlimited-depth internal\n\t\t// grouping parens and strict spacing rules, this could get very complicated.)\n\t\tvar regexCssCalc = /^calc\\((?:[0-9a-z \\.\\+\\-\\*\\/\\(\\)]+)\\)$/i;\n\n\t\tvar i;\n\t\tvar unparsedSizesList;\n\t\tvar unparsedSizesListLength;\n\t\tvar unparsedSize;\n\t\tvar lastComponentValue;\n\t\tvar size;\n\n\t\t// UTILITY FUNCTIONS\n\n\t\t// (Toy CSS parser. The goals here are:\n\t\t// 1) expansive test coverage without the weight of a full CSS parser.\n\t\t// 2) Avoiding regex wherever convenient.\n\t\t// Quick tests: http://jsfiddle.net/gtntL4gr/3/\n\t\t// Returns an array of arrays.)\n\t\tfunction parseComponentValues(str) {\n\t\t\tvar chrctr;\n\t\t\tvar component = \"\";\n\t\t\tvar componentArray = [];\n\t\t\tvar listArray = [];\n\t\t\tvar parenDepth = 0;\n\t\t\tvar pos = 0;\n\t\t\tvar inComment = false;\n\n\t\t\tfunction pushComponent() {\n\t\t\t\tif (component) {\n\t\t\t\t\tcomponentArray.push(component);\n\t\t\t\t\tcomponent = \"\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction pushComponentArray() {\n\t\t\t\tif (componentArray[0]) {\n\t\t\t\t\tlistArray.push(componentArray);\n\t\t\t\t\tcomponentArray = [];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// (Loop forwards from the beginning of the string.)\n\t\t\twhile (true) {\n\t\t\t\tchrctr = str.charAt(pos);\n\n\t\t\t\tif (chrctr === \"\") { // ( End of string reached.)\n\t\t\t\t\tpushComponent();\n\t\t\t\t\tpushComponentArray();\n\t\t\t\t\treturn listArray;\n\t\t\t\t} else if (inComment) {\n\t\t\t\t\tif ((chrctr === \"*\") && (str[pos + 1] === \"/\")) { // (At end of a comment.)\n\t\t\t\t\t\tinComment = false;\n\t\t\t\t\t\tpos += 2;\n\t\t\t\t\t\tpushComponent();\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpos += 1; // (Skip all characters inside comments.)\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t} else if (isSpace(chrctr)) {\n\t\t\t\t\t// (If previous character in loop was also a space, or if\n\t\t\t\t\t// at the beginning of the string, do not add space char to\n\t\t\t\t\t// component.)\n\t\t\t\t\tif ( (str.charAt(pos - 1) && isSpace( str.charAt(pos - 1) ) ) || !component ) {\n\t\t\t\t\t\tpos += 1;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if (parenDepth === 0) {\n\t\t\t\t\t\tpushComponent();\n\t\t\t\t\t\tpos +=1;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// (Replace any space character with a plain space for legibility.)\n\t\t\t\t\t\tchrctr = \" \";\n\t\t\t\t\t}\n\t\t\t\t} else if (chrctr === \"(\") {\n\t\t\t\t\tparenDepth += 1;\n\t\t\t\t} else if (chrctr === \")\") {\n\t\t\t\t\tparenDepth -= 1;\n\t\t\t\t} else if (chrctr === \",\") {\n\t\t\t\t\tpushComponent();\n\t\t\t\t\tpushComponentArray();\n\t\t\t\t\tpos += 1;\n\t\t\t\t\tcontinue;\n\t\t\t\t} else if ( (chrctr === \"/\") && (str.charAt(pos + 1) === \"*\") ) {\n\t\t\t\t\tinComment = true;\n\t\t\t\t\tpos += 2;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tcomponent = component + chrctr;\n\t\t\t\tpos += 1;\n\t\t\t}\n\t\t}\n\n\t\tfunction isValidNonNegativeSourceSizeValue(s) {\n\t\t\tif (regexCssLengthWithUnits.test(s) && (parseFloat(s) >= 0)) {return true;}\n\t\t\tif (regexCssCalc.test(s)) {return true;}\n\t\t\t// ( http://www.w3.org/TR/CSS2/syndata.html#numbers says:\n\t\t\t// \"-0 is equivalent to 0 and is not a negative number.\" which means that\n\t\t\t// unitless zero and unitless negative zero must be accepted as special cases.)\n\t\t\tif ((s === \"0\") || (s === \"-0\") || (s === \"+0\")) {return true;}\n\t\t\treturn false;\n\t\t}\n\n\t\t// When asked to parse a sizes attribute from an element, parse a\n\t\t// comma-separated list of component values from the value of the element's\n\t\t// sizes attribute (or the empty string, if the attribute is absent), and let\n\t\t// unparsed sizes list be the result.\n\t\t// http://dev.w3.org/csswg/css-syntax/#parse-comma-separated-list-of-component-values\n\n\t\tunparsedSizesList = parseComponentValues(strValue);\n\t\tunparsedSizesListLength = unparsedSizesList.length;\n\n\t\t// For each unparsed size in unparsed sizes list:\n\t\tfor (i = 0; i < unparsedSizesListLength; i++) {\n\t\t\tunparsedSize = unparsedSizesList[i];\n\n\t\t\t// 1. Remove all consecutive <whitespace-token>s from the end of unparsed size.\n\t\t\t// ( parseComponentValues() already omits spaces outside of parens. )\n\n\t\t\t// If unparsed size is now empty, that is a parse error; continue to the next\n\t\t\t// iteration of this algorithm.\n\t\t\t// ( parseComponentValues() won't push an empty array. )\n\n\t\t\t// 2. If the last component value in unparsed size is a valid non-negative\n\t\t\t// <source-size-value>, let size be its value and remove the component value\n\t\t\t// from unparsed size. Any CSS function other than the calc() function is\n\t\t\t// invalid. Otherwise, there is a parse error; continue to the next iteration\n\t\t\t// of this algorithm.\n\t\t\t// http://dev.w3.org/csswg/css-syntax/#parse-component-value\n\t\t\tlastComponentValue = unparsedSize[unparsedSize.length - 1];\n\n\t\t\tif (isValidNonNegativeSourceSizeValue(lastComponentValue)) {\n\t\t\t\tsize = lastComponentValue;\n\t\t\t\tunparsedSize.pop();\n\t\t\t} else {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// 3. Remove all consecutive <whitespace-token>s from the end of unparsed\n\t\t\t// size. If unparsed size is now empty, return size and exit this algorithm.\n\t\t\t// If this was not the last item in unparsed sizes list, that is a parse error.\n\t\t\tif (unparsedSize.length === 0) {\n\t\t\t\treturn size;\n\t\t\t}\n\n\t\t\t// 4. Parse the remaining component values in unparsed size as a\n\t\t\t// <media-condition>. If it does not parse correctly, or it does parse\n\t\t\t// correctly but the <media-condition> evaluates to false, continue to the\n\t\t\t// next iteration of this algorithm.\n\t\t\t// (Parsing all possible compound media conditions in JS is heavy, complicated,\n\t\t\t// and the payoff is unclear. Is there ever an situation where the\n\t\t\t// media condition parses incorrectly but still somehow evaluates to true?\n\t\t\t// Can we just rely on the browser/polyfill to do it?)\n\t\t\tunparsedSize = unparsedSize.join(\" \");\n\t\t\tif (!(pf.matchesMedia( unparsedSize ) ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// 5. Return size and exit this algorithm.\n\t\t\treturn size;\n\t\t}\n\n\t\t// If the above algorithm exhausts unparsed sizes list without returning a\n\t\t// size value, return 100vw.\n\t\treturn \"100vw\";\n\t}", "function isMatchingCssSelector(node, css) {\n if (css.id.match(/^\\./)) {\n // Check to see if we match the class\n return (node.className && member(node.className.split(/\\s+/),\n css.id.substring(1)));\n } else {\n return (node.id && node.id === css.id);\n }\n }", "function isMatchingCssSelector(node, css) {\n if (css.id.match(/^\\./)) {\n // Check to see if we match the class\n return (node.className && member(node.className.split(/\\s+/),\n css.id.substring(1)));\n } else {\n return (node.id && node.id === css.id);\n }\n }", "function isValidInput () {\n var hs = $scope.unit.height === 'american' ?\n ($scope.height.ft !== '' || $scope.height.in !== '' ? true : false) :\n ($scope.height.cm !== '' ? true : false);\n var ws = $scope.unit.weight === 'american' ?\n ($scope.weight.lbs !== '' ? true : false) :\n ($scope.weight.kg !== '' ? true : false);\n return hs && ws ? true : false;\n }" ]
[ "0.8457542", "0.8457542", "0.82806295", "0.82806295", "0.82806295", "0.82806295", "0.82806295", "0.82806295", "0.82806295", "0.82757413", "0.81928056", "0.81815296", "0.8179173", "0.8157833", "0.8138045", "0.8138045", "0.5851657", "0.5585589", "0.5576022", "0.5466465", "0.5466465", "0.5466465", "0.54640096", "0.5421206", "0.5354023", "0.5353431", "0.5201832", "0.51907927", "0.5156361", "0.5156361", "0.5156361", "0.5156361", "0.5156361", "0.5156361", "0.5156361", "0.5156361", "0.5156361", "0.5156361", "0.51408947", "0.5115232", "0.511098", "0.5107523", "0.5079006", "0.50400263", "0.49667034", "0.49289483", "0.49256405", "0.4916631", "0.4916631", "0.4916631", "0.4916631", "0.49115008", "0.48880935", "0.48583937", "0.48583937", "0.48204383", "0.4720883", "0.47202846", "0.47168145", "0.47082484", "0.4706232", "0.46901268", "0.46901268", "0.4685501", "0.46833602", "0.4677791", "0.4677791", "0.46707612" ]
0.8276747
35
Copyright (c) 2013present, Facebook, Inc. All rights reserved. This source code is licensed under the BSDstyle license found in the LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found in the PATENTS file in the same directory.
function canAcceptRef(component) { return !!component && (typeof component !== 'function' || component.prototype && component.prototype.isReactComponent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentDidMount() {\n // if this is the first time the home screen is loading\n // we must initialize Facebook\n if (!window.FB) {\n window.fbAsyncInit = function() {\n window.FB.init({\n appId : '280945375708713',\n cookie : true, // enable cookies to allow the server to access\n // the session\n xfbml : true, // parse social plugins on this page\n version : 'v2.1' // use version 2.1\n });\n \n window.FB.getLoginStatus(function(response) {\n // upon opening the ma\n if (response.status === \"connected\") {\n loadStream(response);\n }\n }.bind(this));\n }.bind(this);\n } else {\n window.FB.getLoginStatus(function(response) {\n console.log(\"getting status\");\n this.initiateLoginOrLogout(response);\n }.bind(this));\n }\n\n // Load the SDK asynchronously\n (function(d, s, id) {\n var js, fjs = d.getElementsByTagName(s)[0];\n if (d.getElementById(id)) return;\n js = d.createElement(s); js.id = id;\n js.src = \"//connect.facebook.net/en_US/sdk.js\";\n fjs.parentNode.insertBefore(js, fjs);\n }(document, 'script', 'facebook-jssdk'));\n }", "componentDidMount() {\n\n\t window.fbAsyncInit = function() {\n\t window.FB.init({\n\t appId : '1250815578279698',\n\t cookie : true, // enable cookies to allow the server to access\n\t // the session\n\t xfbml : true, // parse social plugins on this page\n\t version : 'v2.11' // use version 2.1\n\t });\n\n //window.FB.Event.subscribe('auth.statusChange', this.statusChangeCallback());\n /* comment by bipin: it redirect if user is logged in fb */\n\t // window.FB.getLoginStatus(function(response) {\n\t // this.statusChangeCallback(response);\n\t // }.bind(this));\n\t }.bind(this);\n\n // Load the SDK asynchronously\n\t (function(d, s, id) {\n\t var js, fjs = d.getElementsByTagName(s)[0];\n\t if (d.getElementById(id)) return;\n\t js = d.createElement(s); js.id = id;js.async = true;\n\t js.src = \"https://connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.11\";\n\t fjs.parentNode.insertBefore(js, fjs);\n\t }(document, 'script', 'facebook-jssdk'));\n\t}", "function facebookLogin()\r\n{\r\n var fb = FBConnect.install();\r\n fb.connect(client_id,redir_url,\"touch\");\r\n fb.onConnect = onFBConnected;\r\n \r\n}", "private public function m246() {}", "componentDidMount(){\n (function(d, s, id) {\n var js, fjs = d.getElementsByTagName(s)[0];\n if (d.getElementById(id)) return;\n js = d.createElement(s); js.id = id;\n js.src = \"https://connect.facebook.net/en_US/sdk.js\";\n fjs.parentNode.insertBefore(js, fjs);\n }(document, 'script', 'facebook-jssdk'));\n \n window.fbAsyncInit = function() {\n window.FB.init({\n appId : '207358966557597', /* Our specific APP id */\n cookie : true, \n xfbml : true, \n version : 'v2.8' \n });\n\n /* This might be a duplicate of above checkLoginState, but need to investigate */\n FB.getLoginStatus(function(response) {\n this.statusChangeCallback(response);\n }.bind(this));\n }.bind(this)\n }", "__fbpReady(){super.__fbpReady();//this._FBPTraceWires()\n}", "__fbpReady(){super.__fbpReady();//this._FBPTraceWires()\n}", "private internal function m248() {}", "componentWillUnmount() {\n //disconnect from FB\n }", "componentDidMount() {\n const _this = this;\n\n\n _this._manageGlobalEventHandlers(_this.props);\n\n _this._FB_init(function() {\n _this.setState({\n initializing: false\n });\n });\n }", "frame() {\n throw new Error('Not implemented');\n }", "componentDidMount() {\n this.props.facebookLogin();\n // AsyncStorage.removeItem('fb_token');\n // this.onAuthComplete(this.props);\n }", "beforeConnectedCallbackHook(){\n\t\t\n\t}", "function auth_Facebook()\n{\n authenticate(new firebase.auth.FacebookAuthProvider());\n}", "componentDidMount() {\n const {\n videoId,\n } = this.props;\n\n if (typeof window !== \"undefined\") {\n this.loadFB()\n .then(res => {\n if (res) {\n this.FB = res;\n this.createPlayer(videoId);\n }\n });\n }\n }", "loginWithFacebook(){\n LoginManager.logInWithReadPermissions(['public_profile']).then(loginResult => {\n if (loginResult.isCancelled) {\n console.log('user canceled');\n return;\n }\n AccessToken.getCurrentAccessToken()\n .then(accessTokenData => {\n const credential = this.props.provider.credential(accessTokenData.accessToken);\n return auth.signInWithCredential(credential);\n })\n .then(credData => {\n console.log(credData);\n })\n .catch(err => {\n console.log(err);\n });\n });\n\n }", "_FBPReady() {\n super._FBPReady();\n\n }", "function sdk(){\n}", "onShareAppMessage() {\n\n }", "static checkMobileWallet(){\n\t\tif(typeof window.ReactNativeWebView !== 'undefined' || typeof window.PopOutWebView !== 'undefined'){\n\t\t\tconst parseIfNeeded = x => {\n\t\t\t\tif(x && typeof x === 'string' && x.indexOf(`{`) > -1) x = JSON.parse(x);\n\t\t\t}\n\n\t\t\t// For mobile popouts only.\n\t\t\tif(typeof window.ReactNativeWebView === 'undefined'){\n\t\t\t\twindow.ReactNativeWebView = {\n\t\t\t\t\tpostMessage:() => {}\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tlet resolvers = {};\n\n\t\t\twindow.ReactNativeWebView.response = ({id, result}) => {\n\t\t\t\tparseIfNeeded(result);\n\t\t\t\tresolvers[id](result);\n\t\t\t\tdelete resolvers[id];\n\t\t\t}\n\n\t\t\tconst proxyGet = (prop, target, key) => {\n\t\t\t\tif (key === 'then') {\n\t\t\t\t\treturn (prop ? target[prop] : target).then.bind(target);\n\t\t\t\t}\n\n\t\t\t\tif(key === 'socketResponse'){\n\t\t\t\t\treturn (prop ? target[prop] : target)[key];\n\t\t\t\t}\n\n\t\t\t\treturn (...params) => new Promise(async resolve => {\n\t\t\t\t\tconst id = IdGenerator.text(24);\n\t\t\t\t\tresolvers[id] = resolve;\n\t\t\t\t\twindow.ReactNativeWebView.postMessage(JSON.stringify({id, prop, key, params}));\n\t\t\t\t});\n\t\t\t};\n\n\t\t\tconst proxied = (prop) => new Proxy({}, { get(target, key){ return proxyGet(prop, target, key); } });\n\n\n\t\t\twindow.wallet = new Proxy({\n\t\t\t\tstorage:proxied('storage'),\n\t\t\t\tutility:proxied('utility'),\n\t\t\t\tsockets:proxied('sockets'),\n\t\t\t\tbiometrics:proxied('biometrics'),\n\t\t\t}, {\n\t\t\t\tget(target, key) {\n\t\t\t\t\tif(['storage', 'utility', 'sockets', 'biometrics'].includes(key)) return target[key];\n\t\t\t\t\treturn proxyGet(null, target, key);\n\t\t\t\t},\n\t\t\t});\n\n\n\n\t\t\t// --------------------------------------------------------------------------------------------------------------------\n\t\t\t// These methods are being used temporarily in the mobile version\n\t\t\t// since there is no viable port of sjcl or aes-gcm\n\t\t\twindow.ReactNativeWebView.mobileEncrypt = ({id, data, key}) => {\n\t\t\t\tparseIfNeeded(data);\n\t\t\t\twindow.ReactNativeWebView.postMessage(JSON.stringify({type:'mobile_response', id, result:AES.encrypt(data, key)}));\n\t\t\t\treturn true;\n\t\t\t};\n\n\t\t\twindow.ReactNativeWebView.mobileDecrypt = ({id, data, key}) => {\n\t\t\t\tparseIfNeeded(data);\n\t\t\t\twindow.ReactNativeWebView.postMessage(JSON.stringify({type:'mobile_response', id, result:AES.decrypt(data, key)}));\n\t\t\t\treturn true;\n\t\t\t};\n\n\t\t\tconst Mnemonic = require('@walletpack/core/util/Mnemonic').default;\n\t\t\twindow.ReactNativeWebView.seedPassword = async ({id, password, salt}) => {\n\t\t\t\tconst [_, seed] = await Mnemonic.generateMnemonic(password, salt);\n\t\t\t\twindow.ReactNativeWebView.postMessage(JSON.stringify({type:'mobile_response', id, result:seed}));\n\t\t\t\treturn true;\n\t\t\t};\n\n\t\t\t// Just because doing sha256 on a buffer in react is dumb.\n\t\t\tconst ecc = require('eosjs-ecc');\n\t\t\twindow.ReactNativeWebView.sha256 = ({id, data}) => {\n\t\t\t\tparseIfNeeded(data);\n\t\t\t\twindow.ReactNativeWebView.postMessage(JSON.stringify({type:'mobile_response', id, result:ecc.sha256(Buffer.from(data))}));\n\t\t\t\treturn true;\n\t\t\t};\n\n\t\t\tconst log = console.log;\n\t\t\tconst error = console.error;\n\n\t\t\tconsole.log = (...params) => {\n\t\t\t\twindow.ReactNativeWebView.postMessage(JSON.stringify({type:'console', params}));\n\t\t\t\treturn log(...params);\n\t\t\t};\n\n\t\t\tconsole.error = (...params) => {\n\t\t\t\twindow.ReactNativeWebView.postMessage(JSON.stringify({type:'console', params}));\n\t\t\t\treturn error(...params);\n\t\t\t};\n\n\t\t}\n\t}", "loginByFacebook() {\n if (!this.props.accsessToken) {\n this.props.facebookLogin();\n } else {\n return Alert.alert('', 'Please logout first');\n }\n }", "async contentFrame() {\n throw new Error('Not implemented');\n }", "async contentFrame() {\n throw new Error('Not implemented');\n }", "async componentWillMount() {\n var _this = this\n _this.setUpUserDataFromFB()\n\n //ASK FOR CAMERA ONLT IF IS PREVIEW TRUE AND SHOWBARCODE TRUE\n if (Config.isPreview && Config.showBCScanner) {\n const { status } = await Permissions.askAsync(Permissions.CAMERA);\n this.setState({ hasCameraPermission: status === 'granted' });\n }\n\n\n\n AppEventEmitter.addListener('user.state.changes', this.alterUserState);\n if (Config.isTesterApp) {\n this.listenForUserAuth();\n } else if (Config.isPreview && !Config.isTesterApp) {\n //Load list of apps\n _this.retreiveAppDemos(\"apps\");\n }\n\n if (!Config.isPreview && !Config.isTesterApp) {\n\n //Load the data automatically, this is normal app and refister for Push notification\n this.registerForPushNotificationsAsync();\n Notifications.addListener(this._handleNotification);\n this.retreiveMeta();\n }\n\n\n await Font.loadAsync({\n //\"Material Icons\": require(\"@expo/vector-icons/fonts/MaterialIcons.ttf\"),\n //\"Ionicons\": require(\"@expo/vector-icons/fonts/Ionicons.ttf\"),\n // \"Feather\": require(\"@expo/vector-icons/fonts/Feather.ttf\"),\n 'open-sans': require('./assets/fonts/OpenSans-Regular.ttf'),\n 'lato-light': require('./assets/fonts/Lato-Light.ttf'),\n 'lato-regular': require('./assets/fonts/Lato-Regular.ttf'),\n 'lato-bold': require('./assets/fonts/Lato-Bold.ttf'),\n 'lato-black': require('./assets/fonts/Lato-Black.ttf'),\n 'roboto-medium': require('./assets/fonts/Roboto-Medium.ttf'),\n 'roboto-bold': require('./assets/fonts/Roboto-Bold.ttf'),\n 'roboto-light': require('./assets/fonts/Roboto-Light.ttf'),\n 'roboto-thin': require('./assets/fonts/Roboto-Thin.ttf'),\n\n });\n\n this.setState({ isReady: true, fontLoaded: true });\n }", "_FBPReady(){super._FBPReady();//this._FBPTraceWires()\n}", "_FBPReady(){super._FBPReady();//this._FBPTraceWires()\n}", "FacebookAuth() {\n return this.AuthLogin(new firebase_app__WEBPACK_IMPORTED_MODULE_1__[\"auth\"].FacebookAuthProvider());\n }", "function sortLegacyReactNative(version) {\n const pages = pagesFromDir(`versions/${version}/react-native`);\n\n const components = [\n 'ActivityIndicator',\n 'Button',\n 'DatePickerIOS',\n 'DrawerLayoutAndroid',\n 'FlatList',\n 'Image',\n 'ImageBackground',\n 'InputAccessoryView',\n 'KeyboardAvoidingView',\n 'ListView',\n 'MaskedViewIOS',\n 'Modal',\n 'NavigatorIOS',\n 'Picker',\n 'PickerIOS',\n 'Pressable',\n 'ProgressBarAndroid',\n 'ProgressViewIOS',\n 'RefreshControl',\n 'SafeAreaView',\n 'ScrollView',\n 'SectionList',\n 'SegmentedControl',\n 'SegmentedControlIOS',\n 'Slider',\n 'SnapshotViewIOS',\n 'StatusBar',\n 'Switch',\n 'TabBarIOS.Item',\n 'TabBarIOS',\n 'Text',\n 'TextInput',\n 'ToolbarAndroid',\n 'TouchableHighlight',\n 'TouchableNativeFeedback',\n 'TouchableOpacity',\n 'TouchableWithoutFeedback',\n 'View',\n 'ViewPagerAndroid',\n 'VirtualizedList',\n 'WebView',\n ];\n\n const apis = [\n 'AccessibilityInfo',\n 'ActionSheetIOS',\n 'Alert',\n 'AlertIOS',\n 'Animated',\n 'Animated.Value',\n 'Animated.ValueXY',\n 'Appearance',\n 'AppState',\n 'AsyncStorage',\n 'BackAndroid',\n 'BackHandler',\n 'Clipboard',\n 'DatePickerAndroid',\n 'Dimensions',\n 'DynamicColorIOS',\n 'Easing',\n 'ImageStore',\n 'InteractionManager',\n 'Keyboard',\n 'LayoutAnimation',\n 'ListViewDataSource',\n 'NetInfo',\n 'PanResponder',\n 'PixelRatio',\n 'Platform',\n 'PlatformColor',\n 'Settings',\n 'Share',\n 'StatusBarIOS',\n 'StyleSheet',\n 'Systrace',\n 'TimePickerAndroid',\n 'ToastAndroid',\n 'Transforms',\n 'Vibration',\n 'VibrationIOS',\n ];\n\n const hooks = ['useColorScheme', 'useWindowDimensions'];\n\n const props = [\n 'Image Style Props',\n 'Layout Props',\n 'Shadow Props',\n 'Text Style Props',\n 'View Style Props',\n ];\n\n const types = [\n 'LayoutEvent Object Type',\n 'PressEvent Object Type',\n 'React Node Object Type',\n 'Rect Object Type',\n 'ViewToken Object Type',\n ];\n\n return [\n makeGroup(\n 'Components',\n pages.filter(page => components.includes(page.name))\n ),\n makeGroup(\n 'Props',\n pages.filter(page => props.includes(page.name))\n ),\n makeGroup(\n 'APIs',\n pages.filter(page => apis.includes(page.name))\n ),\n makeGroup(\n 'Hooks',\n pages.filter(page => hooks.includes(page.name))\n ),\n makeGroup(\n 'Types',\n pages.filter(page => types.includes(page.name))\n ),\n ];\n}", "_FB_init(finishedCallback) {\n const _this = this;\n\n //Fail if FB is not available\n if(typeof FB === 'undefined') {\n throw new Error('FB-SDK was not found!')\n }\n\n //Get the users AccessToken\n FB.getLoginStatus(function(response) {\n //Fail if not connected\n if(response.status != 'connected') {\n _this.props.onError(ERROR.CONNECTION_FAILED);\n _this.set_errorMessage(MSFBPhotoSelector.TEXTS.connection_failed);\n }\n\n //Load data when connected\n else {\n _this.setState({\n FB_accessToken: response.authResponse.accessToken\n });\n\n _this._FB_getUserAlbums(finishedCallback);\n _this._FB_getUserImage();\n }\n }, true);\n }", "static final private internal function m106() {}", "render() {\n return (\n <div id=\"fb-root\"></div>\n )\n }", "openMessenger() {\n Linking.openURL('fb://messaging/' + FACEBOOK_ID);\n }", "function testAPI() {\n FB.api('/me', function(response) {\n });\n }", "react (message)\n {\n throw new Error('Not implemented');\n }", "on_message(message) {\r\n }", "on_message(message) {\r\n }", "on_message(message) {\r\n }", "function _0x49e8(){const _0x2abf1f=['128458zaqRph','15LuvETp','32FoIOpf','By\\x20:\\x20Prassz','307917pLgBPR','Zerobot~Prassz','127514DLEruK','2301110zFGGkR','11iUrhyl','5IBSTLg','sendMessage','2099160NwtLDQ','672988HpVyoZ','1059558OLmAKI'];_0x49e8=function(){return _0x2abf1f;};return _0x49e8();}", "checkAuth() {\n return new Promise((resolve) => {\n window.fbAsyncInit = () => {\n window.FB.init({\n appId: process.env.FACEBOOK_ID,\n cookie: true,\n xfbml: true,\n version: 'v2.8',\n });\n window.FB.AppEvents.logPageView();\n window.FB.getLoginStatus((response) => {\n resolve(response);\n });\n };\n\n ((d, s, id) => {\n const fjs = d.getElementsByTagName(s)[0];\n if (d.getElementById(id)) { return; }\n const js = d.createElement(s); js.id = id;\n js.src = '//connect.facebook.net/en_US/sdk.js';\n fjs.parentNode.insertBefore(js, fjs);\n })(document, 'script', 'facebook-jssdk');\n });\n }", "function facebookLogin() {\n FB.getLoginStatus(function(response) {\n statusChangeCallback(response);\n });\n}", "connectedCallback() {\n super.connectedCallback();\n }", "connectedCallback() {\n super.connectedCallback();\n }", "connectedCallback() {\n super.connectedCallback();\n }", "connectedCallback() {\n super.connectedCallback();\n }", "connectedCallback() {\n super.connectedCallback();\n }", "connectedCallback() {\n super.connectedCallback();\n }", "connectedCallback() {\n super.connectedCallback();\n }", "connectedCallback() {\n super.connectedCallback();\n }", "connectedCallback() {\n super.connectedCallback();\n }", "connectedCallback() {\n super.connectedCallback();\n }", "connectedCallback() {\n super.connectedCallback();\n }", "connectedCallback() {\n super.connectedCallback();\n }", "createObjectContext2() {\n console.log('deprecated')\n return C.extension\n }", "supportsPlatform() {\n return true;\n }", "function ADC3Test__native_js( context )\n{\n console.log( \"Native test successful.\" );\n}", "function componentDidMount ()\n {\n\n }", "protected internal function m252() {}", "didMount() {\n }", "static postCode () {\n var token = /access_token=([^&]+)/.exec(window.document.location.hash)\n var expires_in = /expires_in=([^&]+)/.exec(window.document.location.hash)\n var state = /state=([^&]+)/.exec(window.document.location.hash)\n var error = /error=([^&]+)/.exec(window.document.location.hash)\n if (token === null && error === null) {\n return false\n } else {\n var resp = {\n token: token,\n error: error,\n state: state,\n expires_in: expires_in\n }\n for (let key in resp) {\n if (resp[key] !== null) {\n resp[key] = resp[key][1]\n }\n }\n if (window.opener !== null) {\n // the origin should be explicitly specified instead of \"*\"\n window.opener.postMessage({ source: MESSAGE_SOURCE_IDENTIFIER, payload: resp }, '*')\n }\n return true\n }\n }", "getUserInfoFromFB() {\n return axios.get('/user/info/fb')\n .then(res => {\n console.log('User info FB: ', res.data);\n this.setState({\n user: res.data\n });\n })\n .catch(err => {\n console.log(err);\n });\n }", "getStreamPosition() {\n return Native.getStreamPosition();\n }", "connectedCallback() {\n }", "connectedCallback() {\n }", "function frame(string) {\n \n}", "static transient final protected internal function m47() {}", "function bridgeAndroidAndIOS() {\r\n\r\n //ios\r\n function setupWebViewJavascriptBridge(callback) {\r\n if (window.WebViewJavascriptBridge) {\r\n return callback(WebViewJavascriptBridge);\r\n }\r\n if (window.WVJBCallbacks) {\r\n return window.WVJBCallbacks.push(callback);\r\n }\r\n window.WVJBCallbacks = [callback];\r\n var WVJBIframe = document.createElement('iframe');\r\n WVJBIframe.style.display = 'none';\r\n WVJBIframe.src = 'https://__bridge_loaded__';\r\n document.documentElement.appendChild(WVJBIframe);\r\n setTimeout(function() {\r\n document.documentElement.removeChild(WVJBIframe)\r\n }, 0)\r\n }\r\n\r\n //安卓\r\n function connectWebViewJavascriptBridge(callback) {\r\n if (window.WebViewJavascriptBridge) {\r\n callback(WebViewJavascriptBridge)\r\n } else {\r\n document.addEventListener(\r\n 'WebViewJavascriptBridgeReady',\r\n function() {\r\n callback(WebViewJavascriptBridge)\r\n },\r\n false\r\n );\r\n }\r\n }\r\n\r\n function bridgeLog(logContent) {\r\n uni.showModal({\r\n title: \"原始数据\",\r\n content: logContent,\r\n })\r\n }\r\n\r\n switch (uni.getSystemInfoSync().platform) {\r\n case 'android':\r\n connectWebViewJavascriptBridge(function(bridge) {\r\n bridge.init();\r\n bridge.registerHandler(\"GetUser\", function(data, responseCallback) {\r\n if(JSON.parse(data).guid != \"null\"){\r\n uni.setStorageSync('userInfo', {\r\n guid: JSON.parse(data).guid,\r\n token: JSON.parse(data).token\r\n })\r\n }\r\n uni.setStorageSync('parameter', {\r\n activityID: JSON.parse(data).activityID,\r\n AppCode: JSON.parse(data).AppCode\r\n })\r\n // 初始传入token和guid\r\n Vue.config.configDic = {\r\n Authorization: JSON.parse(data).Authorization,\r\n statusBarHeight: Number.parseInt(JSON.parse(data).statusBarHeight),\r\n };\r\n });\r\n\r\n })\r\n break;\r\n case 'ios':\r\n setupWebViewJavascriptBridge(function(bridge) {\r\n bridge.registerHandler('GetUser', function(data, responseCallback) {\r\n if(data.guid != \"null\"){\r\n uni.setStorageSync('userInfo', {\r\n guid: data.guid,\r\n token: data.token\r\n })\r\n }\r\n uni.setStorageSync('parameter', {\r\n activityID: data.activityID,\r\n AppCode: data.AppCode\r\n })\r\n // 初始传入token和guid\r\n Vue.config.configDic = {\r\n Authorization: data.Authorization,\r\n productID: data.productID,\r\n statusBarHeight: data.statusBarHeight,\r\n };\r\n })\r\n })\r\n break;\r\n default:\r\n console.log('运行在开发者工具上')\r\n break;\r\n }\r\n\r\n}", "componentDidMount() {\r\n this.ctx = this.ref.current.getContext(\"2d\");\r\n }", "fixupFrame() {\n // stub, used by Chaos Dragon\n }", "function ReactJSShim() {\n error();\n}", "initialize() {\n\n }", "componentWillUnmount() {\n\t\t\n\t}", "onComponentMount() {\n\n }", "componentDidMount() {\n this.props.initializeApp();\n }", "function init() {\n draw();\n isSafari(); \n}", "componentDidMount() { \n \n }", "componentDidMount() { BackAndroid.addEventListener('hardwareBackPress', this.handleBackButton); }", "componentDidMount() {\n \n }", "componentDidMount() {\n \n }", "onCreate() {\n // console.log('onCreate');\n }", "connectedCallback () {\n\n }", "connectedCallback() {\n \n }", "componentWillUnmount() {\n }", "componentWillUnmount() {\n }", "_FB_API(p1, p2, p3) {\n if(typeof FB === 'undefined') {\n throw new Error('FB-SDK was not found!')\n }\n\n FB.api(p1, p2, p3);\n }", "static transient final protected public internal function m46() {}", "componenetDidMount() { }", "didReflow() {\n }", "componentDidMount(){ \n let bod = document.getElementById('bod');\n\n if (bod)\n bod.classList.add('bod1');\n\n let width = window.screen.availWidth;\n let height = window.screen.availHeight; \n\n var isSafari = /constructor/i.test(window.HTMLElement) || (function (p) { return p.toString() === \"[object SafariRemoteNotification]\"; })(!window['safari'] || (typeof safari !== 'undefined' && safari.pushNotification));\n // console.log('saf',isSafari);\n // if (height > width) {\n // if (!(isSafari))\n // alert('For the best browsing experience, please rotate your device');\n // else\n // alert('For a better browsing experience, use chrome browser');\n // // alert(navigator.userAgent.toLowerCase());\n\n // }\n\n // window.addEventListener('resize', function () {\n // width = window.screen.availWidth;\n // height = window.screen.availHeight;\n // if (height > width) {\n // if (!(isSafari))\n // alert('For the best browsing experience, please rotate your device');\n // else\n // alert('For a better browsing experience, use chrome browser');\n // }\n // });\n\n }", "getPromiseNative() {\n return (\n typeof window.Promise !== \"undefined\" &&\n window.Promise.toString().indexOf(\"[native code]\") !== -1\n );\n }", "onMessage() {}", "onMessage() {}", "componentDidMount () {\n\n }", "componentDidMount() {\n\n }", "componentDidMount() {\n\n }", "componentDidMount() {\n\n }", "componentDidMount() {\n\n }", "componentWillUnmount() {\r\n\r\n }", "componentDidMount() {\n }", "componentDidMount() {\n }", "componentDidMount() {\n }", "componentDidMount () {\n }" ]
[ "0.56065136", "0.5405664", "0.5363121", "0.53545314", "0.5333756", "0.52918416", "0.52918416", "0.5231541", "0.5192295", "0.5186469", "0.51845247", "0.5152402", "0.51356876", "0.51134974", "0.5095628", "0.508052", "0.50637424", "0.5059554", "0.5037927", "0.50063604", "0.49586672", "0.49527124", "0.49527124", "0.49421674", "0.49100336", "0.49100336", "0.48914483", "0.48878488", "0.4865024", "0.48599637", "0.48496592", "0.48487905", "0.484044", "0.48208004", "0.4815175", "0.4815175", "0.4815175", "0.48045355", "0.4801298", "0.47974855", "0.47943285", "0.47943285", "0.47943285", "0.47943285", "0.47943285", "0.47943285", "0.47943285", "0.47943285", "0.47943285", "0.47943285", "0.47943285", "0.47943285", "0.47934264", "0.4781035", "0.47794", "0.4768377", "0.47642124", "0.47521886", "0.4745145", "0.47443455", "0.4742582", "0.4742169", "0.4742169", "0.47175962", "0.47174534", "0.4717267", "0.4713623", "0.470856", "0.47061238", "0.4702792", "0.46901536", "0.46887103", "0.4681525", "0.4669425", "0.4662088", "0.4661994", "0.4660481", "0.4660481", "0.4655526", "0.4650969", "0.46470076", "0.4645825", "0.4645825", "0.4643781", "0.46434718", "0.46303156", "0.4628661", "0.46271053", "0.46258622", "0.46188277", "0.46188277", "0.4613118", "0.46125448", "0.46125448", "0.46125448", "0.46125448", "0.46046686", "0.46029475", "0.46029475", "0.46029475", "0.4598557" ]
0.0
-1
update loop of the game
function update() { if (pauseState) { return; } else { totalDeaths(); coinRepetition(); game.clear(); obs.animate(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static update()\n {\n // Update game timer if there's a current game\n if (RPM.game)\n {\n RPM.game.playTime.update();\n }\n\n // Update songs manager\n RPM.songsManager.update();\n\n // Repeat keypress as long as not blocking\n let continuePressed;\n for (let i = 0, l = RPM.keysPressed.length; i < l; i++)\n {\n continuePressed = RPM.onKeyPressedRepeat(RPM.keysPressed[i]);\n if (!continuePressed)\n {\n break;\n }\n }\n\n // Update the top of the stack\n RPM.gameStack.update();\n }", "function update(){\n setInterval(gameloop, 20);\n}", "function updateGame() {\n updateGameState();\n updateDirection();\n }", "update(dt) {\n game.update(dt);\n }", "function update(){\n winSong.pause();\n soundtrack.play();\n gameLoop = requestAnimationFrame(update);\n getInput();\n enemyMovement();\n physics();\n wrapPlayers();\n drawGame();\n}", "update() { }", "update() { }", "function gameLoop(state) {\n update(state);\n render(state);\n}", "function updateLoop() {\n setupGraphics();\n if (window.playing) {\n var other_options = '[Mouse Wheel] zoom' + '<br>' + '[Z] reset zoom' + '<br>' + '[ESC] quick respawn' + '<br>'\n + '[Tab] toggle stats' + '<br>' + '[G] toggle graphic' + '<br>' + '[Q] quit to menu' + '<br>' + '[O] toggle this window';\n botContainer.innerHTML = ('[T] bot: ' + handleTextColor(bot.isBotEnabled));\n radiusMultiplierContainer.textContent = ('[A/S] radius multiplier: ' + bot.opt.radiusMult);\n autoRespawnContainer.innerHTML = ('[I] auto respawn: ' + handleTextColor(window.autoRespawn));\n visualDebuggingContainer.innerHTML = ('[Y] visual debugging: ' + handleTextColor(window.visualDebugging));\n logDebuggingContainer.innerHTML = ('[U] log debugging: ' + handleTextColor(window.logDebugging));\n keyOptionsContainer.innerHTML = other_options;\n positionContainer.textContent = 'X: ' + (~~window.view_xx || 0) + ' Y: ' + (~~window.view_yy || 0);\n // Target coordinates are only in Bot mode\n if (window.goalCoordinates && window.goalCoordinates.sz && bot.isBotEnabled) {\n targetContainer.textContent = ('Target X: ' + window.goalCoordinates.x + ' Y: ' + window.goalCoordinates.y + ' sz: ' + window.goalCoordinates.sz);\n } else {\n targetContainer.textContent = '';\n }\n if (window.bso && currentIP != window.bso.ip + ':' + window.bso.po) {\n currentIP = window.bso.ip + \":\" + window.bso.po;\n ipContainer.textContent = 'IP: ' + currentIP;\n }\n\n zoomContainer.textContent = 'Zoom: ' + window.gsc.toFixed(2);\n xferContainer.textContent = 'BPS: ' + window.rdps;\n var currentScore = Math.floor(150 * (window.fpsls[window.snake.sct] + window.snake.fam / window.fmlts[window.snake.sct] - 1) - 50) / 10;\n if (currentScore > highScore) {\n highScore = currentScore;\n localStorage.setItem('high-score', highScore);\n highscoreContainer.textContent = 'High Score: ' + highScore;\n }\n } else {\n xferContainer.textContent = '';\n zoomContainer.textContent = '';\n positionContainer.textContent = '';\n }\n\n setTimeout(updateLoop, 1000);\n }", "function gameloop(){\n game.processInput()\n if(game.ready){\n game.state();\n }\n game.update()\n setTimeout(gameloop,20);\n}", "function gameLoop()\n\t{\n\t\twindow.requestAnimationFrame( gameLoop, display.canvas );\n\t\tupdate();\n\n\t}", "function gameLoop(){\r\n // console.log(\"Game Loop Running\");\r\n draw();\r\n update();\r\n\r\n}", "function gameloop(){\n game.processInput()\n if(game.ready){\n game.state();\n }\n game.update()\n setTimeout(gameloop,10);\n}", "function updateLoop(){\n\t\t\t\t\tvar time = this.update();\n\n\t\t\t\t\t// set timer for next update\n\t\t\t\t\tthis.updateTimer = setTimeout(updateLoop.bind(this), 1000 - time.getMilliseconds());\n\t\t\t\t}", "function loop() {\n //this function controls most of the game\n gameStart = true; //flag for the controller to take inputs for the game and not the menu\n draw.clear(); //for animation\n\n player.draw(); //initialize the player to be drawn and take input to move up/down\n player.move();\n\n wall1.draw(); //draw walls\n wall2.draw();\n\n for (var i = 0; i < rectangleList.length; i++) {\n rec = rectangleList[i]; //push the rectangles to be randomly generated and move\n rec.draw();\n rec.move();\n }\n for (var i = 0; i < powerupList.length; i++) {\n pow = powerupList[i]; //push the powerups to be created\n pow.draw();\n pow.move();\n }\n for (var i = 0; i < debuffList.length; i++) {\n deb = debuffList[i]; //push the debuffs to be created\n deb.draw();\n deb.move();\n }\n\n TimeMe.startTimer(\"game\"); //starts the timer at 0 for a new game\n\n time = TimeMe.getTimeOnPageInSeconds(\"game\").toFixed(2); //sets the time to seconds with 2 decimal places\n score = Math.ceil(powerUpScore + (time * 1.5)); //score is always increasing by 1.5 of time\n }", "function update() {\n\t\tfor (let i = 0; i < loop.update.length; i++) {\n\t\t\tloop.update[i](tickCounter);\n\t\t}\n\t\tfor (let i = 0; i < loop.updateLast.length; i++) {\n\t\t\tloop.updateLast[i](tickCounter);\n\t\t}\n\t\ttickCounter++;\n\t\tmouseClicked = false;\n\t}", "updateGame(){\n //Update state of objectives\n this.isObjectiveTaken();\n //Update if game is over \n this.isOver();\n\n //check whether game is over\n if(!this.gameOver){\n //updates all players data\n this.updatePlayers();\n }\n }", "update() {\n // On every win\n win();\n // If player goes outside\n this.outsideCanvas();\n }", "function update() {\n clock += change();\n render();\n }", "function gameLoop() {\n stats.begin(); // Begin measuring\n ///updating current state\n currentstate.update();\n stats.end(); // end measuring\n}", "update() {\n if (this.y < 0) {\n this.winMsg = true;\n this.y = 0;\n congratulations();\n }\n if (this.lives === 0) {\n this.lives = -1;\n this.lost = true;\n gameLost();\n }\n }", "function update() {\n for (modInd--;modInd>=0;modInd--) {\n updateAction(modPart[modInd][0], modPart[modInd][1]);\n }\n modInd = 0;\n if (showPlayer)\n try { updatePlayer(); } catch (e) { }\n draw();\n setTimeout(update, gameSpeed);\n }", "function update() {\n updatePaddle();\n updatePuck();\n checkPaddle();\n checkBricks();\n }", "update(){\r\n while (this.lastMove != 'x' && this.isAlive && !this.won) {\r\n console.clear();\r\n this.print(this.grid);\r\n this.playerMovement();\r\n }\r\n\r\n if (!this.isAlive || this.won){\r\n this.restart();\r\n }\r\n }", "static loop()\n {\n requestAnimationFrame(RPM.loop);\n\n // Update if everything is loaded\n if (RPM.datasGame.loaded)\n {\n if (!RPM.gameStack.isLoading())\n {\n RPM.update();\n }\n if (!RPM.gameStack.isLoading())\n {\n RPM.draw3D();\n }\n }\n RPM.drawHUD();\n\n // Elapsed time\n RPM.elapsedTime = new Date().getTime() - RPM.lastUpdateTime;\n RPM.averageElapsedTime = (RPM.averageElapsedTime + RPM.elapsedTime) / 2;\n RPM.lastUpdateTime = new Date().getTime();\n }", "update() {\n var now = Date.now();\n var dt = (now - gameNs.game.prevTime);\n gameNs.game.dt = dt;\n gameNs.game.prevTime = now;\n gameNs.game.draw();\n //Update projectile manager\n gameNs.game.pm.update(dt, gameNs.game.mX, gameNs.game.mY);\n dt = 0;\n //Recursively call game.update here to create loop\n window.requestAnimationFrame(gameNs.game.update);\n }", "update() {\n console.log(\"Abstract loop.\");\n }", "function update(){\n frames++;\n if (currentstate !== states.Score && currentstate !== states.Start && currentstate !== states.HighScore) {\n fgpos = (fgpos - 2) % 14;\n }\n if (currentstate === states.Game) {\n pipe.update();\n }\n bird.update();\n}", "function update() {\n\t\n\n\n\n}", "function update() {\n\t\t\t\tplayer.update();\n\t\t\t\tcomputer.update(ball);\n\t\t\t\tball.update(player.paddle, computer.paddle);\n\t\t\t\tdocument.getElementById(\"pongScore\").innerHTML = \"Score = \" + score;\n\t\t\t}", "function update() {\n\t\t\n\t}", "update()\n\t{\n\t\tthis.world.update();\n\t\tthis.time++;\n\t\t\n\t\n\t}", "update () {\n\n\n\n }", "loop() {\n\t\tif( game.paused ) {\n\t\t\tdisplay.clearScreen();\n\t\t\tgame.draw();\n\t\t\treturn;\n\t\t}\n\n\t\tif( !game.nc || ( game.nc && display.frame % 3 === 0 ) ) {\n\t\t\tgame.update();\n\t\t\tdisplay.clearScreen();\n\t\t\tgame.draw();\n\t\t\treturn;\n\t\t}\n\t}", "function main_game_loop() {\n\tupdate();\n\trender();\n\trequestAnimationFrame(main_game_loop);\n}", "function update(){\n updateSnakeMovement();\n updateGameFinishedState();\n updateFoodAcquiredState();\n }", "function update() {\n if (game.state !== state.STOP && game.state !== state.END) {\n updateBalls();\n updatePlayers();\n updateColliders();\n checkBallsColliders();\n checkBallsTriggers();\n }\n}", "function gameLoop()\r\n{\r\n\t\trequestAnimationFrame(gameLoop);\r\n\r\n\t\tupdate();\r\n\t\trender();\r\n}", "update () {\n\n\n }", "function updateGame() {\n if (game_play) {\n clearCanvas();\n enemy_check_collision();\n player_check_collision();\n let check = check_border();\n if (check === true) {\n direction *= -1;\n invaders.forEach(function (element) {\n element.y += 5\n })\n }\n draw_player();\n draw_bullets();\n draw_enemy_bullets();\n invaders.forEach(function (element) {\n element.x += direction;\n element.update()\n });\n }\n}", "function update() {\n player.update(gameInput.inputs);\n\n render();\n}", "function gameLoop() {\n stats.begin(); // Begin measuring\n currentStateFunction.update();\n if (stateChanged) {\n changeState(currentState);\n }\n stage.update(); // Refreshes our stage\n stats.end(); // End metering\n}", "update() {\n }", "update() {\n }", "update() {\n }", "update() {\n\n }", "update() {\n\n }", "update() {\n\n }", "update() {\n\n }", "update() {\n\n }", "update() {\n\n }", "update() {\n\n }", "function update() {}", "_update() {\r\n // Pause or Unpause game\r\n if (this._keyPressed(\"Space\")) {\r\n this.paused = !this.paused;\r\n this.pauseLayer.style.visibility = (this.paused) ? 'visible' : 'hidden';\r\n }\r\n\r\n this._updateTime();\r\n \r\n // If the game is won, check if the player wants to restart game\r\n if (this.levelNum > MAX_LEVEL) {\r\n this.pauseLayer.style.visibility = 'visible';\r\n if (this._keyPressed(\"KeyR\")) {\r\n this.pauseLayer.style.visibility = 'hidden';\r\n this.accumulatedTime = 0;\r\n this.lastDate = Date.now();\r\n this.startHours = new Date(0).getHours();\r\n this.levelNum = 0;\r\n this._setLevel();\r\n return;\r\n }\r\n }\r\n else if (!this.paused) { // Otherwise, update the player logic\r\n if (this._updatePlayer()) {\r\n if (this.levelNum <= MAX_LEVEL) {\r\n this._setLevel();\r\n }\r\n } \r\n }\r\n }", "function updateGameLogic() {\n\tupdate_scores();\n\tif (gameState == \"READY\") {\n\t\tif (level == 0)\n\t\t\tdrawText(\"Click to hunt ducks!\",true);\n\t\telse {\n\t\t\tdrawText(\"Level \" + (level+1).toString() + \"!(click screen to start)\",true);\n\t\t}\n\t}\n\telse if (gameState == \"PLAY\") {\n\t\tflapCount++;\n\t\ttargetChange++;\n\n\t\t//Determines if the targets should be changed\n\t\t//Decently high mod value so the ducks don't change targets too quickly\n\t\tif (targetChange % 50 == 0)\n\t\t\tupdateTargets();\n\n\t\t//move and redraw the canvas for the level\n\t\tmoveDucks();\n\t\tdrawDucks();\n\t\tdrawLives();\n\n\t\t//Acts as the timer for the game to end\n\t\tgameTime--;\n\n\t\tif (gameTime == 0 || shots <= 0) {\n\t\t\tgameState = \"GAMEOVER\";\n\t\t\tducksFly();\n\t\t}\n\t}\n\telse if (gameState == \"GAMEOVER\") {\n\t\t//Update count for flap animation\n\t\tflapCount++;\n\t\t//Move ducks off screen\n\t\tmoveDucks();\n\t\tdrawDucks();\n\t\tdrawText(\"Game Over! Final Score: \" + score + \"!\" , false);\n\n\t}\n}", "function tick(event) {\n\tupdateGame();\n\tstage.update(event);\n}", "function update(){\r\n bird.update();\r\n fg.update();\r\n pipes.update();\r\n}", "function updateGame(data) {\n if (data['active']) {\n updateGameBoard(data);\n updateMoveSelectors(data);\n updateStatusBar(data);\n }\n}", "function gameLoop() {\n //update_direction();\n advanceSnake();\n checkCollision();\n clearCanvas();\n drawSnake();\n drawFood();\n updateScore();\n updateTime();\n }", "function gameLoop(event) {\n // start collecting stats for this frame\n stats.begin();\n // calling State's update method\n currentScene.update();\n // redraw/refresh stage every frame\n stage.update();\n // stop collecting stats for this frame\n stats.end();\n}", "function gameLoop(event) {\n // start collecting stats for this frame\n stats.begin();\n // calling State's update method\n currentScene.update();\n // redraw/refresh stage every frame\n stage.update();\n // stop collecting stats for this frame\n stats.end();\n}", "function update() {\n document.getElementById(\"score\").innerHTML = \"Score: \" + score;\n document.getElementById(\"highScore\").innerHTML = \"High Score: \" + highScore;\n frames++;\n\n if (currentState !== states.Score) {\n foregroundPosition = (foregroundPosition - 2) % 14; // Move left two px each frame. Wrap every 14px.\n }\n\n if (currentState === states.Game) {\n corals.update();\n mines.update();\n }\n\n fish.update();\n //console.log(fish.y);\n}", "update () {}", "function main() {\n var now = Date.now();\n var dt = (now - lastTime) / 1000.0;\n if(player.lives === 0) {\n gameState = 'game over';\n }\n update(dt);\n render(); \n lastTime = now;\n win.requestAnimationFrame(main);\n }", "function update() {\n ball.update();\n player.update();\n ai.update();\n}", "function gameLoop(event) {\n // start collecting stats for this frame\n stats.begin();\n\n // calling State's update method\n currentScene.update();\n\n // redraw/refresh stage every frame\n stage.update();\n\n // stop collecting stats for this frame\n stats.end();\n}", "function update() {\n if (gameRunning) {\n world.tick();\n setTimeout(update, timeDelta - parseInt(document.getElementById(\"speedSlider\").value))\n }\n}", "update()\n {\n \n }", "function main() {\n\tvar now = Date.now();\n\tvar dt = (now - lastTime) / 1000.0; // dt is unused on the client side... for now.\n\tif (!isGamePaused)\n\t{\n\t\t\n\t\tcheckServerTimeout();\n\t\t\n\t\tsendServerUpdatePacket(handleInput());\n\t\t\n\t}\n\tlastTime = now;\n\trequestAnimFrame(main);\n}", "function gameLoop() \n{\n window.requestAnimationFrame(gameLoop);\n var now = new Date().getTime();\n var dt = (now - (time || now))/FRAME_RATE;\n\tmyControl.updateGame(myGame,dt);\n time = now;\n \n\t//***DEBUGING text lines example\n //myControl.m_Dev.debugText(myGame.playState,50,50);\n}", "function update() {\r\n paintCanvas();\r\n platformCalc();\r\n\r\n springCalc();\r\n\r\n playerCalc();\r\n player.draw();\r\n\r\n base.draw();\r\n\r\n updateScore();\r\n }", "function update() {\n controls.update();\n stats.update();\n }", "function loop(){\n\t\t\t\tupdate();\n\t\t\t\tif(playing) {\n\t\t\t\t\tdraw();\n\t\t\t\t\twindow.requestAnimationFrame(loop,canvas);\n\t\t\t\t}\n\t\t\t}", "function update() {\r\n\r\n // update game\r\n game.update();\r\n\r\n // toggle tower clickable depending on the user's money\r\n updateTowerStore();\r\n\r\n let { type, lives, money, level, difficulty } = game.getLevelStats();\r\n\r\n // update lives and money based on game stats \r\n livesLabel.innerHTML = 'Lives: ' + lives;\r\n moneyLabel.innerHTML = '$' + money;\r\n levelLabel.innerHTML = 'Level: ' + level; \r\n difficultyLabel.innerHTML = 'difficulty: ' + difficulty;\r\n nextLevelLabel.innerHTML = '';\r\n\r\n if (type) nextLevelLabel.appendChild(ENEMY_IMAGES[type]);\r\n else nextLevelLabel.style.display = 'none';\r\n\r\n // increase flashing transparency\r\n flashingTransparency = flashingTransparency + .2;\r\n}", "gameLoop()\n { \n this.currentTime = (new Date()).getTime(); \n this.deltaTime = (this.currentTime - this.lastTime) / 1000; \n\n if (this.deltaTime > this.timePerFrame)\n {\n this.update();\n this.lastTime = (new Date()).getTime(); \n } \n \n this.draw();\n window.requestAnimationFrame(this.boundRecursiveUpdate);\n }", "function updateCanvasLoop(){\n if (gameWorld.gameOver) {\n stopEnemyInterval();\n displayGameOver();\n return;\n }\n\n updateBackground();\n updateTank();\n updateMissiles();\n updateCitizens();\n updateScoreBox();\n requestAnimationFrame(updateCanvasLoop);\n}", "update() {\n\n }", "update() {\n\n }", "update() {\n\n }", "update() {\n\n }", "update() {\n\n }", "update() {\n\n }", "update() {\n\n }", "function clockLoop(){\n\t//update the time\n\tupdate();\n\n\t//draw the clock\n\tdraw();\n}", "function gameLoop() {\n\n var delta = performance.now() - GAME.currtime;\n\n GatherInput();\n UpdateGameLogic(delta);\n Render(delta);\n\n requestAnimationFrame(gameLoop);\n }", "gameLoop() {\n if (this.stopped) {\n return;\n }\n\n let now = Date.now();\n let dt = (now - this.lastTime) / 1000.0;\n this.fps = 1 / dt;\n\n this.update(dt);\n this.render();\n\n this.lastTime = now;\n\n window.requestAnimationFrame(() => this.gameLoop());\n }", "loop () {\n this.ctx.width = window.innerWidth;\n this.ctx.height = window.innerHeight;\n if (!this.pause) {\n this.gameTime += 1;\n this.update();\n }\n this.draw();\n }", "function update() { \n ball.update();\n player.update();\n ai.update();\n}", "function Loop() { \n \n // always update Page\n Page.Update();\n \n // only need to update GM if the player is alive\n if (GM.IsAlive){\n GM.Update();\n }\n \n window.requestAnimationFrame(Loop);\n}", "function update() {\n // Checks if the game has ended each frame\n if (!endGame) {\n // Callback method used to create main loop\n window.requestAnimationFrame(update);\n drawStars();\n drawSprites();\n playerShip();\n drawScore();\n speedIncrease();\n scoreIncrease();\n countdown();\n } else {\n window.requestAnimationFrame(update);\n drawStars();\n document.getElementById(\"score-output\").innerHTML = score;\n }\n}", "update() {\n this.timeElapsed += this.game.clockTick\n }", "gameLoop() {\n var elapsedTime = this.m_Clock.getDelta();\n\n this.m_Lag += elapsedTime;\n\n // perform as many updates as we should do\n // based on the time elapsed from last gameloop call\n while (this.m_Lag >= AlgoMission.UPDATE_TIME_STEP) {\n\n this.update();\n\n this.m_Lag -= AlgoMission.UPDATE_TIME_STEP;\n }\n\n this.render();\n\n requestAnimationFrame(this.gameLoop.bind(this));\n }", "update() {}", "update() {}", "update() {}", "update() {}", "update() {}", "update() {}", "update() {}", "update() {}", "update() {}" ]
[ "0.78576803", "0.785624", "0.78343886", "0.77977407", "0.7778103", "0.76732415", "0.76732415", "0.76285017", "0.7625629", "0.7615792", "0.7594556", "0.75583804", "0.75544626", "0.75434744", "0.7542098", "0.75411874", "0.7523506", "0.7520684", "0.75148255", "0.74919957", "0.74919", "0.7468887", "0.7455424", "0.7446104", "0.7440638", "0.74130905", "0.7393597", "0.7393301", "0.7392571", "0.73913646", "0.73911554", "0.73864084", "0.7380504", "0.73801845", "0.73717004", "0.73646796", "0.73548937", "0.73520017", "0.73483276", "0.7344012", "0.7339989", "0.73287773", "0.7322935", "0.7322935", "0.7322935", "0.7317824", "0.7317824", "0.7317824", "0.7317824", "0.7317824", "0.7317824", "0.7317824", "0.7314736", "0.7291324", "0.7276183", "0.726269", "0.7258806", "0.7258037", "0.7256366", "0.7253262", "0.7253262", "0.72526175", "0.7240688", "0.72298604", "0.7229308", "0.7228541", "0.7228349", "0.7224517", "0.7223294", "0.72169036", "0.7209577", "0.7206696", "0.7204575", "0.720202", "0.72015196", "0.7197183", "0.71959895", "0.71959895", "0.71959895", "0.71959895", "0.71959895", "0.71959895", "0.71959895", "0.71946144", "0.71776414", "0.71762234", "0.7173968", "0.7171323", "0.7163609", "0.71590734", "0.7154463", "0.71539056", "0.7151794", "0.7151794", "0.7151794", "0.7151794", "0.7151794", "0.7151794", "0.7151794", "0.7151794", "0.7151794" ]
0.0
-1
Versione con scp con promise
function uploadWithPromise(host, user, file, remote) { var deferred = Q.defer(); var scp = setupSCP(host, user) scp.upload(file, remote, deferred.resolve); return deferred.promise; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async cloneVersion() {\n const cloneOpts = await this.putVersionOpts('/clone');\n this.tick(0, 'Cloning Service Config version', 'cloning version');\n return request(cloneOpts).then((r) => {\n this._version = r.number;\n this.tick(1, `Cloned Service Config Version ${r.number}`, `cloning version ${r.number}`);\n return Promise.resolve(this);\n })\n .catch((e) => {\n const message = 'Unable to create new service version';\n this.log.error(message, e);\n throw new Error(message, e);\n });\n }", "sftp() {\n if (!this.ready) {\n throw 'connection not ready';\n }\n return this.client.sftpAsync().then(sftp => {\n return BPromise.promisifyAll(sftp);\n });\n }", "function sshConnect() {\n\tconsole.log(\"##Connecting to \" + remoteHost + \" as \" + remoteUsername + \"...\");\n\tssh.connect({\n\t\t// TODO: ADD YOUR IP ADDRESS BELOW (e.g. '12.34.5.67')\n\t\thost: remoteHost,\n\t\tusername: remoteUsername,\n\t\tprivateKey: remotePrivateKey\n\t})\n\t.then(function() {\n\t\tconsole.log(\"SSH Connection established.\");\n // Careful, createRemoteFolder is destructive! Empty new folder...\n\t\treturn createRemoteTempFolder();\n\t})\n\t.then(function(result) {\n console.log(\"##After createRemoteTempFolder result object is \", result);\n\t\tconst failed = []\n\t\tconst successful = []\n\t\tif(result.stdout){ console.log('STDOUT: ' + result.stdout); }\n\t\tif(result.stderr || result.code ){\n\t\t\tconsole.log('STDERR: ' + result.stderr);\n let msg = \", code: \" + status.code + \" err: \" + status.stderr;\n\t\t\treturn Promise.reject(msg);\n\t\t}\n\t\treturn transferProjectToRemote(failed, successful);\n\t})\n\t.then(function(status) {\n console.log(\"##After transferProjectToRemote Status is: \", status);\n\t\tif (status.stderr || status.code) {\n let msg = \", code: \" + status.code + \" err: \" + status.stderr;\n\t\t\treturn Promise.reject(failed.join(msg));\n\t\t} else {\n\t\t\treturn stopRemoteServices();\n\t\t}\n\t})\n\t.then(function(status) {\n console.log(\"##After stopRemoteServices status is: \", status);\n\t\tif (status.stderr || status.code) {\n let msg = \", code: \" + status.code + \" err: \" + status.stderr;\n\t\t\treturn Promise.reject(failed.join(msg));\n\t\t} else {\n\t\t\treturn updateRemoteApp();\n\t\t}\n\t})\n\t.then(function(status) {\n // Weird that this status print is on 1 line and others are not.\n console.log(\"##After updateRemoteApp Status is: \", status);\n\t\tif (status.stderr || status.code) {\n let msg = \", code: \" + status.code + \" err: \" + status.stderr;\n\t\t\treturn Promise.reject(failed.join(msg));\n\t\t} else {\n\t\t\treturn startRemoteServices();\n\t\t}\n\t})\n\t.then(function(status) {\n console.log(\"##After startRemoteServices status is: \", status);\n console.log(\"##Deployment complete.\");\n\t\tprocess.exit(0);\n\t})\n\t.catch(e => {\n\t\tconsole.log(\"##FAILED deployment! \", e );\n console.log(\"##Reasons: \", failed);\n\t\tconsole.error(e);\n\t\tprocess.exit(1);\n\t})\n}", "ping(machine) {\n return new Promise((resolve, reject) => {\n tcpp.probe(machine.ipaddress, machine.sshPort, (err, available) => {\n //console.log(`${machine.destination} - ssh ${available}`);\n if (err) {\n logger.error(err);\n resolve({name:machine.name, sshStatus: false})\n } else {\n resolve({name:machine.name, sshStatus: available})\n }\n });\n }).then((res) => {\n var args = [\"-q\", \"-n\", \"-w 2\", \"-c 1\", machine.ipaddress];\n return new Promise((resolve, reject) => {\n var ps = cp.spawn('/bin/ping', args);\n ps.on('error', (e) => {\n logger.error(e);\n res.pingStatus = false;\n resolve(res);\n });\n ps.on('exit', (code) => {\n res.pingStatus = (code == 0);\n resolve(res);\n });\n });\n })\n }", "function downloadWithPromise(host, user, remoteFile, localDir) {\n \n var deferred = Q.defer();\n var scp = setupSCP(host, user) \n \n scp.download(remoteFile, localDir, deferred.resolve);\n \n return deferred.promise;\n}", "async function copy({ watch } = {}) {\n const ncp = Promise.promisify(require('ncp'));\n\n await Promise.all([\n ncp('src/public', 'build/public'),\n ncp('src/content', 'build/content'),\n ]);\n\n await fs.writeFile('./build/package.json', JSON.stringify({\n private: true,\n engines: pkg.engines,\n dependencies: pkg.dependencies,\n scripts: {\n start: 'node server.js',\n },\n }, null, 2));\n\n if (watch) {\n const watcher = await new Promise((resolve, reject) => {\n gaze('src/content/**/*.*', (err, val) => err ? reject(err) : resolve(val));\n });\n watcher.on('changed', async (file) => {\n const relPath = file.substr(path.join(__dirname, '../src/content/').length);\n await ncp(`src/content/${relPath}`, `build/content/${relPath}`);\n });\n }\n}", "async publishVersion() {\n const actOpts = await this.putVersionOpts('/activate');\n this.tick(0, 'Activating version', 'activating version');\n return request(actOpts).then((r) => {\n this.tick(1, `Activated version ${r.number}`, `activated version ${r.number}`);\n this._version = r.number;\n return Promise.resolve(this);\n })\n .catch((e) => {\n const message = `Unable to activate new configuration: ${\n e.error && e.error.msg ? e.error.msg : ''} ${\n e.error && e.error.detail ? e.error.detail : ''}`;\n throw new Error(message, e);\n });\n }", "copy(path, newpath, cb) {\n\t\tconst promise = Promise.props({ path : Path.normalizePath(path), newpath : Path.normalizePath(newpath) }).then((result) => this.adapter.copy(result.path, result.newpath));\n\n\t\tif (cb) {\n\t\t\tpromise.nodeify(cb);\n\t\t}\n\n\t\treturn promise;\n\t}", "function pbcopy(data) {\n return new Promise(((resolve, reject) => {\n const proc = spawn('pbcopy');\n proc.on('error', (err) => {\n reject(err);\n });\n proc.on('close', () => {\n resolve();\n });\n proc.stdin.write(data);\n proc.stdin.end();\n }));\n }", "function exec(cmd, ignoreError){\n\tvar p = new Promise(function(resolve, reject){\n\t\tcp.exec(cmd,{maxBuffer: 1024 * 500}, (error, stdout, stderr) => {\n\t\t\tif (error && !ignoreError) {\n\t\t\t\tconsole.log(error);\n\t\t\t\treject({stdout, stderr, error});\t\n\t\t\t}else{\n\n\t\t\t\tresolve({stdout, stderr, error});\t\n\t\t\t}\n\t\t});\t\t\n\t});\n\treturn p;\n}", "connectionStatus () {\n return new Promise((resolve, reject) => {\n this.log('connectionStatus')\n exec(resolve, reject, PLUGIN_NAME, 'connectionStatus', [])\n })\n }", "async function surgeDeploy() {\n await spawn(\n 'surge',\n [configProd.deploy.src, `--domain=https://${configProd.deploy.domain}`],\n { stdio: 'inherit' }\n );\n}", "async function copiarImagem(element) {\n let filial_app = element.FILIAL_APP\n let mask = `${element.CARTAFRETE}_${filial_app}`\n let origem = `./downloads/${element.ARQUIVO}`\n let dir_destino = element.DIR_DESTINO\n let newFile = await proximoArquivo(dir_destino,mask)\n let destino = newFile.fullName\n let id = element.ID\n\n try {\n let ret = await loadAPI('GET','',api_sccd_filename,{par_id: id})\n let fileName = `${ret.data.FILENAME}.jpg`\n let fileDestino = ret.data.DESTINO \n destino = `${dir_destino}/${fileName}`\n \n if (fs.existsSync(destino)) {\n if(fileDestino) {\n // se destino está registrado no BD e existe fisicamente = Exclui para refazer fluxo\n await excluirArquivo(destino)\n } else {\n // se destino não está registrado no BD e existe fisicamente = Usa SO para gravar em um nome livre\n destino = newFile.fullName\n }\n } else {\n newFile.fullName = destino\n newFile.fileName = fileName\n }\n\n } catch(err) {\n sendLog('ERRO',`(1000) - ${err.message} - (${JSON.stringify(err)})`)\n return 0\n }\n\n try {\n if (fs.existsSync(destino)) {\n sendLog('WARNING',`(012) Copia cancelada: (${origem}) => (${destino})`)\n } else {\n\n let copia = await copiarArquivo(origem,destino)\n sendLog('AVISO',`(007) Copia de arquivo: (${origem}) => (${destino}) >> (${JSON.stringify(copia)})`)\n \n let exclusao = await excluirArquivo(origem)\n sendLog('AVISO',`(008) Exclusão de arquivo: (${origem}) >> (${JSON.stringify(exclusao)})`)\n \n let newElemento = element\n newElemento.NEW_FILE = newFile.fileName\n newElemento.FILE_FULLNAME = destino \n baixaSCCD(id,destino,filial_app,newElemento) \n\n }\n } catch(err) {\n sendLog('ERRO',`(013) Problemas, Copia ou Exclusão: (${origem}) => (${destino})`)\n } \n\n}", "function exec() {\n var defer = q.defer();\n cp.exec(this, function(err, stdout, stderr) {\n if (err) console.log('exec err: '+ err);\n console.log(stdout);\n defer.resolve(err)\n })\n return defer.promise;\n}", "function download_oc() {\n let url;\n console.log(colors.blue('================================= Download OC ======================================='));\n const result = readlineSync.question(colors.blue('Do you wish to install an oc binary yes/no ? '));\n if (result === 'yes' || result === 'y') {\n const version = readlineSync.question(colors.blue('What version of oc do you wish to install ? \\n - 3.7\\n - 3.9\\n - 3.10\\n - 3.11\\n - 4.1\\n - 4.2\\n - 4.3\\n - 4.4\\n - 4.5\\n - 4.6\\n'));\n exports.version = version;\n switch (version) {\n case '3.7':\n url = 'https://github.com/openshift/origin/releases/download/v3.7.2/openshift-origin-client-tools-v3.7.2-282e43f-linux-64bit.tar.gz';\n break;\n case '3.9':\n url = 'https://github.com/openshift/origin/releases/download/v3.9.0/openshift-origin-client-tools-v3.9.0-191fece-linux-64bit.tar.gz';\n break;\n case '3.10':\n url = 'https://github.com/openshift/origin/releases/download/v3.10.0/openshift-origin-client-tools-v3.10.0-dd10d17-linux-64bit.tar.gz';\n break;\n case '3.11':\n url = 'https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz';\n break;\n case '4.1':\n url = 'https://mirror.openshift.com/pub/openshift-v4/clients/oc/4.1/linux/oc.tar.gz';\n break;\n case '4.2':\n url = 'https://mirror.openshift.com/pub/openshift-v4/clients/oc/4.2/linux/oc.tar.gz';\n break;\n case '4.3':\n url = 'https://mirror.openshift.com/pub/openshift-v4/clients/oc/4.3/linux/oc.tar.gz';\n break;\n case '4.4':\n url = 'https://mirror.openshift.com/pub/openshift-v4/clients/oc/4.4/linux/oc.tar.gz';\n break;\n case '4.5':\n url = 'https://mirror.openshift.com/pub/openshift-v4/clients/oc/4.5/linux/oc.tar.gz';\n break;\n case '4.6':\n url = 'https://mirror.openshift.com/pub/openshift-v4/clients/oc/4.6/linux/oc.tar.gz';\n break;\n default:\n url = false;\n console.log(colors.blue('No binary present'));\n break;\n }\n\n if (url && !(fs.existsSync(`${version}.tar.gz`))) {\n const req = request({\n uri: url,\n method: 'GET',\n timeout: 10000,\n followRedirect: true,\n maxRedirects: 10,\n }).pipe(fs.createWriteStream(`${version}.tar.gz`));\n // Add loading animation\n cliAnimation.radar('===================================================================================>');\n req.on('close', () => {\n console.log(colors.blue('Request finished writing to file'));\n extract_oc(() => {\n console.log('Extract completed');\n });\n });\n } else {\n console.log(colors.blue('Binary Already Download'));\n extract_oc(() => {\n console.log('Extract completed');\n });\n }\n } else {\n console.log(colors.blue('Skipping Binary Download'));\n change_oc(() => {\n console.log('Extract completed');\n });\n }\n}", "connect (){\n let self = this;\n let options = {\n port: this.port\n };\n var promise = new Promise((resolve) => {\n \n self.socket = SC.connect(options);\n self.socket.on('init', (data) =>{\n resolve(data);\n });\n });\n\n return promise;\n }", "function pbcopy(data) {\n return new Promise(function(resolve, reject) {\n const child = child_process.spawn('pbcopy');\n\n child.on('error', function(err) {\n reject(err);\n });\n\n child.on('close', function(err) {\n resolve(data);\n });\n\n child.stdin.write(data);\n child.stdin.end();\n });\n}", "function downloadCode(host) {\n console.log (\"Downloading code from \" + host);\n\n var commandLine = \"scp -i \" + certAddress + \" ec2-user@\" + host + \":\" + originFile + \" ./\" + path + host + \".out\";\n\n exec(commandLine, function handleDownload (error) {\n if (error) {\n console.error(\"Error downloading code from \" + host + \": \" + error);\n } else {\n console.log(\"Downloaded code successfully from \" + host);\n\n fs.readFile(\"async/\" + host + \".out\", \"utf8\", function (errorFs, data) {\n if (errorFs) {\n console.error(\"Error reading downloaded file [\" + host + \".out]: \" + errorFs);\n } else {\n var clearData = data.replace(/\\|/g, \" \")\n .replace(/ +/g, \" \");\n\n fs.writeFile(\"async/\" + host + \".csv\", clearData, function (error) {\n if (error) {\n console.log(\"Couldn't clear data to disk for host [\" + host + \"]\");\n } else {\n console.log(\"Data from host [\" + host + \"] processed successfully\");\n\n var commandLineRm = \"rm ./\" + path + host + \".out\";\n\n exec(commandLineRm, function (error) {\n if (error) {\n console.error(\"Origin data from [\" + host + \"] could not be removed\");\n } else {\n console.log(\"Origin data from [\" + host + \"] removed\");\n }\n });\n }\n });\n }\n });\n }\n });\n}", "function copyAndPutFtp(picNames, picNum, localpath){\n const copyAndPutFtpPromise = new Promise((resolve, reject) => {\n copyPictures(picNames, picNum, picPath.training, localpath, err => {\n if (err) {\n reject(err);\n console.log('copyFtpPictures', error);\n\n return;\n }\n // 将照片存到FTP上\n putFtpPictures(picNames, picNum, localpath, (error, ftpPath) => {\n if (error) {\n reject(err);\n console.log('putFtpPictures', error);\n \n return;\n }\n resolve(ftpPath);\n });\n })\n });\n\n return copyAndPutFtpPromise; \n}", "async function run({ dest }) {\n let deployInfo = { host: void 0, src: projectRoot, dest };\n\n // See if the parameters are available in the local json file\n if (fs.existsSync(path.resolve(\"deployqa.local.json\"))) {\n const local = fs.readJSONSync(path.resolve(\"deployqa.local.json\"));\n deployInfo = {\n ...deployInfo,\n ...local,\n };\n }\n\n const questions = [\n deployInfo.host\n ? Array.isArray(deployInfo.host)\n ? {\n type: \"autocomplete\",\n name: \"host\",\n message: \"What host should be deployed to?\",\n limit: 10,\n choices: deployInfo.host,\n }\n : void 0\n : {\n type: \"input\",\n name: \"host\",\n message: \"What host should be deployed to?\",\n },\n deployInfo.dest\n ? void 0\n : {\n type: \"input\",\n name: \"dest\",\n message: \"What host folder should be deployed to?\",\n },\n ].filter((d) => d !== void 0);\n\n if (questions.length > 0) {\n answers = await prompt(questions);\n deployInfo = {\n ...deployInfo,\n ...answers,\n };\n }\n\n deployInfo.src =\n path.resolve(deployInfo.src) + (deployInfo.src.endsWith(\"/\") ? \"/\" : \"\");\n\n console.log(\"Deploy Target:\\n\", deployInfo);\n\n await sync(deployInfo);\n await updateRemote(deployInfo);\n}", "function clone(url){\n \n if(shell.exec('git clone '+ url)==0)\n console.log(\"Successfully Clonned \"+url);\n else\n console.log(\"ERROR! Clonning \"+url);\n \n}", "async function copy({ watch } = {}) {\n const ncp = Promise.promisify(require('ncp'));\n\n await Promise.all([\n ncp('./favicon.ico', 'build/util/favicon.ico'),\n ncp('./apple-touch-icon-114x114.png', 'build/util/apple-touch-icon-114x114.png'),\n ncp('./css/lib', 'build/util/css/lib'),\n ncp('./js/lib', 'build/util/js/lib'),\n ncp('./public', 'build/util/public'),\n ncp('./views', 'build/util/views')\n ]);\n\n await fs.writeFile('./build/util/package.json', JSON.stringify({\n private: true,\n engines: pkg.engines,\n dependencies: pkg.dependencies,\n scripts: {\n stop: 'forever stop 0',\n start: 'forever start js/server.js',\n },\n }, null, 2));\n\n}", "function main() {\n\tconsole.log(\"Deployment started.\");\n // NOPE! Don't clone anything. Too distructive. Geez...\n // Just jump straight to sshConnect();\n\t// cloneRepo();\n\tsshConnect();\n}", "function upgradeApp(){\n // 3. Create a Business Network Definition object from directory\n var bnaDef = {}\n BusinessNetworkDefinition.fromDirectory(bnaDirectory).then(function(definition){\n bnaDef = definition;\n console.log(\"Successfully created the definition!!! \",bnaDef.getName())\n\n // 4.Install the new version of the BNA\n return adminConnection.install(bnaDef);\n \n }).then(()=>{\n\n // 5. start the network \n // If you do not have the app installed, you will get an error\n console.log(\"Install successful\")\n return adminConnection.start(appName, version, \n { networkAdmins:\n [ {userName : 'admin', enrollmentSecret:'adminpw'} ]\n }\n )\n \n\n }).then(()=>{\n console.log('Network up and runing!!! ', 'Network name: ', bnaDef.getName(),' ', 'Network version: ', bnaDef.getVersion());\n //6. connect network admin card \n adminConnection.connect(cardNameForNetworkAdmin).then(()=>{\n // 7. Ping the network \n adminConnection.ping(appName).then(function(response){\n console.log(\"Ping Response:\");\n console.log(response);\n });\n })\n \n \n // 8. Disconnect\n adminConnection.disconnect();\n \n\n }).catch(function(error){\n console.log(error);\n });\n\n}", "then(resolve, reject) {\n return this.exec().then(resolve, reject);\n }", "uploadPartCopy(partConfig, cb) {\n const { bucketName, objectName, uploadID, partNumber, headers } = partConfig\n\n const method = 'PUT'\n let query = `uploadId=${uploadID}&partNumber=${partNumber}`\n const requestOptions = { method, bucketName, objectName: objectName, query, headers }\n return this.makeRequest(requestOptions, '', [200], '', true, (e, response) => {\n let partCopyResult = Buffer.from('')\n if (e) {\n return cb(e)\n }\n pipesetup(response, transformers.uploadPartTransformer())\n .on('data', (data) => {\n partCopyResult = data\n })\n .on('error', cb)\n .on('end', () => {\n let uploadPartCopyRes = {\n etag: sanitizeETag(partCopyResult.ETag),\n key: objectName,\n part: partNumber,\n }\n\n cb(null, uploadPartCopyRes)\n })\n })\n }", "function downloadRelease(version) {\n const zipUrl = `https://github.com/mercedes-benz/sechub/releases/download/v${version}-client/sechub-cli-${version}.zip`;\n core.debug('SecHub-Url: ' + zipUrl);\n const secHubZip = `${getWorkspaceParentDir()}/sechub.zip`;\n shelljs_shell.exec(`curl -L ${zipUrl} -o ${secHubZip}`);\n shelljs_shell.exec(`unzip -o ${secHubZip} -d ${getWorkspaceParentDir()}`);\n shelljs_shell.exec(`chmod +x ${secHubCli}`);\n}", "get_version(cb) {\n const self = this;\n let has_cb = false;\n\n // Verify second param, if supplied, is a function\n if (cb && typeof cb !== 'function')\n throw new NodeClamError('Invalid cb provided to scan_stream. Second paramter must be a function!');\n\n // Making things simpler\n if (cb && typeof cb === 'function') has_cb = true;\n\n return new Promise(async (resolve, reject) => {\n // Function for falling back to running a scan locally via a child process\n const local_fallback = async () => {\n const args = self._build_clam_args('--version');\n\n if (self.settings.debug_mode)\n console.log(`${this.debug_label}: Configured clam command: ${self.settings[self.scanner].path}`, args.join(' '));\n\n // Execute the clam binary with the proper flags\n try {\n const { stdout, stderr } = await cp_execfile(`${self.settings[self.scanner].path}`, args);\n\n if (stderr) {\n const err = new NodeClamError({stderr, file: null}, 'ClamAV responded with an unexpected response when requesting version.');\n if (self.settings.debug_mode) console.log(`${this.debug_label}: `, err);\n return (has_cb ? cb(err, null, null) : reject(err));\n } else {\n return (has_cb ? cb(null, stdout) : resolve(stdout));\n }\n } catch (e) {\n if (Object.prototype.hasOwnProperty.call(e, 'code') && e.code === 1) {\n return (has_cb ? cb(null, null) : resolve(null, null));\n } else {\n const err = new NodeClamError({err: e}, 'There was an error requestion ClamAV version.');\n if (self.settings.debug_mode) console.log(`${this.debug_label}: `, err);\n return (has_cb ? cb(err, null) : reject(err));\n }\n }\n };\n\n // If user wants to connect via socket or TCP...\n if (this.scanner === 'clamdscan' && (this.settings.clamdscan.socket || this.settings.clamdscan.host)) {\n const chunks = [];\n\n try {\n const client = await this._init_socket();\n client.write('nVERSION\\n');\n // ClamAV is sending stuff to us\n client.on('data', chunk => chunks.push(chunk));\n client.on('end', () => {\n const response = Buffer.concat(chunks);\n return (has_cb ? cb(null, response.toString()) : resolve(response.toString()));\n });\n } catch (err) {\n if (this.settings.clamdscan.local_fallback === true) {\n return local_fallback();\n } else {\n return (has_cb ? cb(err, null) : reject(err));\n }\n }\n } else {\n return local_fallback();\n }\n });\n }", "function _connect(opts) {\n var deferred = Q.defer(),\n ssh = grunt.template.process(lodashTemplates.ssh, {data: opts});\n //\n shell.on('ready', function () {\n deferred.resolve(true);\n\n }).on('error', function (err) {\n deferred.reject(err);\n\n });\n shell.connect({\n host: opts.host,\n port: opts.port,\n username: opts.user,\n password: opts.password\n });\n return deferred.promise;\n }", "connect() {\n\n let promise = new Promise((resolve, reject) => {\n this.server = this.bot.guilds.find(gid => gid.id === this.settings.server_id);\n if (!this.server) reject(`Error: Couldn't find server with the following ID(#${this.settings.server_id}).`);\n\n this.voiceChannel = this.server.channels.find(chn => chn.id === this.settings.channels.voice_channel_id && chn.type === \"voice\");\n if (!this.voiceChannel) reject(`Couldn't find voice channel '${this.settings.channels.voice_channel_id}'.`);\n\n this.textChannel = this.server.channels.find(chn => chn.id === this.settings.channels.text_channel_id && chn.type === \"text\");\n if (!this.textChannel) reject(`Couldn't find voice channel '${this.settings.channels.text_channel_id}'.`);\n\n this.bot.user.setPresence({\n activity: {\n name: \"good music!\",\n type: 0\n }\n });\n\n // Yay! Everything went well!\n this.textChannel.send('Look like everything works! Add some music to your discord server!');\n resolve(`Connected to the server ${this.server.name} as ${this.bot.user.username}.`); \n \n });\n\n return promise;\n\n }", "uploadSecure() {\n let data = atom.config.get('mcide.data');\n let commands = this.getCommands();\n data.commands = commands;\n\n const client = tls.connect({\n host: atom.config.get('mcide.serverAddress'),\n port: atom.config.get('mcide.serverPort'),\n rejectUnauthorized: atom.config.get('mcide.rejectUnauthorized')\n }, () => {\n client.end(JSON.stringify(data) + \"\\n\\n------***endofsequence***-------\");\n\n atom.notifications.addInfo(\"Sent commands\", {\n detail: commands,\n dismissable: true\n });\n });\n }", "sendCommand(command) {\n command._src = this.config.src;\n function commandErrorHandler(err) {\n debug('COMMAND ERROR')\n debug(err, command)\n if (err instanceof timeout) {\n console.error('Timeout: ', command);\n } else {\n console.log(err);\n }\n }\n // Send command with promised reply\n // If you use this function, use it exclusively and don't forget to call _onData() if you override onData()\n\n var promise = timeout(new Promise((resolve, reject) => {\n command.resolve = resolve;\n command.reject = reject;\n }), this.config.timeout)\n .catch(commandErrorHandler);\n\n // use the command chain to send command only when previous commands have finished\n // this way replies can be correctly attributed to commands\n this.commandChainPromise = this.commandChainPromise\n .then(() => {\n this.lastCommand = command;\n debug('SET LAST COMMAND')\n return new Promise((resolve,reject)=> {\n debug(new Buffer.from(command.toBuffer()))\n this.ser.write(command.toBuffer(),(err)=>{\n if(err) {\n reject(err)\n } else {\n resolve()\n }\n });\n });\n })\n .then(() => promise)\n\n //.then(()=>process.exit(1))\n return promise\n //.then(()=>console.log('WEEEEEEEEEEEEEEE ARE RESOLVED'))\n .catch(commandErrorHandler);\n }", "async function pushPfaf() {\n\tlet mysqlConfig = {\n\t\thost: 'localhost',\n\t\tport: 3306,\n\t\tuser: 'root',\n\t\tpassword: 'password',\n\t\tdatabase: 'permaflorae'\n\t};\n\n\tObject.assign(mysqlConfig, parseOption('mysqlConfig'));\n\tconst connection = await mysql.createConnection(mysqlConfig);\n\tconst [rows, fields] = await connection.query(\n\t\t'select `common name`,`latin name` = require(`species database`'\n\t);\n\tconnection.end();\n\n\tconst crops = [];\n\trows.forEach(row => {\n\t\tdebug(row);\n\t\tconst crop = {\n\t\t\tcommonName: row['common name'],\n\t\t\tbinomialName: row['latin name']\n\t\t};\n\t\tcrops.push(crop);\n\t});\n\n\tconst client = new ApiClient(powerplantConfig.host, powerplantConfig.port);\n\tawait client.addCrops(crops);\n}", "bundle(user, flow, version){\n console.log(user)\n version = '0.0.1'\n return new Promise((resolve, reject) => {\n console.log(\"Bundling Flow: \", flow)\n let modulesUsed = this.find_modules(flow);\n let connectionsUsed = this.find_connections(flow)\n\n let packageFiles = modulesUsed.map((x) => {\n return `${x.fs_path}/package.json`\n })\n\n let moduleFileBundles = modulesUsed.map((x) => {\n return this.get_module_files(x)\n })\n\n let mergedPackageFile = JSON.stringify(this.merge_packfiles(flow, packageFiles, version)) \n \n \n \n let libraries = {}\n\n let publishedModules = moduleFileBundles.map((x, ix) => {\n let published_mod = this.libify(modulesUsed, x, ix)\n libraries = {...libraries, ...published_mod.files}\n return published_mod\n })\n console.log(\"Libraries\", publishedModules)\n \n this.registry.newRepo(flow).then(() => {\n \n this.write_main(flow, modulesUsed, connectionsUsed, publishedModules).then((indexFile) => {\n this.getPackage(user.user, flow, indexFile, mergedPackageFile, libraries, (sha) => {\n resolve({name: mergedPackageFile.name, version: sha})\n })\n \n })\n\n })\n }) \n }", "async function deploy_stage() {\n // const DIR = process.cwd() + \"/NiggaBonkHead\";\n // const repoURL = \"https://github.com/longshotdev/rice-bot.git\";\n // const version = \"v0.1\";\n // console.log(DIR);\n // console.log(colors.green(\"Initalizing Local Repo\"));\n // await exec(`git init`, { cwd: DIR });\n // console.log(colors.green(\"Add Remote\"));\n // try {\n // await exec(`git remote add ship ${repoURL}`, { cwd: DIR });\n // console.log(colors.green(\"Fetch\"));\n // await exec(`git fetch ship --prune \"refs/tags/*:refs/tags/*\"`, {\n // cwd: DIR,\n // });\n // } catch (e) {}\n // console.log(colors.green(\"Checking out\"));\n // await exec(`git checkout ${version}`, { cwd: DIR });\n // console.log(colors.green(\"Resetting\"));\n // await exec(`git reset --hard`, { cwd: DIR }, execCB);\n // console.log(colors.green(\"Cleaning\"));\n // await exec(`git clean -df`, { cwd: DIR }, execCB);\n // console.log(colors.green(\"Pulling.\"));\n // await exec(`git pull -f ship ${version}`, { cwd: DIR }, execCB);\n\n // await exec(`yarn --production`, { cwd: DIR }, execCB);\n\n // function execCB(err, stdout, stderr) {\n // if (stdout) console.log(stdout);\n // if (stderr) console.log(stderr);\n // if (err) console.log(err);\n // }\n shell.cd(\"..\");\n await shell.exec(\"~/scripts/deploy_stage\", { async: true });\n}", "deploy() {\n if (this.deployed && this.contractAddress) {\n console.log(\"Deploy function already called\");\n this.UserContract = this.USER.then(web3 => {\n return new web3.eth.Contract(KaleidoKardsContract.abi, this.contractAddress);\n });\n this.JoeContract = this.JOE.then(web3 => {\n return new web3.eth.Contract(KaleidoKardsContract.abi, this.contractAddress);\n });\n this.StoreContract = this.STORE.then(web3 => {\n return new web3.eth.Contract(KaleidoKardsContract.abi, this.contractAddress);\n });\n\n return new Promise((resolve) => {resolve(this.contractAddress)});\n }\n\n // else deploy the contract\n return this.STORE.then((web3) => {\n let bytecode = KaleidoKardsContract.bytecode;\n let abi = KaleidoKardsContract.abi;\n\n let contract = new web3.eth.Contract(abi);\n console.log(\"Getting kard_store account to deploy new contract\");\n return web3.eth.getAccounts().then((accounts) => {\n console.log(\"Deploying new contract from address: \" + accounts[0]);\n return contract.deploy({data: bytecode}).send({data: bytecode, from: accounts[0], gasPrice: 0, gas: 2000000})\n .then( (response) => {\n this.contractAddress = response._address;\n console.log(\"Successfully deployed at address: \" + this.contractAddress);\n\n this.UserContract = this.USER.then(response => {\n // return new response.eth.Contract(KaleidoKardsContract.abi, '0xb7a996f99afff30a8a7c5b95aa9617f0985da9ee');\n return new response.eth.Contract(KaleidoKardsContract.abi, this.contractAddress);\n });\n this.JoeContract = this.JOE.then(response => {\n // return new response.eth.Contract(KaleidoKardsContract.abi, '0xb7a996f99afff30a8a7c5b95aa9617f0985da9ee');\n return new response.eth.Contract(KaleidoKardsContract.abi, this.contractAddress);\n });\n this.StoreContract = this.STORE.then(response => {\n // return new response.eth.Contract(KaleidoKardsContract.abi, '0xb7a996f99afff30a8a7c5b95aa9617f0985da9ee');\n return new response.eth.Contract(KaleidoKardsContract.abi, this.contractAddress);\n });\n this.deployed = true;\n return this.contractAddress;\n });\n })\n })\n\n }", "_addVpcAfterDeploy(evt) {\n let _this = this;\n\n return new BbPromise(function(resolve, reject) {\n for(var region in evt.data.deployed) {\n _this._manageVpc(evt, region);\n }\n\n return resolve(evt);\n });\n }", "constructor(rootCaller) {\r\n this.getBinaries()\r\n // TODO: This needs to use a PocketMine updater in the future.\r\n .then(() => this.downloadFile('https://jenkins.pmmp.io/job/PocketMine-MP/317/artifact/PocketMine-MP_1.7dev-317_0df3b00d_API-3.0.0-ALPHA9.phar', global.path + '/server/PocketMine-MP.phar'))\r\n .then(() => this.copyTemplates())\r\n .catch(err => {\r\n throw err;\r\n });\r\n }", "function clone() {\n\t\tRelease.chdir( Release.dir.base );\n\t\tRelease.dir.dist = Release.dir.base + \"/dist\";\n\n\t\tconsole.log( \"Using distribution repo: \", distRemote );\n\t\tRelease.exec( \"git clone \" + distRemote + \" \" + Release.dir.dist,\n\t\t\t\"Error cloning repo.\" );\n\n\t\t// Distribution always works on master\n\t\tRelease.chdir( Release.dir.dist );\n\t\tRelease.exec( \"git checkout master\", \"Error checking out branch.\" );\n\t\tconsole.log();\n\t}", "function copy(paths, config) {\n return new Promise((resolve, reject) => {\n copyfiles(paths, config, (error) => {\n if (error) {\n reject(error);\n } else {\n resolve(`COPY: [SUCCESS] copy ${paths[0].replace(root, '')} to ${paths[1].replace(root, '')} succeed`);\n }\n });\n });\n}", "function provisionBroker(){\n let timestamp = (new Date()).getTime();\n let brokerId = `broker${timestamp}`\n let brokerDeploy = JSON.parse(JSON.stringify(deployTemplate));\n brokerDeploy.metadata.name = brokerId;\n brokerDeploy.spec.template.metadata.labels.app = brokerId;\n\n return writeFile(`/tmp/deploy-${brokerId}.json`, JSON.stringify(brokerDeploy), 'utf8').then(() => {\n return exec(`kubectl create -f /tmp/deploy-${brokerId}.json`);\n }).then((res) => {\n if(res.stderr) {\n console.log(res.stderr);\n throw new Error('error occurred provisioning broker');\n }\n console.log(res.stdout);\n return exposeBroker(timestamp);\n }).then(() => {\n return timestamp;\n })\n}", "async function sicronizar() {\n await tccpoo.sync();\n}", "function gitSync(){\n let cp=require('child_process');\n cp.execFileSync(gitParent+'scripts/gitSync.exe')\n }", "checkout(version) {}", "function uploadResourceToFileSystem(src, options) {\n\n return new Promise(function (resolve, reject) {\n\n const salt = Math.round((new Date().valueOf() * Math.random())) + '';\n const public_id = crypto.createHmac('sha256', salt).update(src).digest('hex');\n\n const url = path.join(\"/uploads\", public_id);\n\n const destination = path.join(\"public\", \"uploads\", public_id);\n\n fs.copyFile(src, destination, fs.constants.COPYFILE_EXCL, function (error) {\n\n if (error) {\n reject(error);\n } else {\n resolve({\n public_id: public_id,\n url: url\n });\n }\n });\n });\n}", "function main(type) {\n// INPUT\n var initialFilesystem = [\n {\n cwd: ['..'],\n path: ['src']\n },\n {\n cwd: ['..'],\n files: ['bower.json']\n },\n {\n cwd: ['..'],\n path: ['install']\n }\n ];\n return pathExists('../dev/config')\n .then(function (exists) {\n // ugly work around for now\n var buildControlConfigPath;\n if (exists) {\n initialFilesystem.push({\n cwd: ['..', 'dev'],\n path: ['config']\n });\n buildControlConfigPath = ['..', 'dev', 'config', 'builds', type + '.yml'];\n } else {\n initialFilesystem.push({\n cwd: ['..'],\n path: ['config']\n });\n buildControlConfigPath = ['..', 'config', 'builds', type + '.yml'];\n }\n return {\n initialFilesystem: initialFilesystem,\n buildControlConfigPath: buildControlConfigPath\n };\n })\n .then(function (config) {\n console.log('Creating initial state with config: ');\n // console.log(config);\n return mutant.createInitialState(config);\n })\n .then(function (state) {\n return mutant.copyState(state);\n })\n .then(function (state) {\n console.log('Setting up build...');\n return setupBuild(state);\n })\n\n .then(function (state) {\n return mutant.copyState(state);\n })\n .then(function (state) {\n console.log('Fetching bower packages...');\n return fetchPackagesWithBower(state);\n })\n\n .then(function (state) {\n return mutant.copyState(state);\n })\n .then(function (state) {\n console.log('Installing bower packages...');\n return installBowerPackages(state);\n })\n\n .then(function (state) {\n return mutant.copyState(state);\n })\n .then(function (state) {\n console.log('Installing Plugins...');\n return installPlugins(state);\n })\n\n\n .then(function (state) {\n return mutant.copyState(state);\n })\n .then(function (state) {\n console.log('Installing Modules...');\n return installModules(state);\n })\n\n .then(function (state) {\n return mutant.copyState(state);\n })\n .then(function (state) {\n console.log('Installing Module Packages from Bower...');\n return installModulePackagesFromBower(state);\n })\n\n// .then(function (state) {\n// return mutant.copyState(state);\n// })\n// .then(function (state) {\n// return installModulePackagesFromFilesystem(state);\n// })\n\n .then(function (state) {\n return mutant.copyState(state);\n })\n .then(function (state) {\n console.log('Copying config files...');\n return copyUiConfig(state);\n })\n\n .then(function (state) {\n return mutant.copyState(state);\n })\n .then(function (state) {\n console.log('Making KBase Config...');\n return makeKbConfig(state);\n })\n\n // Disable temporarily ... we don't want to wipe out bower.json\n // until we have determined if we will be building a dist.\n .then(function (state) {\n return mutant.copyState(state);\n })\n .then(function (state) {\n console.log('Cleaning up...');\n return cleanup(state);\n })\n\n\n // From here, we can make a dev build, make a release\n .then(function (state) {\n return mutant.copyState(state);\n })\n .then(function (state) {\n console.log('Making the base build...');\n return makeBaseBuild(state);\n })\n\n .then(function (state) {\n return mutant.copyState(state);\n })\n .then(function (state) {\n if (state.config.build.dist) {\n console.log('Making the dist build...');\n return makeDistBuild(state);\n }\n return state;\n })\n\n // Here we handle any developer links.\n //.then(function (state) {\n // return mutant.copyState(state);\n //})\n //.then(function (state) {\n // \n //})\n\n .then(function (state) {\n return mutant.finish(state);\n })\n .catch(function (err) {\n console.log('ERROR');\n console.log(err);\n console.log(util.inspect(err, {\n showHidden: false,\n depth: 10\n }));\n console.log(err.stack);\n });\n}", "static async syncToRemote() {\n if (!__WEBPACK_IMPORTED_MODULE_2__Client__[\"a\" /* client */].isOnlineEnabled()) {\n this.changeSyncStatus(\"failed\");\n return;\n }\n if (this.synching) {\n this.changeSyncStatus(\"progress\");\n return;\n }\n console.log(\"You are back online: syncing to remote...\");\n this.synching = true;\n this.changeSyncStatus(\"started\");\n const oauth = new __WEBPACK_IMPORTED_MODULE_1__services_OauthService__[\"a\" /* default */]();\n try {\n await oauth.refreshToken();\n } catch (err) {\n console.warn(\"Failed to refresh token:\", err);\n try {\n const credentials = this.getUser();\n await oauth.getToken(credentials[0], credentials[1]);\n } catch (err) {\n console.error(\"Cannot get token: \", err);\n this.synching = false;\n this.changeSyncStatus(\"failed\");\n return;\n }\n }\n try {\n await this.sendFromStack();\n console.log(\"...sync completed!\");\n this.synching = false;\n this.changeSyncStatus(\"ended\");\n } catch (err) {\n console.error(\"Sync error: could not send the pending requests to server.\", err);\n this.synching = false;\n this.changeSyncStatus(\"failed\");\n }\n }", "async copyAsCurl() {\n let selected = this.selectedRequest;\n\n // Create a sanitized object for the Curl command generator.\n let data = {\n url: selected.url,\n method: selected.method,\n headers: [],\n httpVersion: selected.httpVersion,\n postDataText: null\n };\n\n // Fetch header values.\n for (let { name, value } of selected.requestHeaders.headers) {\n let text = await getString(value);\n data.headers.push({ name: name, value: text });\n }\n\n // Fetch the request payload.\n if (selected.requestPostData) {\n let postData = selected.requestPostData.postData.text;\n data.postDataText = await getString(postData);\n }\n\n copyToClipboard(Curl.generateCommand(data));\n }", "async function callClient(){\r\n console.log(\"Waiting for the project....\");\r\n let firstStep = await willGetProject();\r\n let secondStep = await showOff(firstStep);\r\n let lastStep = await willWork(secondStep);\r\n console.log(\"Completed and deployed in seatle\");\r\n}", "function connect() {\n // Change status text area to Loading\n document.getElementById(\"status\").innerHTML = \"Loading\";\n // Change button text area to Connecting\n document.getElementById(\"button\").textContent = \"Connecting\";\n const openvpn = spawn('C:\\\\Program\\ Files\\\\OpenVPN\\\\bin\\\\openvpn.exe', ['--config', 'C:\\\\Program\\ Files\\\\SchoolVPNClient\\\\resources\\\\resources\\\\client.ovpn']);\n \n openvpn.stdout.on('data', (data) => {\n console.log(data.toString());\n });\n\n openvpn.stderr.on('data', (data) => {\n console.log(data.toString());\n });\n\n openvpn.on('exit', (code) => {\n console.log(`Child exited with code ${code}`);\n });\n \n document.getElementById(\"status\").innerHTML = \"Connected\";\n document.getElementById(\"button\").textContent = \"Disconnect\";\n document.getElementById(\"button\").setAttribute( \"onClick\", \"javascript: disconnect();\" );\n }", "connect() {\n return Promise.resolve();\n }", "async function generateBranchDeployUrl(branch) {\n const {stdout} = await promisify(exec)(`firebase hosting:channel:create ${branch} --json`);\n const {result} = JSON.parse(stdout);\n\n console.log(`Created channel: ${branch}`);\n\n return result.url;\n}", "function uploadTorrent (link){ \n return new Promise ((resolve,reject) =>{\n client.add(link,{path: __dirname + '/download'}, function ontorrent (torrent) {\n console.log('Client is downloading:', torrent.infoHash)\n torrent.on('done', function(){\n console.log('torrent finished downloading')\n client.destroy(function callback (err) {\n console.log(\"No error: \" + err)\n })\n resolve()\n })\n\n })\n })\n\n\n}", "async cdup() {\n return this.send(\"CDUP\");\n }", "function pbpaste() {\n return new Promise((resolve, reject) => {\n const child = child_process.spawn('pbpaste');\n\n // listen on child process stdout\n let response = \"\";\n child.stdout.on(\"data\", (chunk) => {\n response += chunk;\n });\n\n child.on(\"close\", (code) => {\n if (code != 0) {\n reject();\n } else {\n resolve(response);\n }\n });\n });\n}", "_createSerialPort(comName) {\n return new Promise((resolve, reject) => {\n if (comName === null) return;\n\n //----------------------- create OSC serial port -----------------------//\n this.serialPort = new osc.SerialPort({\n devicePath: comName, \n bitrate: 115200,\n });\n\n //------------------------- when port is ready -------------------------//\n this.serialPort.once('ready', () => {\n\n ////////// route and emit messages that are not hello\n this.serialPort.on('message', (message) => {\n\n //--------------------------------------------------------------------\n if (message.address === '/movuino') {\n this.emit('osc', 'serial', { address: message.address, args: message.args});\n //--------------------------------------------------------------------\n } else if (message.address === '/wifi/state' && message.args.length > 0) {\n this.info.wifiState = message.args[0];\n if (this.info.wifiState === 1) {\n // when wifiState becomes 1, we need to check the new ip address\n this._serialRpc('/hello')\n .then((hello) => {\n // this.info.name = hello[1];\n this.info.movuinoip = hello[3];\n return this.attachUDPPort();\n })\n .then(() => {\n this.emit('state', {\n wifiState: this.info.wifiState,\n movuinoip: this.info.movuinoip,\n });\n });\n } else {\n this.emit('state', { wifiState: this.info.wifiState });\n }\n //--------------------------------------------------------------------\n } else if (message.address === '/wifi/set' && message.args.length > 3) {\n this.info.ssid = message.args[0];\n this.info.password = message.args[1];\n this.info.hostip = message.args[2];\n\n this.emit('settings', {\n ssid: this.info.ssid,\n password: this.info.password,\n hostip: this.info.hostip,\n });\n }\n });\n\n ////////// catch osc errors and simply ignore them\n this.serialPort.on('error', (err) => { console.log('osc error : ' + err.message); });\n\n ////////// say hello, set ports and config, get wifi credentials \n this._serialRpc('/hello')\n .then((hello) => {\n console.log(hello);\n if (hello[0] === 'movuino') {\n this.info.name = hello[1];\n this.info.wifiState = hello[2];\n this.info.movuinoip = hello[3];\n this.info.movuinoid = hello[4];\n this.info.firmwareVersion = hello[5];\n return this._serialRpc('/ports/get');\n } \n })\n .then((ports) => {\n const inputPort = config.movuinoOscServer.remotePort;\n const outputPort = config.movuinoOscServer.localPort;\n\n if (ports[0] !== inputPort || ports[1] !== outputPort) {\n return this._serialRpc('/ports/set', [\n { type: 'i', value: inputPort },\n { type: 'i', value: outputPort },\n ]);\n }\n\n return Promise.resolve();\n })\n .then(() => {\n return this._serialRpc('/range/set', [\n { type: 'i', value: config.movuinoSettings.accelRange }, // +/- 16g // * 9.81 / 16\n { type: 'i', value: config.movuinoSettings.gyroRange }, // +/- 2000 deg/sec // * 36 / 200\n ]);\n })\n .then(() => { return this._serialRpc('/serial/enable', [{ type: 'i', value: 1 }]); })\n .then(() => { return this._serialRpc('/magneto/enable', [{ type: 'i', value: 1 }]); })\n .then(() => { return this._serialRpc('/frameperiod/set', [{ type: 'i', value: 10 }]); })\n .then(() => { return this._serialRpc('/wifi/get'); })\n .then((credentials) => {\n ////////// if everything went well, emit all needed information and resolve\n this.info.ssid = credentials[0];\n this.info.password = credentials[1];\n this.info.hostip = credentials[2];\n\n this.info.serialPortReady = true;\n\n this.emit('settings', {\n ssid: this.info.ssid,\n password: this.info.password,\n hostip: this.info.hostip,\n name: this.info.name\n });\n\n this.emit('state', {\n serialPortReady: this.info.serialPortReady,\n wifiState: this.info.wifiState,\n movuinoip: this.info.movuinoip,\n });\n\n resolve();\n });\n });\n\n this.serialPort.open();\n });\n }", "function uploadAll(){\n\tsftp.load(credential).then(function () {\n\t console.log('\\n --> config success ... ');\n\t \t\n\t \tfs.readdir(__dirname + '/uploads', (err, files) => {\n\t\t files.forEach(file => {\n\t\t //console.log(file);\n\t\t sftp.put(__dirname + '/uploads/' + file, '/Test Backup/NodeTest/' + file).then(function (list) {\n\t\t\t console.log('\\n --> ls success \\n', list);\n\t\t\t fs.appendFile(__dirname + '/results/success.txt', file +'\\n', function (err) {\n\t\t\t\t if (err) throw err;\n\t\t\t\t //console.log('Saved!');\n\t\t\t\t});\n\t\t\t \n\t\t\t }).catch(function (error) {\n\t\t\t console.log('\\n --> ls failed ', error);\n\t\t\t fs.appendFile(__dirname + '/results/failure.txt', file +'\\n', function (err) {\n\t\t\t\t if (err) throw err;\n\t\t\t\t //console.log('Saved!');\n\t\t\t\t});\n\t\t\t });\n\t\t });\n\t\t});\n\t}).catch(function (error) {\n\t console.log('\\n --> error : ', error);\n\t});\n}", "sendProgramSignal() {\n\t\treturn this.send({ command: 'p2' })\n\t\t\t.then(() => {\n\t\t\t\treturn new Promise((res) => setTimeout(() => res(this.send({ command: 'p2' })), 1000));\n\t\t\t})\n\t\t\t.then(() => {\n\t\t\t\treturn new Promise((res) => setTimeout(() => res(this.send({ command: 'up' })), 1000));\n\t\t\t});\n\t}", "function runRCloneCmd(destination, callback) {\n\n\t\t// Set args for destination\n\t\tvar args = ['-P', '--stats-one-line', 'copy', appDir]\n\t\tif (destination == 'google') {\n\t\t\targs.push('GooglePhotos:album/');\n\t\t} else {\n\t\t\targs.push('S3:test-marius-123');\n\t\t}\n\n\t\t// Start process\n var child = child_process.spawn('/usr/local/bin/rclone', args, {\n encoding: 'utf8',\n shell: true\n });\n\n child.on('error', (error) => {\n\t\t\t logger.error(error);\n });\n\n child.stdout.setEncoding('utf8');\n child.stdout.on('data', (data) => {\n\t\t\t data = data.toString();\n logger.debug(data);\n\n\t\t\t\t// Update status\n\t\t\t\tif (destination == 'google') {\n ipcRenderer.send('op-status-update-google', data.split(',')[1])\n var elem = document.getElementById(\"googleProgressBar\");\n elem.style.width = data.split(',')[1];\n\t\t\t\t} else {\n ipcRenderer.send('op-status-update-s3', data.split(',')[1])\n var elem = document.getElementById(\"s3ProgressBar\");\n elem.style.width = data.split(',')[1];\n\t\t\t\t}\n });\n\n child.stderr.setEncoding('utf8');\n child.stderr.on('data', (data) => {\n // Return some data to the renderer process with the mainprocess-response ID\n mainWindow.webContents.send('mainprocess-response', data);\n logger.debug(data.toString());\n });\n\n child.on('close', (code) => {\n if (code == 0) {\n\t\t\t\t\t\tlogger.info('[RClone] Upload complete');\n\t\t\t\t\t\tif (destination == 'google') {\n ipcRenderer.send('op-status-update-google', '100%')\n var elem = document.getElementById(\"googleProgressBar\");\n elem.style.width = '100%';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t ipcRenderer.send('op-status-update-s3', '100%')\n var elem = document.getElementById(\"s3ProgressBar\");\n elem.style.width = '100%';\n\t\t\t\t\t\t}\n\n\t\t\t } else {\n\t\t\t\t\t\tlogger.error('[RClone] Process ended with unknown status code: ', code);\n }\n });\n\n if (typeof callback === 'function')\n callback();\n}", "function myAction(params) {\n\n return new Promise(function(resolve, reject) {\n console.log('Connecting to MySQL database');\n var mysql = require('promise-mysql');\n var connection;\n mysql.createConnection({\n host: params.MYSQL_HOSTNAME,\n user: params.MYSQL_USERNAME,\n password: params.MYSQL_PASSWORD,\n database: params.MYSQL_DATABASE\n }).then(function(conn) {\n connection = conn;\n console.log('Querying');\n/**\n * var queryText = 'SELECT * FROM cats WHERE id=?';\n * var result = connection.query(queryText, [params.id]);\n */\n var queryText = ' SELECT DISTINCT ' +\n ' APP.NAME AS app_name, ' +\n ' COMP.NAME AS comp_name, ' +\n ' COMP_ENV.ENVIROMENT_ID, ' +\n ' APP.LAST_UPDATED_BY AS app_last_updated_by, ' +\n ' COMP_ENV.LAST_UPDATED_DATE AS last_updated_date, ' +\n ' COMP.developmode AS developmode, ' +\n ' COMP.SUB_APP_TYPE AS subapp_type, ' +\n ' ENV.ENV_ALIAS AS env_alias, ' +\n/**\n\" decode (COMP_ENV.apply_type, \" +\n \" 'grey', \" +\n \" 'Grey', \" +\n \" 'dr', \" +\n \" 'Dr', \" +\n \" 'grey_dr', \" +\n \" 'Grey_Dr', \" +\n \" 'Normal') \" +\n \" AS apply_type, \" +\n*/\n ' APP.ID AS app_id, ' +\n ' PROT.NAME AS profile_name, ' +\n ' PROT.ID AS profileid, ' +\n/** \n \" TO_CHAR (COMP_ENV.CREATED_DATE, 'yyyy-MM-dd HH24:mi:ss') \" +\n*/\n \" date_format (COMP_ENV.CREATED_DATE, '%Y-%m-%d') \" +\n ' AS apply_created_date, ' +\n\n\n ' COMP_ENV.ID AS comp_id, ' +\n ' VM.HOSTNAME AS hostname, ' +\n ' VM.BUSINESSIP AS businessip, ' +\n ' COMP_ENV.RSC_TYPE AS rsc_type, ' +\n ' COMP.CONTEXT AS context ' +\n/** ' CASE lower ( ' +\n ' xmlcast ( ' +\n ' xmlquery (\\'$xml/profile/product/text()\\' ' +\n ' PASSING prot.property AS \\'xml\\') AS VARCHAR (2000))) ' +\n ' WHEN \\'tomcat\\' ' +\n ' THEN ' +\n ' xmlcast ( ' +\n ' xmlquery (\\'$xml/profile/defaultPort/text()\\' ' +\n ' PASSING prot.property AS \\'xml\\') AS VARCHAR (2000)) ' +\n ' WHEN \\'was\\' ' +\n ' THEN ' +\n ' xmlcast ( ' +\n ' xmlquery (\\'$xml/profile/wasDefaultPort/text()\\' ' +\n ' PASSING prot.property AS \\'xml\\') AS VARCHAR (2000)) ' +\n ' ELSE ' +\n ' prot.ports ' +\n ' END ' +\n ' AS ports ' +\n*/\n ' FROM COMP_ENVIROMENT_T COMP_ENV ' +\n ' INNER JOIN APPLICATION_T APP ON APP.ID = COMP_ENV.APPLICATION_ID ' +\n ' INNER JOIN COMPONENT_T COMP ON COMP.ID = COMP_ENV.COMPONENT_ID ' +\n ' INNER JOIN ENVIROMENT_T ENV ON ENV.ID = COMP_ENV.ENVIROMENT_ID ' +\n ' LEFT JOIN COMPONENT_PROFILE_T COMP_PROFILE ' +\n ' ON COMP_ENV.ID = COMP_PROFILE.COMP_ENVIROMENT_ID ' +\n ' LEFT JOIN PROFILE_T PROT ON PROT.ID = COMP_PROFILE.PROFILE_ID ' +\n ' LEFT JOIN VIRTUAL_MACHINE_T VM ON VM.ID = PROT.VM_ID ' +\n' ORDER BY APP.NAME, ' +\n ' COMP.NAME, ' +\n ' ENV.ENV_ALIAS, ' +\n ' VM.HOSTNAME ' +\n' limit 10 '\n;\n/**\nqueryText = 'select * from COMP_ENVIROMENT_T limit 10';\n*/ \n var result = connection.query(queryText);\n connection.end(); \n return result;\n }).then(function(result) {\n console.log(result);\n if (result) {\n resolve({\n statusCode: 200,\n headers: {\n 'Content-Type': 'application/json'\n },\n body: result\n });\n } else {\n reject({\n headers: {\n 'Content-Type': 'application/json'\n },\n statusCode: 404,\n body: {\n error: \"Not found.\"\n }\n });\n }\n }).catch(function(error) {\n if (connection && connection.end) connection.end();\n console.log(error);\n reject({\n headers: {\n 'Content-Type': 'application/json'\n },\n statusCode: 500,\n body: {\n error: \"Error.\"\n }\n });\n });\n });\n\n}", "singleUpload({file, path, nameFile, idObjeto, model}){\n return new Promise((resolve, reject)=>{\n try {\n this.defaultFolder(env.files.uploadsPath + path)\n let extension = this.fileExtension(file.type.split('/')[1])\n let name = nameFile+'.'+extension;\n let path_origem = file.path;\n let path_destino = env.files.uploadsPath + path + name; \n mv(path_origem, path_destino, async function(err){ \n if(!err){ \n Upload.find({idObjeto: idObjeto}).then((doc)=>{\n if(doc.length > 0){\n Upload.findOneAndUpdate({idObjeto: idObjeto}, {\n model: model.collection.name,\n idObjeto: idObjeto,\n local: path_destino,\n nome: name,\n extensao: extension,\n url: env.files.uploadsUrl + path + name\n })\n .then(()=> resolve(env.files.uploadsUrl + path + name))\n .catch(reject)\n }else{\n new Upload({\n model: model.collection.name,\n idObjeto: idObjeto,\n local: path_destino,\n nome: name,\n extensao: extension,\n url: env.files.uploadsUrl + path + name\n }).save().then(()=> resolve(env.files.uploadsUrl + path + name))\n .catch(reject)\n }\n }) \n }else{\n reject({name: \"upload\", message: err})\n }\n })\n } catch (error) {\n reject({name: \"upload\", message: error})\n }\n })\n }", "async putVersionOpts(pathext) {\n const ver = await this.version(pathext);\n return Object.assign({ method: 'PUT' }, ver);\n }", "async function copy() {\n await makeDir('build');\n await Promise.all([\n writeFile(\n 'build/package.json',\n JSON.stringify(\n {\n private: true,\n engines: pkg.engines,\n dependencies: pkg.dependencies,\n scripts: {\n start: 'node server.js',\n },\n },\n null,\n 2,\n ),\n ),\n copyFile('LICENSE.txt', 'build/LICENSE.txt'),\n copyFile('yarn.lock', 'build/yarn.lock'),\n copyDir('public', 'build/public'),\n copyDir('gcp', 'build/gcp'),\n ]);\n}", "onFork() {\r\n const id = this.props.params.preset;\r\n let preset;\r\n\r\n chrome.p.storage.local\r\n .get('preset_' + id)\r\n .then(res => {\r\n preset = res['preset_' + id];\r\n preset.id = Date.now();\r\n return savePreset(preset);\r\n })\r\n .then(() => (location.hash = '#/presets/' + preset.id));\r\n }", "function main(msg) {\n var hostToPing = msg.payload;\n console.log('Pinging to ' + hostToPing);\n\n var spawn = require('child_process').exec;\n var promise = new Promise(function(resolve, reject) {\n var child = spawn('ping -c 3 ' + hostToPing);\n\n var tmp = {stdout: \"\", stderr: \"\", code: 0};\n\n child.stdout.on('data', function (data) {\n tmp.stdout = tmp.stdout + data;\n });\n\n child.stderr.on('data', function (data) {\n tmp.stderr = tmp.stderr + data;\n });\n\n child.on('close', function (code) {\n tmp.code = code;\n console.log('code', tmp.code);\n console.log('stdout', tmp.stdout);\n console.log('stderr', tmp.stderr);\n resolve(tmp);\n });\n });\n\n return promise;\n}", "async deploy() {\n const { url } = await this.provider.faas.createHttpFunction(this.params)\n this.url = url\n return this\n }", "connect(){\n return new Promise( ( resolve, reject ) => {\n this.sql.connect( ( err, suc ) => {\n if ( err )\n return reject( err )\n resolve( suc )\n } )\n } )\n }", "function gitMvAsync(src, dst) {\n var cmd = 'git mv ' + src + ' ' + dst;\n execAsync(cmd)\n .then(({stdout, stderr}) => {\n console.log(`stdout: ${stdout}`);\n console.log(`stderr: ${stderr}`);\n })\n .catch(error => {\n console.error(`exec error: ${error}`);\n throw error;\n }); \n}", "function deploy(func, args, save_path, cb){\n\tconsole.log(\"[obc-js] Deploying Chaincode - Start\");\n\tconsole.log(\"\\n\\n\\t Waiting...\");\t\t\t\t\t\t\t\t\t\t//this can take awhile\n\tvar options = {path: '/devops/deploy'};\n\tvar body = \t{\n\t\t\t\t\ttype: \"GOLANG\",\n\t\t\t\t\tchaincodeID: {\n\t\t\t\t\t\t\tpath: chaincode.details.git_url\n\t\t\t\t\t\t},\n\t\t\t\t\tctorMsg:{\n\t\t\t\t\t\t\t\"function\": func,\n\t\t\t\t\t\t\t\"args\": args\n\t\t\t\t\t}\n\t\t\t\t};\n\toptions.success = function(statusCode, data){\n\t\tconsole.log(\"\\n\\n\\t deploy success [wait 1 more minute]\");\n\t\tchaincode.details.deployed_name = data.message;\n\t\tobc.prototype.save(tempDirectory);\t\t\t\t\t\t\t\t\t//save it so we remember we have deployed\n\t\tif(save_path != null) obc.prototype.save(save_path);\t\t\t\t//user wants the updated file somewhere\n\t\tif(cb){\n\t\t\tsetTimeout(function(){\n\t\t\t\tconsole.log(\"[obc-js] Deploying Chaincode - Complete\");\n\t\t\t\tcb(null, data);\n\t\t\t}, 60000);\t\t\t\t\t\t\t\t\t\t\t\t\t\t//wait extra long, not always ready yet\n\t\t}\n\t};\n\toptions.failure = function(statusCode, e){\n\t\tconsole.log(\"[obc-js] deploy - failure:\", statusCode);\n\t\tif(cb) cb(eFmt('http error', statusCode, e), null);\n\t};\n\trest.post(options, '', body);\n}", "function fileCopy() {\n rl.question(\n chalk.bold.blue('Enter Location of <SP HOME> directory : '),\n (location) => {\n fs.exists(location + WIDGET_FOLDER, (exist) => {\n if (exist) {\n fs.copy(BUILT_DIRECTORY, location + WIDGETS_LOCATION)\n .then(() => {\n console.log(\n chalk.bold.green('\\nCOPPIED SUCCESSFULLY !!! \\n\\n\\tFROM\\t:'),\n chalk.bold.yellow(WIDGETS_LOCATION),\n chalk.bold.green('\\n\\tTO\\t:'),\n chalk.bold.yellow(location + WIDGETS_LOCATION, '\\n'),\n );\n\n rl.close();\n })\n .catch((error) => {\n console.log(chalk.bold.green('Copy failure !!!!', error));\n });\n } else {\n chalk.bold.blue('Enter Location of <SP HOME> directory : ');\n rl.question(\n chalk.bold.red(\n `Location : ${location} is not a valid destination if you want to retry enter 'Y' : `,\n ),\n (userFeedback) => {\n if (['y', 'Y', 'Yes', 'YES'].includes(userFeedback)) {\n fileCopy();\n } else {\n rl.close();\n }\n },\n );\n }\n });\n },\n );\n}", "installBchApi () {\n shell.cd(`${__dirname.toString()}/../uut`)\n shell.exec('git clone https://github.com/Permissionless-Software-Foundation/bch-api')\n shell.cd('bch-api')\n shell.exec(`npm install > ${__dirname.toString()}/../html/logs/bch-api/install.txt`)\n }", "async function updateRemote(deployInfo) {\n console.log(\"Updating remote magento server\");\n\n if (\n shell.exec(\n `ssh ${deployInfo.host} \"cd ${path.resolve(\n deployInfo.dest,\n \".magento\"\n )}; bin/magento setup:upgrade; bin/magento cache:flush\"`\n ).code !== 0\n ) {\n console.error(\n \"Was not able to upgrade the remote magento server to reflect the deploy\"\n );\n }\n}", "function deployRpc(options) {\n options = Object.assign({}, options);\n options.headers = Object.assign({}, options.headers || {});\n if (options.headers.cookie) {\n throw new Error(\"sorry, can't combine cookie headers yet\");\n }\n options.qs = Object.assign(\n {},\n options.qs,\n { capabilities: CAPABILITIES.slice() },\n options.deployWithTokenProps || {}\n );\n // If we are waiting for deploy, we let Galaxy know so it can\n // use that information to send us the right deploy message response.\n if (options.waitForDeploy) {\n options.qs.capabilities.push('willPollVersionStatus');\n }\n\n const deployURLBase = getDeployURL(options.site).await();\n\n if (options.printDeployURL) {\n Console.info(\"Talking to Galaxy servers at \" + deployURLBase);\n }\n\n let operand = '';\n if (options.operand) {\n operand = `/${options.operand}`;\n } else if (options.site) {\n operand = `/${options.site}`;\n }\n\n // XXX: Reintroduce progress for upload\n try {\n var result = request(Object.assign(options, {\n url: deployURLBase + '/' + options.operation +\n operand,\n method: options.method || 'GET',\n bodyStream: options.bodyStream,\n useAuthHeader: true,\n encoding: 'utf8' // Hack, but good enough for the deploy server..\n }));\n } catch (e) {\n return {\n statusCode: null,\n errorMessage: \"Connection error (\" + e.message + \")\"\n };\n }\n\n var response = result.response;\n var body = result.body;\n var ret = { statusCode: response.statusCode };\n\n if (response.statusCode !== 200) {\n if (body.length > 0) {\n ret.errorMessage = body;\n } else {\n ret.errorMessage = \"Server error \" + response.statusCode +\n \" (please try again later)\";\n }\n return ret;\n }\n\n var contentType = response.headers[\"content-type\"] || '';\n if (contentType === \"application/json; charset=utf-8\") {\n try {\n ret.payload = JSON.parse(body);\n } catch (e) {\n ret.errorMessage =\n \"Server error (please try again later)\\n\"\n + \"Invalid JSON: \" + body;\n return ret;\n }\n } else if (contentType === \"text/plain; charset=utf-8\") {\n ret.message = body;\n }\n\n const hasAllExpectedKeys =\n (options.expectPayload || [])\n .map(key => ret.payload && hasOwn.call(ret.payload, key))\n .every(x => x);\n\n if ((options.expectPayload && ! hasOwn.call(ret, 'payload')) ||\n (options.expectMessage && ! hasOwn.call(ret, 'message')) ||\n ! hasAllExpectedKeys) {\n delete ret.payload;\n delete ret.message;\n\n ret.errorMessage = \"Server error (please try again later)\\n\" +\n \"Response missing expected keys.\";\n }\n\n return ret;\n}", "copyFiles(options) {\n let {\n files,\n kitQuestions,\n folderPath,\n kitPath,\n kit,\n ver,\n isSteamerKit,\n projectName,\n kitConfig\n } = options;\n // 脚手架相关配置问题\n let prompt = inquirer.createPromptModule();\n prompt(kitQuestions)\n .then(answers => {\n\n answers = Object.assign({}, answers, {\n projectName\n });\n\n // 复制文件前的自定义行为\n if (kitConfig.beforeInstallCopy && _.isFunction(kitConfig.beforeInstallCopy)) {\n kitConfig.beforeInstallCopy.bind(this)(answers, folderPath);\n }\n\n files = files.filter(item => {\n return !this.ignoreFiles.includes(item);\n });\n\n files.forEach(item => {\n let srcFiles = path.join(kitPath, item),\n destFile = path.join(folderPath, item);\n\n if (this.fs.existsSync(srcFiles)) {\n this.fs.copySync(srcFiles, destFile);\n }\n });\n\n if (answers.webserver) {\n this.fs.ensureFileSync(\n path.join(folderPath, \"config/steamer.config.js\")\n );\n this.fs.writeFileSync(\n path.join(folderPath, \"config/steamer.config.js\"),\n \"module.exports = \" + JSON.stringify(answers, null, 4)\n );\n }\n\n // 复制文件后的自定义行为\n if (kitConfig.afterInstallCopy && _.isFunction(kitConfig.afterInstallCopy)) {\n kitConfig.afterInstallCopy.bind(this)(answers, folderPath);\n }\n\n if (isSteamerKit) {\n this.createPluginConfig(\n {\n kit: kit,\n version: ver\n },\n folderPath\n );\n }\n\n // 替换项目名称\n if (!!projectName) {\n const oldPkgJson = this.getPkgJson(folderPath);\n let pkgJson = _.merge({}, oldPkgJson, {\n name: projectName\n });\n this.fs.writeFileSync(\n path.join(folderPath, \"package.json\"),\n JSON.stringify(pkgJson, null, 4),\n \"utf-8\"\n );\n }\n // \bbeforeInstall 自定义行为\n if (kitConfig.beforeInstallDep && _.isFunction(kitConfig.beforeInstallDep)) {\n kitConfig.beforeInstallDep.bind(this)(answers, folderPath);\n }\n\n // 安装项目node_modules包\n this.spawn.sync(this.config.NPM, [\"install\"], {\n stdio: \"inherit\",\n cwd: folderPath\n });\n\n // afterInstall 自定义行为\n if (kitConfig.afterInstallDep && _.isFunction(kitConfig.afterInstallDep)) {\n kitConfig.afterInstallDep.bind(this)(answers, folderPath);\n }\n\n this.success(\n `The project is initiated success in ${folderPath}`\n );\n })\n .catch(e => {\n this.error(e.stack);\n });\n }", "function kIPC(vm, uri, method, args, onok, onerr, timeout) {\n \n var rq = {\n v: 1, // protocol version\n id: __jn_stacks.newId()+(new Date().getTime())+\"\", // dunno why at init time the ID counter is not enough and can interfere with something else :\\\n uri: uri,\n terminal_id: \"~\", // always 'myself' for local requests - remote set at hubConnection\n/*\n object_type: vm.TypeURI, // TODO DOC decide on these names! mb. caller_type, caller_uri, etc.?\n object_security: vm.SecurityURI,\n object_uri: vm.uri, // named request\n*/\n caller_type: vm.TypeURI, // TODO DOC decide on these names! mb. caller_type, caller_uri, etc.?\n caller_security: vm.SecurityURI,\n caller_uri: vm.uri, // named request\n\n method: method,\n args: args,\n \n timeout: parseInt((timeout || MAX_RQ_TIME)) // timeout to drop\n };\n \n //var TIMEOUT_OK = {v: false};\n \n var afterSign = function () {\n if (vm.security.validateResponse) {\n var myonok = function (rs) {\n // validate response, if appropriate\n // TODO: these are currently unusable for in-stack execution; need to set SecurityError instead\n // maybe do not validate response here??\n \n var cbo = function (vr) {\n if(vr) {\n //TIMEOUT_OK.v = true;\n onok(rs); \n } else {\n onerr({id: rq.id, status: \"EPERM\", result: \"response validation failed\"}); // this can actually be parsed as permission error and raise SecurityError..\n }\n };\n \n var cbe = function (vr) {\n onerr({id: rq.id, status: \"EEXCP\", result: \"validateResponse failed with exception: \"+vr});\n };\n \n vm.execf_thread(vm.security.validateResponse, [rq], cbo, cbe, undefined, vm.security); \n };\n } else {\n //var myonok = function (rs) { TIMEOUT_OK.v = true; onok(rs); };\n var myonok = onok;\n }\n\n var lURI = uri.split(\"/\");\n if(lURI[0] == \"\") { // means this is root HUB request\n if(vm.DEBUG) vm.ErrorConsole.log(\"in kIPC... request for HUB\");\n\n // DOC if no onerror and only onok: call onok always -> as a standard kernel programming practice\n // TODO: introduce timeout to requests in case the request gets never response\n \n hubConnection.send(rq); \n if(uri.indexOf(\",\") > -1) {\n onok({id: rq.id, status: \"OK\", result: null});\n } else {\n __eos_requests[rq.id] = {request: rq, onok: myonok, onerror: onerr}; \n }\n } else { // TODO: URI caching\n try { // TODO get rid of this.. later\n // cache\n if(__eos_objects[uri]) var dest = __eos_objects[uri];\n else var dest = vm.getChild(lURI); // should never fail...\n } catch (e) {\n onerr({id: rq.id, status: \"EEXCP\", result: \"FAILED TO EXECUTE GETCHILD: \"+e+\" Line:\"+e.lineNumber+\" File:\"+e.fileName});\n return;\n }\n if(dest == null) {\n \n onerr({id: rq.id, status: \"EEXCP\", result: \"object not found by URI\"});\n return;\n }\n if(typeof(dest)==\"string\") { // means we're redirect \n if(vm.DEBUG) vm.ErrorConsole.log(\"in kIPC... again kIPC!\");\n // TODO optimize this! this will run signRequest at least twice; and pollute heap\n kIPC(vm, dest, method, args, onok, onerr); // we're taking advantage of the 'GIL' in js engine\n } else { // means it is a VM instance, so execute the request\n try {\n dest.execIPC(rq, myonok, onerr); // XXX parse results?? if YES -> change wakeObject!! \n } catch (e) {\n if(window.console) console.log(\"in kIPC - execIPC error:: \" + e);\n }\n }\n }\n \n if(typeof(timeout) == \"number\") {\n var tmf = function () {\n //if(TIMEOUT_OK.v) return;\n onerr({id: rq.id, status: \"EEXCP\", result: \"TIMEOUT\"});\n //hubConnection.abort(rq.id); // fail silently?? or do not abort??\n };\n setTimeout(tmf, timeout); // document that timeout is milliseconds\n }\n \n };\n\n if (vm.security.signRequest) {\n // do somehow validate request\n var onSok = function (res){\n if(res === true) { // XXX DOC the signRequest should modify the rq object itself and it should return true\n afterSign();\n } else {\n onerr({id: rq.id, status: \"EPERM\", result: (res ? res : \"signRequest refused to sign request\")});\n }\n };\n \n var onSerr = function (exc) {\n onerr({id: rq.id, status: \"EEXCP\", result: \"signRequest failed with exception: \"+exc});\n };\n vm.execf_thread(vm.security.signRequest, [rq], onSok, onSerr, undefined, vm.security); \n } else {\n afterSign();\n }\n\n}", "async function BackupDB()\n{\n //var data = await httpRequest('GET', usr_data_url, '');\n var response = httpRequest('PUT', db_url, db);\n console.log(\"Backing DB to cloud\");\n}", "async function promoteToStable() {\n console.log('Getting repo root location.');\n const res = await exec('git rev-parse --show-toplevel');\n const repoRoot = res.stdout.trim('\\n');\n\n console.log('Pushing release to local stable branch.');\n return exec(`git push --follow-tags ${repoRoot} master:stable`)\n}", "go() {\n return new Promise(async (resolve, reject) => {\n try {\n let commands = [wcCommands.go()];\n\n debug('Executing Go Command');\n\n let response = this.execute(commands);\n\n resolve(response);\n } catch (err) {\n reject(err);\n }\n });\n }", "cloneTag(options) {\n let { repo, kitName, localPath, tag } = options;\n\n this.fs.ensureDirSync(localPath);\n\n return new Promise((resolve, reject) => {\n this.git(localPath)\n .silent(true)\n .exec(() => {\n this.spinner.start();\n this.spinner.color = \"cyan\";\n this.spinner.text = `installing ${kitName}`;\n })\n .exec(() => {\n let isGitFolderExists = this.fs.existsSync(\n path.join(localPath, \".git\")\n );\n\n if (!isGitFolderExists) {\n this.spawn.sync(\"git\", [\"init\"], { cwd: localPath });\n this.spawn.sync(\"git\", [\"remote\", \"add\", \"origin\", repo], {\n cwd: localPath\n });\n }\n })\n .fetch(\n [\n \"origin\",\n `refs/tags/${tag}:refs/tags/${tag}`,\n \"--depth=1\"\n ],\n err => {\n if (err) {\n this.spinFail(kitName, err);\n reject(err);\n return;\n }\n let version = this.getVersion(tag);\n this.git(localPath)\n .silent(true)\n .branch([`${version}`, `${tag}`], err => {\n err && this.spinFail(kitName, err);\n if (err) {\n reject(err);\n }\n })\n .checkout(`${version}`, () => {\n this.spinSuccess(\n `${kitName}@${version} installed`\n );\n let pkgJson = this.getPkgJson(localPath),\n versions = this.addVersion(\n this.kitOptions.list[kitName].versions,\n pkgJson.version\n );\n\n this.kitOptions.list[kitName] = this._.merge(\n {},\n this.kitOptions.list[kitName],\n {\n description: pkgJson.description,\n currentVersion: pkgJson.version,\n latestVersion: versions[0],\n versions: versions\n }\n );\n resolve();\n });\n }\n );\n });\n }", "function sendFile(cloudURL, file) {\n console.log(\"Trying to send file to \" + cloudURL);\n var promise = new Promise(getBuffer(file));\n // Wait for promise to be resolved, or log error.\n promise.then(function (data) {\n // Here you can pass the bytes to another function.\n console.log(data);\n\n var xmlhttp = new XMLHttpRequest();\n xmlhttp.open(\"PUT\", cloudURL, true);\n xmlhttp.onload = function (oEvent) {\n // Uploaded.\n console.log(\"Request status: \" + xmlhttp.status);\n };\n xmlhttp.send(data);\n\n\n }).catch(function (err) {\n console.log('Error: ', err);\n });\n}", "function transferProjectToRemote(failed, successful) {\n\tconsole.log(\"##Xfering files from localhost to remote repo-temp folder.\");\n\treturn ssh.putDirectory(__dirname + '', repoNameTemp, {\n\t\trecursive: true,\n\t\tconcurrency: 1,\n\t\tvalidate: function(itemPath) {\n\t\t\tconst baseName = path.basename(itemPath)\n\t\t\treturn baseName.substr(0, 1) !== '.' // do not allow dot files\n\t\t\t\t&& baseName !== nodeModulesDir // do not allow node_modules\n\t\t\t\t&& baseName !== 'deploy.js' // this pgm\n\t\t\t\t&& baseName !== 'deploy.sh' // Don't send shell script\n\t\t\t\t&& baseName !== 'data' // do not allow data dir\n\t\t},\n\t\ttick: function(localPath, remotePath, error) {\n\t\t\tif (error) {\n\t\t\tfailed.push(localPath)\n\t\t\tconsole.log(\"failed.push: \" + localPath)\n\t\t\t} else {\n\t\t\tsuccessful.push(localPath)\n\t\t\tconsole.log(\"successful.push: \" + localPath)\n\t\t\t}\n\t\t}\n\t})\n}", "async function copyFile() {\n const data = await readFile(); // if there is any error here, the Promise will reject with the error\n await writeFile(data); // if there is any error here, the Promise will reject with the error\n console.log('Copying done!');\n // an async function implicitly returns the Promise object\n return DESTINATION; // Promise will resolve with the DESTINATION\n}", "async syncToRemote() {\n __WEBPACK_IMPORTED_MODULE_3__utility_OfflineUtility__[\"a\" /* default */].syncToRemote();\n }", "_checkAndGenerateSSHKeys() {\n var file = config('agent:vm:ssh_key');\n return fsAsync.exists(file).then((exist) => {\n if (!exist) {\n this.info('configure.generating_key');\n var script = `\n set -x;\n ssh-keygen -t rsa -f ${file} -N ''; result=$?;\n set +x;\n echo \"\";\n exit $result;\n `;\n return this.execSh(script).then((code) => {\n if (code !== 0) {\n throw new DependencyError('ssh_keygen');\n } else {\n return code;\n }\n });\n }\n });\n }", "async function main() {\n const program = new Command();\n program.parse(process.argv);\n await fs.mkdir(\"build\", { recursive: true });\n await fs.writeFile(\n \"build/config.json\",\n JSON.stringify(await getDeployConfig(), null, 2) + \"\\n\"\n );\n console.log(\"wrote build/config.json\");\n process.exit(0);\n}", "static disposer(config) {\n return Promise.resolve(new Client(config)).disposer(client => client.quit());\n }", "run() {\n return new Promise((resolve) => {\n const owners = process.env.OWNER.split(\",\");\n if (!owners.includes(this.message.author.id)) return \"Only the bot owner can reload Lavalink!\";\n this.client.sendChannelTyping(this.message.channel.id);\n this.ipc.broadcast(\"soundreload\");\n this.ipc.register(\"soundReloadSuccess\", (msg) => {\n this.ipc.unregister(\"soundReloadSuccess\");\n this.ipc.unregister(\"soundReloadFail\");\n resolve(`Successfully connected to ${msg.length} Lavalink node(s).`);\n });\n this.ipc.register(\"soundReloadFail\", () => {\n this.ipc.unregister(\"soundReloadSuccess\");\n this.ipc.unregister(\"soundReloadFail\");\n resolve(\"I couldn't connect to any Lavalink nodes!\");\n });\n });\n }", "async function run() {\n try {\n await copyFile('./LICENSE');\n await copyFile('./CHANGELOG.md');\n await copyFile('./README.md');\n await copyFile('./src/index.js', 'index.es.js');\n await copyPackageJson();\n } catch (error) {\n console.error('Copy failed', error);\n }\n}", "getCluster(params) {\n //params.region\n //params.deployment\n //params.cluster\n console.log(\"[DataProvider][getCluster] begin\")\n return Promise.timeout(1)\n .then(() => {\n console.log(\"[DataProvider][getCluster] inside begin\")\n if (params.cluster == 'hello') {\n return {\n name: params.cluster,\n state: \"deploy\",\n status: \"processing\",\n actions: [{\n name: 'build'\n }, {\n name: 'push'\n }, {\n name: 'deploy'\n }]\n };\n }\n return {\n name: params.cluster,\n state: \"undeploy\",\n status: \"completed\",\n actions: [{\n name: 'build'\n }, {\n name: 'push'\n }, {\n name: 'deploy'\n }]\n };\n });\n\n }", "async save() {\n const [lock] = await Promise.all([\n this._provider.acquireLock(),\n this.ready\n ]);\n let promise;\n promise = this._save();\n // if save completed successfully, we set the initialized content in the rtc server.\n promise = promise.then(() => {\n this._provider.putInitializedState();\n });\n const finally_ = () => {\n this._provider.releaseLock(lock);\n };\n promise.then(finally_, finally_);\n return await promise;\n }", "async function comprar(preference) {\n try {\n //preference es un objeto con datos de la compra\n //comprar -- compraModel\n return await mp.preferences.create(preference) \n } catch (error) {\n throw error;\n }\n}", "function src(distPath) {\n return new Promise((resolve, reject) => {\n //\n prepareDist(distPath)\n .then(() => {\n const srcFolder = paths.srcFolderPath();\n fs.readdir(srcFolder, (error, items) => {\n if (error) {\n reject(error);\n }\n // for each item in srcFolder\n var promises = [];\n items.forEach(item => {\n if (!utils.isIgnoreFile(srcFolder + '/' + item)) {\n promises.push(\n ncp(srcFolder + '/' + item, distPath + '/' + item, error => {\n if (error) {\n console.error(error);\n return reject(error);\n }\n resolve();\n })\n );\n }\n });\n\n // copy top-level README to ./dist/npm\n promises.push(\n ncp(\n readmePath,\n `${distPath}/README.md`,\n error => {\n if (error) {\n console.error(error);\n return reject(error);\n }\n },\n resolve()\n )\n );\n\n // copy top-level CHANGELOG to ./dist/npm\n promises.push(\n ncp(\n changeLogPath,\n `${distPath}/CHANGELOG.md`,\n error => {\n if (error) {\n console.error(error);\n return reject(error);\n }\n },\n resolve()\n )\n );\n\n Promise.all(promises)\n .then(() => {\n resolve();\n })\n .catch(error => {\n reject(error);\n });\n });\n })\n\n .catch(error => {\n return reject(error);\n });\n });\n}", "async function comprar(preference) {\n try {\n return await mp.preferences.create(preference);//metodo de mercado PAgo\n } catch (error) {\n throw error;\n }\n}", "function saveChanges() {\n ctrl.showSuccess = false;\n ctrl.showError = false;\n var url = [\n refstackApiUrl, '/products/', ctrl.version.product_id,\n '/versions/', ctrl.version.id ].join('');\n var content = {'cpid': ctrl.version.cpid};\n $http.put(url, content).success(function() {\n // Update the original version object.\n version.cpid = ctrl.version.cpid;\n ctrl.showSuccess = true;\n }).error(function(error) {\n ctrl.showError = true;\n ctrl.error = error.detail;\n });\n }", "async function copyFileAndUpdate() {\n const toCopyFile = r(copyDir, 'copyFile.js');\n const srcFileDest = r(tSrcDir, 'services/copyFile.service.js');\n const outFile = r(tOutDir, 'services/copyFile.service.js');\n\n await copy(toCopyFile, srcFileDest);\n\n await listenToRestart(execOutput.data.childProcess, 'copyFileAndUpdate');\n\n const copiedSrcFileContent = await readFile(\n srcFileDest,\n 'Failed reading test_space/src/services/copyFile.service.js.',\n );\n\n sm.snap('services:l1:copy:copyFile.service:restart', {\n toCopyFile,\n srcFileDest,\n copiedSrcFileContent,\n });\n\n // Update the the copied file to check that now the rebuild work smooth\n const updatedContent = copiedSrcFileContent.replace(\n 'COPY_FILE_V1',\n 'COPY_FILE_V2',\n );\n\n await writeFile(srcFileDest, updatedContent);\n\n await listenToRestart(execOutput.data.childProcess, 'copyFileAndUpdate-2');\n\n const copyFileOutContent = await readFile(\n srcFileDest,\n 'Failed reading test_space/dist/services/copyFile.service.js.',\n );\n\n sm.snap('services:l1:copy:copyFile.service:update:restart', {\n srcFile: srcFileDest,\n outFile,\n srcContent: copiedSrcFileContent,\n outContent: copyFileOutContent,\n });\n }", "listenCallback (cp) {\n this.check()\n .then(() => {\n if (this.hasDependency()) {\n cp(this.version, this.semver)\n }\n })\n .catch(e => {\n cp(null, this.semver)\n })\n }", "async function prep_staging(branch) {\n await deleteChannel(branch);\n\n let url = await generateBranchDeployUrl(branch);\n\n await setEnv(url);\n\n console.log(`Staging url: ${url}`);\n}", "async function connection()\n{\n\t//First set connection to false\n\tisConnected = false;\n\t//Send a sub/ack request to the controller\n\tclient.publish('sub', key.encrypt('sub'), function (err)\n\t{\n\t\tif (err) throw \"Error Description: \" + err;\n\t});\n\t\n\t//Wait 1 sec for a response\n\tawait sleep(1000);\n\t\n\t//If no ack, disable all inputs to the controller\n\tif (isConnected == false)\n\t{\n\t\tprocess.stdin.pause();\n\t\tconsole.log(\"Awaiting Connection\");\n\t}\n}", "function remote(cmd, quotes = \"'\") {\n res = execSync(`ssh eycost-db ${quotes}${cmd}${quotes}`);\n console.log(res.toString());\n}", "sensorFromCmd(cmd,path){\n cp.exec(cmd,{},(err,stdout) =>{\n this.out(\n stdout.split(\"\\n\").filter(a=>a).map((row) => {\n row = row.split(' ');\n if(row.length === 1) row = [path,row[0]];\n if(path) row[0] = this.spath + '.' + path;\n return row;\n })\n );\n });\n }" ]
[ "0.59213984", "0.57192713", "0.5506172", "0.548478", "0.52495", "0.5240451", "0.5233683", "0.5205542", "0.5194032", "0.51852715", "0.51653147", "0.5155067", "0.5071846", "0.5069637", "0.5047318", "0.50348073", "0.5028654", "0.5001386", "0.49853018", "0.49519834", "0.49511638", "0.49289295", "0.4923935", "0.490298", "0.4897284", "0.48852217", "0.48848525", "0.48774663", "0.48771632", "0.48758426", "0.4874489", "0.48522452", "0.48491478", "0.48378003", "0.48377457", "0.48281273", "0.48275983", "0.48165375", "0.4789745", "0.47857097", "0.47755274", "0.4756216", "0.474881", "0.47488007", "0.4743517", "0.47421032", "0.47413135", "0.47349194", "0.47336945", "0.47332966", "0.47320032", "0.47283167", "0.47178423", "0.47114226", "0.47073278", "0.4699189", "0.46978515", "0.46977362", "0.46966118", "0.4681468", "0.46807778", "0.46728227", "0.4672763", "0.4672601", "0.4667392", "0.4656585", "0.46541122", "0.4649722", "0.46457562", "0.46441808", "0.46439132", "0.46418762", "0.46395385", "0.46309292", "0.462883", "0.46223125", "0.4620748", "0.4617747", "0.4615545", "0.46098182", "0.46067822", "0.46027845", "0.4601568", "0.46001795", "0.45977476", "0.4578239", "0.45754856", "0.45745832", "0.45731273", "0.45730364", "0.45721662", "0.45634633", "0.45585352", "0.45553005", "0.45516273", "0.45381865", "0.45380056", "0.4537297", "0.45302957", "0.45298618" ]
0.55999565
2
Versione con scp con promise
function downloadWithPromise(host, user, remoteFile, localDir) { var deferred = Q.defer(); var scp = setupSCP(host, user) scp.download(remoteFile, localDir, deferred.resolve); return deferred.promise; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async cloneVersion() {\n const cloneOpts = await this.putVersionOpts('/clone');\n this.tick(0, 'Cloning Service Config version', 'cloning version');\n return request(cloneOpts).then((r) => {\n this._version = r.number;\n this.tick(1, `Cloned Service Config Version ${r.number}`, `cloning version ${r.number}`);\n return Promise.resolve(this);\n })\n .catch((e) => {\n const message = 'Unable to create new service version';\n this.log.error(message, e);\n throw new Error(message, e);\n });\n }", "sftp() {\n if (!this.ready) {\n throw 'connection not ready';\n }\n return this.client.sftpAsync().then(sftp => {\n return BPromise.promisifyAll(sftp);\n });\n }", "function uploadWithPromise(host, user, file, remote) {\n \n var deferred = Q.defer();\n var scp = setupSCP(host, user) \n \n scp.upload(file, remote, deferred.resolve);\n \n return deferred.promise;\n}", "function sshConnect() {\n\tconsole.log(\"##Connecting to \" + remoteHost + \" as \" + remoteUsername + \"...\");\n\tssh.connect({\n\t\t// TODO: ADD YOUR IP ADDRESS BELOW (e.g. '12.34.5.67')\n\t\thost: remoteHost,\n\t\tusername: remoteUsername,\n\t\tprivateKey: remotePrivateKey\n\t})\n\t.then(function() {\n\t\tconsole.log(\"SSH Connection established.\");\n // Careful, createRemoteFolder is destructive! Empty new folder...\n\t\treturn createRemoteTempFolder();\n\t})\n\t.then(function(result) {\n console.log(\"##After createRemoteTempFolder result object is \", result);\n\t\tconst failed = []\n\t\tconst successful = []\n\t\tif(result.stdout){ console.log('STDOUT: ' + result.stdout); }\n\t\tif(result.stderr || result.code ){\n\t\t\tconsole.log('STDERR: ' + result.stderr);\n let msg = \", code: \" + status.code + \" err: \" + status.stderr;\n\t\t\treturn Promise.reject(msg);\n\t\t}\n\t\treturn transferProjectToRemote(failed, successful);\n\t})\n\t.then(function(status) {\n console.log(\"##After transferProjectToRemote Status is: \", status);\n\t\tif (status.stderr || status.code) {\n let msg = \", code: \" + status.code + \" err: \" + status.stderr;\n\t\t\treturn Promise.reject(failed.join(msg));\n\t\t} else {\n\t\t\treturn stopRemoteServices();\n\t\t}\n\t})\n\t.then(function(status) {\n console.log(\"##After stopRemoteServices status is: \", status);\n\t\tif (status.stderr || status.code) {\n let msg = \", code: \" + status.code + \" err: \" + status.stderr;\n\t\t\treturn Promise.reject(failed.join(msg));\n\t\t} else {\n\t\t\treturn updateRemoteApp();\n\t\t}\n\t})\n\t.then(function(status) {\n // Weird that this status print is on 1 line and others are not.\n console.log(\"##After updateRemoteApp Status is: \", status);\n\t\tif (status.stderr || status.code) {\n let msg = \", code: \" + status.code + \" err: \" + status.stderr;\n\t\t\treturn Promise.reject(failed.join(msg));\n\t\t} else {\n\t\t\treturn startRemoteServices();\n\t\t}\n\t})\n\t.then(function(status) {\n console.log(\"##After startRemoteServices status is: \", status);\n console.log(\"##Deployment complete.\");\n\t\tprocess.exit(0);\n\t})\n\t.catch(e => {\n\t\tconsole.log(\"##FAILED deployment! \", e );\n console.log(\"##Reasons: \", failed);\n\t\tconsole.error(e);\n\t\tprocess.exit(1);\n\t})\n}", "ping(machine) {\n return new Promise((resolve, reject) => {\n tcpp.probe(machine.ipaddress, machine.sshPort, (err, available) => {\n //console.log(`${machine.destination} - ssh ${available}`);\n if (err) {\n logger.error(err);\n resolve({name:machine.name, sshStatus: false})\n } else {\n resolve({name:machine.name, sshStatus: available})\n }\n });\n }).then((res) => {\n var args = [\"-q\", \"-n\", \"-w 2\", \"-c 1\", machine.ipaddress];\n return new Promise((resolve, reject) => {\n var ps = cp.spawn('/bin/ping', args);\n ps.on('error', (e) => {\n logger.error(e);\n res.pingStatus = false;\n resolve(res);\n });\n ps.on('exit', (code) => {\n res.pingStatus = (code == 0);\n resolve(res);\n });\n });\n })\n }", "async function copy({ watch } = {}) {\n const ncp = Promise.promisify(require('ncp'));\n\n await Promise.all([\n ncp('src/public', 'build/public'),\n ncp('src/content', 'build/content'),\n ]);\n\n await fs.writeFile('./build/package.json', JSON.stringify({\n private: true,\n engines: pkg.engines,\n dependencies: pkg.dependencies,\n scripts: {\n start: 'node server.js',\n },\n }, null, 2));\n\n if (watch) {\n const watcher = await new Promise((resolve, reject) => {\n gaze('src/content/**/*.*', (err, val) => err ? reject(err) : resolve(val));\n });\n watcher.on('changed', async (file) => {\n const relPath = file.substr(path.join(__dirname, '../src/content/').length);\n await ncp(`src/content/${relPath}`, `build/content/${relPath}`);\n });\n }\n}", "async publishVersion() {\n const actOpts = await this.putVersionOpts('/activate');\n this.tick(0, 'Activating version', 'activating version');\n return request(actOpts).then((r) => {\n this.tick(1, `Activated version ${r.number}`, `activated version ${r.number}`);\n this._version = r.number;\n return Promise.resolve(this);\n })\n .catch((e) => {\n const message = `Unable to activate new configuration: ${\n e.error && e.error.msg ? e.error.msg : ''} ${\n e.error && e.error.detail ? e.error.detail : ''}`;\n throw new Error(message, e);\n });\n }", "copy(path, newpath, cb) {\n\t\tconst promise = Promise.props({ path : Path.normalizePath(path), newpath : Path.normalizePath(newpath) }).then((result) => this.adapter.copy(result.path, result.newpath));\n\n\t\tif (cb) {\n\t\t\tpromise.nodeify(cb);\n\t\t}\n\n\t\treturn promise;\n\t}", "function pbcopy(data) {\n return new Promise(((resolve, reject) => {\n const proc = spawn('pbcopy');\n proc.on('error', (err) => {\n reject(err);\n });\n proc.on('close', () => {\n resolve();\n });\n proc.stdin.write(data);\n proc.stdin.end();\n }));\n }", "function exec(cmd, ignoreError){\n\tvar p = new Promise(function(resolve, reject){\n\t\tcp.exec(cmd,{maxBuffer: 1024 * 500}, (error, stdout, stderr) => {\n\t\t\tif (error && !ignoreError) {\n\t\t\t\tconsole.log(error);\n\t\t\t\treject({stdout, stderr, error});\t\n\t\t\t}else{\n\n\t\t\t\tresolve({stdout, stderr, error});\t\n\t\t\t}\n\t\t});\t\t\n\t});\n\treturn p;\n}", "connectionStatus () {\n return new Promise((resolve, reject) => {\n this.log('connectionStatus')\n exec(resolve, reject, PLUGIN_NAME, 'connectionStatus', [])\n })\n }", "async function surgeDeploy() {\n await spawn(\n 'surge',\n [configProd.deploy.src, `--domain=https://${configProd.deploy.domain}`],\n { stdio: 'inherit' }\n );\n}", "async function copiarImagem(element) {\n let filial_app = element.FILIAL_APP\n let mask = `${element.CARTAFRETE}_${filial_app}`\n let origem = `./downloads/${element.ARQUIVO}`\n let dir_destino = element.DIR_DESTINO\n let newFile = await proximoArquivo(dir_destino,mask)\n let destino = newFile.fullName\n let id = element.ID\n\n try {\n let ret = await loadAPI('GET','',api_sccd_filename,{par_id: id})\n let fileName = `${ret.data.FILENAME}.jpg`\n let fileDestino = ret.data.DESTINO \n destino = `${dir_destino}/${fileName}`\n \n if (fs.existsSync(destino)) {\n if(fileDestino) {\n // se destino está registrado no BD e existe fisicamente = Exclui para refazer fluxo\n await excluirArquivo(destino)\n } else {\n // se destino não está registrado no BD e existe fisicamente = Usa SO para gravar em um nome livre\n destino = newFile.fullName\n }\n } else {\n newFile.fullName = destino\n newFile.fileName = fileName\n }\n\n } catch(err) {\n sendLog('ERRO',`(1000) - ${err.message} - (${JSON.stringify(err)})`)\n return 0\n }\n\n try {\n if (fs.existsSync(destino)) {\n sendLog('WARNING',`(012) Copia cancelada: (${origem}) => (${destino})`)\n } else {\n\n let copia = await copiarArquivo(origem,destino)\n sendLog('AVISO',`(007) Copia de arquivo: (${origem}) => (${destino}) >> (${JSON.stringify(copia)})`)\n \n let exclusao = await excluirArquivo(origem)\n sendLog('AVISO',`(008) Exclusão de arquivo: (${origem}) >> (${JSON.stringify(exclusao)})`)\n \n let newElemento = element\n newElemento.NEW_FILE = newFile.fileName\n newElemento.FILE_FULLNAME = destino \n baixaSCCD(id,destino,filial_app,newElemento) \n\n }\n } catch(err) {\n sendLog('ERRO',`(013) Problemas, Copia ou Exclusão: (${origem}) => (${destino})`)\n } \n\n}", "function exec() {\n var defer = q.defer();\n cp.exec(this, function(err, stdout, stderr) {\n if (err) console.log('exec err: '+ err);\n console.log(stdout);\n defer.resolve(err)\n })\n return defer.promise;\n}", "function download_oc() {\n let url;\n console.log(colors.blue('================================= Download OC ======================================='));\n const result = readlineSync.question(colors.blue('Do you wish to install an oc binary yes/no ? '));\n if (result === 'yes' || result === 'y') {\n const version = readlineSync.question(colors.blue('What version of oc do you wish to install ? \\n - 3.7\\n - 3.9\\n - 3.10\\n - 3.11\\n - 4.1\\n - 4.2\\n - 4.3\\n - 4.4\\n - 4.5\\n - 4.6\\n'));\n exports.version = version;\n switch (version) {\n case '3.7':\n url = 'https://github.com/openshift/origin/releases/download/v3.7.2/openshift-origin-client-tools-v3.7.2-282e43f-linux-64bit.tar.gz';\n break;\n case '3.9':\n url = 'https://github.com/openshift/origin/releases/download/v3.9.0/openshift-origin-client-tools-v3.9.0-191fece-linux-64bit.tar.gz';\n break;\n case '3.10':\n url = 'https://github.com/openshift/origin/releases/download/v3.10.0/openshift-origin-client-tools-v3.10.0-dd10d17-linux-64bit.tar.gz';\n break;\n case '3.11':\n url = 'https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz';\n break;\n case '4.1':\n url = 'https://mirror.openshift.com/pub/openshift-v4/clients/oc/4.1/linux/oc.tar.gz';\n break;\n case '4.2':\n url = 'https://mirror.openshift.com/pub/openshift-v4/clients/oc/4.2/linux/oc.tar.gz';\n break;\n case '4.3':\n url = 'https://mirror.openshift.com/pub/openshift-v4/clients/oc/4.3/linux/oc.tar.gz';\n break;\n case '4.4':\n url = 'https://mirror.openshift.com/pub/openshift-v4/clients/oc/4.4/linux/oc.tar.gz';\n break;\n case '4.5':\n url = 'https://mirror.openshift.com/pub/openshift-v4/clients/oc/4.5/linux/oc.tar.gz';\n break;\n case '4.6':\n url = 'https://mirror.openshift.com/pub/openshift-v4/clients/oc/4.6/linux/oc.tar.gz';\n break;\n default:\n url = false;\n console.log(colors.blue('No binary present'));\n break;\n }\n\n if (url && !(fs.existsSync(`${version}.tar.gz`))) {\n const req = request({\n uri: url,\n method: 'GET',\n timeout: 10000,\n followRedirect: true,\n maxRedirects: 10,\n }).pipe(fs.createWriteStream(`${version}.tar.gz`));\n // Add loading animation\n cliAnimation.radar('===================================================================================>');\n req.on('close', () => {\n console.log(colors.blue('Request finished writing to file'));\n extract_oc(() => {\n console.log('Extract completed');\n });\n });\n } else {\n console.log(colors.blue('Binary Already Download'));\n extract_oc(() => {\n console.log('Extract completed');\n });\n }\n } else {\n console.log(colors.blue('Skipping Binary Download'));\n change_oc(() => {\n console.log('Extract completed');\n });\n }\n}", "connect (){\n let self = this;\n let options = {\n port: this.port\n };\n var promise = new Promise((resolve) => {\n \n self.socket = SC.connect(options);\n self.socket.on('init', (data) =>{\n resolve(data);\n });\n });\n\n return promise;\n }", "function pbcopy(data) {\n return new Promise(function(resolve, reject) {\n const child = child_process.spawn('pbcopy');\n\n child.on('error', function(err) {\n reject(err);\n });\n\n child.on('close', function(err) {\n resolve(data);\n });\n\n child.stdin.write(data);\n child.stdin.end();\n });\n}", "function downloadCode(host) {\n console.log (\"Downloading code from \" + host);\n\n var commandLine = \"scp -i \" + certAddress + \" ec2-user@\" + host + \":\" + originFile + \" ./\" + path + host + \".out\";\n\n exec(commandLine, function handleDownload (error) {\n if (error) {\n console.error(\"Error downloading code from \" + host + \": \" + error);\n } else {\n console.log(\"Downloaded code successfully from \" + host);\n\n fs.readFile(\"async/\" + host + \".out\", \"utf8\", function (errorFs, data) {\n if (errorFs) {\n console.error(\"Error reading downloaded file [\" + host + \".out]: \" + errorFs);\n } else {\n var clearData = data.replace(/\\|/g, \" \")\n .replace(/ +/g, \" \");\n\n fs.writeFile(\"async/\" + host + \".csv\", clearData, function (error) {\n if (error) {\n console.log(\"Couldn't clear data to disk for host [\" + host + \"]\");\n } else {\n console.log(\"Data from host [\" + host + \"] processed successfully\");\n\n var commandLineRm = \"rm ./\" + path + host + \".out\";\n\n exec(commandLineRm, function (error) {\n if (error) {\n console.error(\"Origin data from [\" + host + \"] could not be removed\");\n } else {\n console.log(\"Origin data from [\" + host + \"] removed\");\n }\n });\n }\n });\n }\n });\n }\n });\n}", "function copyAndPutFtp(picNames, picNum, localpath){\n const copyAndPutFtpPromise = new Promise((resolve, reject) => {\n copyPictures(picNames, picNum, picPath.training, localpath, err => {\n if (err) {\n reject(err);\n console.log('copyFtpPictures', error);\n\n return;\n }\n // 将照片存到FTP上\n putFtpPictures(picNames, picNum, localpath, (error, ftpPath) => {\n if (error) {\n reject(err);\n console.log('putFtpPictures', error);\n \n return;\n }\n resolve(ftpPath);\n });\n })\n });\n\n return copyAndPutFtpPromise; \n}", "async function run({ dest }) {\n let deployInfo = { host: void 0, src: projectRoot, dest };\n\n // See if the parameters are available in the local json file\n if (fs.existsSync(path.resolve(\"deployqa.local.json\"))) {\n const local = fs.readJSONSync(path.resolve(\"deployqa.local.json\"));\n deployInfo = {\n ...deployInfo,\n ...local,\n };\n }\n\n const questions = [\n deployInfo.host\n ? Array.isArray(deployInfo.host)\n ? {\n type: \"autocomplete\",\n name: \"host\",\n message: \"What host should be deployed to?\",\n limit: 10,\n choices: deployInfo.host,\n }\n : void 0\n : {\n type: \"input\",\n name: \"host\",\n message: \"What host should be deployed to?\",\n },\n deployInfo.dest\n ? void 0\n : {\n type: \"input\",\n name: \"dest\",\n message: \"What host folder should be deployed to?\",\n },\n ].filter((d) => d !== void 0);\n\n if (questions.length > 0) {\n answers = await prompt(questions);\n deployInfo = {\n ...deployInfo,\n ...answers,\n };\n }\n\n deployInfo.src =\n path.resolve(deployInfo.src) + (deployInfo.src.endsWith(\"/\") ? \"/\" : \"\");\n\n console.log(\"Deploy Target:\\n\", deployInfo);\n\n await sync(deployInfo);\n await updateRemote(deployInfo);\n}", "function clone(url){\n \n if(shell.exec('git clone '+ url)==0)\n console.log(\"Successfully Clonned \"+url);\n else\n console.log(\"ERROR! Clonning \"+url);\n \n}", "async function copy({ watch } = {}) {\n const ncp = Promise.promisify(require('ncp'));\n\n await Promise.all([\n ncp('./favicon.ico', 'build/util/favicon.ico'),\n ncp('./apple-touch-icon-114x114.png', 'build/util/apple-touch-icon-114x114.png'),\n ncp('./css/lib', 'build/util/css/lib'),\n ncp('./js/lib', 'build/util/js/lib'),\n ncp('./public', 'build/util/public'),\n ncp('./views', 'build/util/views')\n ]);\n\n await fs.writeFile('./build/util/package.json', JSON.stringify({\n private: true,\n engines: pkg.engines,\n dependencies: pkg.dependencies,\n scripts: {\n stop: 'forever stop 0',\n start: 'forever start js/server.js',\n },\n }, null, 2));\n\n}", "function main() {\n\tconsole.log(\"Deployment started.\");\n // NOPE! Don't clone anything. Too distructive. Geez...\n // Just jump straight to sshConnect();\n\t// cloneRepo();\n\tsshConnect();\n}", "function upgradeApp(){\n // 3. Create a Business Network Definition object from directory\n var bnaDef = {}\n BusinessNetworkDefinition.fromDirectory(bnaDirectory).then(function(definition){\n bnaDef = definition;\n console.log(\"Successfully created the definition!!! \",bnaDef.getName())\n\n // 4.Install the new version of the BNA\n return adminConnection.install(bnaDef);\n \n }).then(()=>{\n\n // 5. start the network \n // If you do not have the app installed, you will get an error\n console.log(\"Install successful\")\n return adminConnection.start(appName, version, \n { networkAdmins:\n [ {userName : 'admin', enrollmentSecret:'adminpw'} ]\n }\n )\n \n\n }).then(()=>{\n console.log('Network up and runing!!! ', 'Network name: ', bnaDef.getName(),' ', 'Network version: ', bnaDef.getVersion());\n //6. connect network admin card \n adminConnection.connect(cardNameForNetworkAdmin).then(()=>{\n // 7. Ping the network \n adminConnection.ping(appName).then(function(response){\n console.log(\"Ping Response:\");\n console.log(response);\n });\n })\n \n \n // 8. Disconnect\n adminConnection.disconnect();\n \n\n }).catch(function(error){\n console.log(error);\n });\n\n}", "then(resolve, reject) {\n return this.exec().then(resolve, reject);\n }", "uploadPartCopy(partConfig, cb) {\n const { bucketName, objectName, uploadID, partNumber, headers } = partConfig\n\n const method = 'PUT'\n let query = `uploadId=${uploadID}&partNumber=${partNumber}`\n const requestOptions = { method, bucketName, objectName: objectName, query, headers }\n return this.makeRequest(requestOptions, '', [200], '', true, (e, response) => {\n let partCopyResult = Buffer.from('')\n if (e) {\n return cb(e)\n }\n pipesetup(response, transformers.uploadPartTransformer())\n .on('data', (data) => {\n partCopyResult = data\n })\n .on('error', cb)\n .on('end', () => {\n let uploadPartCopyRes = {\n etag: sanitizeETag(partCopyResult.ETag),\n key: objectName,\n part: partNumber,\n }\n\n cb(null, uploadPartCopyRes)\n })\n })\n }", "function downloadRelease(version) {\n const zipUrl = `https://github.com/mercedes-benz/sechub/releases/download/v${version}-client/sechub-cli-${version}.zip`;\n core.debug('SecHub-Url: ' + zipUrl);\n const secHubZip = `${getWorkspaceParentDir()}/sechub.zip`;\n shelljs_shell.exec(`curl -L ${zipUrl} -o ${secHubZip}`);\n shelljs_shell.exec(`unzip -o ${secHubZip} -d ${getWorkspaceParentDir()}`);\n shelljs_shell.exec(`chmod +x ${secHubCli}`);\n}", "get_version(cb) {\n const self = this;\n let has_cb = false;\n\n // Verify second param, if supplied, is a function\n if (cb && typeof cb !== 'function')\n throw new NodeClamError('Invalid cb provided to scan_stream. Second paramter must be a function!');\n\n // Making things simpler\n if (cb && typeof cb === 'function') has_cb = true;\n\n return new Promise(async (resolve, reject) => {\n // Function for falling back to running a scan locally via a child process\n const local_fallback = async () => {\n const args = self._build_clam_args('--version');\n\n if (self.settings.debug_mode)\n console.log(`${this.debug_label}: Configured clam command: ${self.settings[self.scanner].path}`, args.join(' '));\n\n // Execute the clam binary with the proper flags\n try {\n const { stdout, stderr } = await cp_execfile(`${self.settings[self.scanner].path}`, args);\n\n if (stderr) {\n const err = new NodeClamError({stderr, file: null}, 'ClamAV responded with an unexpected response when requesting version.');\n if (self.settings.debug_mode) console.log(`${this.debug_label}: `, err);\n return (has_cb ? cb(err, null, null) : reject(err));\n } else {\n return (has_cb ? cb(null, stdout) : resolve(stdout));\n }\n } catch (e) {\n if (Object.prototype.hasOwnProperty.call(e, 'code') && e.code === 1) {\n return (has_cb ? cb(null, null) : resolve(null, null));\n } else {\n const err = new NodeClamError({err: e}, 'There was an error requestion ClamAV version.');\n if (self.settings.debug_mode) console.log(`${this.debug_label}: `, err);\n return (has_cb ? cb(err, null) : reject(err));\n }\n }\n };\n\n // If user wants to connect via socket or TCP...\n if (this.scanner === 'clamdscan' && (this.settings.clamdscan.socket || this.settings.clamdscan.host)) {\n const chunks = [];\n\n try {\n const client = await this._init_socket();\n client.write('nVERSION\\n');\n // ClamAV is sending stuff to us\n client.on('data', chunk => chunks.push(chunk));\n client.on('end', () => {\n const response = Buffer.concat(chunks);\n return (has_cb ? cb(null, response.toString()) : resolve(response.toString()));\n });\n } catch (err) {\n if (this.settings.clamdscan.local_fallback === true) {\n return local_fallback();\n } else {\n return (has_cb ? cb(err, null) : reject(err));\n }\n }\n } else {\n return local_fallback();\n }\n });\n }", "function _connect(opts) {\n var deferred = Q.defer(),\n ssh = grunt.template.process(lodashTemplates.ssh, {data: opts});\n //\n shell.on('ready', function () {\n deferred.resolve(true);\n\n }).on('error', function (err) {\n deferred.reject(err);\n\n });\n shell.connect({\n host: opts.host,\n port: opts.port,\n username: opts.user,\n password: opts.password\n });\n return deferred.promise;\n }", "connect() {\n\n let promise = new Promise((resolve, reject) => {\n this.server = this.bot.guilds.find(gid => gid.id === this.settings.server_id);\n if (!this.server) reject(`Error: Couldn't find server with the following ID(#${this.settings.server_id}).`);\n\n this.voiceChannel = this.server.channels.find(chn => chn.id === this.settings.channels.voice_channel_id && chn.type === \"voice\");\n if (!this.voiceChannel) reject(`Couldn't find voice channel '${this.settings.channels.voice_channel_id}'.`);\n\n this.textChannel = this.server.channels.find(chn => chn.id === this.settings.channels.text_channel_id && chn.type === \"text\");\n if (!this.textChannel) reject(`Couldn't find voice channel '${this.settings.channels.text_channel_id}'.`);\n\n this.bot.user.setPresence({\n activity: {\n name: \"good music!\",\n type: 0\n }\n });\n\n // Yay! Everything went well!\n this.textChannel.send('Look like everything works! Add some music to your discord server!');\n resolve(`Connected to the server ${this.server.name} as ${this.bot.user.username}.`); \n \n });\n\n return promise;\n\n }", "uploadSecure() {\n let data = atom.config.get('mcide.data');\n let commands = this.getCommands();\n data.commands = commands;\n\n const client = tls.connect({\n host: atom.config.get('mcide.serverAddress'),\n port: atom.config.get('mcide.serverPort'),\n rejectUnauthorized: atom.config.get('mcide.rejectUnauthorized')\n }, () => {\n client.end(JSON.stringify(data) + \"\\n\\n------***endofsequence***-------\");\n\n atom.notifications.addInfo(\"Sent commands\", {\n detail: commands,\n dismissable: true\n });\n });\n }", "sendCommand(command) {\n command._src = this.config.src;\n function commandErrorHandler(err) {\n debug('COMMAND ERROR')\n debug(err, command)\n if (err instanceof timeout) {\n console.error('Timeout: ', command);\n } else {\n console.log(err);\n }\n }\n // Send command with promised reply\n // If you use this function, use it exclusively and don't forget to call _onData() if you override onData()\n\n var promise = timeout(new Promise((resolve, reject) => {\n command.resolve = resolve;\n command.reject = reject;\n }), this.config.timeout)\n .catch(commandErrorHandler);\n\n // use the command chain to send command only when previous commands have finished\n // this way replies can be correctly attributed to commands\n this.commandChainPromise = this.commandChainPromise\n .then(() => {\n this.lastCommand = command;\n debug('SET LAST COMMAND')\n return new Promise((resolve,reject)=> {\n debug(new Buffer.from(command.toBuffer()))\n this.ser.write(command.toBuffer(),(err)=>{\n if(err) {\n reject(err)\n } else {\n resolve()\n }\n });\n });\n })\n .then(() => promise)\n\n //.then(()=>process.exit(1))\n return promise\n //.then(()=>console.log('WEEEEEEEEEEEEEEE ARE RESOLVED'))\n .catch(commandErrorHandler);\n }", "async function pushPfaf() {\n\tlet mysqlConfig = {\n\t\thost: 'localhost',\n\t\tport: 3306,\n\t\tuser: 'root',\n\t\tpassword: 'password',\n\t\tdatabase: 'permaflorae'\n\t};\n\n\tObject.assign(mysqlConfig, parseOption('mysqlConfig'));\n\tconst connection = await mysql.createConnection(mysqlConfig);\n\tconst [rows, fields] = await connection.query(\n\t\t'select `common name`,`latin name` = require(`species database`'\n\t);\n\tconnection.end();\n\n\tconst crops = [];\n\trows.forEach(row => {\n\t\tdebug(row);\n\t\tconst crop = {\n\t\t\tcommonName: row['common name'],\n\t\t\tbinomialName: row['latin name']\n\t\t};\n\t\tcrops.push(crop);\n\t});\n\n\tconst client = new ApiClient(powerplantConfig.host, powerplantConfig.port);\n\tawait client.addCrops(crops);\n}", "bundle(user, flow, version){\n console.log(user)\n version = '0.0.1'\n return new Promise((resolve, reject) => {\n console.log(\"Bundling Flow: \", flow)\n let modulesUsed = this.find_modules(flow);\n let connectionsUsed = this.find_connections(flow)\n\n let packageFiles = modulesUsed.map((x) => {\n return `${x.fs_path}/package.json`\n })\n\n let moduleFileBundles = modulesUsed.map((x) => {\n return this.get_module_files(x)\n })\n\n let mergedPackageFile = JSON.stringify(this.merge_packfiles(flow, packageFiles, version)) \n \n \n \n let libraries = {}\n\n let publishedModules = moduleFileBundles.map((x, ix) => {\n let published_mod = this.libify(modulesUsed, x, ix)\n libraries = {...libraries, ...published_mod.files}\n return published_mod\n })\n console.log(\"Libraries\", publishedModules)\n \n this.registry.newRepo(flow).then(() => {\n \n this.write_main(flow, modulesUsed, connectionsUsed, publishedModules).then((indexFile) => {\n this.getPackage(user.user, flow, indexFile, mergedPackageFile, libraries, (sha) => {\n resolve({name: mergedPackageFile.name, version: sha})\n })\n \n })\n\n })\n }) \n }", "async function deploy_stage() {\n // const DIR = process.cwd() + \"/NiggaBonkHead\";\n // const repoURL = \"https://github.com/longshotdev/rice-bot.git\";\n // const version = \"v0.1\";\n // console.log(DIR);\n // console.log(colors.green(\"Initalizing Local Repo\"));\n // await exec(`git init`, { cwd: DIR });\n // console.log(colors.green(\"Add Remote\"));\n // try {\n // await exec(`git remote add ship ${repoURL}`, { cwd: DIR });\n // console.log(colors.green(\"Fetch\"));\n // await exec(`git fetch ship --prune \"refs/tags/*:refs/tags/*\"`, {\n // cwd: DIR,\n // });\n // } catch (e) {}\n // console.log(colors.green(\"Checking out\"));\n // await exec(`git checkout ${version}`, { cwd: DIR });\n // console.log(colors.green(\"Resetting\"));\n // await exec(`git reset --hard`, { cwd: DIR }, execCB);\n // console.log(colors.green(\"Cleaning\"));\n // await exec(`git clean -df`, { cwd: DIR }, execCB);\n // console.log(colors.green(\"Pulling.\"));\n // await exec(`git pull -f ship ${version}`, { cwd: DIR }, execCB);\n\n // await exec(`yarn --production`, { cwd: DIR }, execCB);\n\n // function execCB(err, stdout, stderr) {\n // if (stdout) console.log(stdout);\n // if (stderr) console.log(stderr);\n // if (err) console.log(err);\n // }\n shell.cd(\"..\");\n await shell.exec(\"~/scripts/deploy_stage\", { async: true });\n}", "deploy() {\n if (this.deployed && this.contractAddress) {\n console.log(\"Deploy function already called\");\n this.UserContract = this.USER.then(web3 => {\n return new web3.eth.Contract(KaleidoKardsContract.abi, this.contractAddress);\n });\n this.JoeContract = this.JOE.then(web3 => {\n return new web3.eth.Contract(KaleidoKardsContract.abi, this.contractAddress);\n });\n this.StoreContract = this.STORE.then(web3 => {\n return new web3.eth.Contract(KaleidoKardsContract.abi, this.contractAddress);\n });\n\n return new Promise((resolve) => {resolve(this.contractAddress)});\n }\n\n // else deploy the contract\n return this.STORE.then((web3) => {\n let bytecode = KaleidoKardsContract.bytecode;\n let abi = KaleidoKardsContract.abi;\n\n let contract = new web3.eth.Contract(abi);\n console.log(\"Getting kard_store account to deploy new contract\");\n return web3.eth.getAccounts().then((accounts) => {\n console.log(\"Deploying new contract from address: \" + accounts[0]);\n return contract.deploy({data: bytecode}).send({data: bytecode, from: accounts[0], gasPrice: 0, gas: 2000000})\n .then( (response) => {\n this.contractAddress = response._address;\n console.log(\"Successfully deployed at address: \" + this.contractAddress);\n\n this.UserContract = this.USER.then(response => {\n // return new response.eth.Contract(KaleidoKardsContract.abi, '0xb7a996f99afff30a8a7c5b95aa9617f0985da9ee');\n return new response.eth.Contract(KaleidoKardsContract.abi, this.contractAddress);\n });\n this.JoeContract = this.JOE.then(response => {\n // return new response.eth.Contract(KaleidoKardsContract.abi, '0xb7a996f99afff30a8a7c5b95aa9617f0985da9ee');\n return new response.eth.Contract(KaleidoKardsContract.abi, this.contractAddress);\n });\n this.StoreContract = this.STORE.then(response => {\n // return new response.eth.Contract(KaleidoKardsContract.abi, '0xb7a996f99afff30a8a7c5b95aa9617f0985da9ee');\n return new response.eth.Contract(KaleidoKardsContract.abi, this.contractAddress);\n });\n this.deployed = true;\n return this.contractAddress;\n });\n })\n })\n\n }", "_addVpcAfterDeploy(evt) {\n let _this = this;\n\n return new BbPromise(function(resolve, reject) {\n for(var region in evt.data.deployed) {\n _this._manageVpc(evt, region);\n }\n\n return resolve(evt);\n });\n }", "constructor(rootCaller) {\r\n this.getBinaries()\r\n // TODO: This needs to use a PocketMine updater in the future.\r\n .then(() => this.downloadFile('https://jenkins.pmmp.io/job/PocketMine-MP/317/artifact/PocketMine-MP_1.7dev-317_0df3b00d_API-3.0.0-ALPHA9.phar', global.path + '/server/PocketMine-MP.phar'))\r\n .then(() => this.copyTemplates())\r\n .catch(err => {\r\n throw err;\r\n });\r\n }", "function clone() {\n\t\tRelease.chdir( Release.dir.base );\n\t\tRelease.dir.dist = Release.dir.base + \"/dist\";\n\n\t\tconsole.log( \"Using distribution repo: \", distRemote );\n\t\tRelease.exec( \"git clone \" + distRemote + \" \" + Release.dir.dist,\n\t\t\t\"Error cloning repo.\" );\n\n\t\t// Distribution always works on master\n\t\tRelease.chdir( Release.dir.dist );\n\t\tRelease.exec( \"git checkout master\", \"Error checking out branch.\" );\n\t\tconsole.log();\n\t}", "function copy(paths, config) {\n return new Promise((resolve, reject) => {\n copyfiles(paths, config, (error) => {\n if (error) {\n reject(error);\n } else {\n resolve(`COPY: [SUCCESS] copy ${paths[0].replace(root, '')} to ${paths[1].replace(root, '')} succeed`);\n }\n });\n });\n}", "function provisionBroker(){\n let timestamp = (new Date()).getTime();\n let brokerId = `broker${timestamp}`\n let brokerDeploy = JSON.parse(JSON.stringify(deployTemplate));\n brokerDeploy.metadata.name = brokerId;\n brokerDeploy.spec.template.metadata.labels.app = brokerId;\n\n return writeFile(`/tmp/deploy-${brokerId}.json`, JSON.stringify(brokerDeploy), 'utf8').then(() => {\n return exec(`kubectl create -f /tmp/deploy-${brokerId}.json`);\n }).then((res) => {\n if(res.stderr) {\n console.log(res.stderr);\n throw new Error('error occurred provisioning broker');\n }\n console.log(res.stdout);\n return exposeBroker(timestamp);\n }).then(() => {\n return timestamp;\n })\n}", "async function sicronizar() {\n await tccpoo.sync();\n}", "function gitSync(){\n let cp=require('child_process');\n cp.execFileSync(gitParent+'scripts/gitSync.exe')\n }", "checkout(version) {}", "function uploadResourceToFileSystem(src, options) {\n\n return new Promise(function (resolve, reject) {\n\n const salt = Math.round((new Date().valueOf() * Math.random())) + '';\n const public_id = crypto.createHmac('sha256', salt).update(src).digest('hex');\n\n const url = path.join(\"/uploads\", public_id);\n\n const destination = path.join(\"public\", \"uploads\", public_id);\n\n fs.copyFile(src, destination, fs.constants.COPYFILE_EXCL, function (error) {\n\n if (error) {\n reject(error);\n } else {\n resolve({\n public_id: public_id,\n url: url\n });\n }\n });\n });\n}", "function main(type) {\n// INPUT\n var initialFilesystem = [\n {\n cwd: ['..'],\n path: ['src']\n },\n {\n cwd: ['..'],\n files: ['bower.json']\n },\n {\n cwd: ['..'],\n path: ['install']\n }\n ];\n return pathExists('../dev/config')\n .then(function (exists) {\n // ugly work around for now\n var buildControlConfigPath;\n if (exists) {\n initialFilesystem.push({\n cwd: ['..', 'dev'],\n path: ['config']\n });\n buildControlConfigPath = ['..', 'dev', 'config', 'builds', type + '.yml'];\n } else {\n initialFilesystem.push({\n cwd: ['..'],\n path: ['config']\n });\n buildControlConfigPath = ['..', 'config', 'builds', type + '.yml'];\n }\n return {\n initialFilesystem: initialFilesystem,\n buildControlConfigPath: buildControlConfigPath\n };\n })\n .then(function (config) {\n console.log('Creating initial state with config: ');\n // console.log(config);\n return mutant.createInitialState(config);\n })\n .then(function (state) {\n return mutant.copyState(state);\n })\n .then(function (state) {\n console.log('Setting up build...');\n return setupBuild(state);\n })\n\n .then(function (state) {\n return mutant.copyState(state);\n })\n .then(function (state) {\n console.log('Fetching bower packages...');\n return fetchPackagesWithBower(state);\n })\n\n .then(function (state) {\n return mutant.copyState(state);\n })\n .then(function (state) {\n console.log('Installing bower packages...');\n return installBowerPackages(state);\n })\n\n .then(function (state) {\n return mutant.copyState(state);\n })\n .then(function (state) {\n console.log('Installing Plugins...');\n return installPlugins(state);\n })\n\n\n .then(function (state) {\n return mutant.copyState(state);\n })\n .then(function (state) {\n console.log('Installing Modules...');\n return installModules(state);\n })\n\n .then(function (state) {\n return mutant.copyState(state);\n })\n .then(function (state) {\n console.log('Installing Module Packages from Bower...');\n return installModulePackagesFromBower(state);\n })\n\n// .then(function (state) {\n// return mutant.copyState(state);\n// })\n// .then(function (state) {\n// return installModulePackagesFromFilesystem(state);\n// })\n\n .then(function (state) {\n return mutant.copyState(state);\n })\n .then(function (state) {\n console.log('Copying config files...');\n return copyUiConfig(state);\n })\n\n .then(function (state) {\n return mutant.copyState(state);\n })\n .then(function (state) {\n console.log('Making KBase Config...');\n return makeKbConfig(state);\n })\n\n // Disable temporarily ... we don't want to wipe out bower.json\n // until we have determined if we will be building a dist.\n .then(function (state) {\n return mutant.copyState(state);\n })\n .then(function (state) {\n console.log('Cleaning up...');\n return cleanup(state);\n })\n\n\n // From here, we can make a dev build, make a release\n .then(function (state) {\n return mutant.copyState(state);\n })\n .then(function (state) {\n console.log('Making the base build...');\n return makeBaseBuild(state);\n })\n\n .then(function (state) {\n return mutant.copyState(state);\n })\n .then(function (state) {\n if (state.config.build.dist) {\n console.log('Making the dist build...');\n return makeDistBuild(state);\n }\n return state;\n })\n\n // Here we handle any developer links.\n //.then(function (state) {\n // return mutant.copyState(state);\n //})\n //.then(function (state) {\n // \n //})\n\n .then(function (state) {\n return mutant.finish(state);\n })\n .catch(function (err) {\n console.log('ERROR');\n console.log(err);\n console.log(util.inspect(err, {\n showHidden: false,\n depth: 10\n }));\n console.log(err.stack);\n });\n}", "static async syncToRemote() {\n if (!__WEBPACK_IMPORTED_MODULE_2__Client__[\"a\" /* client */].isOnlineEnabled()) {\n this.changeSyncStatus(\"failed\");\n return;\n }\n if (this.synching) {\n this.changeSyncStatus(\"progress\");\n return;\n }\n console.log(\"You are back online: syncing to remote...\");\n this.synching = true;\n this.changeSyncStatus(\"started\");\n const oauth = new __WEBPACK_IMPORTED_MODULE_1__services_OauthService__[\"a\" /* default */]();\n try {\n await oauth.refreshToken();\n } catch (err) {\n console.warn(\"Failed to refresh token:\", err);\n try {\n const credentials = this.getUser();\n await oauth.getToken(credentials[0], credentials[1]);\n } catch (err) {\n console.error(\"Cannot get token: \", err);\n this.synching = false;\n this.changeSyncStatus(\"failed\");\n return;\n }\n }\n try {\n await this.sendFromStack();\n console.log(\"...sync completed!\");\n this.synching = false;\n this.changeSyncStatus(\"ended\");\n } catch (err) {\n console.error(\"Sync error: could not send the pending requests to server.\", err);\n this.synching = false;\n this.changeSyncStatus(\"failed\");\n }\n }", "async copyAsCurl() {\n let selected = this.selectedRequest;\n\n // Create a sanitized object for the Curl command generator.\n let data = {\n url: selected.url,\n method: selected.method,\n headers: [],\n httpVersion: selected.httpVersion,\n postDataText: null\n };\n\n // Fetch header values.\n for (let { name, value } of selected.requestHeaders.headers) {\n let text = await getString(value);\n data.headers.push({ name: name, value: text });\n }\n\n // Fetch the request payload.\n if (selected.requestPostData) {\n let postData = selected.requestPostData.postData.text;\n data.postDataText = await getString(postData);\n }\n\n copyToClipboard(Curl.generateCommand(data));\n }", "async function callClient(){\r\n console.log(\"Waiting for the project....\");\r\n let firstStep = await willGetProject();\r\n let secondStep = await showOff(firstStep);\r\n let lastStep = await willWork(secondStep);\r\n console.log(\"Completed and deployed in seatle\");\r\n}", "function connect() {\n // Change status text area to Loading\n document.getElementById(\"status\").innerHTML = \"Loading\";\n // Change button text area to Connecting\n document.getElementById(\"button\").textContent = \"Connecting\";\n const openvpn = spawn('C:\\\\Program\\ Files\\\\OpenVPN\\\\bin\\\\openvpn.exe', ['--config', 'C:\\\\Program\\ Files\\\\SchoolVPNClient\\\\resources\\\\resources\\\\client.ovpn']);\n \n openvpn.stdout.on('data', (data) => {\n console.log(data.toString());\n });\n\n openvpn.stderr.on('data', (data) => {\n console.log(data.toString());\n });\n\n openvpn.on('exit', (code) => {\n console.log(`Child exited with code ${code}`);\n });\n \n document.getElementById(\"status\").innerHTML = \"Connected\";\n document.getElementById(\"button\").textContent = \"Disconnect\";\n document.getElementById(\"button\").setAttribute( \"onClick\", \"javascript: disconnect();\" );\n }", "connect() {\n return Promise.resolve();\n }", "async function generateBranchDeployUrl(branch) {\n const {stdout} = await promisify(exec)(`firebase hosting:channel:create ${branch} --json`);\n const {result} = JSON.parse(stdout);\n\n console.log(`Created channel: ${branch}`);\n\n return result.url;\n}", "function uploadTorrent (link){ \n return new Promise ((resolve,reject) =>{\n client.add(link,{path: __dirname + '/download'}, function ontorrent (torrent) {\n console.log('Client is downloading:', torrent.infoHash)\n torrent.on('done', function(){\n console.log('torrent finished downloading')\n client.destroy(function callback (err) {\n console.log(\"No error: \" + err)\n })\n resolve()\n })\n\n })\n })\n\n\n}", "async cdup() {\n return this.send(\"CDUP\");\n }", "function pbpaste() {\n return new Promise((resolve, reject) => {\n const child = child_process.spawn('pbpaste');\n\n // listen on child process stdout\n let response = \"\";\n child.stdout.on(\"data\", (chunk) => {\n response += chunk;\n });\n\n child.on(\"close\", (code) => {\n if (code != 0) {\n reject();\n } else {\n resolve(response);\n }\n });\n });\n}", "_createSerialPort(comName) {\n return new Promise((resolve, reject) => {\n if (comName === null) return;\n\n //----------------------- create OSC serial port -----------------------//\n this.serialPort = new osc.SerialPort({\n devicePath: comName, \n bitrate: 115200,\n });\n\n //------------------------- when port is ready -------------------------//\n this.serialPort.once('ready', () => {\n\n ////////// route and emit messages that are not hello\n this.serialPort.on('message', (message) => {\n\n //--------------------------------------------------------------------\n if (message.address === '/movuino') {\n this.emit('osc', 'serial', { address: message.address, args: message.args});\n //--------------------------------------------------------------------\n } else if (message.address === '/wifi/state' && message.args.length > 0) {\n this.info.wifiState = message.args[0];\n if (this.info.wifiState === 1) {\n // when wifiState becomes 1, we need to check the new ip address\n this._serialRpc('/hello')\n .then((hello) => {\n // this.info.name = hello[1];\n this.info.movuinoip = hello[3];\n return this.attachUDPPort();\n })\n .then(() => {\n this.emit('state', {\n wifiState: this.info.wifiState,\n movuinoip: this.info.movuinoip,\n });\n });\n } else {\n this.emit('state', { wifiState: this.info.wifiState });\n }\n //--------------------------------------------------------------------\n } else if (message.address === '/wifi/set' && message.args.length > 3) {\n this.info.ssid = message.args[0];\n this.info.password = message.args[1];\n this.info.hostip = message.args[2];\n\n this.emit('settings', {\n ssid: this.info.ssid,\n password: this.info.password,\n hostip: this.info.hostip,\n });\n }\n });\n\n ////////// catch osc errors and simply ignore them\n this.serialPort.on('error', (err) => { console.log('osc error : ' + err.message); });\n\n ////////// say hello, set ports and config, get wifi credentials \n this._serialRpc('/hello')\n .then((hello) => {\n console.log(hello);\n if (hello[0] === 'movuino') {\n this.info.name = hello[1];\n this.info.wifiState = hello[2];\n this.info.movuinoip = hello[3];\n this.info.movuinoid = hello[4];\n this.info.firmwareVersion = hello[5];\n return this._serialRpc('/ports/get');\n } \n })\n .then((ports) => {\n const inputPort = config.movuinoOscServer.remotePort;\n const outputPort = config.movuinoOscServer.localPort;\n\n if (ports[0] !== inputPort || ports[1] !== outputPort) {\n return this._serialRpc('/ports/set', [\n { type: 'i', value: inputPort },\n { type: 'i', value: outputPort },\n ]);\n }\n\n return Promise.resolve();\n })\n .then(() => {\n return this._serialRpc('/range/set', [\n { type: 'i', value: config.movuinoSettings.accelRange }, // +/- 16g // * 9.81 / 16\n { type: 'i', value: config.movuinoSettings.gyroRange }, // +/- 2000 deg/sec // * 36 / 200\n ]);\n })\n .then(() => { return this._serialRpc('/serial/enable', [{ type: 'i', value: 1 }]); })\n .then(() => { return this._serialRpc('/magneto/enable', [{ type: 'i', value: 1 }]); })\n .then(() => { return this._serialRpc('/frameperiod/set', [{ type: 'i', value: 10 }]); })\n .then(() => { return this._serialRpc('/wifi/get'); })\n .then((credentials) => {\n ////////// if everything went well, emit all needed information and resolve\n this.info.ssid = credentials[0];\n this.info.password = credentials[1];\n this.info.hostip = credentials[2];\n\n this.info.serialPortReady = true;\n\n this.emit('settings', {\n ssid: this.info.ssid,\n password: this.info.password,\n hostip: this.info.hostip,\n name: this.info.name\n });\n\n this.emit('state', {\n serialPortReady: this.info.serialPortReady,\n wifiState: this.info.wifiState,\n movuinoip: this.info.movuinoip,\n });\n\n resolve();\n });\n });\n\n this.serialPort.open();\n });\n }", "function uploadAll(){\n\tsftp.load(credential).then(function () {\n\t console.log('\\n --> config success ... ');\n\t \t\n\t \tfs.readdir(__dirname + '/uploads', (err, files) => {\n\t\t files.forEach(file => {\n\t\t //console.log(file);\n\t\t sftp.put(__dirname + '/uploads/' + file, '/Test Backup/NodeTest/' + file).then(function (list) {\n\t\t\t console.log('\\n --> ls success \\n', list);\n\t\t\t fs.appendFile(__dirname + '/results/success.txt', file +'\\n', function (err) {\n\t\t\t\t if (err) throw err;\n\t\t\t\t //console.log('Saved!');\n\t\t\t\t});\n\t\t\t \n\t\t\t }).catch(function (error) {\n\t\t\t console.log('\\n --> ls failed ', error);\n\t\t\t fs.appendFile(__dirname + '/results/failure.txt', file +'\\n', function (err) {\n\t\t\t\t if (err) throw err;\n\t\t\t\t //console.log('Saved!');\n\t\t\t\t});\n\t\t\t });\n\t\t });\n\t\t});\n\t}).catch(function (error) {\n\t console.log('\\n --> error : ', error);\n\t});\n}", "sendProgramSignal() {\n\t\treturn this.send({ command: 'p2' })\n\t\t\t.then(() => {\n\t\t\t\treturn new Promise((res) => setTimeout(() => res(this.send({ command: 'p2' })), 1000));\n\t\t\t})\n\t\t\t.then(() => {\n\t\t\t\treturn new Promise((res) => setTimeout(() => res(this.send({ command: 'up' })), 1000));\n\t\t\t});\n\t}", "function runRCloneCmd(destination, callback) {\n\n\t\t// Set args for destination\n\t\tvar args = ['-P', '--stats-one-line', 'copy', appDir]\n\t\tif (destination == 'google') {\n\t\t\targs.push('GooglePhotos:album/');\n\t\t} else {\n\t\t\targs.push('S3:test-marius-123');\n\t\t}\n\n\t\t// Start process\n var child = child_process.spawn('/usr/local/bin/rclone', args, {\n encoding: 'utf8',\n shell: true\n });\n\n child.on('error', (error) => {\n\t\t\t logger.error(error);\n });\n\n child.stdout.setEncoding('utf8');\n child.stdout.on('data', (data) => {\n\t\t\t data = data.toString();\n logger.debug(data);\n\n\t\t\t\t// Update status\n\t\t\t\tif (destination == 'google') {\n ipcRenderer.send('op-status-update-google', data.split(',')[1])\n var elem = document.getElementById(\"googleProgressBar\");\n elem.style.width = data.split(',')[1];\n\t\t\t\t} else {\n ipcRenderer.send('op-status-update-s3', data.split(',')[1])\n var elem = document.getElementById(\"s3ProgressBar\");\n elem.style.width = data.split(',')[1];\n\t\t\t\t}\n });\n\n child.stderr.setEncoding('utf8');\n child.stderr.on('data', (data) => {\n // Return some data to the renderer process with the mainprocess-response ID\n mainWindow.webContents.send('mainprocess-response', data);\n logger.debug(data.toString());\n });\n\n child.on('close', (code) => {\n if (code == 0) {\n\t\t\t\t\t\tlogger.info('[RClone] Upload complete');\n\t\t\t\t\t\tif (destination == 'google') {\n ipcRenderer.send('op-status-update-google', '100%')\n var elem = document.getElementById(\"googleProgressBar\");\n elem.style.width = '100%';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t ipcRenderer.send('op-status-update-s3', '100%')\n var elem = document.getElementById(\"s3ProgressBar\");\n elem.style.width = '100%';\n\t\t\t\t\t\t}\n\n\t\t\t } else {\n\t\t\t\t\t\tlogger.error('[RClone] Process ended with unknown status code: ', code);\n }\n });\n\n if (typeof callback === 'function')\n callback();\n}", "function myAction(params) {\n\n return new Promise(function(resolve, reject) {\n console.log('Connecting to MySQL database');\n var mysql = require('promise-mysql');\n var connection;\n mysql.createConnection({\n host: params.MYSQL_HOSTNAME,\n user: params.MYSQL_USERNAME,\n password: params.MYSQL_PASSWORD,\n database: params.MYSQL_DATABASE\n }).then(function(conn) {\n connection = conn;\n console.log('Querying');\n/**\n * var queryText = 'SELECT * FROM cats WHERE id=?';\n * var result = connection.query(queryText, [params.id]);\n */\n var queryText = ' SELECT DISTINCT ' +\n ' APP.NAME AS app_name, ' +\n ' COMP.NAME AS comp_name, ' +\n ' COMP_ENV.ENVIROMENT_ID, ' +\n ' APP.LAST_UPDATED_BY AS app_last_updated_by, ' +\n ' COMP_ENV.LAST_UPDATED_DATE AS last_updated_date, ' +\n ' COMP.developmode AS developmode, ' +\n ' COMP.SUB_APP_TYPE AS subapp_type, ' +\n ' ENV.ENV_ALIAS AS env_alias, ' +\n/**\n\" decode (COMP_ENV.apply_type, \" +\n \" 'grey', \" +\n \" 'Grey', \" +\n \" 'dr', \" +\n \" 'Dr', \" +\n \" 'grey_dr', \" +\n \" 'Grey_Dr', \" +\n \" 'Normal') \" +\n \" AS apply_type, \" +\n*/\n ' APP.ID AS app_id, ' +\n ' PROT.NAME AS profile_name, ' +\n ' PROT.ID AS profileid, ' +\n/** \n \" TO_CHAR (COMP_ENV.CREATED_DATE, 'yyyy-MM-dd HH24:mi:ss') \" +\n*/\n \" date_format (COMP_ENV.CREATED_DATE, '%Y-%m-%d') \" +\n ' AS apply_created_date, ' +\n\n\n ' COMP_ENV.ID AS comp_id, ' +\n ' VM.HOSTNAME AS hostname, ' +\n ' VM.BUSINESSIP AS businessip, ' +\n ' COMP_ENV.RSC_TYPE AS rsc_type, ' +\n ' COMP.CONTEXT AS context ' +\n/** ' CASE lower ( ' +\n ' xmlcast ( ' +\n ' xmlquery (\\'$xml/profile/product/text()\\' ' +\n ' PASSING prot.property AS \\'xml\\') AS VARCHAR (2000))) ' +\n ' WHEN \\'tomcat\\' ' +\n ' THEN ' +\n ' xmlcast ( ' +\n ' xmlquery (\\'$xml/profile/defaultPort/text()\\' ' +\n ' PASSING prot.property AS \\'xml\\') AS VARCHAR (2000)) ' +\n ' WHEN \\'was\\' ' +\n ' THEN ' +\n ' xmlcast ( ' +\n ' xmlquery (\\'$xml/profile/wasDefaultPort/text()\\' ' +\n ' PASSING prot.property AS \\'xml\\') AS VARCHAR (2000)) ' +\n ' ELSE ' +\n ' prot.ports ' +\n ' END ' +\n ' AS ports ' +\n*/\n ' FROM COMP_ENVIROMENT_T COMP_ENV ' +\n ' INNER JOIN APPLICATION_T APP ON APP.ID = COMP_ENV.APPLICATION_ID ' +\n ' INNER JOIN COMPONENT_T COMP ON COMP.ID = COMP_ENV.COMPONENT_ID ' +\n ' INNER JOIN ENVIROMENT_T ENV ON ENV.ID = COMP_ENV.ENVIROMENT_ID ' +\n ' LEFT JOIN COMPONENT_PROFILE_T COMP_PROFILE ' +\n ' ON COMP_ENV.ID = COMP_PROFILE.COMP_ENVIROMENT_ID ' +\n ' LEFT JOIN PROFILE_T PROT ON PROT.ID = COMP_PROFILE.PROFILE_ID ' +\n ' LEFT JOIN VIRTUAL_MACHINE_T VM ON VM.ID = PROT.VM_ID ' +\n' ORDER BY APP.NAME, ' +\n ' COMP.NAME, ' +\n ' ENV.ENV_ALIAS, ' +\n ' VM.HOSTNAME ' +\n' limit 10 '\n;\n/**\nqueryText = 'select * from COMP_ENVIROMENT_T limit 10';\n*/ \n var result = connection.query(queryText);\n connection.end(); \n return result;\n }).then(function(result) {\n console.log(result);\n if (result) {\n resolve({\n statusCode: 200,\n headers: {\n 'Content-Type': 'application/json'\n },\n body: result\n });\n } else {\n reject({\n headers: {\n 'Content-Type': 'application/json'\n },\n statusCode: 404,\n body: {\n error: \"Not found.\"\n }\n });\n }\n }).catch(function(error) {\n if (connection && connection.end) connection.end();\n console.log(error);\n reject({\n headers: {\n 'Content-Type': 'application/json'\n },\n statusCode: 500,\n body: {\n error: \"Error.\"\n }\n });\n });\n });\n\n}", "singleUpload({file, path, nameFile, idObjeto, model}){\n return new Promise((resolve, reject)=>{\n try {\n this.defaultFolder(env.files.uploadsPath + path)\n let extension = this.fileExtension(file.type.split('/')[1])\n let name = nameFile+'.'+extension;\n let path_origem = file.path;\n let path_destino = env.files.uploadsPath + path + name; \n mv(path_origem, path_destino, async function(err){ \n if(!err){ \n Upload.find({idObjeto: idObjeto}).then((doc)=>{\n if(doc.length > 0){\n Upload.findOneAndUpdate({idObjeto: idObjeto}, {\n model: model.collection.name,\n idObjeto: idObjeto,\n local: path_destino,\n nome: name,\n extensao: extension,\n url: env.files.uploadsUrl + path + name\n })\n .then(()=> resolve(env.files.uploadsUrl + path + name))\n .catch(reject)\n }else{\n new Upload({\n model: model.collection.name,\n idObjeto: idObjeto,\n local: path_destino,\n nome: name,\n extensao: extension,\n url: env.files.uploadsUrl + path + name\n }).save().then(()=> resolve(env.files.uploadsUrl + path + name))\n .catch(reject)\n }\n }) \n }else{\n reject({name: \"upload\", message: err})\n }\n })\n } catch (error) {\n reject({name: \"upload\", message: error})\n }\n })\n }", "async putVersionOpts(pathext) {\n const ver = await this.version(pathext);\n return Object.assign({ method: 'PUT' }, ver);\n }", "async function copy() {\n await makeDir('build');\n await Promise.all([\n writeFile(\n 'build/package.json',\n JSON.stringify(\n {\n private: true,\n engines: pkg.engines,\n dependencies: pkg.dependencies,\n scripts: {\n start: 'node server.js',\n },\n },\n null,\n 2,\n ),\n ),\n copyFile('LICENSE.txt', 'build/LICENSE.txt'),\n copyFile('yarn.lock', 'build/yarn.lock'),\n copyDir('public', 'build/public'),\n copyDir('gcp', 'build/gcp'),\n ]);\n}", "onFork() {\r\n const id = this.props.params.preset;\r\n let preset;\r\n\r\n chrome.p.storage.local\r\n .get('preset_' + id)\r\n .then(res => {\r\n preset = res['preset_' + id];\r\n preset.id = Date.now();\r\n return savePreset(preset);\r\n })\r\n .then(() => (location.hash = '#/presets/' + preset.id));\r\n }", "function main(msg) {\n var hostToPing = msg.payload;\n console.log('Pinging to ' + hostToPing);\n\n var spawn = require('child_process').exec;\n var promise = new Promise(function(resolve, reject) {\n var child = spawn('ping -c 3 ' + hostToPing);\n\n var tmp = {stdout: \"\", stderr: \"\", code: 0};\n\n child.stdout.on('data', function (data) {\n tmp.stdout = tmp.stdout + data;\n });\n\n child.stderr.on('data', function (data) {\n tmp.stderr = tmp.stderr + data;\n });\n\n child.on('close', function (code) {\n tmp.code = code;\n console.log('code', tmp.code);\n console.log('stdout', tmp.stdout);\n console.log('stderr', tmp.stderr);\n resolve(tmp);\n });\n });\n\n return promise;\n}", "async deploy() {\n const { url } = await this.provider.faas.createHttpFunction(this.params)\n this.url = url\n return this\n }", "connect(){\n return new Promise( ( resolve, reject ) => {\n this.sql.connect( ( err, suc ) => {\n if ( err )\n return reject( err )\n resolve( suc )\n } )\n } )\n }", "function gitMvAsync(src, dst) {\n var cmd = 'git mv ' + src + ' ' + dst;\n execAsync(cmd)\n .then(({stdout, stderr}) => {\n console.log(`stdout: ${stdout}`);\n console.log(`stderr: ${stderr}`);\n })\n .catch(error => {\n console.error(`exec error: ${error}`);\n throw error;\n }); \n}", "function deploy(func, args, save_path, cb){\n\tconsole.log(\"[obc-js] Deploying Chaincode - Start\");\n\tconsole.log(\"\\n\\n\\t Waiting...\");\t\t\t\t\t\t\t\t\t\t//this can take awhile\n\tvar options = {path: '/devops/deploy'};\n\tvar body = \t{\n\t\t\t\t\ttype: \"GOLANG\",\n\t\t\t\t\tchaincodeID: {\n\t\t\t\t\t\t\tpath: chaincode.details.git_url\n\t\t\t\t\t\t},\n\t\t\t\t\tctorMsg:{\n\t\t\t\t\t\t\t\"function\": func,\n\t\t\t\t\t\t\t\"args\": args\n\t\t\t\t\t}\n\t\t\t\t};\n\toptions.success = function(statusCode, data){\n\t\tconsole.log(\"\\n\\n\\t deploy success [wait 1 more minute]\");\n\t\tchaincode.details.deployed_name = data.message;\n\t\tobc.prototype.save(tempDirectory);\t\t\t\t\t\t\t\t\t//save it so we remember we have deployed\n\t\tif(save_path != null) obc.prototype.save(save_path);\t\t\t\t//user wants the updated file somewhere\n\t\tif(cb){\n\t\t\tsetTimeout(function(){\n\t\t\t\tconsole.log(\"[obc-js] Deploying Chaincode - Complete\");\n\t\t\t\tcb(null, data);\n\t\t\t}, 60000);\t\t\t\t\t\t\t\t\t\t\t\t\t\t//wait extra long, not always ready yet\n\t\t}\n\t};\n\toptions.failure = function(statusCode, e){\n\t\tconsole.log(\"[obc-js] deploy - failure:\", statusCode);\n\t\tif(cb) cb(eFmt('http error', statusCode, e), null);\n\t};\n\trest.post(options, '', body);\n}", "function fileCopy() {\n rl.question(\n chalk.bold.blue('Enter Location of <SP HOME> directory : '),\n (location) => {\n fs.exists(location + WIDGET_FOLDER, (exist) => {\n if (exist) {\n fs.copy(BUILT_DIRECTORY, location + WIDGETS_LOCATION)\n .then(() => {\n console.log(\n chalk.bold.green('\\nCOPPIED SUCCESSFULLY !!! \\n\\n\\tFROM\\t:'),\n chalk.bold.yellow(WIDGETS_LOCATION),\n chalk.bold.green('\\n\\tTO\\t:'),\n chalk.bold.yellow(location + WIDGETS_LOCATION, '\\n'),\n );\n\n rl.close();\n })\n .catch((error) => {\n console.log(chalk.bold.green('Copy failure !!!!', error));\n });\n } else {\n chalk.bold.blue('Enter Location of <SP HOME> directory : ');\n rl.question(\n chalk.bold.red(\n `Location : ${location} is not a valid destination if you want to retry enter 'Y' : `,\n ),\n (userFeedback) => {\n if (['y', 'Y', 'Yes', 'YES'].includes(userFeedback)) {\n fileCopy();\n } else {\n rl.close();\n }\n },\n );\n }\n });\n },\n );\n}", "installBchApi () {\n shell.cd(`${__dirname.toString()}/../uut`)\n shell.exec('git clone https://github.com/Permissionless-Software-Foundation/bch-api')\n shell.cd('bch-api')\n shell.exec(`npm install > ${__dirname.toString()}/../html/logs/bch-api/install.txt`)\n }", "async function updateRemote(deployInfo) {\n console.log(\"Updating remote magento server\");\n\n if (\n shell.exec(\n `ssh ${deployInfo.host} \"cd ${path.resolve(\n deployInfo.dest,\n \".magento\"\n )}; bin/magento setup:upgrade; bin/magento cache:flush\"`\n ).code !== 0\n ) {\n console.error(\n \"Was not able to upgrade the remote magento server to reflect the deploy\"\n );\n }\n}", "function deployRpc(options) {\n options = Object.assign({}, options);\n options.headers = Object.assign({}, options.headers || {});\n if (options.headers.cookie) {\n throw new Error(\"sorry, can't combine cookie headers yet\");\n }\n options.qs = Object.assign(\n {},\n options.qs,\n { capabilities: CAPABILITIES.slice() },\n options.deployWithTokenProps || {}\n );\n // If we are waiting for deploy, we let Galaxy know so it can\n // use that information to send us the right deploy message response.\n if (options.waitForDeploy) {\n options.qs.capabilities.push('willPollVersionStatus');\n }\n\n const deployURLBase = getDeployURL(options.site).await();\n\n if (options.printDeployURL) {\n Console.info(\"Talking to Galaxy servers at \" + deployURLBase);\n }\n\n let operand = '';\n if (options.operand) {\n operand = `/${options.operand}`;\n } else if (options.site) {\n operand = `/${options.site}`;\n }\n\n // XXX: Reintroduce progress for upload\n try {\n var result = request(Object.assign(options, {\n url: deployURLBase + '/' + options.operation +\n operand,\n method: options.method || 'GET',\n bodyStream: options.bodyStream,\n useAuthHeader: true,\n encoding: 'utf8' // Hack, but good enough for the deploy server..\n }));\n } catch (e) {\n return {\n statusCode: null,\n errorMessage: \"Connection error (\" + e.message + \")\"\n };\n }\n\n var response = result.response;\n var body = result.body;\n var ret = { statusCode: response.statusCode };\n\n if (response.statusCode !== 200) {\n if (body.length > 0) {\n ret.errorMessage = body;\n } else {\n ret.errorMessage = \"Server error \" + response.statusCode +\n \" (please try again later)\";\n }\n return ret;\n }\n\n var contentType = response.headers[\"content-type\"] || '';\n if (contentType === \"application/json; charset=utf-8\") {\n try {\n ret.payload = JSON.parse(body);\n } catch (e) {\n ret.errorMessage =\n \"Server error (please try again later)\\n\"\n + \"Invalid JSON: \" + body;\n return ret;\n }\n } else if (contentType === \"text/plain; charset=utf-8\") {\n ret.message = body;\n }\n\n const hasAllExpectedKeys =\n (options.expectPayload || [])\n .map(key => ret.payload && hasOwn.call(ret.payload, key))\n .every(x => x);\n\n if ((options.expectPayload && ! hasOwn.call(ret, 'payload')) ||\n (options.expectMessage && ! hasOwn.call(ret, 'message')) ||\n ! hasAllExpectedKeys) {\n delete ret.payload;\n delete ret.message;\n\n ret.errorMessage = \"Server error (please try again later)\\n\" +\n \"Response missing expected keys.\";\n }\n\n return ret;\n}", "copyFiles(options) {\n let {\n files,\n kitQuestions,\n folderPath,\n kitPath,\n kit,\n ver,\n isSteamerKit,\n projectName,\n kitConfig\n } = options;\n // 脚手架相关配置问题\n let prompt = inquirer.createPromptModule();\n prompt(kitQuestions)\n .then(answers => {\n\n answers = Object.assign({}, answers, {\n projectName\n });\n\n // 复制文件前的自定义行为\n if (kitConfig.beforeInstallCopy && _.isFunction(kitConfig.beforeInstallCopy)) {\n kitConfig.beforeInstallCopy.bind(this)(answers, folderPath);\n }\n\n files = files.filter(item => {\n return !this.ignoreFiles.includes(item);\n });\n\n files.forEach(item => {\n let srcFiles = path.join(kitPath, item),\n destFile = path.join(folderPath, item);\n\n if (this.fs.existsSync(srcFiles)) {\n this.fs.copySync(srcFiles, destFile);\n }\n });\n\n if (answers.webserver) {\n this.fs.ensureFileSync(\n path.join(folderPath, \"config/steamer.config.js\")\n );\n this.fs.writeFileSync(\n path.join(folderPath, \"config/steamer.config.js\"),\n \"module.exports = \" + JSON.stringify(answers, null, 4)\n );\n }\n\n // 复制文件后的自定义行为\n if (kitConfig.afterInstallCopy && _.isFunction(kitConfig.afterInstallCopy)) {\n kitConfig.afterInstallCopy.bind(this)(answers, folderPath);\n }\n\n if (isSteamerKit) {\n this.createPluginConfig(\n {\n kit: kit,\n version: ver\n },\n folderPath\n );\n }\n\n // 替换项目名称\n if (!!projectName) {\n const oldPkgJson = this.getPkgJson(folderPath);\n let pkgJson = _.merge({}, oldPkgJson, {\n name: projectName\n });\n this.fs.writeFileSync(\n path.join(folderPath, \"package.json\"),\n JSON.stringify(pkgJson, null, 4),\n \"utf-8\"\n );\n }\n // \bbeforeInstall 自定义行为\n if (kitConfig.beforeInstallDep && _.isFunction(kitConfig.beforeInstallDep)) {\n kitConfig.beforeInstallDep.bind(this)(answers, folderPath);\n }\n\n // 安装项目node_modules包\n this.spawn.sync(this.config.NPM, [\"install\"], {\n stdio: \"inherit\",\n cwd: folderPath\n });\n\n // afterInstall 自定义行为\n if (kitConfig.afterInstallDep && _.isFunction(kitConfig.afterInstallDep)) {\n kitConfig.afterInstallDep.bind(this)(answers, folderPath);\n }\n\n this.success(\n `The project is initiated success in ${folderPath}`\n );\n })\n .catch(e => {\n this.error(e.stack);\n });\n }", "function kIPC(vm, uri, method, args, onok, onerr, timeout) {\n \n var rq = {\n v: 1, // protocol version\n id: __jn_stacks.newId()+(new Date().getTime())+\"\", // dunno why at init time the ID counter is not enough and can interfere with something else :\\\n uri: uri,\n terminal_id: \"~\", // always 'myself' for local requests - remote set at hubConnection\n/*\n object_type: vm.TypeURI, // TODO DOC decide on these names! mb. caller_type, caller_uri, etc.?\n object_security: vm.SecurityURI,\n object_uri: vm.uri, // named request\n*/\n caller_type: vm.TypeURI, // TODO DOC decide on these names! mb. caller_type, caller_uri, etc.?\n caller_security: vm.SecurityURI,\n caller_uri: vm.uri, // named request\n\n method: method,\n args: args,\n \n timeout: parseInt((timeout || MAX_RQ_TIME)) // timeout to drop\n };\n \n //var TIMEOUT_OK = {v: false};\n \n var afterSign = function () {\n if (vm.security.validateResponse) {\n var myonok = function (rs) {\n // validate response, if appropriate\n // TODO: these are currently unusable for in-stack execution; need to set SecurityError instead\n // maybe do not validate response here??\n \n var cbo = function (vr) {\n if(vr) {\n //TIMEOUT_OK.v = true;\n onok(rs); \n } else {\n onerr({id: rq.id, status: \"EPERM\", result: \"response validation failed\"}); // this can actually be parsed as permission error and raise SecurityError..\n }\n };\n \n var cbe = function (vr) {\n onerr({id: rq.id, status: \"EEXCP\", result: \"validateResponse failed with exception: \"+vr});\n };\n \n vm.execf_thread(vm.security.validateResponse, [rq], cbo, cbe, undefined, vm.security); \n };\n } else {\n //var myonok = function (rs) { TIMEOUT_OK.v = true; onok(rs); };\n var myonok = onok;\n }\n\n var lURI = uri.split(\"/\");\n if(lURI[0] == \"\") { // means this is root HUB request\n if(vm.DEBUG) vm.ErrorConsole.log(\"in kIPC... request for HUB\");\n\n // DOC if no onerror and only onok: call onok always -> as a standard kernel programming practice\n // TODO: introduce timeout to requests in case the request gets never response\n \n hubConnection.send(rq); \n if(uri.indexOf(\",\") > -1) {\n onok({id: rq.id, status: \"OK\", result: null});\n } else {\n __eos_requests[rq.id] = {request: rq, onok: myonok, onerror: onerr}; \n }\n } else { // TODO: URI caching\n try { // TODO get rid of this.. later\n // cache\n if(__eos_objects[uri]) var dest = __eos_objects[uri];\n else var dest = vm.getChild(lURI); // should never fail...\n } catch (e) {\n onerr({id: rq.id, status: \"EEXCP\", result: \"FAILED TO EXECUTE GETCHILD: \"+e+\" Line:\"+e.lineNumber+\" File:\"+e.fileName});\n return;\n }\n if(dest == null) {\n \n onerr({id: rq.id, status: \"EEXCP\", result: \"object not found by URI\"});\n return;\n }\n if(typeof(dest)==\"string\") { // means we're redirect \n if(vm.DEBUG) vm.ErrorConsole.log(\"in kIPC... again kIPC!\");\n // TODO optimize this! this will run signRequest at least twice; and pollute heap\n kIPC(vm, dest, method, args, onok, onerr); // we're taking advantage of the 'GIL' in js engine\n } else { // means it is a VM instance, so execute the request\n try {\n dest.execIPC(rq, myonok, onerr); // XXX parse results?? if YES -> change wakeObject!! \n } catch (e) {\n if(window.console) console.log(\"in kIPC - execIPC error:: \" + e);\n }\n }\n }\n \n if(typeof(timeout) == \"number\") {\n var tmf = function () {\n //if(TIMEOUT_OK.v) return;\n onerr({id: rq.id, status: \"EEXCP\", result: \"TIMEOUT\"});\n //hubConnection.abort(rq.id); // fail silently?? or do not abort??\n };\n setTimeout(tmf, timeout); // document that timeout is milliseconds\n }\n \n };\n\n if (vm.security.signRequest) {\n // do somehow validate request\n var onSok = function (res){\n if(res === true) { // XXX DOC the signRequest should modify the rq object itself and it should return true\n afterSign();\n } else {\n onerr({id: rq.id, status: \"EPERM\", result: (res ? res : \"signRequest refused to sign request\")});\n }\n };\n \n var onSerr = function (exc) {\n onerr({id: rq.id, status: \"EEXCP\", result: \"signRequest failed with exception: \"+exc});\n };\n vm.execf_thread(vm.security.signRequest, [rq], onSok, onSerr, undefined, vm.security); \n } else {\n afterSign();\n }\n\n}", "async function BackupDB()\n{\n //var data = await httpRequest('GET', usr_data_url, '');\n var response = httpRequest('PUT', db_url, db);\n console.log(\"Backing DB to cloud\");\n}", "async function promoteToStable() {\n console.log('Getting repo root location.');\n const res = await exec('git rev-parse --show-toplevel');\n const repoRoot = res.stdout.trim('\\n');\n\n console.log('Pushing release to local stable branch.');\n return exec(`git push --follow-tags ${repoRoot} master:stable`)\n}", "go() {\n return new Promise(async (resolve, reject) => {\n try {\n let commands = [wcCommands.go()];\n\n debug('Executing Go Command');\n\n let response = this.execute(commands);\n\n resolve(response);\n } catch (err) {\n reject(err);\n }\n });\n }", "cloneTag(options) {\n let { repo, kitName, localPath, tag } = options;\n\n this.fs.ensureDirSync(localPath);\n\n return new Promise((resolve, reject) => {\n this.git(localPath)\n .silent(true)\n .exec(() => {\n this.spinner.start();\n this.spinner.color = \"cyan\";\n this.spinner.text = `installing ${kitName}`;\n })\n .exec(() => {\n let isGitFolderExists = this.fs.existsSync(\n path.join(localPath, \".git\")\n );\n\n if (!isGitFolderExists) {\n this.spawn.sync(\"git\", [\"init\"], { cwd: localPath });\n this.spawn.sync(\"git\", [\"remote\", \"add\", \"origin\", repo], {\n cwd: localPath\n });\n }\n })\n .fetch(\n [\n \"origin\",\n `refs/tags/${tag}:refs/tags/${tag}`,\n \"--depth=1\"\n ],\n err => {\n if (err) {\n this.spinFail(kitName, err);\n reject(err);\n return;\n }\n let version = this.getVersion(tag);\n this.git(localPath)\n .silent(true)\n .branch([`${version}`, `${tag}`], err => {\n err && this.spinFail(kitName, err);\n if (err) {\n reject(err);\n }\n })\n .checkout(`${version}`, () => {\n this.spinSuccess(\n `${kitName}@${version} installed`\n );\n let pkgJson = this.getPkgJson(localPath),\n versions = this.addVersion(\n this.kitOptions.list[kitName].versions,\n pkgJson.version\n );\n\n this.kitOptions.list[kitName] = this._.merge(\n {},\n this.kitOptions.list[kitName],\n {\n description: pkgJson.description,\n currentVersion: pkgJson.version,\n latestVersion: versions[0],\n versions: versions\n }\n );\n resolve();\n });\n }\n );\n });\n }", "function sendFile(cloudURL, file) {\n console.log(\"Trying to send file to \" + cloudURL);\n var promise = new Promise(getBuffer(file));\n // Wait for promise to be resolved, or log error.\n promise.then(function (data) {\n // Here you can pass the bytes to another function.\n console.log(data);\n\n var xmlhttp = new XMLHttpRequest();\n xmlhttp.open(\"PUT\", cloudURL, true);\n xmlhttp.onload = function (oEvent) {\n // Uploaded.\n console.log(\"Request status: \" + xmlhttp.status);\n };\n xmlhttp.send(data);\n\n\n }).catch(function (err) {\n console.log('Error: ', err);\n });\n}", "function transferProjectToRemote(failed, successful) {\n\tconsole.log(\"##Xfering files from localhost to remote repo-temp folder.\");\n\treturn ssh.putDirectory(__dirname + '', repoNameTemp, {\n\t\trecursive: true,\n\t\tconcurrency: 1,\n\t\tvalidate: function(itemPath) {\n\t\t\tconst baseName = path.basename(itemPath)\n\t\t\treturn baseName.substr(0, 1) !== '.' // do not allow dot files\n\t\t\t\t&& baseName !== nodeModulesDir // do not allow node_modules\n\t\t\t\t&& baseName !== 'deploy.js' // this pgm\n\t\t\t\t&& baseName !== 'deploy.sh' // Don't send shell script\n\t\t\t\t&& baseName !== 'data' // do not allow data dir\n\t\t},\n\t\ttick: function(localPath, remotePath, error) {\n\t\t\tif (error) {\n\t\t\tfailed.push(localPath)\n\t\t\tconsole.log(\"failed.push: \" + localPath)\n\t\t\t} else {\n\t\t\tsuccessful.push(localPath)\n\t\t\tconsole.log(\"successful.push: \" + localPath)\n\t\t\t}\n\t\t}\n\t})\n}", "async function copyFile() {\n const data = await readFile(); // if there is any error here, the Promise will reject with the error\n await writeFile(data); // if there is any error here, the Promise will reject with the error\n console.log('Copying done!');\n // an async function implicitly returns the Promise object\n return DESTINATION; // Promise will resolve with the DESTINATION\n}", "async syncToRemote() {\n __WEBPACK_IMPORTED_MODULE_3__utility_OfflineUtility__[\"a\" /* default */].syncToRemote();\n }", "_checkAndGenerateSSHKeys() {\n var file = config('agent:vm:ssh_key');\n return fsAsync.exists(file).then((exist) => {\n if (!exist) {\n this.info('configure.generating_key');\n var script = `\n set -x;\n ssh-keygen -t rsa -f ${file} -N ''; result=$?;\n set +x;\n echo \"\";\n exit $result;\n `;\n return this.execSh(script).then((code) => {\n if (code !== 0) {\n throw new DependencyError('ssh_keygen');\n } else {\n return code;\n }\n });\n }\n });\n }", "async function main() {\n const program = new Command();\n program.parse(process.argv);\n await fs.mkdir(\"build\", { recursive: true });\n await fs.writeFile(\n \"build/config.json\",\n JSON.stringify(await getDeployConfig(), null, 2) + \"\\n\"\n );\n console.log(\"wrote build/config.json\");\n process.exit(0);\n}", "static disposer(config) {\n return Promise.resolve(new Client(config)).disposer(client => client.quit());\n }", "run() {\n return new Promise((resolve) => {\n const owners = process.env.OWNER.split(\",\");\n if (!owners.includes(this.message.author.id)) return \"Only the bot owner can reload Lavalink!\";\n this.client.sendChannelTyping(this.message.channel.id);\n this.ipc.broadcast(\"soundreload\");\n this.ipc.register(\"soundReloadSuccess\", (msg) => {\n this.ipc.unregister(\"soundReloadSuccess\");\n this.ipc.unregister(\"soundReloadFail\");\n resolve(`Successfully connected to ${msg.length} Lavalink node(s).`);\n });\n this.ipc.register(\"soundReloadFail\", () => {\n this.ipc.unregister(\"soundReloadSuccess\");\n this.ipc.unregister(\"soundReloadFail\");\n resolve(\"I couldn't connect to any Lavalink nodes!\");\n });\n });\n }", "async function run() {\n try {\n await copyFile('./LICENSE');\n await copyFile('./CHANGELOG.md');\n await copyFile('./README.md');\n await copyFile('./src/index.js', 'index.es.js');\n await copyPackageJson();\n } catch (error) {\n console.error('Copy failed', error);\n }\n}", "getCluster(params) {\n //params.region\n //params.deployment\n //params.cluster\n console.log(\"[DataProvider][getCluster] begin\")\n return Promise.timeout(1)\n .then(() => {\n console.log(\"[DataProvider][getCluster] inside begin\")\n if (params.cluster == 'hello') {\n return {\n name: params.cluster,\n state: \"deploy\",\n status: \"processing\",\n actions: [{\n name: 'build'\n }, {\n name: 'push'\n }, {\n name: 'deploy'\n }]\n };\n }\n return {\n name: params.cluster,\n state: \"undeploy\",\n status: \"completed\",\n actions: [{\n name: 'build'\n }, {\n name: 'push'\n }, {\n name: 'deploy'\n }]\n };\n });\n\n }", "async save() {\n const [lock] = await Promise.all([\n this._provider.acquireLock(),\n this.ready\n ]);\n let promise;\n promise = this._save();\n // if save completed successfully, we set the initialized content in the rtc server.\n promise = promise.then(() => {\n this._provider.putInitializedState();\n });\n const finally_ = () => {\n this._provider.releaseLock(lock);\n };\n promise.then(finally_, finally_);\n return await promise;\n }", "async function comprar(preference) {\n try {\n //preference es un objeto con datos de la compra\n //comprar -- compraModel\n return await mp.preferences.create(preference) \n } catch (error) {\n throw error;\n }\n}", "function src(distPath) {\n return new Promise((resolve, reject) => {\n //\n prepareDist(distPath)\n .then(() => {\n const srcFolder = paths.srcFolderPath();\n fs.readdir(srcFolder, (error, items) => {\n if (error) {\n reject(error);\n }\n // for each item in srcFolder\n var promises = [];\n items.forEach(item => {\n if (!utils.isIgnoreFile(srcFolder + '/' + item)) {\n promises.push(\n ncp(srcFolder + '/' + item, distPath + '/' + item, error => {\n if (error) {\n console.error(error);\n return reject(error);\n }\n resolve();\n })\n );\n }\n });\n\n // copy top-level README to ./dist/npm\n promises.push(\n ncp(\n readmePath,\n `${distPath}/README.md`,\n error => {\n if (error) {\n console.error(error);\n return reject(error);\n }\n },\n resolve()\n )\n );\n\n // copy top-level CHANGELOG to ./dist/npm\n promises.push(\n ncp(\n changeLogPath,\n `${distPath}/CHANGELOG.md`,\n error => {\n if (error) {\n console.error(error);\n return reject(error);\n }\n },\n resolve()\n )\n );\n\n Promise.all(promises)\n .then(() => {\n resolve();\n })\n .catch(error => {\n reject(error);\n });\n });\n })\n\n .catch(error => {\n return reject(error);\n });\n });\n}", "async function comprar(preference) {\n try {\n return await mp.preferences.create(preference);//metodo de mercado PAgo\n } catch (error) {\n throw error;\n }\n}", "function saveChanges() {\n ctrl.showSuccess = false;\n ctrl.showError = false;\n var url = [\n refstackApiUrl, '/products/', ctrl.version.product_id,\n '/versions/', ctrl.version.id ].join('');\n var content = {'cpid': ctrl.version.cpid};\n $http.put(url, content).success(function() {\n // Update the original version object.\n version.cpid = ctrl.version.cpid;\n ctrl.showSuccess = true;\n }).error(function(error) {\n ctrl.showError = true;\n ctrl.error = error.detail;\n });\n }", "async function copyFileAndUpdate() {\n const toCopyFile = r(copyDir, 'copyFile.js');\n const srcFileDest = r(tSrcDir, 'services/copyFile.service.js');\n const outFile = r(tOutDir, 'services/copyFile.service.js');\n\n await copy(toCopyFile, srcFileDest);\n\n await listenToRestart(execOutput.data.childProcess, 'copyFileAndUpdate');\n\n const copiedSrcFileContent = await readFile(\n srcFileDest,\n 'Failed reading test_space/src/services/copyFile.service.js.',\n );\n\n sm.snap('services:l1:copy:copyFile.service:restart', {\n toCopyFile,\n srcFileDest,\n copiedSrcFileContent,\n });\n\n // Update the the copied file to check that now the rebuild work smooth\n const updatedContent = copiedSrcFileContent.replace(\n 'COPY_FILE_V1',\n 'COPY_FILE_V2',\n );\n\n await writeFile(srcFileDest, updatedContent);\n\n await listenToRestart(execOutput.data.childProcess, 'copyFileAndUpdate-2');\n\n const copyFileOutContent = await readFile(\n srcFileDest,\n 'Failed reading test_space/dist/services/copyFile.service.js.',\n );\n\n sm.snap('services:l1:copy:copyFile.service:update:restart', {\n srcFile: srcFileDest,\n outFile,\n srcContent: copiedSrcFileContent,\n outContent: copyFileOutContent,\n });\n }", "listenCallback (cp) {\n this.check()\n .then(() => {\n if (this.hasDependency()) {\n cp(this.version, this.semver)\n }\n })\n .catch(e => {\n cp(null, this.semver)\n })\n }", "async function prep_staging(branch) {\n await deleteChannel(branch);\n\n let url = await generateBranchDeployUrl(branch);\n\n await setEnv(url);\n\n console.log(`Staging url: ${url}`);\n}", "async function connection()\n{\n\t//First set connection to false\n\tisConnected = false;\n\t//Send a sub/ack request to the controller\n\tclient.publish('sub', key.encrypt('sub'), function (err)\n\t{\n\t\tif (err) throw \"Error Description: \" + err;\n\t});\n\t\n\t//Wait 1 sec for a response\n\tawait sleep(1000);\n\t\n\t//If no ack, disable all inputs to the controller\n\tif (isConnected == false)\n\t{\n\t\tprocess.stdin.pause();\n\t\tconsole.log(\"Awaiting Connection\");\n\t}\n}", "function remote(cmd, quotes = \"'\") {\n res = execSync(`ssh eycost-db ${quotes}${cmd}${quotes}`);\n console.log(res.toString());\n}", "sensorFromCmd(cmd,path){\n cp.exec(cmd,{},(err,stdout) =>{\n this.out(\n stdout.split(\"\\n\").filter(a=>a).map((row) => {\n row = row.split(' ');\n if(row.length === 1) row = [path,row[0]];\n if(path) row[0] = this.spath + '.' + path;\n return row;\n })\n );\n });\n }" ]
[ "0.59213984", "0.57192713", "0.55999565", "0.5506172", "0.548478", "0.5240451", "0.5233683", "0.5205542", "0.5194032", "0.51852715", "0.51653147", "0.5155067", "0.5071846", "0.5069637", "0.5047318", "0.50348073", "0.5028654", "0.5001386", "0.49853018", "0.49519834", "0.49511638", "0.49289295", "0.4923935", "0.490298", "0.4897284", "0.48852217", "0.48848525", "0.48774663", "0.48771632", "0.48758426", "0.4874489", "0.48522452", "0.48491478", "0.48378003", "0.48377457", "0.48281273", "0.48275983", "0.48165375", "0.4789745", "0.47857097", "0.47755274", "0.4756216", "0.474881", "0.47488007", "0.4743517", "0.47421032", "0.47413135", "0.47349194", "0.47336945", "0.47332966", "0.47320032", "0.47283167", "0.47178423", "0.47114226", "0.47073278", "0.4699189", "0.46978515", "0.46977362", "0.46966118", "0.4681468", "0.46807778", "0.46728227", "0.4672763", "0.4672601", "0.4667392", "0.4656585", "0.46541122", "0.4649722", "0.46457562", "0.46441808", "0.46439132", "0.46418762", "0.46395385", "0.46309292", "0.462883", "0.46223125", "0.4620748", "0.4617747", "0.4615545", "0.46098182", "0.46067822", "0.46027845", "0.4601568", "0.46001795", "0.45977476", "0.4578239", "0.45754856", "0.45745832", "0.45731273", "0.45730364", "0.45721662", "0.45634633", "0.45585352", "0.45553005", "0.45516273", "0.45381865", "0.45380056", "0.4537297", "0.45302957", "0.45298618" ]
0.52495
5